From 1cc1f6fd435130e176b3e0e0e34b03ad2a7a6249 Mon Sep 17 00:00:00 2001 From: Krishna Chaitanya Date: Wed, 7 Oct 2026 15:58:07 +0530 Subject: [PATCH 1/2] Add Rejected (declined:) search filter for expenses and expense reports --- src/CONST/index.ts | 2 + .../FilterComponents/ListFilterContent.tsx | 2 + src/hooks/useAdvancedSearchFilters.ts | 2 + src/hooks/useAutocompleteSuggestions.ts | 3 +- src/languages/de.ts | 1 + src/languages/el.ts | 1 + src/languages/en.ts | 1 + src/languages/es.ts | 1 + src/languages/fr.ts | 1 + src/languages/it.ts | 1 + src/languages/ja.ts | 1 + src/languages/nl.ts | 1 + src/languages/pl.ts | 1 + src/languages/pt-BR.ts | 1 + src/languages/zh-hans.ts | 1 + src/libs/SearchAutocompleteUtils.ts | 1 + src/libs/SearchParser/autocompleteParser.js | 1228 +++++++++-------- .../SearchParser/autocompleteParser.peggy | 1 + src/libs/SearchParser/baseRules.peggy | 1 + src/libs/SearchParser/searchParser.js | 1188 ++++++++-------- src/libs/SearchParser/searchParser.peggy | 1 + src/libs/SearchQueryUtils.ts | 3 +- src/libs/SearchUIUtils.ts | 8 +- src/types/form/SearchAdvancedFiltersForm.ts | 10 + tests/unit/Search/SearchQueryUtilsTest.ts | 74 + tests/unit/SearchParserTest.ts | 28 + .../hooks/useAutocompleteSuggestions.test.ts | 15 + 27 files changed, 1392 insertions(+), 1186 deletions(-) diff --git a/src/CONST/index.ts b/src/CONST/index.ts index bde832c72f9f..b6dd8fde42a5 100644 --- a/src/CONST/index.ts +++ b/src/CONST/index.ts @@ -8111,6 +8111,7 @@ const CONST = { ASSIGNEE: 'assignee', REIMBURSABLE: 'reimbursable', BILLABLE: 'billable', + DECLINED: 'declined', POLICY_ID: 'policyID', ACTION: 'action', HAS: 'has', @@ -8195,6 +8196,7 @@ const CONST = { ASSIGNEE: 'assignee', REIMBURSABLE: 'reimbursable', BILLABLE: 'billable', + DECLINED: 'declined', ACTION: 'action', HAS: 'has', PURCHASE_AMOUNT: 'purchase-amount', diff --git a/src/components/Search/FilterComponents/ListFilterContent.tsx b/src/components/Search/FilterComponents/ListFilterContent.tsx index b6c51e39154e..6f0a3a984c39 100644 --- a/src/components/Search/FilterComponents/ListFilterContent.tsx +++ b/src/components/Search/FilterComponents/ListFilterContent.tsx @@ -49,6 +49,7 @@ type ListFilterContentProps = SearchFilterCommonProps & { @@ -250,6 +251,7 @@ function ListFilterContent({ } case CONST.SEARCH.SYNTAX_FILTER_KEYS.BILLABLE: case CONST.SEARCH.SYNTAX_FILTER_KEYS.REIMBURSABLE: + case CONST.SEARCH.SYNTAX_FILTER_KEYS.DECLINED: case CONST.SEARCH.SYNTAX_FILTER_KEYS.TRANSACTION_STATUS: case CONST.SEARCH.SYNTAX_FILTER_KEYS.WITHDRAWAL_TYPE: { const isSingleSelectFilterValue = (v: ListFilterContentProps['value']): v is SingleSelectListFilterContentProps['value'] => { diff --git a/src/hooks/useAdvancedSearchFilters.ts b/src/hooks/useAdvancedSearchFilters.ts index 54ff2aa0531a..880c2656ae58 100644 --- a/src/hooks/useAdvancedSearchFilters.ts +++ b/src/hooks/useAdvancedSearchFilters.ts @@ -42,6 +42,7 @@ const typeFiltersKeys = { CONST.SEARCH.SYNTAX_FILTER_KEYS.ATTENDEE, CONST.SEARCH.SYNTAX_FILTER_KEYS.REIMBURSABLE, CONST.SEARCH.SYNTAX_FILTER_KEYS.BILLABLE, + CONST.SEARCH.SYNTAX_FILTER_KEYS.DECLINED, CONST.SEARCH.SYNTAX_FILTER_KEYS.CARD_ID, CONST.SEARCH.SYNTAX_FILTER_KEYS.BANK_ACCOUNT, CONST.SEARCH.SYNTAX_FILTER_KEYS.FEED, @@ -89,6 +90,7 @@ const typeFiltersKeys = { CONST.SEARCH.SYNTAX_FILTER_KEYS.CURRENCY, CONST.SEARCH.SYNTAX_FILTER_KEYS.EXPORTED_TO, CONST.SEARCH.SYNTAX_FILTER_KEYS.PAID_STATUS, + CONST.SEARCH.SYNTAX_FILTER_KEYS.DECLINED, CONST.SEARCH.SYNTAX_FILTER_KEYS.PAID_BY, CONST.SEARCH.SYNTAX_FILTER_KEYS.TITLE, CONST.SEARCH.SYNTAX_FILTER_KEYS.REPORT_ID, diff --git a/src/hooks/useAutocompleteSuggestions.ts b/src/hooks/useAutocompleteSuggestions.ts index 2bd13293d02d..c7cfa784f7c6 100644 --- a/src/hooks/useAutocompleteSuggestions.ts +++ b/src/hooks/useAutocompleteSuggestions.ts @@ -546,7 +546,8 @@ function useAutocompleteSuggestions({ })); } case CONST.SEARCH.SYNTAX_FILTER_KEYS.REIMBURSABLE: - case CONST.SEARCH.SYNTAX_FILTER_KEYS.BILLABLE: { + case CONST.SEARCH.SYNTAX_FILTER_KEYS.BILLABLE: + case CONST.SEARCH.SYNTAX_FILTER_KEYS.DECLINED: { const filteredValues = BOOLEAN_VALUES.filter((value) => value.includes(autocompleteValue.toLowerCase()) && !alreadyAutocompletedKeys.has(value)).sort(); return filteredValues.map((value) => ({ diff --git a/src/languages/de.ts b/src/languages/de.ts index e1ac70e7b154..72e97b07dd4b 100644 --- a/src/languages/de.ts +++ b/src/languages/de.ts @@ -9952,6 +9952,7 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc posted: 'Gebucht', withdrawn: 'Zurückgezogen', billable: 'Abrechenbar', + rejected: 'Abgelehnt', reimbursable: 'Erstattungsfähig', purchaseCurrency: 'Kaufwährung', sortOrder: { diff --git a/src/languages/el.ts b/src/languages/el.ts index efec389bde0d..922d02d924c4 100644 --- a/src/languages/el.ts +++ b/src/languages/el.ts @@ -10157,6 +10157,7 @@ ${reportName}`, posted: 'Καταχωρισμένο', withdrawn: 'Ανακλήθηκε', billable: 'Χρεώσιμη', + rejected: 'Απορρίφθηκε', reimbursable: 'Επανεντάξιμο', purchaseCurrency: 'Νόμισμα αγοράς', sortOrder: { diff --git a/src/languages/en.ts b/src/languages/en.ts index c323aab09500..152be70c6aa2 100644 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -10204,6 +10204,7 @@ const translations = { createdDate: 'Created date', withdrawn: 'Withdrawn', billable: 'Billable', + rejected: 'Rejected', reimbursable: 'Reimbursable', purchaseCurrency: 'Purchase currency', sortOrder: { diff --git a/src/languages/es.ts b/src/languages/es.ts index 5d22f6494554..a2ceb709a689 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -9804,6 +9804,7 @@ ${reportName}`, posted: 'Contabilización', withdrawn: 'Retirada', billable: 'Facturable', + rejected: 'Rechazado', reimbursable: 'Reembolsable', purchaseCurrency: 'Moneda de compra', sortOrder: { diff --git a/src/languages/fr.ts b/src/languages/fr.ts index bb75b55e623f..935a3ead0314 100644 --- a/src/languages/fr.ts +++ b/src/languages/fr.ts @@ -9975,6 +9975,7 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e posted: 'Publié', withdrawn: 'Retiré', billable: 'Facturable', + rejected: 'Rejeté', reimbursable: 'Remboursable', purchaseCurrency: 'Devise d’achat', sortOrder: { diff --git a/src/languages/it.ts b/src/languages/it.ts index 6d6fd5d0dc0a..5a8109cfb182 100644 --- a/src/languages/it.ts +++ b/src/languages/it.ts @@ -9905,6 +9905,7 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`, posted: 'Pubblicato', withdrawn: 'Ritirata', billable: 'Fatturabile', + rejected: 'Rifiutato', reimbursable: 'Rimborsabile', purchaseCurrency: 'Valuta di acquisto', sortOrder: { diff --git a/src/languages/ja.ts b/src/languages/ja.ts index dedd9c28c5c9..20c34e7b9ea3 100644 --- a/src/languages/ja.ts +++ b/src/languages/ja.ts @@ -9766,6 +9766,7 @@ ${reportName}`, posted: '投稿日', withdrawn: '取下済み', billable: '請求可能', + rejected: '却下済み', reimbursable: '払い戻し対象', purchaseCurrency: '購入通貨', sortOrder: { diff --git a/src/languages/nl.ts b/src/languages/nl.ts index 2edb1f2c1f58..a71c88280d93 100644 --- a/src/languages/nl.ts +++ b/src/languages/nl.ts @@ -9872,6 +9872,7 @@ er bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`, posted: 'Gepost', withdrawn: 'Ingetrokken', billable: 'Factureerbaar', + rejected: 'Afgekeurd', reimbursable: 'Vergoedbaar', purchaseCurrency: 'Aankoopvaluta', sortOrder: { diff --git a/src/languages/pl.ts b/src/languages/pl.ts index 2d63bc3cff66..2079ad0d841c 100644 --- a/src/languages/pl.ts +++ b/src/languages/pl.ts @@ -9887,6 +9887,7 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`, posted: 'Opublikowano', withdrawn: 'Wycofano', billable: 'Fakturowalne', + rejected: 'Odrzucone', reimbursable: 'Podlegające zwrotowi', purchaseCurrency: 'Waluta zakupu', sortOrder: { diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts index fe7d8ea789cf..9666f8747c03 100644 --- a/src/languages/pt-BR.ts +++ b/src/languages/pt-BR.ts @@ -9870,6 +9870,7 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`, posted: 'Publicado', withdrawn: 'Retirado', billable: 'Faturável', + rejected: 'Rejeitado', reimbursable: 'Reembolsável', purchaseCurrency: 'Moeda de compra', sortOrder: { diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts index 1175f91919be..3dbf6db3afd2 100644 --- a/src/languages/zh-hans.ts +++ b/src/languages/zh-hans.ts @@ -9504,6 +9504,7 @@ ${reportName}`, posted: '已发布', withdrawn: '已撤回', billable: '可计费', + rejected: '已拒绝', reimbursable: '可报销', purchaseCurrency: '购买货币', sortOrder: { diff --git a/src/libs/SearchAutocompleteUtils.ts b/src/libs/SearchAutocompleteUtils.ts index 30934ec63579..7d95391c4293 100644 --- a/src/libs/SearchAutocompleteUtils.ts +++ b/src/libs/SearchAutocompleteUtils.ts @@ -244,6 +244,7 @@ function filterOutRangesWithCorrectValue( return viewList.includes(range.value); case CONST.SEARCH.SYNTAX_FILTER_KEYS.BILLABLE: case CONST.SEARCH.SYNTAX_FILTER_KEYS.REIMBURSABLE: + case CONST.SEARCH.SYNTAX_FILTER_KEYS.DECLINED: return booleanList.includes(range.value); case CONST.SEARCH.SYNTAX_FILTER_KEYS.DATE: case CONST.SEARCH.SYNTAX_FILTER_KEYS.SUBMITTED: diff --git a/src/libs/SearchParser/autocompleteParser.js b/src/libs/SearchParser/autocompleteParser.js index aff5fc529fc3..97e38d01c0eb 100644 --- a/src/libs/SearchParser/autocompleteParser.js +++ b/src/libs/SearchParser/autocompleteParser.js @@ -228,88 +228,89 @@ function peg$parse(input, options) { var peg$c42 = "withdrawalid"; var peg$c43 = "withdrawal-id"; var peg$c44 = "billable"; - var peg$c45 = "reimbursable"; - var peg$c46 = "type"; - var peg$c47 = "status"; - var peg$c48 = "sortBy"; - var peg$c49 = "sort-by"; - var peg$c50 = "sortOrder"; - var peg$c51 = "sort-order"; - var peg$c52 = "policyID"; - var peg$c53 = "workspace"; - var peg$c54 = "submitted"; - var peg$c55 = "approved"; - var peg$c56 = "paid"; - var peg$c57 = "exported"; - var peg$c58 = "posted"; - var peg$c59 = "withdrawn"; - var peg$c60 = "groupby"; - var peg$c61 = "group-by"; - var peg$c62 = "limit"; - var peg$c63 = "feed"; - var peg$c64 = "title"; - var peg$c65 = "submitteruserid"; - var peg$c66 = "submitter-user-id"; - var peg$c67 = "submitterpayrollid"; - var peg$c68 = "submitter-payroll-id"; - var peg$c69 = "orderdealnumbers"; - var peg$c70 = "order-deal-numbers"; - var peg$c71 = "assignee"; - var peg$c72 = "createdby"; - var peg$c73 = "created-by"; - var peg$c74 = "action"; - var peg$c75 = "total"; - var peg$c76 = "has"; - var peg$c77 = "is"; - var peg$c78 = "purchaseamount"; - var peg$c79 = "purchase-amount"; - var peg$c80 = "purchasecurrency"; - var peg$c81 = "purchase-currency"; - var peg$c82 = "amountdebited"; - var peg$c83 = "amount-debited"; - var peg$c84 = "amountreimbursed"; - var peg$c85 = "amount-reimbursed"; - var peg$c86 = "columns"; - var peg$c87 = "view"; - var peg$c88 = "compare"; - var peg$c89 = "per-diem"; - var peg$c90 = "drafts"; - var peg$c91 = "draft"; - var peg$c92 = "tax"; - var peg$c93 = "policy-name"; - var peg$c94 = "long-report-id"; - var peg$c95 = "exported-to"; - var peg$c96 = "exportedto"; - var peg$c97 = "exchange-rate"; - var peg$c98 = "reimbursable-total"; - var peg$c99 = "non-reimbursable-total"; - var peg$c100 = "group-from"; - var peg$c101 = "group-expenses"; - var peg$c102 = "group-total"; - var peg$c103 = "group-card"; - var peg$c104 = "group-feed"; - var peg$c105 = "group-bank-account"; - var peg$c106 = "group-withdrawn"; - var peg$c107 = "group-withdrawal-id"; - var peg$c108 = "group-amount-debited"; - var peg$c109 = "group-amount-reimbursed"; - var peg$c110 = "group-category"; - var peg$c111 = "group-tag"; - var peg$c112 = "group-merchant"; - var peg$c113 = "group-day"; - var peg$c114 = "group-month"; - var peg$c115 = "group-week"; - var peg$c116 = "group-year"; - var peg$c117 = "group-quarter"; - var peg$c118 = "!="; - var peg$c119 = ">="; - var peg$c120 = ">"; - var peg$c121 = "<="; - var peg$c122 = "<"; - var peg$c123 = "\\"; - var peg$c124 = "\u201C"; - var peg$c125 = "\u201D"; - var peg$c126 = "\""; + var peg$c45 = "declined"; + var peg$c46 = "reimbursable"; + var peg$c47 = "type"; + var peg$c48 = "status"; + var peg$c49 = "sortBy"; + var peg$c50 = "sort-by"; + var peg$c51 = "sortOrder"; + var peg$c52 = "sort-order"; + var peg$c53 = "policyID"; + var peg$c54 = "workspace"; + var peg$c55 = "submitted"; + var peg$c56 = "approved"; + var peg$c57 = "paid"; + var peg$c58 = "exported"; + var peg$c59 = "posted"; + var peg$c60 = "withdrawn"; + var peg$c61 = "groupby"; + var peg$c62 = "group-by"; + var peg$c63 = "limit"; + var peg$c64 = "feed"; + var peg$c65 = "title"; + var peg$c66 = "submitteruserid"; + var peg$c67 = "submitter-user-id"; + var peg$c68 = "submitterpayrollid"; + var peg$c69 = "submitter-payroll-id"; + var peg$c70 = "orderdealnumbers"; + var peg$c71 = "order-deal-numbers"; + var peg$c72 = "assignee"; + var peg$c73 = "createdby"; + var peg$c74 = "created-by"; + var peg$c75 = "action"; + var peg$c76 = "total"; + var peg$c77 = "has"; + var peg$c78 = "is"; + var peg$c79 = "purchaseamount"; + var peg$c80 = "purchase-amount"; + var peg$c81 = "purchasecurrency"; + var peg$c82 = "purchase-currency"; + var peg$c83 = "amountdebited"; + var peg$c84 = "amount-debited"; + var peg$c85 = "amountreimbursed"; + var peg$c86 = "amount-reimbursed"; + var peg$c87 = "columns"; + var peg$c88 = "view"; + var peg$c89 = "compare"; + var peg$c90 = "per-diem"; + var peg$c91 = "drafts"; + var peg$c92 = "draft"; + var peg$c93 = "tax"; + var peg$c94 = "policy-name"; + var peg$c95 = "long-report-id"; + var peg$c96 = "exported-to"; + var peg$c97 = "exportedto"; + var peg$c98 = "exchange-rate"; + var peg$c99 = "reimbursable-total"; + var peg$c100 = "non-reimbursable-total"; + var peg$c101 = "group-from"; + var peg$c102 = "group-expenses"; + var peg$c103 = "group-total"; + var peg$c104 = "group-card"; + var peg$c105 = "group-feed"; + var peg$c106 = "group-bank-account"; + var peg$c107 = "group-withdrawn"; + var peg$c108 = "group-withdrawal-id"; + var peg$c109 = "group-amount-debited"; + var peg$c110 = "group-amount-reimbursed"; + var peg$c111 = "group-category"; + var peg$c112 = "group-tag"; + var peg$c113 = "group-merchant"; + var peg$c114 = "group-day"; + var peg$c115 = "group-month"; + var peg$c116 = "group-week"; + var peg$c117 = "group-year"; + var peg$c118 = "group-quarter"; + var peg$c119 = "!="; + var peg$c120 = ">="; + var peg$c121 = ">"; + var peg$c122 = "<="; + var peg$c123 = "<"; + var peg$c124 = "\\"; + var peg$c125 = "\u201C"; + var peg$c126 = "\u201D"; + var peg$c127 = "\""; var peg$r0 = /^[ \t\r\n\xA0,:=<>!]/; var peg$r1 = /^[:=]/; @@ -374,105 +375,106 @@ function peg$parse(input, options) { var peg$e45 = peg$literalExpectation("withdrawalID", true); var peg$e46 = peg$literalExpectation("withdrawal-id", true); var peg$e47 = peg$literalExpectation("billable", true); - var peg$e48 = peg$literalExpectation("reimbursable", true); - var peg$e49 = peg$literalExpectation("type", true); - var peg$e50 = peg$literalExpectation("status", true); - var peg$e51 = peg$literalExpectation("sortBy", false); - var peg$e52 = peg$literalExpectation("sort-by", true); - var peg$e53 = peg$literalExpectation("sortOrder", false); - var peg$e54 = peg$literalExpectation("sort-order", true); - var peg$e55 = peg$literalExpectation("policyID", false); - var peg$e56 = peg$literalExpectation("workspace", true); - var peg$e57 = peg$literalExpectation("submitted", true); - var peg$e58 = peg$literalExpectation("approved", true); - var peg$e59 = peg$literalExpectation("paid", true); - var peg$e60 = peg$literalExpectation("exported", true); - var peg$e61 = peg$literalExpectation("posted", true); - var peg$e62 = peg$literalExpectation("withdrawn", true); - var peg$e63 = peg$literalExpectation("groupBy", true); - var peg$e64 = peg$literalExpectation("group-by", true); - var peg$e65 = peg$literalExpectation("limit", true); - var peg$e66 = peg$literalExpectation("feed", true); - var peg$e67 = peg$literalExpectation("title", true); - var peg$e68 = peg$literalExpectation("submitterUserID", true); - var peg$e69 = peg$literalExpectation("submitter-user-id", true); - var peg$e70 = peg$literalExpectation("submitterPayrollID", true); - var peg$e71 = peg$literalExpectation("submitter-payroll-id", true); - var peg$e72 = peg$literalExpectation("orderDealNumbers", true); - var peg$e73 = peg$literalExpectation("order-deal-numbers", true); - var peg$e74 = peg$literalExpectation("assignee", true); - var peg$e75 = peg$literalExpectation("createdBy", true); - var peg$e76 = peg$literalExpectation("created-by", true); - var peg$e77 = peg$literalExpectation("action", true); - var peg$e78 = peg$literalExpectation("total", true); - var peg$e79 = peg$literalExpectation("has", true); - var peg$e80 = peg$literalExpectation("is", true); - var peg$e81 = peg$literalExpectation("purchaseAmount", true); - var peg$e82 = peg$literalExpectation("purchase-amount", true); - var peg$e83 = peg$literalExpectation("purchaseCurrency", true); - var peg$e84 = peg$literalExpectation("purchase-currency", true); - var peg$e85 = peg$literalExpectation("amountDebited", true); - var peg$e86 = peg$literalExpectation("amount-debited", true); - var peg$e87 = peg$literalExpectation("amountReimbursed", true); - var peg$e88 = peg$literalExpectation("amount-reimbursed", true); - var peg$e89 = peg$literalExpectation("columns", true); - var peg$e90 = peg$literalExpectation("view", true); - var peg$e91 = peg$literalExpectation("compare", true); - var peg$e92 = peg$literalExpectation("per-diem", true); - var peg$e93 = peg$literalExpectation("drafts", true); - var peg$e94 = peg$literalExpectation("draft", true); - var peg$e95 = peg$literalExpectation("tax", true); - var peg$e96 = peg$literalExpectation("policy-name", true); - var peg$e97 = peg$literalExpectation("long-report-id", true); - var peg$e98 = peg$literalExpectation("exported-to", true); - var peg$e99 = peg$classExpectation([":", "="], false, false); - var peg$e100 = peg$literalExpectation("exportedTo", true); - var peg$e101 = peg$literalExpectation("exchange-rate", true); - var peg$e102 = peg$literalExpectation("reimbursable-total", true); - var peg$e103 = peg$literalExpectation("non-reimbursable-total", true); - var peg$e104 = peg$literalExpectation("group-from", true); - var peg$e105 = peg$literalExpectation("group-expenses", true); - var peg$e106 = peg$literalExpectation("group-total", true); - var peg$e107 = peg$literalExpectation("group-card", true); - var peg$e108 = peg$literalExpectation("group-feed", true); - var peg$e109 = peg$literalExpectation("group-bank-account", true); - var peg$e110 = peg$literalExpectation("group-withdrawn", true); - var peg$e111 = peg$literalExpectation("group-withdrawal-id", true); - var peg$e112 = peg$literalExpectation("group-amount-debited", true); - var peg$e113 = peg$literalExpectation("group-amount-reimbursed", true); - var peg$e114 = peg$literalExpectation("group-category", true); - var peg$e115 = peg$literalExpectation("group-tag", true); - var peg$e116 = peg$literalExpectation("group-merchant", true); - var peg$e117 = peg$literalExpectation("group-day", true); - var peg$e118 = peg$literalExpectation("group-month", true); - var peg$e119 = peg$literalExpectation("group-week", true); - var peg$e120 = peg$literalExpectation("group-year", true); - var peg$e121 = peg$literalExpectation("group-quarter", true); - var peg$e122 = peg$otherExpectation("operator"); - var peg$e123 = peg$literalExpectation("!=", false); - var peg$e124 = peg$literalExpectation(">=", false); - var peg$e125 = peg$literalExpectation(">", false); - var peg$e126 = peg$literalExpectation("<=", false); - var peg$e127 = peg$literalExpectation("<", false); - var peg$e128 = peg$literalExpectation("\\", false); - var peg$e129 = peg$classExpectation([",", "\"", "\u201D", "\u201C", "\\"], false, false); - var peg$e130 = peg$otherExpectation("word"); - var peg$e131 = peg$classExpectation([" ", ",", "\t", "\n", "\r", "\xA0"], true, false); - var peg$e132 = peg$otherExpectation("whitespace"); - var peg$e133 = peg$classExpectation([" ", "\t", "\r", "\n", "\xA0"], false, false); - var peg$e134 = peg$otherExpectation("quote"); - var peg$e135 = peg$classExpectation([" ", ",", "\"", "\u201D", "\u201C", "\t", "\n", "\r", "\xA0"], true, false); - var peg$e136 = peg$classExpectation(["\"", ["\u201C", "\u201D"]], false, false); - var peg$e137 = peg$classExpectation(["\"", "\u201D", "\u201C", "\r", "\n"], true, false); - var peg$e138 = peg$literalExpectation("\u201C", false); - var peg$e139 = peg$literalExpectation("\u201D", false); - var peg$e140 = peg$literalExpectation("\"", false); - var peg$e141 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ["a", "z"], ["A", "Z"], ["0", "9"]], false, false); - var peg$e142 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"]], false, false); - var peg$e143 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0"], false, false); - var peg$e144 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ["a", "z"], ["A", "Z"]], false, false); - var peg$e145 = peg$classExpectation([","], false, false); - var peg$e146 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ","], false, false); + var peg$e48 = peg$literalExpectation("declined", true); + var peg$e49 = peg$literalExpectation("reimbursable", true); + var peg$e50 = peg$literalExpectation("type", true); + var peg$e51 = peg$literalExpectation("status", true); + var peg$e52 = peg$literalExpectation("sortBy", false); + var peg$e53 = peg$literalExpectation("sort-by", true); + var peg$e54 = peg$literalExpectation("sortOrder", false); + var peg$e55 = peg$literalExpectation("sort-order", true); + var peg$e56 = peg$literalExpectation("policyID", false); + var peg$e57 = peg$literalExpectation("workspace", true); + var peg$e58 = peg$literalExpectation("submitted", true); + var peg$e59 = peg$literalExpectation("approved", true); + var peg$e60 = peg$literalExpectation("paid", true); + var peg$e61 = peg$literalExpectation("exported", true); + var peg$e62 = peg$literalExpectation("posted", true); + var peg$e63 = peg$literalExpectation("withdrawn", true); + var peg$e64 = peg$literalExpectation("groupBy", true); + var peg$e65 = peg$literalExpectation("group-by", true); + var peg$e66 = peg$literalExpectation("limit", true); + var peg$e67 = peg$literalExpectation("feed", true); + var peg$e68 = peg$literalExpectation("title", true); + var peg$e69 = peg$literalExpectation("submitterUserID", true); + var peg$e70 = peg$literalExpectation("submitter-user-id", true); + var peg$e71 = peg$literalExpectation("submitterPayrollID", true); + var peg$e72 = peg$literalExpectation("submitter-payroll-id", true); + var peg$e73 = peg$literalExpectation("orderDealNumbers", true); + var peg$e74 = peg$literalExpectation("order-deal-numbers", true); + var peg$e75 = peg$literalExpectation("assignee", true); + var peg$e76 = peg$literalExpectation("createdBy", true); + var peg$e77 = peg$literalExpectation("created-by", true); + var peg$e78 = peg$literalExpectation("action", true); + var peg$e79 = peg$literalExpectation("total", true); + var peg$e80 = peg$literalExpectation("has", true); + var peg$e81 = peg$literalExpectation("is", true); + var peg$e82 = peg$literalExpectation("purchaseAmount", true); + var peg$e83 = peg$literalExpectation("purchase-amount", true); + var peg$e84 = peg$literalExpectation("purchaseCurrency", true); + var peg$e85 = peg$literalExpectation("purchase-currency", true); + var peg$e86 = peg$literalExpectation("amountDebited", true); + var peg$e87 = peg$literalExpectation("amount-debited", true); + var peg$e88 = peg$literalExpectation("amountReimbursed", true); + var peg$e89 = peg$literalExpectation("amount-reimbursed", true); + var peg$e90 = peg$literalExpectation("columns", true); + var peg$e91 = peg$literalExpectation("view", true); + var peg$e92 = peg$literalExpectation("compare", true); + var peg$e93 = peg$literalExpectation("per-diem", true); + var peg$e94 = peg$literalExpectation("drafts", true); + var peg$e95 = peg$literalExpectation("draft", true); + var peg$e96 = peg$literalExpectation("tax", true); + var peg$e97 = peg$literalExpectation("policy-name", true); + var peg$e98 = peg$literalExpectation("long-report-id", true); + var peg$e99 = peg$literalExpectation("exported-to", true); + var peg$e100 = peg$classExpectation([":", "="], false, false); + var peg$e101 = peg$literalExpectation("exportedTo", true); + var peg$e102 = peg$literalExpectation("exchange-rate", true); + var peg$e103 = peg$literalExpectation("reimbursable-total", true); + var peg$e104 = peg$literalExpectation("non-reimbursable-total", true); + var peg$e105 = peg$literalExpectation("group-from", true); + var peg$e106 = peg$literalExpectation("group-expenses", true); + var peg$e107 = peg$literalExpectation("group-total", true); + var peg$e108 = peg$literalExpectation("group-card", true); + var peg$e109 = peg$literalExpectation("group-feed", true); + var peg$e110 = peg$literalExpectation("group-bank-account", true); + var peg$e111 = peg$literalExpectation("group-withdrawn", true); + var peg$e112 = peg$literalExpectation("group-withdrawal-id", true); + var peg$e113 = peg$literalExpectation("group-amount-debited", true); + var peg$e114 = peg$literalExpectation("group-amount-reimbursed", true); + var peg$e115 = peg$literalExpectation("group-category", true); + var peg$e116 = peg$literalExpectation("group-tag", true); + var peg$e117 = peg$literalExpectation("group-merchant", true); + var peg$e118 = peg$literalExpectation("group-day", true); + var peg$e119 = peg$literalExpectation("group-month", true); + var peg$e120 = peg$literalExpectation("group-week", true); + var peg$e121 = peg$literalExpectation("group-year", true); + var peg$e122 = peg$literalExpectation("group-quarter", true); + var peg$e123 = peg$otherExpectation("operator"); + var peg$e124 = peg$literalExpectation("!=", false); + var peg$e125 = peg$literalExpectation(">=", false); + var peg$e126 = peg$literalExpectation(">", false); + var peg$e127 = peg$literalExpectation("<=", false); + var peg$e128 = peg$literalExpectation("<", false); + var peg$e129 = peg$literalExpectation("\\", false); + var peg$e130 = peg$classExpectation([",", "\"", "\u201D", "\u201C", "\\"], false, false); + var peg$e131 = peg$otherExpectation("word"); + var peg$e132 = peg$classExpectation([" ", ",", "\t", "\n", "\r", "\xA0"], true, false); + var peg$e133 = peg$otherExpectation("whitespace"); + var peg$e134 = peg$classExpectation([" ", "\t", "\r", "\n", "\xA0"], false, false); + var peg$e135 = peg$otherExpectation("quote"); + var peg$e136 = peg$classExpectation([" ", ",", "\"", "\u201D", "\u201C", "\t", "\n", "\r", "\xA0"], true, false); + var peg$e137 = peg$classExpectation(["\"", ["\u201C", "\u201D"]], false, false); + var peg$e138 = peg$classExpectation(["\"", "\u201D", "\u201C", "\r", "\n"], true, false); + var peg$e139 = peg$literalExpectation("\u201C", false); + var peg$e140 = peg$literalExpectation("\u201D", false); + var peg$e141 = peg$literalExpectation("\"", false); + var peg$e142 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ["a", "z"], ["A", "Z"], ["0", "9"]], false, false); + var peg$e143 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"]], false, false); + var peg$e144 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0"], false, false); + var peg$e145 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ["a", "z"], ["A", "Z"]], false, false); + var peg$e146 = peg$classExpectation([","], false, false); + var peg$e147 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ","], false, false); var peg$f0 = function(ranges) { return { autocomplete, ranges }; }; var peg$f1 = function(filters) { return filters.filter(Boolean).flat(); }; @@ -565,105 +567,106 @@ function peg$parse(input, options) { var peg$f33 = function() { return "paidStatus"; }; var peg$f34 = function() { return "withdrawalID"; }; var peg$f35 = function() { return "billable"; }; - var peg$f36 = function() { return "reimbursable"; }; - var peg$f37 = function() { return "type"; }; - var peg$f38 = function() { return "status"; }; - var peg$f39 = function() { return "sortBy"; }; - var peg$f40 = function() { return "sortOrder"; }; - var peg$f41 = function() { return "policyID"; }; - var peg$f42 = function() { return "submitted"; }; - var peg$f43 = function() { return "approved"; }; - var peg$f44 = function() { return "paid"; }; - var peg$f45 = function() { return "exported"; }; - var peg$f46 = function() { return "posted"; }; - var peg$f47 = function() { return "withdrawn"; }; - var peg$f48 = function() { return "groupBy"; }; - var peg$f49 = function() { return "limit"; }; - var peg$f50 = function() { return "feed"; }; - var peg$f51 = function() { return "title"; }; - var peg$f52 = function() { return "submitterUserID"; }; - var peg$f53 = function() { return "submitterPayrollID"; }; - var peg$f54 = function() { return "orderDealNumbers"; }; - var peg$f55 = function() { return "assignee"; }; - var peg$f56 = function() { return "createdBy"; }; - var peg$f57 = function() { return "action"; }; - var peg$f58 = function() {return "total"; }; - var peg$f59 = function() {return "has"; }; - var peg$f60 = function() {return "is"; }; - var peg$f61 = function() {return "purchaseAmount"}; - var peg$f62 = function() {return "purchaseCurrency"}; - var peg$f63 = function() {return "amountDebited"}; - var peg$f64 = function() {return "amountReimbursed"}; - var peg$f65 = function() { + var peg$f36 = function() { return "declined"; }; + var peg$f37 = function() { return "reimbursable"; }; + var peg$f38 = function() { return "type"; }; + var peg$f39 = function() { return "status"; }; + var peg$f40 = function() { return "sortBy"; }; + var peg$f41 = function() { return "sortOrder"; }; + var peg$f42 = function() { return "policyID"; }; + var peg$f43 = function() { return "submitted"; }; + var peg$f44 = function() { return "approved"; }; + var peg$f45 = function() { return "paid"; }; + var peg$f46 = function() { return "exported"; }; + var peg$f47 = function() { return "posted"; }; + var peg$f48 = function() { return "withdrawn"; }; + var peg$f49 = function() { return "groupBy"; }; + var peg$f50 = function() { return "limit"; }; + var peg$f51 = function() { return "feed"; }; + var peg$f52 = function() { return "title"; }; + var peg$f53 = function() { return "submitterUserID"; }; + var peg$f54 = function() { return "submitterPayrollID"; }; + var peg$f55 = function() { return "orderDealNumbers"; }; + var peg$f56 = function() { return "assignee"; }; + var peg$f57 = function() { return "createdBy"; }; + var peg$f58 = function() { return "action"; }; + var peg$f59 = function() {return "total"; }; + var peg$f60 = function() {return "has"; }; + var peg$f61 = function() {return "is"; }; + var peg$f62 = function() {return "purchaseAmount"}; + var peg$f63 = function() {return "purchaseCurrency"}; + var peg$f64 = function() {return "amountDebited"}; + var peg$f65 = function() {return "amountReimbursed"}; + var peg$f66 = function() { isColumnsContext = true; return "columns"; }; - var peg$f66 = function() {return "view"}; - var peg$f67 = function() {return "compare"}; - var peg$f68 = function() { return isColumnsContext; }; - var peg$f69 = function() { return "perDiem"; }; - var peg$f70 = function() { return "drafts"; }; - var peg$f71 = function() { return "originalamount"; }; - var peg$f72 = function() { return "taxAmount"; }; - var peg$f73 = function() { return "taxrate"; }; - var peg$f74 = function() { return "policyname"; }; - var peg$f75 = function() { return "withdrawalID"; }; - var peg$f76 = function() { return "bankAccount"; }; - var peg$f77 = function() { return "reportID"; }; - var peg$f78 = function() { return "base62ReportID"; }; - var peg$f79 = function() { return "exportedto"; }; - var peg$f80 = function() { return "exportedTo"; }; + var peg$f67 = function() {return "view"}; + var peg$f68 = function() {return "compare"}; + var peg$f69 = function() { return isColumnsContext; }; + var peg$f70 = function() { return "perDiem"; }; + var peg$f71 = function() { return "drafts"; }; + var peg$f72 = function() { return "originalamount"; }; + var peg$f73 = function() { return "taxAmount"; }; + var peg$f74 = function() { return "taxrate"; }; + var peg$f75 = function() { return "policyname"; }; + var peg$f76 = function() { return "withdrawalID"; }; + var peg$f77 = function() { return "bankAccount"; }; + var peg$f78 = function() { return "reportID"; }; + var peg$f79 = function() { return "base62ReportID"; }; + var peg$f80 = function() { return "exportedto"; }; var peg$f81 = function() { return "exportedTo"; }; - var peg$f82 = function() { return "exchangeRate"; }; - var peg$f83 = function() { return "reimbursableTotal"; }; - var peg$f84 = function() { return "nonReimbursableTotal"; }; - var peg$f85 = function() { return "groupFrom"; }; - var peg$f86 = function() { return "groupExpenses"; }; - var peg$f87 = function() { return "groupTotal"; }; - var peg$f88 = function() { return "groupCard"; }; - var peg$f89 = function() { return "groupFeed"; }; - var peg$f90 = function() { return "groupBankAccount"; }; - var peg$f91 = function() { return "groupWithdrawn"; }; - var peg$f92 = function() { return "groupWithdrawalID"; }; - var peg$f93 = function() { return "groupAmountDebited"; }; - var peg$f94 = function() { return "groupAmountReimbursed"; }; - var peg$f95 = function() { return "amountDebited"; }; - var peg$f96 = function() { return "amountReimbursed"; }; - var peg$f97 = function() { return "groupCategory"; }; - var peg$f98 = function() { return "groupTag"; }; - var peg$f99 = function() { return "groupMerchant"; }; - var peg$f100 = function() { return "groupday"; }; - var peg$f101 = function() { return "groupmonth"; }; - var peg$f102 = function() { return "groupweek"; }; - var peg$f103 = function() { return "groupyear"; }; - var peg$f104 = function() { return "groupquarter"; }; - var peg$f105 = function() { return "eq"; }; - var peg$f106 = function() { return "neq"; }; - var peg$f107 = function() { return "gte"; }; - var peg$f108 = function() { return "gt"; }; - var peg$f109 = function() { return "lte"; }; - var peg$f110 = function() { return "lt"; }; - var peg$f111 = function(o) { + var peg$f82 = function() { return "exportedTo"; }; + var peg$f83 = function() { return "exchangeRate"; }; + var peg$f84 = function() { return "reimbursableTotal"; }; + var peg$f85 = function() { return "nonReimbursableTotal"; }; + var peg$f86 = function() { return "groupFrom"; }; + var peg$f87 = function() { return "groupExpenses"; }; + var peg$f88 = function() { return "groupTotal"; }; + var peg$f89 = function() { return "groupCard"; }; + var peg$f90 = function() { return "groupFeed"; }; + var peg$f91 = function() { return "groupBankAccount"; }; + var peg$f92 = function() { return "groupWithdrawn"; }; + var peg$f93 = function() { return "groupWithdrawalID"; }; + var peg$f94 = function() { return "groupAmountDebited"; }; + var peg$f95 = function() { return "groupAmountReimbursed"; }; + var peg$f96 = function() { return "amountDebited"; }; + var peg$f97 = function() { return "amountReimbursed"; }; + var peg$f98 = function() { return "groupCategory"; }; + var peg$f99 = function() { return "groupTag"; }; + var peg$f100 = function() { return "groupMerchant"; }; + var peg$f101 = function() { return "groupday"; }; + var peg$f102 = function() { return "groupmonth"; }; + var peg$f103 = function() { return "groupweek"; }; + var peg$f104 = function() { return "groupyear"; }; + var peg$f105 = function() { return "groupquarter"; }; + var peg$f106 = function() { return "eq"; }; + var peg$f107 = function() { return "neq"; }; + var peg$f108 = function() { return "gte"; }; + var peg$f109 = function() { return "gt"; }; + var peg$f110 = function() { return "lte"; }; + var peg$f111 = function() { return "lt"; }; + var peg$f112 = function(o) { if (nameOperator) { expectingNestedQuote = (o === "eq"); // Use simple parser if no valid operator is found } isColumnsContext = false; return o; }; - var peg$f112 = function(c) { return c; }; - var peg$f113 = function(chars) { return chars.join("").trim(); }; - var peg$f114 = function() { + var peg$f113 = function(c) { return c; }; + var peg$f114 = function(chars) { return chars.join("").trim(); }; + var peg$f115 = function() { isColumnsContext = false; return "and"; }; - var peg$f115 = function() { return expectingNestedQuote; }; - var peg$f116 = function(start, inner, end) { //handle no-breaking space + var peg$f116 = function() { return expectingNestedQuote; }; + var peg$f117 = function(start, inner, end) { //handle no-breaking space return [...start, '"', ...inner, '"', ...end].join(""); }; - var peg$f117 = function(start) {return "“"}; - var peg$f118 = function(start) {return "”"}; - var peg$f119 = function(start) {return "\""}; - var peg$f120 = function(start, inner, end) { + var peg$f118 = function(start) {return "“"}; + var peg$f119 = function(start) {return "”"}; + var peg$f120 = function(start) {return "\""}; + var peg$f121 = function(start, inner, end) { return [...start, '"', ...inner, '"'].join(""); }; var peg$currPos = options.peg$currPos | 0; @@ -1136,61 +1139,64 @@ function peg$parse(input, options) { if (s1 === peg$FAILED) { s1 = peg$parsebillable(); if (s1 === peg$FAILED) { - s1 = peg$parsepolicyID(); + s1 = peg$parsedeclined(); if (s1 === peg$FAILED) { - s1 = peg$parseaction(); + s1 = peg$parsepolicyID(); if (s1 === peg$FAILED) { - s1 = peg$parsedate(); + s1 = peg$parseaction(); if (s1 === peg$FAILED) { - s1 = peg$parsesubmitted(); + s1 = peg$parsedate(); if (s1 === peg$FAILED) { - s1 = peg$parseapproved(); + s1 = peg$parsesubmitted(); if (s1 === peg$FAILED) { - s1 = peg$parsepaid(); + s1 = peg$parseapproved(); if (s1 === peg$FAILED) { - s1 = peg$parseexportedTo(); + s1 = peg$parsepaid(); if (s1 === peg$FAILED) { - s1 = peg$parseexported(); + s1 = peg$parseexportedTo(); if (s1 === peg$FAILED) { - s1 = peg$parsewithdrawn(); + s1 = peg$parseexported(); if (s1 === peg$FAILED) { - s1 = peg$parseposted(); + s1 = peg$parsewithdrawn(); if (s1 === peg$FAILED) { - s1 = peg$parsehas(); + s1 = peg$parseposted(); if (s1 === peg$FAILED) { - s1 = peg$parseis(); + s1 = peg$parsehas(); if (s1 === peg$FAILED) { - s1 = peg$parsepurchaseCurrency(); + s1 = peg$parseis(); if (s1 === peg$FAILED) { - s1 = peg$parsepurchaseAmount(); + s1 = peg$parsepurchaseCurrency(); if (s1 === peg$FAILED) { - s1 = peg$parseamountDebited(); + s1 = peg$parsepurchaseAmount(); if (s1 === peg$FAILED) { - s1 = peg$parseamountReimbursed(); + s1 = peg$parseamountDebited(); if (s1 === peg$FAILED) { - s1 = peg$parseamount(); + s1 = peg$parseamountReimbursed(); if (s1 === peg$FAILED) { - s1 = peg$parsemerchant(); + s1 = peg$parseamount(); if (s1 === peg$FAILED) { - s1 = peg$parsedescription(); + s1 = peg$parsemerchant(); if (s1 === peg$FAILED) { - s1 = peg$parsereportID(); + s1 = peg$parsedescription(); if (s1 === peg$FAILED) { - s1 = peg$parsewithdrawalID(); + s1 = peg$parsereportID(); if (s1 === peg$FAILED) { - s1 = peg$parsetitle(); + s1 = peg$parsewithdrawalID(); if (s1 === peg$FAILED) { - s1 = peg$parsesubmitterUserID(); + s1 = peg$parsetitle(); if (s1 === peg$FAILED) { - s1 = peg$parsesubmitterPayrollID(); + s1 = peg$parsesubmitterUserID(); if (s1 === peg$FAILED) { - s1 = peg$parseorderDealNumbers(); + s1 = peg$parsesubmitterPayrollID(); if (s1 === peg$FAILED) { - s1 = peg$parsereportFieldDynamic(); + s1 = peg$parseorderDealNumbers(); if (s1 === peg$FAILED) { - s1 = peg$parsecolumns(); + s1 = peg$parsereportFieldDynamic(); if (s1 === peg$FAILED) { - s1 = peg$parselimit(); + s1 = peg$parsecolumns(); + if (s1 === peg$FAILED) { + s1 = peg$parselimit(); + } } } } @@ -2027,13 +2033,13 @@ function peg$parse(input, options) { return s0; } - function peg$parsereimbursable() { + function peg$parsedeclined() { var s0, s1; s0 = peg$currPos; - s1 = input.substr(peg$currPos, 12); + s1 = input.substr(peg$currPos, 8); if (s1.toLowerCase() === peg$c45) { - peg$currPos += 12; + peg$currPos += 8; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$e48); } @@ -2047,13 +2053,13 @@ function peg$parse(input, options) { return s0; } - function peg$parsetype() { + function peg$parsereimbursable() { var s0, s1; s0 = peg$currPos; - s1 = input.substr(peg$currPos, 4); + s1 = input.substr(peg$currPos, 12); if (s1.toLowerCase() === peg$c46) { - peg$currPos += 4; + peg$currPos += 12; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$e49); } @@ -2067,13 +2073,13 @@ function peg$parse(input, options) { return s0; } - function peg$parsestatus() { + function peg$parsetype() { var s0, s1; s0 = peg$currPos; - s1 = input.substr(peg$currPos, 6); + s1 = input.substr(peg$currPos, 4); if (s1.toLowerCase() === peg$c47) { - peg$currPos += 6; + peg$currPos += 4; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$e50); } @@ -2087,28 +2093,48 @@ function peg$parse(input, options) { return s0; } + function peg$parsestatus() { + var s0, s1; + + s0 = peg$currPos; + s1 = input.substr(peg$currPos, 6); + if (s1.toLowerCase() === peg$c48) { + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e51); } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f39(); + } + s0 = s1; + + return s0; + } + function peg$parsesortBy() { var s0, s1; - if (input.substr(peg$currPos, 6) === peg$c48) { - s0 = peg$c48; + if (input.substr(peg$currPos, 6) === peg$c49) { + s0 = peg$c49; peg$currPos += 6; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e51); } + if (peg$silentFails === 0) { peg$fail(peg$e52); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 7); - if (s1.toLowerCase() === peg$c49) { + if (s1.toLowerCase() === peg$c50) { peg$currPos += 7; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e52); } + if (peg$silentFails === 0) { peg$fail(peg$e53); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f39(); + s1 = peg$f40(); } s0 = s1; } @@ -2119,25 +2145,25 @@ function peg$parse(input, options) { function peg$parsesortOrder() { var s0, s1; - if (input.substr(peg$currPos, 9) === peg$c50) { - s0 = peg$c50; + if (input.substr(peg$currPos, 9) === peg$c51) { + s0 = peg$c51; peg$currPos += 9; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e53); } + if (peg$silentFails === 0) { peg$fail(peg$e54); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c51) { + if (s1.toLowerCase() === peg$c52) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e54); } + if (peg$silentFails === 0) { peg$fail(peg$e55); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f40(); + s1 = peg$f41(); } s0 = s1; } @@ -2148,25 +2174,25 @@ function peg$parse(input, options) { function peg$parsepolicyID() { var s0, s1; - if (input.substr(peg$currPos, 8) === peg$c52) { - s0 = peg$c52; + if (input.substr(peg$currPos, 8) === peg$c53) { + s0 = peg$c53; peg$currPos += 8; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e55); } + if (peg$silentFails === 0) { peg$fail(peg$e56); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 9); - if (s1.toLowerCase() === peg$c53) { + if (s1.toLowerCase() === peg$c54) { peg$currPos += 9; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e56); } + if (peg$silentFails === 0) { peg$fail(peg$e57); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f41(); + s1 = peg$f42(); } s0 = s1; } @@ -2179,15 +2205,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 9); - if (s1.toLowerCase() === peg$c54) { + if (s1.toLowerCase() === peg$c55) { peg$currPos += 9; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e57); } + if (peg$silentFails === 0) { peg$fail(peg$e58); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f42(); + s1 = peg$f43(); } s0 = s1; @@ -2199,15 +2225,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 8); - if (s1.toLowerCase() === peg$c55) { + if (s1.toLowerCase() === peg$c56) { peg$currPos += 8; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e58); } + if (peg$silentFails === 0) { peg$fail(peg$e59); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f43(); + s1 = peg$f44(); } s0 = s1; @@ -2219,15 +2245,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 4); - if (s1.toLowerCase() === peg$c56) { + if (s1.toLowerCase() === peg$c57) { peg$currPos += 4; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e59); } + if (peg$silentFails === 0) { peg$fail(peg$e60); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f44(); + s1 = peg$f45(); } s0 = s1; @@ -2239,15 +2265,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 8); - if (s1.toLowerCase() === peg$c57) { + if (s1.toLowerCase() === peg$c58) { peg$currPos += 8; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e60); } + if (peg$silentFails === 0) { peg$fail(peg$e61); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f45(); + s1 = peg$f46(); } s0 = s1; @@ -2259,15 +2285,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 6); - if (s1.toLowerCase() === peg$c58) { + if (s1.toLowerCase() === peg$c59) { peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e61); } + if (peg$silentFails === 0) { peg$fail(peg$e62); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f46(); + s1 = peg$f47(); } s0 = s1; @@ -2279,15 +2305,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 9); - if (s1.toLowerCase() === peg$c59) { + if (s1.toLowerCase() === peg$c60) { peg$currPos += 9; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e62); } + if (peg$silentFails === 0) { peg$fail(peg$e63); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f47(); + s1 = peg$f48(); } s0 = s1; @@ -2298,24 +2324,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 7); - if (s0.toLowerCase() === peg$c60) { + if (s0.toLowerCase() === peg$c61) { peg$currPos += 7; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e63); } + if (peg$silentFails === 0) { peg$fail(peg$e64); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 8); - if (s1.toLowerCase() === peg$c61) { + if (s1.toLowerCase() === peg$c62) { peg$currPos += 8; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e64); } + if (peg$silentFails === 0) { peg$fail(peg$e65); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f48(); + s1 = peg$f49(); } s0 = s1; } @@ -2328,15 +2354,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 5); - if (s1.toLowerCase() === peg$c62) { + if (s1.toLowerCase() === peg$c63) { peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e65); } + if (peg$silentFails === 0) { peg$fail(peg$e66); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f49(); + s1 = peg$f50(); } s0 = s1; @@ -2348,15 +2374,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 4); - if (s1.toLowerCase() === peg$c63) { + if (s1.toLowerCase() === peg$c64) { peg$currPos += 4; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e66); } + if (peg$silentFails === 0) { peg$fail(peg$e67); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f50(); + s1 = peg$f51(); } s0 = s1; @@ -2368,15 +2394,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 5); - if (s1.toLowerCase() === peg$c64) { + if (s1.toLowerCase() === peg$c65) { peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e67); } + if (peg$silentFails === 0) { peg$fail(peg$e68); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f51(); + s1 = peg$f52(); } s0 = s1; @@ -2387,24 +2413,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 15); - if (s0.toLowerCase() === peg$c65) { + if (s0.toLowerCase() === peg$c66) { peg$currPos += 15; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e68); } + if (peg$silentFails === 0) { peg$fail(peg$e69); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 17); - if (s1.toLowerCase() === peg$c66) { + if (s1.toLowerCase() === peg$c67) { peg$currPos += 17; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e69); } + if (peg$silentFails === 0) { peg$fail(peg$e70); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f52(); + s1 = peg$f53(); } s0 = s1; } @@ -2416,24 +2442,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 18); - if (s0.toLowerCase() === peg$c67) { + if (s0.toLowerCase() === peg$c68) { peg$currPos += 18; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e70); } + if (peg$silentFails === 0) { peg$fail(peg$e71); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 20); - if (s1.toLowerCase() === peg$c68) { + if (s1.toLowerCase() === peg$c69) { peg$currPos += 20; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e71); } + if (peg$silentFails === 0) { peg$fail(peg$e72); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f53(); + s1 = peg$f54(); } s0 = s1; } @@ -2445,24 +2471,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 16); - if (s0.toLowerCase() === peg$c69) { + if (s0.toLowerCase() === peg$c70) { peg$currPos += 16; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e72); } + if (peg$silentFails === 0) { peg$fail(peg$e73); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 18); - if (s1.toLowerCase() === peg$c70) { + if (s1.toLowerCase() === peg$c71) { peg$currPos += 18; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e73); } + if (peg$silentFails === 0) { peg$fail(peg$e74); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f54(); + s1 = peg$f55(); } s0 = s1; } @@ -2475,15 +2501,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 8); - if (s1.toLowerCase() === peg$c71) { + if (s1.toLowerCase() === peg$c72) { peg$currPos += 8; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e74); } + if (peg$silentFails === 0) { peg$fail(peg$e75); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f55(); + s1 = peg$f56(); } s0 = s1; @@ -2494,24 +2520,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 9); - if (s0.toLowerCase() === peg$c72) { + if (s0.toLowerCase() === peg$c73) { peg$currPos += 9; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e75); } + if (peg$silentFails === 0) { peg$fail(peg$e76); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c73) { + if (s1.toLowerCase() === peg$c74) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e76); } + if (peg$silentFails === 0) { peg$fail(peg$e77); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f56(); + s1 = peg$f57(); } s0 = s1; } @@ -2524,15 +2550,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 6); - if (s1.toLowerCase() === peg$c74) { + if (s1.toLowerCase() === peg$c75) { peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e77); } + if (peg$silentFails === 0) { peg$fail(peg$e78); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f57(); + s1 = peg$f58(); } s0 = s1; @@ -2544,15 +2570,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 5); - if (s1.toLowerCase() === peg$c75) { + if (s1.toLowerCase() === peg$c76) { peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e78); } + if (peg$silentFails === 0) { peg$fail(peg$e79); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f58(); + s1 = peg$f59(); } s0 = s1; @@ -2564,15 +2590,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 3); - if (s1.toLowerCase() === peg$c76) { + if (s1.toLowerCase() === peg$c77) { peg$currPos += 3; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e79); } + if (peg$silentFails === 0) { peg$fail(peg$e80); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f59(); + s1 = peg$f60(); } s0 = s1; @@ -2584,15 +2610,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 2); - if (s1.toLowerCase() === peg$c77) { + if (s1.toLowerCase() === peg$c78) { peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e80); } + if (peg$silentFails === 0) { peg$fail(peg$e81); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f60(); + s1 = peg$f61(); } s0 = s1; @@ -2603,24 +2629,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 14); - if (s0.toLowerCase() === peg$c78) { + if (s0.toLowerCase() === peg$c79) { peg$currPos += 14; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e81); } + if (peg$silentFails === 0) { peg$fail(peg$e82); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 15); - if (s1.toLowerCase() === peg$c79) { + if (s1.toLowerCase() === peg$c80) { peg$currPos += 15; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e82); } + if (peg$silentFails === 0) { peg$fail(peg$e83); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f61(); + s1 = peg$f62(); } s0 = s1; } @@ -2632,24 +2658,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 16); - if (s0.toLowerCase() === peg$c80) { + if (s0.toLowerCase() === peg$c81) { peg$currPos += 16; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e83); } + if (peg$silentFails === 0) { peg$fail(peg$e84); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 17); - if (s1.toLowerCase() === peg$c81) { + if (s1.toLowerCase() === peg$c82) { peg$currPos += 17; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e84); } + if (peg$silentFails === 0) { peg$fail(peg$e85); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f62(); + s1 = peg$f63(); } s0 = s1; } @@ -2661,24 +2687,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 13); - if (s0.toLowerCase() === peg$c82) { + if (s0.toLowerCase() === peg$c83) { peg$currPos += 13; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e85); } + if (peg$silentFails === 0) { peg$fail(peg$e86); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c83) { + if (s1.toLowerCase() === peg$c84) { peg$currPos += 14; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e86); } + if (peg$silentFails === 0) { peg$fail(peg$e87); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f63(); + s1 = peg$f64(); } s0 = s1; } @@ -2690,24 +2716,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 16); - if (s0.toLowerCase() === peg$c84) { + if (s0.toLowerCase() === peg$c85) { peg$currPos += 16; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e87); } + if (peg$silentFails === 0) { peg$fail(peg$e88); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 17); - if (s1.toLowerCase() === peg$c85) { + if (s1.toLowerCase() === peg$c86) { peg$currPos += 17; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e88); } + if (peg$silentFails === 0) { peg$fail(peg$e89); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f64(); + s1 = peg$f65(); } s0 = s1; } @@ -2720,15 +2746,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 7); - if (s1.toLowerCase() === peg$c86) { + if (s1.toLowerCase() === peg$c87) { peg$currPos += 7; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e89); } + if (peg$silentFails === 0) { peg$fail(peg$e90); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f65(); + s1 = peg$f66(); } s0 = s1; @@ -2740,15 +2766,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 4); - if (s1.toLowerCase() === peg$c87) { + if (s1.toLowerCase() === peg$c88) { peg$currPos += 4; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e90); } + if (peg$silentFails === 0) { peg$fail(peg$e91); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f66(); + s1 = peg$f67(); } s0 = s1; @@ -2760,15 +2786,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 7); - if (s1.toLowerCase() === peg$c88) { + if (s1.toLowerCase() === peg$c89) { peg$currPos += 7; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e91); } + if (peg$silentFails === 0) { peg$fail(peg$e92); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f67(); + s1 = peg$f68(); } s0 = s1; @@ -2780,7 +2806,7 @@ function peg$parse(input, options) { s0 = peg$currPos; peg$savedPos = peg$currPos; - s1 = peg$f68(); + s1 = peg$f69(); if (s1) { s1 = undefined; } else { @@ -2915,11 +2941,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 8); - if (s1.toLowerCase() === peg$c89) { + if (s1.toLowerCase() === peg$c90) { peg$currPos += 8; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e92); } + if (peg$silentFails === 0) { peg$fail(peg$e93); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -2934,7 +2960,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f69(); + s0 = peg$f70(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -2952,19 +2978,19 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 6); - if (s1.toLowerCase() === peg$c90) { + if (s1.toLowerCase() === peg$c91) { peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e93); } + if (peg$silentFails === 0) { peg$fail(peg$e94); } } if (s1 === peg$FAILED) { s1 = input.substr(peg$currPos, 5); - if (s1.toLowerCase() === peg$c91) { + if (s1.toLowerCase() === peg$c92) { peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e94); } + if (peg$silentFails === 0) { peg$fail(peg$e95); } } } if (s1 !== peg$FAILED) { @@ -2980,7 +3006,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f70(); + s0 = peg$f71(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -2998,11 +3024,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 15); - if (s1.toLowerCase() === peg$c79) { + if (s1.toLowerCase() === peg$c80) { peg$currPos += 15; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e82); } + if (peg$silentFails === 0) { peg$fail(peg$e83); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3017,7 +3043,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f71(); + s0 = peg$f72(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3035,11 +3061,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 3); - if (s1.toLowerCase() === peg$c92) { + if (s1.toLowerCase() === peg$c93) { peg$currPos += 3; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e95); } + if (peg$silentFails === 0) { peg$fail(peg$e96); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3054,7 +3080,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f72(); + s0 = peg$f73(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3091,7 +3117,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f73(); + s0 = peg$f74(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3109,11 +3135,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c93) { + if (s1.toLowerCase() === peg$c94) { peg$currPos += 11; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e96); } + if (peg$silentFails === 0) { peg$fail(peg$e97); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3128,7 +3154,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f74(); + s0 = peg$f75(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3165,7 +3191,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f75(); + s0 = peg$f76(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3202,7 +3228,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f76(); + s0 = peg$f77(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3220,11 +3246,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c94) { + if (s1.toLowerCase() === peg$c95) { peg$currPos += 14; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e97); } + if (peg$silentFails === 0) { peg$fail(peg$e98); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3239,7 +3265,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f77(); + s0 = peg$f78(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3276,7 +3302,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f78(); + s0 = peg$f79(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3294,11 +3320,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c95) { + if (s1.toLowerCase() === peg$c96) { peg$currPos += 11; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e98); } + if (peg$silentFails === 0) { peg$fail(peg$e99); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3313,7 +3339,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f79(); + s0 = peg$f80(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3338,7 +3364,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e99); } + if (peg$silentFails === 0) { peg$fail(peg$e100); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; @@ -3357,11 +3383,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c96) { + if (s1.toLowerCase() === peg$c97) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e100); } + if (peg$silentFails === 0) { peg$fail(peg$e101); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3376,7 +3402,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f80(); + s0 = peg$f81(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3388,11 +3414,11 @@ function peg$parse(input, options) { if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c95) { + if (s1.toLowerCase() === peg$c96) { peg$currPos += 11; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e98); } + if (peg$silentFails === 0) { peg$fail(peg$e99); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3407,7 +3433,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f81(); + s0 = peg$f82(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3426,11 +3452,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 13); - if (s1.toLowerCase() === peg$c97) { + if (s1.toLowerCase() === peg$c98) { peg$currPos += 13; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e101); } + if (peg$silentFails === 0) { peg$fail(peg$e102); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3445,7 +3471,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f82(); + s0 = peg$f83(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3463,11 +3489,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 18); - if (s1.toLowerCase() === peg$c98) { + if (s1.toLowerCase() === peg$c99) { peg$currPos += 18; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e102); } + if (peg$silentFails === 0) { peg$fail(peg$e103); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3482,7 +3508,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f83(); + s0 = peg$f84(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3500,11 +3526,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 22); - if (s1.toLowerCase() === peg$c99) { + if (s1.toLowerCase() === peg$c100) { peg$currPos += 22; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e103); } + if (peg$silentFails === 0) { peg$fail(peg$e104); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3519,7 +3545,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f84(); + s0 = peg$f85(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3537,11 +3563,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c100) { + if (s1.toLowerCase() === peg$c101) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e104); } + if (peg$silentFails === 0) { peg$fail(peg$e105); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3556,7 +3582,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f85(); + s0 = peg$f86(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3574,11 +3600,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c101) { + if (s1.toLowerCase() === peg$c102) { peg$currPos += 14; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e105); } + if (peg$silentFails === 0) { peg$fail(peg$e106); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3593,7 +3619,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f86(); + s0 = peg$f87(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3611,11 +3637,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c102) { + if (s1.toLowerCase() === peg$c103) { peg$currPos += 11; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e106); } + if (peg$silentFails === 0) { peg$fail(peg$e107); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3630,7 +3656,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f87(); + s0 = peg$f88(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3648,11 +3674,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c103) { + if (s1.toLowerCase() === peg$c104) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e107); } + if (peg$silentFails === 0) { peg$fail(peg$e108); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3667,7 +3693,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f88(); + s0 = peg$f89(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3685,11 +3711,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c104) { + if (s1.toLowerCase() === peg$c105) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e108); } + if (peg$silentFails === 0) { peg$fail(peg$e109); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3704,7 +3730,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f89(); + s0 = peg$f90(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3722,11 +3748,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 18); - if (s1.toLowerCase() === peg$c105) { + if (s1.toLowerCase() === peg$c106) { peg$currPos += 18; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e109); } + if (peg$silentFails === 0) { peg$fail(peg$e110); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3741,7 +3767,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f90(); + s0 = peg$f91(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3759,11 +3785,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 15); - if (s1.toLowerCase() === peg$c106) { + if (s1.toLowerCase() === peg$c107) { peg$currPos += 15; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e110); } + if (peg$silentFails === 0) { peg$fail(peg$e111); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3778,7 +3804,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f91(); + s0 = peg$f92(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3796,11 +3822,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 19); - if (s1.toLowerCase() === peg$c107) { + if (s1.toLowerCase() === peg$c108) { peg$currPos += 19; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e111); } + if (peg$silentFails === 0) { peg$fail(peg$e112); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3815,7 +3841,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f92(); + s0 = peg$f93(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3833,11 +3859,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 20); - if (s1.toLowerCase() === peg$c108) { + if (s1.toLowerCase() === peg$c109) { peg$currPos += 20; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e112); } + if (peg$silentFails === 0) { peg$fail(peg$e113); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3852,7 +3878,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f93(); + s0 = peg$f94(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3870,11 +3896,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 23); - if (s1.toLowerCase() === peg$c109) { + if (s1.toLowerCase() === peg$c110) { peg$currPos += 23; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e113); } + if (peg$silentFails === 0) { peg$fail(peg$e114); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3889,7 +3915,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f94(); + s0 = peg$f95(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3907,11 +3933,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c83) { + if (s1.toLowerCase() === peg$c84) { peg$currPos += 14; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e86); } + if (peg$silentFails === 0) { peg$fail(peg$e87); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3926,7 +3952,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f95(); + s0 = peg$f96(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3944,11 +3970,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 17); - if (s1.toLowerCase() === peg$c85) { + if (s1.toLowerCase() === peg$c86) { peg$currPos += 17; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e88); } + if (peg$silentFails === 0) { peg$fail(peg$e89); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3963,7 +3989,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f96(); + s0 = peg$f97(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3981,11 +4007,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c110) { + if (s1.toLowerCase() === peg$c111) { peg$currPos += 14; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e114); } + if (peg$silentFails === 0) { peg$fail(peg$e115); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4000,7 +4026,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f97(); + s0 = peg$f98(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4018,11 +4044,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 9); - if (s1.toLowerCase() === peg$c111) { + if (s1.toLowerCase() === peg$c112) { peg$currPos += 9; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e115); } + if (peg$silentFails === 0) { peg$fail(peg$e116); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4037,7 +4063,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f98(); + s0 = peg$f99(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4055,11 +4081,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c112) { + if (s1.toLowerCase() === peg$c113) { peg$currPos += 14; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e116); } + if (peg$silentFails === 0) { peg$fail(peg$e117); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4074,7 +4100,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f99(); + s0 = peg$f100(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4092,11 +4118,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 9); - if (s1.toLowerCase() === peg$c113) { + if (s1.toLowerCase() === peg$c114) { peg$currPos += 9; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e117); } + if (peg$silentFails === 0) { peg$fail(peg$e118); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4111,7 +4137,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f100(); + s0 = peg$f101(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4129,11 +4155,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c114) { + if (s1.toLowerCase() === peg$c115) { peg$currPos += 11; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e118); } + if (peg$silentFails === 0) { peg$fail(peg$e119); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4148,7 +4174,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f101(); + s0 = peg$f102(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4166,11 +4192,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c115) { + if (s1.toLowerCase() === peg$c116) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e119); } + if (peg$silentFails === 0) { peg$fail(peg$e120); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4185,7 +4211,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f102(); + s0 = peg$f103(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4203,11 +4229,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c116) { + if (s1.toLowerCase() === peg$c117) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e120); } + if (peg$silentFails === 0) { peg$fail(peg$e121); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4222,7 +4248,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f103(); + s0 = peg$f104(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4240,11 +4266,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 13); - if (s1.toLowerCase() === peg$c117) { + if (s1.toLowerCase() === peg$c118) { peg$currPos += 13; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e121); } + if (peg$silentFails === 0) { peg$fail(peg$e122); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4259,7 +4285,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f104(); + s0 = peg$f105(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4282,81 +4308,81 @@ function peg$parse(input, options) { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e99); } + if (peg$silentFails === 0) { peg$fail(peg$e100); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f105(); + s1 = peg$f106(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c118) { - s1 = peg$c118; + if (input.substr(peg$currPos, 2) === peg$c119) { + s1 = peg$c119; peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e123); } + if (peg$silentFails === 0) { peg$fail(peg$e124); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f106(); + s1 = peg$f107(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c119) { - s1 = peg$c119; + if (input.substr(peg$currPos, 2) === peg$c120) { + s1 = peg$c120; peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e124); } + if (peg$silentFails === 0) { peg$fail(peg$e125); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f107(); + s1 = peg$f108(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 62) { - s1 = peg$c120; + s1 = peg$c121; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e125); } + if (peg$silentFails === 0) { peg$fail(peg$e126); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f108(); + s1 = peg$f109(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c121) { - s1 = peg$c121; + if (input.substr(peg$currPos, 2) === peg$c122) { + s1 = peg$c122; peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e126); } + if (peg$silentFails === 0) { peg$fail(peg$e127); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f109(); + s1 = peg$f110(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 60) { - s1 = peg$c122; + s1 = peg$c123; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e127); } + if (peg$silentFails === 0) { peg$fail(peg$e128); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f110(); + s1 = peg$f111(); } s0 = s1; } @@ -4367,7 +4393,7 @@ function peg$parse(input, options) { peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e122); } + if (peg$silentFails === 0) { peg$fail(peg$e123); } } return s0; @@ -4380,7 +4406,7 @@ function peg$parse(input, options) { s1 = peg$parseoperator(); if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f111(s1); + s1 = peg$f112(s1); } s0 = s1; @@ -4392,11 +4418,11 @@ function peg$parse(input, options) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 92) { - s1 = peg$c123; + s1 = peg$c124; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e128); } + if (peg$silentFails === 0) { peg$fail(peg$e129); } } if (s1 !== peg$FAILED) { s2 = input.charAt(peg$currPos); @@ -4404,11 +4430,11 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e129); } + if (peg$silentFails === 0) { peg$fail(peg$e130); } } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f112(s2); + s0 = peg$f113(s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4434,7 +4460,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e131); } + if (peg$silentFails === 0) { peg$fail(peg$e132); } } } if (s2 !== peg$FAILED) { @@ -4447,7 +4473,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e131); } + if (peg$silentFails === 0) { peg$fail(peg$e132); } } } } @@ -4456,13 +4482,13 @@ function peg$parse(input, options) { } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f113(s1); + s1 = peg$f114(s1); } s0 = s1; peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e130); } + if (peg$silentFails === 0) { peg$fail(peg$e131); } } return s0; @@ -4474,7 +4500,7 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = peg$parse_(); peg$savedPos = s0; - s1 = peg$f114(); + s1 = peg$f115(); s0 = s1; return s0; @@ -4490,7 +4516,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e133); } + if (peg$silentFails === 0) { peg$fail(peg$e134); } } while (s1 !== peg$FAILED) { s0.push(s1); @@ -4499,12 +4525,12 @@ function peg$parse(input, options) { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e133); } + if (peg$silentFails === 0) { peg$fail(peg$e134); } } } peg$silentFails--; s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e132); } + if (peg$silentFails === 0) { peg$fail(peg$e133); } return s0; } @@ -4514,7 +4540,7 @@ function peg$parse(input, options) { s0 = peg$currPos; peg$savedPos = peg$currPos; - s1 = peg$f115(); + s1 = peg$f116(); if (s1) { s1 = undefined; } else { @@ -4551,7 +4577,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e135); } + if (peg$silentFails === 0) { peg$fail(peg$e136); } } while (s2 !== peg$FAILED) { s1.push(s2); @@ -4560,7 +4586,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e135); } + if (peg$silentFails === 0) { peg$fail(peg$e136); } } } s2 = input.charAt(peg$currPos); @@ -4568,7 +4594,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e136); } + if (peg$silentFails === 0) { peg$fail(peg$e137); } } if (s2 !== peg$FAILED) { s3 = []; @@ -4579,7 +4605,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e137); } + if (peg$silentFails === 0) { peg$fail(peg$e138); } } } while (s4 !== peg$FAILED) { @@ -4591,7 +4617,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e137); } + if (peg$silentFails === 0) { peg$fail(peg$e138); } } } } @@ -4600,7 +4626,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e136); } + if (peg$silentFails === 0) { peg$fail(peg$e137); } } if (s4 !== peg$FAILED) { s5 = []; @@ -4609,7 +4635,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e131); } + if (peg$silentFails === 0) { peg$fail(peg$e132); } } while (s6 !== peg$FAILED) { s5.push(s6); @@ -4618,11 +4644,11 @@ function peg$parse(input, options) { peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e131); } + if (peg$silentFails === 0) { peg$fail(peg$e132); } } } peg$savedPos = s0; - s0 = peg$f116(s1, s3, s5); + s0 = peg$f117(s1, s3, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4634,7 +4660,7 @@ function peg$parse(input, options) { peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e134); } + if (peg$silentFails === 0) { peg$fail(peg$e135); } } return s0; @@ -4651,7 +4677,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e135); } + if (peg$silentFails === 0) { peg$fail(peg$e136); } } while (s2 !== peg$FAILED) { s1.push(s2); @@ -4660,7 +4686,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e135); } + if (peg$silentFails === 0) { peg$fail(peg$e136); } } } s2 = input.charAt(peg$currPos); @@ -4668,7 +4694,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e136); } + if (peg$silentFails === 0) { peg$fail(peg$e137); } } if (s2 !== peg$FAILED) { s3 = []; @@ -4679,7 +4705,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e137); } + if (peg$silentFails === 0) { peg$fail(peg$e138); } } if (s4 === peg$FAILED) { s4 = peg$currPos; @@ -4695,15 +4721,15 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 8220) { - s6 = peg$c124; + s6 = peg$c125; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e138); } + if (peg$silentFails === 0) { peg$fail(peg$e139); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; - s4 = peg$f117(s1); + s4 = peg$f118(s1); } else { peg$currPos = s4; s4 = peg$FAILED; @@ -4726,15 +4752,15 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 8221) { - s6 = peg$c125; + s6 = peg$c126; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e139); } + if (peg$silentFails === 0) { peg$fail(peg$e140); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; - s4 = peg$f118(s1); + s4 = peg$f119(s1); } else { peg$currPos = s4; s4 = peg$FAILED; @@ -4757,15 +4783,15 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 34) { - s6 = peg$c126; + s6 = peg$c127; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e140); } + if (peg$silentFails === 0) { peg$fail(peg$e141); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; - s4 = peg$f119(s1); + s4 = peg$f120(s1); } else { peg$currPos = s4; s4 = peg$FAILED; @@ -4787,7 +4813,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e137); } + if (peg$silentFails === 0) { peg$fail(peg$e138); } } if (s4 === peg$FAILED) { s4 = peg$currPos; @@ -4803,15 +4829,15 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 8220) { - s6 = peg$c124; + s6 = peg$c125; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e138); } + if (peg$silentFails === 0) { peg$fail(peg$e139); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; - s4 = peg$f117(s1); + s4 = peg$f118(s1); } else { peg$currPos = s4; s4 = peg$FAILED; @@ -4834,15 +4860,15 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 8221) { - s6 = peg$c125; + s6 = peg$c126; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e139); } + if (peg$silentFails === 0) { peg$fail(peg$e140); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; - s4 = peg$f118(s1); + s4 = peg$f119(s1); } else { peg$currPos = s4; s4 = peg$FAILED; @@ -4865,15 +4891,15 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 34) { - s6 = peg$c126; + s6 = peg$c127; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e140); } + if (peg$silentFails === 0) { peg$fail(peg$e141); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; - s4 = peg$f119(s1); + s4 = peg$f120(s1); } else { peg$currPos = s4; s4 = peg$FAILED; @@ -4890,7 +4916,7 @@ function peg$parse(input, options) { s4 = peg$parseclosingQuote(); if (s4 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f120(s1, s3, s4); + s0 = peg$f121(s1, s3, s4); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4902,7 +4928,7 @@ function peg$parse(input, options) { peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e134); } + if (peg$silentFails === 0) { peg$fail(peg$e135); } } return s0; @@ -4917,7 +4943,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e136); } + if (peg$silentFails === 0) { peg$fail(peg$e137); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4955,7 +4981,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e141); } + if (peg$silentFails === 0) { peg$fail(peg$e142); } } while (s2 !== peg$FAILED) { s1.push(s2); @@ -4964,7 +4990,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e141); } + if (peg$silentFails === 0) { peg$fail(peg$e142); } } } s2 = []; @@ -4973,7 +4999,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e142); } + if (peg$silentFails === 0) { peg$fail(peg$e143); } } while (s3 !== peg$FAILED) { s2.push(s3); @@ -4982,7 +5008,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e142); } + if (peg$silentFails === 0) { peg$fail(peg$e143); } } } s3 = []; @@ -4991,7 +5017,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e143); } + if (peg$silentFails === 0) { peg$fail(peg$e144); } } while (s4 !== peg$FAILED) { s3.push(s4); @@ -5000,7 +5026,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e143); } + if (peg$silentFails === 0) { peg$fail(peg$e144); } } } s4 = peg$parseoperator(); @@ -5019,7 +5045,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e144); } + if (peg$silentFails === 0) { peg$fail(peg$e145); } } while (s2 !== peg$FAILED) { s1.push(s2); @@ -5028,7 +5054,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e144); } + if (peg$silentFails === 0) { peg$fail(peg$e145); } } } s2 = peg$currPos; @@ -5075,7 +5101,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e145); } + if (peg$silentFails === 0) { peg$fail(peg$e146); } } } } @@ -5091,7 +5117,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e146); } + if (peg$silentFails === 0) { peg$fail(peg$e147); } } if (s0 === peg$FAILED) { s0 = peg$currPos; diff --git a/src/libs/SearchParser/autocompleteParser.peggy b/src/libs/SearchParser/autocompleteParser.peggy index 1a24a98020eb..7d4076907517 100644 --- a/src/libs/SearchParser/autocompleteParser.peggy +++ b/src/libs/SearchParser/autocompleteParser.peggy @@ -105,6 +105,7 @@ autocompleteKey "key" / view / reimbursable / billable + / declined / policyID / action / date diff --git a/src/libs/SearchParser/baseRules.peggy b/src/libs/SearchParser/baseRules.peggy index 5077ae7f8862..66bd8ffaa8d4 100644 --- a/src/libs/SearchParser/baseRules.peggy +++ b/src/libs/SearchParser/baseRules.peggy @@ -68,6 +68,7 @@ withdrawalID = "withdrawalID"i / "withdrawal-id"i { return "withdrawalID"; } billable = "billable"i { return "billable"; } +declined = "declined"i { return "declined"; } reimbursable = "reimbursable"i { return "reimbursable"; } type = "type"i { return "type"; } status = "status"i { return "status"; } diff --git a/src/libs/SearchParser/searchParser.js b/src/libs/SearchParser/searchParser.js index edaa43a60119..feab33600cf2 100644 --- a/src/libs/SearchParser/searchParser.js +++ b/src/libs/SearchParser/searchParser.js @@ -229,88 +229,89 @@ function peg$parse(input, options) { var peg$c42 = "withdrawalid"; var peg$c43 = "withdrawal-id"; var peg$c44 = "billable"; - var peg$c45 = "reimbursable"; - var peg$c46 = "type"; - var peg$c47 = "status"; - var peg$c48 = "sortBy"; - var peg$c49 = "sort-by"; - var peg$c50 = "sortOrder"; - var peg$c51 = "sort-order"; - var peg$c52 = "policyID"; - var peg$c53 = "workspace"; - var peg$c54 = "submitted"; - var peg$c55 = "approved"; - var peg$c56 = "paid"; - var peg$c57 = "exported"; - var peg$c58 = "posted"; - var peg$c59 = "withdrawn"; - var peg$c60 = "groupby"; - var peg$c61 = "group-by"; - var peg$c62 = "limit"; - var peg$c63 = "feed"; - var peg$c64 = "title"; - var peg$c65 = "submitteruserid"; - var peg$c66 = "submitter-user-id"; - var peg$c67 = "submitterpayrollid"; - var peg$c68 = "submitter-payroll-id"; - var peg$c69 = "orderdealnumbers"; - var peg$c70 = "order-deal-numbers"; - var peg$c71 = "assignee"; - var peg$c72 = "createdby"; - var peg$c73 = "created-by"; - var peg$c74 = "action"; - var peg$c75 = "total"; - var peg$c76 = "has"; - var peg$c77 = "is"; - var peg$c78 = "purchaseamount"; - var peg$c79 = "purchase-amount"; - var peg$c80 = "purchasecurrency"; - var peg$c81 = "purchase-currency"; - var peg$c82 = "amountdebited"; - var peg$c83 = "amount-debited"; - var peg$c84 = "amountreimbursed"; - var peg$c85 = "amount-reimbursed"; - var peg$c86 = "columns"; - var peg$c87 = "view"; - var peg$c88 = "compare"; - var peg$c89 = "per-diem"; - var peg$c90 = "drafts"; - var peg$c91 = "draft"; - var peg$c92 = "tax"; - var peg$c93 = "policy-name"; - var peg$c94 = "long-report-id"; - var peg$c95 = "exported-to"; - var peg$c96 = "exportedto"; - var peg$c97 = "exchange-rate"; - var peg$c98 = "reimbursable-total"; - var peg$c99 = "non-reimbursable-total"; - var peg$c100 = "group-from"; - var peg$c101 = "group-expenses"; - var peg$c102 = "group-total"; - var peg$c103 = "group-card"; - var peg$c104 = "group-feed"; - var peg$c105 = "group-bank-account"; - var peg$c106 = "group-withdrawn"; - var peg$c107 = "group-withdrawal-id"; - var peg$c108 = "group-amount-debited"; - var peg$c109 = "group-amount-reimbursed"; - var peg$c110 = "group-category"; - var peg$c111 = "group-tag"; - var peg$c112 = "group-merchant"; - var peg$c113 = "group-day"; - var peg$c114 = "group-month"; - var peg$c115 = "group-week"; - var peg$c116 = "group-year"; - var peg$c117 = "group-quarter"; - var peg$c118 = "!="; - var peg$c119 = ">="; - var peg$c120 = ">"; - var peg$c121 = "<="; - var peg$c122 = "<"; - var peg$c123 = "\\"; - var peg$c124 = "\u201C"; - var peg$c125 = "\u201D"; - var peg$c126 = "\""; + var peg$c45 = "declined"; + var peg$c46 = "reimbursable"; + var peg$c47 = "type"; + var peg$c48 = "status"; + var peg$c49 = "sortBy"; + var peg$c50 = "sort-by"; + var peg$c51 = "sortOrder"; + var peg$c52 = "sort-order"; + var peg$c53 = "policyID"; + var peg$c54 = "workspace"; + var peg$c55 = "submitted"; + var peg$c56 = "approved"; + var peg$c57 = "paid"; + var peg$c58 = "exported"; + var peg$c59 = "posted"; + var peg$c60 = "withdrawn"; + var peg$c61 = "groupby"; + var peg$c62 = "group-by"; + var peg$c63 = "limit"; + var peg$c64 = "feed"; + var peg$c65 = "title"; + var peg$c66 = "submitteruserid"; + var peg$c67 = "submitter-user-id"; + var peg$c68 = "submitterpayrollid"; + var peg$c69 = "submitter-payroll-id"; + var peg$c70 = "orderdealnumbers"; + var peg$c71 = "order-deal-numbers"; + var peg$c72 = "assignee"; + var peg$c73 = "createdby"; + var peg$c74 = "created-by"; + var peg$c75 = "action"; + var peg$c76 = "total"; + var peg$c77 = "has"; + var peg$c78 = "is"; + var peg$c79 = "purchaseamount"; + var peg$c80 = "purchase-amount"; + var peg$c81 = "purchasecurrency"; + var peg$c82 = "purchase-currency"; + var peg$c83 = "amountdebited"; + var peg$c84 = "amount-debited"; + var peg$c85 = "amountreimbursed"; + var peg$c86 = "amount-reimbursed"; + var peg$c87 = "columns"; + var peg$c88 = "view"; + var peg$c89 = "compare"; + var peg$c90 = "per-diem"; + var peg$c91 = "drafts"; + var peg$c92 = "draft"; + var peg$c93 = "tax"; + var peg$c94 = "policy-name"; + var peg$c95 = "long-report-id"; + var peg$c96 = "exported-to"; + var peg$c97 = "exportedto"; + var peg$c98 = "exchange-rate"; + var peg$c99 = "reimbursable-total"; + var peg$c100 = "non-reimbursable-total"; + var peg$c101 = "group-from"; + var peg$c102 = "group-expenses"; + var peg$c103 = "group-total"; + var peg$c104 = "group-card"; + var peg$c105 = "group-feed"; + var peg$c106 = "group-bank-account"; + var peg$c107 = "group-withdrawn"; + var peg$c108 = "group-withdrawal-id"; + var peg$c109 = "group-amount-debited"; + var peg$c110 = "group-amount-reimbursed"; + var peg$c111 = "group-category"; + var peg$c112 = "group-tag"; + var peg$c113 = "group-merchant"; + var peg$c114 = "group-day"; + var peg$c115 = "group-month"; + var peg$c116 = "group-week"; + var peg$c117 = "group-year"; + var peg$c118 = "group-quarter"; + var peg$c119 = "!="; + var peg$c120 = ">="; + var peg$c121 = ">"; + var peg$c122 = "<="; + var peg$c123 = "<"; + var peg$c124 = "\\"; + var peg$c125 = "\u201C"; + var peg$c126 = "\u201D"; + var peg$c127 = "\""; var peg$r0 = /^[^ \t\r\n\xA0]/; var peg$r1 = /^[ \t\r\n\xA0,:=<>!]/; @@ -378,105 +379,106 @@ function peg$parse(input, options) { var peg$e47 = peg$literalExpectation("withdrawalID", true); var peg$e48 = peg$literalExpectation("withdrawal-id", true); var peg$e49 = peg$literalExpectation("billable", true); - var peg$e50 = peg$literalExpectation("reimbursable", true); - var peg$e51 = peg$literalExpectation("type", true); - var peg$e52 = peg$literalExpectation("status", true); - var peg$e53 = peg$literalExpectation("sortBy", false); - var peg$e54 = peg$literalExpectation("sort-by", true); - var peg$e55 = peg$literalExpectation("sortOrder", false); - var peg$e56 = peg$literalExpectation("sort-order", true); - var peg$e57 = peg$literalExpectation("policyID", false); - var peg$e58 = peg$literalExpectation("workspace", true); - var peg$e59 = peg$literalExpectation("submitted", true); - var peg$e60 = peg$literalExpectation("approved", true); - var peg$e61 = peg$literalExpectation("paid", true); - var peg$e62 = peg$literalExpectation("exported", true); - var peg$e63 = peg$literalExpectation("posted", true); - var peg$e64 = peg$literalExpectation("withdrawn", true); - var peg$e65 = peg$literalExpectation("groupBy", true); - var peg$e66 = peg$literalExpectation("group-by", true); - var peg$e67 = peg$literalExpectation("limit", true); - var peg$e68 = peg$literalExpectation("feed", true); - var peg$e69 = peg$literalExpectation("title", true); - var peg$e70 = peg$literalExpectation("submitterUserID", true); - var peg$e71 = peg$literalExpectation("submitter-user-id", true); - var peg$e72 = peg$literalExpectation("submitterPayrollID", true); - var peg$e73 = peg$literalExpectation("submitter-payroll-id", true); - var peg$e74 = peg$literalExpectation("orderDealNumbers", true); - var peg$e75 = peg$literalExpectation("order-deal-numbers", true); - var peg$e76 = peg$literalExpectation("assignee", true); - var peg$e77 = peg$literalExpectation("createdBy", true); - var peg$e78 = peg$literalExpectation("created-by", true); - var peg$e79 = peg$literalExpectation("action", true); - var peg$e80 = peg$literalExpectation("total", true); - var peg$e81 = peg$literalExpectation("has", true); - var peg$e82 = peg$literalExpectation("is", true); - var peg$e83 = peg$literalExpectation("purchaseAmount", true); - var peg$e84 = peg$literalExpectation("purchase-amount", true); - var peg$e85 = peg$literalExpectation("purchaseCurrency", true); - var peg$e86 = peg$literalExpectation("purchase-currency", true); - var peg$e87 = peg$literalExpectation("amountDebited", true); - var peg$e88 = peg$literalExpectation("amount-debited", true); - var peg$e89 = peg$literalExpectation("amountReimbursed", true); - var peg$e90 = peg$literalExpectation("amount-reimbursed", true); - var peg$e91 = peg$literalExpectation("columns", true); - var peg$e92 = peg$literalExpectation("view", true); - var peg$e93 = peg$literalExpectation("compare", true); - var peg$e94 = peg$literalExpectation("per-diem", true); - var peg$e95 = peg$literalExpectation("drafts", true); - var peg$e96 = peg$literalExpectation("draft", true); - var peg$e97 = peg$literalExpectation("tax", true); - var peg$e98 = peg$literalExpectation("policy-name", true); - var peg$e99 = peg$literalExpectation("long-report-id", true); - var peg$e100 = peg$literalExpectation("exported-to", true); - var peg$e101 = peg$classExpectation([":", "="], false, false); - var peg$e102 = peg$literalExpectation("exportedTo", true); - var peg$e103 = peg$literalExpectation("exchange-rate", true); - var peg$e104 = peg$literalExpectation("reimbursable-total", true); - var peg$e105 = peg$literalExpectation("non-reimbursable-total", true); - var peg$e106 = peg$literalExpectation("group-from", true); - var peg$e107 = peg$literalExpectation("group-expenses", true); - var peg$e108 = peg$literalExpectation("group-total", true); - var peg$e109 = peg$literalExpectation("group-card", true); - var peg$e110 = peg$literalExpectation("group-feed", true); - var peg$e111 = peg$literalExpectation("group-bank-account", true); - var peg$e112 = peg$literalExpectation("group-withdrawn", true); - var peg$e113 = peg$literalExpectation("group-withdrawal-id", true); - var peg$e114 = peg$literalExpectation("group-amount-debited", true); - var peg$e115 = peg$literalExpectation("group-amount-reimbursed", true); - var peg$e116 = peg$literalExpectation("group-category", true); - var peg$e117 = peg$literalExpectation("group-tag", true); - var peg$e118 = peg$literalExpectation("group-merchant", true); - var peg$e119 = peg$literalExpectation("group-day", true); - var peg$e120 = peg$literalExpectation("group-month", true); - var peg$e121 = peg$literalExpectation("group-week", true); - var peg$e122 = peg$literalExpectation("group-year", true); - var peg$e123 = peg$literalExpectation("group-quarter", true); - var peg$e124 = peg$otherExpectation("operator"); - var peg$e125 = peg$literalExpectation("!=", false); - var peg$e126 = peg$literalExpectation(">=", false); - var peg$e127 = peg$literalExpectation(">", false); - var peg$e128 = peg$literalExpectation("<=", false); - var peg$e129 = peg$literalExpectation("<", false); - var peg$e130 = peg$literalExpectation("\\", false); - var peg$e131 = peg$classExpectation([",", "\"", "\u201D", "\u201C", "\\"], false, false); - var peg$e132 = peg$otherExpectation("word"); - var peg$e133 = peg$classExpectation([" ", ",", "\t", "\n", "\r", "\xA0"], true, false); - var peg$e134 = peg$otherExpectation("whitespace"); - var peg$e135 = peg$classExpectation([" ", "\t", "\r", "\n", "\xA0"], false, false); - var peg$e136 = peg$otherExpectation("quote"); - var peg$e137 = peg$classExpectation([" ", ",", "\"", "\u201D", "\u201C", "\t", "\n", "\r", "\xA0"], true, false); - var peg$e138 = peg$classExpectation(["\"", ["\u201C", "\u201D"]], false, false); - var peg$e139 = peg$classExpectation(["\"", "\u201D", "\u201C", "\r", "\n"], true, false); - var peg$e140 = peg$literalExpectation("\u201C", false); - var peg$e141 = peg$literalExpectation("\u201D", false); - var peg$e142 = peg$literalExpectation("\"", false); - var peg$e143 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ["a", "z"], ["A", "Z"], ["0", "9"]], false, false); - var peg$e144 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"]], false, false); - var peg$e145 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0"], false, false); - var peg$e146 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ["a", "z"], ["A", "Z"]], false, false); - var peg$e147 = peg$classExpectation([","], false, false); - var peg$e148 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ","], false, false); + var peg$e50 = peg$literalExpectation("declined", true); + var peg$e51 = peg$literalExpectation("reimbursable", true); + var peg$e52 = peg$literalExpectation("type", true); + var peg$e53 = peg$literalExpectation("status", true); + var peg$e54 = peg$literalExpectation("sortBy", false); + var peg$e55 = peg$literalExpectation("sort-by", true); + var peg$e56 = peg$literalExpectation("sortOrder", false); + var peg$e57 = peg$literalExpectation("sort-order", true); + var peg$e58 = peg$literalExpectation("policyID", false); + var peg$e59 = peg$literalExpectation("workspace", true); + var peg$e60 = peg$literalExpectation("submitted", true); + var peg$e61 = peg$literalExpectation("approved", true); + var peg$e62 = peg$literalExpectation("paid", true); + var peg$e63 = peg$literalExpectation("exported", true); + var peg$e64 = peg$literalExpectation("posted", true); + var peg$e65 = peg$literalExpectation("withdrawn", true); + var peg$e66 = peg$literalExpectation("groupBy", true); + var peg$e67 = peg$literalExpectation("group-by", true); + var peg$e68 = peg$literalExpectation("limit", true); + var peg$e69 = peg$literalExpectation("feed", true); + var peg$e70 = peg$literalExpectation("title", true); + var peg$e71 = peg$literalExpectation("submitterUserID", true); + var peg$e72 = peg$literalExpectation("submitter-user-id", true); + var peg$e73 = peg$literalExpectation("submitterPayrollID", true); + var peg$e74 = peg$literalExpectation("submitter-payroll-id", true); + var peg$e75 = peg$literalExpectation("orderDealNumbers", true); + var peg$e76 = peg$literalExpectation("order-deal-numbers", true); + var peg$e77 = peg$literalExpectation("assignee", true); + var peg$e78 = peg$literalExpectation("createdBy", true); + var peg$e79 = peg$literalExpectation("created-by", true); + var peg$e80 = peg$literalExpectation("action", true); + var peg$e81 = peg$literalExpectation("total", true); + var peg$e82 = peg$literalExpectation("has", true); + var peg$e83 = peg$literalExpectation("is", true); + var peg$e84 = peg$literalExpectation("purchaseAmount", true); + var peg$e85 = peg$literalExpectation("purchase-amount", true); + var peg$e86 = peg$literalExpectation("purchaseCurrency", true); + var peg$e87 = peg$literalExpectation("purchase-currency", true); + var peg$e88 = peg$literalExpectation("amountDebited", true); + var peg$e89 = peg$literalExpectation("amount-debited", true); + var peg$e90 = peg$literalExpectation("amountReimbursed", true); + var peg$e91 = peg$literalExpectation("amount-reimbursed", true); + var peg$e92 = peg$literalExpectation("columns", true); + var peg$e93 = peg$literalExpectation("view", true); + var peg$e94 = peg$literalExpectation("compare", true); + var peg$e95 = peg$literalExpectation("per-diem", true); + var peg$e96 = peg$literalExpectation("drafts", true); + var peg$e97 = peg$literalExpectation("draft", true); + var peg$e98 = peg$literalExpectation("tax", true); + var peg$e99 = peg$literalExpectation("policy-name", true); + var peg$e100 = peg$literalExpectation("long-report-id", true); + var peg$e101 = peg$literalExpectation("exported-to", true); + var peg$e102 = peg$classExpectation([":", "="], false, false); + var peg$e103 = peg$literalExpectation("exportedTo", true); + var peg$e104 = peg$literalExpectation("exchange-rate", true); + var peg$e105 = peg$literalExpectation("reimbursable-total", true); + var peg$e106 = peg$literalExpectation("non-reimbursable-total", true); + var peg$e107 = peg$literalExpectation("group-from", true); + var peg$e108 = peg$literalExpectation("group-expenses", true); + var peg$e109 = peg$literalExpectation("group-total", true); + var peg$e110 = peg$literalExpectation("group-card", true); + var peg$e111 = peg$literalExpectation("group-feed", true); + var peg$e112 = peg$literalExpectation("group-bank-account", true); + var peg$e113 = peg$literalExpectation("group-withdrawn", true); + var peg$e114 = peg$literalExpectation("group-withdrawal-id", true); + var peg$e115 = peg$literalExpectation("group-amount-debited", true); + var peg$e116 = peg$literalExpectation("group-amount-reimbursed", true); + var peg$e117 = peg$literalExpectation("group-category", true); + var peg$e118 = peg$literalExpectation("group-tag", true); + var peg$e119 = peg$literalExpectation("group-merchant", true); + var peg$e120 = peg$literalExpectation("group-day", true); + var peg$e121 = peg$literalExpectation("group-month", true); + var peg$e122 = peg$literalExpectation("group-week", true); + var peg$e123 = peg$literalExpectation("group-year", true); + var peg$e124 = peg$literalExpectation("group-quarter", true); + var peg$e125 = peg$otherExpectation("operator"); + var peg$e126 = peg$literalExpectation("!=", false); + var peg$e127 = peg$literalExpectation(">=", false); + var peg$e128 = peg$literalExpectation(">", false); + var peg$e129 = peg$literalExpectation("<=", false); + var peg$e130 = peg$literalExpectation("<", false); + var peg$e131 = peg$literalExpectation("\\", false); + var peg$e132 = peg$classExpectation([",", "\"", "\u201D", "\u201C", "\\"], false, false); + var peg$e133 = peg$otherExpectation("word"); + var peg$e134 = peg$classExpectation([" ", ",", "\t", "\n", "\r", "\xA0"], true, false); + var peg$e135 = peg$otherExpectation("whitespace"); + var peg$e136 = peg$classExpectation([" ", "\t", "\r", "\n", "\xA0"], false, false); + var peg$e137 = peg$otherExpectation("quote"); + var peg$e138 = peg$classExpectation([" ", ",", "\"", "\u201D", "\u201C", "\t", "\n", "\r", "\xA0"], true, false); + var peg$e139 = peg$classExpectation(["\"", ["\u201C", "\u201D"]], false, false); + var peg$e140 = peg$classExpectation(["\"", "\u201D", "\u201C", "\r", "\n"], true, false); + var peg$e141 = peg$literalExpectation("\u201C", false); + var peg$e142 = peg$literalExpectation("\u201D", false); + var peg$e143 = peg$literalExpectation("\"", false); + var peg$e144 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ["a", "z"], ["A", "Z"], ["0", "9"]], false, false); + var peg$e145 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"]], false, false); + var peg$e146 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0"], false, false); + var peg$e147 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ["a", "z"], ["A", "Z"]], false, false); + var peg$e148 = peg$classExpectation([","], false, false); + var peg$e149 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ","], false, false); var peg$f0 = function(filters) { return applyDefaults(filters); }; var peg$f1 = function(head, tail) { @@ -591,105 +593,106 @@ function peg$parse(input, options) { var peg$f33 = function() { return "paidStatus"; }; var peg$f34 = function() { return "withdrawalID"; }; var peg$f35 = function() { return "billable"; }; - var peg$f36 = function() { return "reimbursable"; }; - var peg$f37 = function() { return "type"; }; - var peg$f38 = function() { return "status"; }; - var peg$f39 = function() { return "sortBy"; }; - var peg$f40 = function() { return "sortOrder"; }; - var peg$f41 = function() { return "policyID"; }; - var peg$f42 = function() { return "submitted"; }; - var peg$f43 = function() { return "approved"; }; - var peg$f44 = function() { return "paid"; }; - var peg$f45 = function() { return "exported"; }; - var peg$f46 = function() { return "posted"; }; - var peg$f47 = function() { return "withdrawn"; }; - var peg$f48 = function() { return "groupBy"; }; - var peg$f49 = function() { return "limit"; }; - var peg$f50 = function() { return "feed"; }; - var peg$f51 = function() { return "title"; }; - var peg$f52 = function() { return "submitterUserID"; }; - var peg$f53 = function() { return "submitterPayrollID"; }; - var peg$f54 = function() { return "orderDealNumbers"; }; - var peg$f55 = function() { return "assignee"; }; - var peg$f56 = function() { return "createdBy"; }; - var peg$f57 = function() { return "action"; }; - var peg$f58 = function() {return "total"; }; - var peg$f59 = function() {return "has"; }; - var peg$f60 = function() {return "is"; }; - var peg$f61 = function() {return "purchaseAmount"}; - var peg$f62 = function() {return "purchaseCurrency"}; - var peg$f63 = function() {return "amountDebited"}; - var peg$f64 = function() {return "amountReimbursed"}; - var peg$f65 = function() { + var peg$f36 = function() { return "declined"; }; + var peg$f37 = function() { return "reimbursable"; }; + var peg$f38 = function() { return "type"; }; + var peg$f39 = function() { return "status"; }; + var peg$f40 = function() { return "sortBy"; }; + var peg$f41 = function() { return "sortOrder"; }; + var peg$f42 = function() { return "policyID"; }; + var peg$f43 = function() { return "submitted"; }; + var peg$f44 = function() { return "approved"; }; + var peg$f45 = function() { return "paid"; }; + var peg$f46 = function() { return "exported"; }; + var peg$f47 = function() { return "posted"; }; + var peg$f48 = function() { return "withdrawn"; }; + var peg$f49 = function() { return "groupBy"; }; + var peg$f50 = function() { return "limit"; }; + var peg$f51 = function() { return "feed"; }; + var peg$f52 = function() { return "title"; }; + var peg$f53 = function() { return "submitterUserID"; }; + var peg$f54 = function() { return "submitterPayrollID"; }; + var peg$f55 = function() { return "orderDealNumbers"; }; + var peg$f56 = function() { return "assignee"; }; + var peg$f57 = function() { return "createdBy"; }; + var peg$f58 = function() { return "action"; }; + var peg$f59 = function() {return "total"; }; + var peg$f60 = function() {return "has"; }; + var peg$f61 = function() {return "is"; }; + var peg$f62 = function() {return "purchaseAmount"}; + var peg$f63 = function() {return "purchaseCurrency"}; + var peg$f64 = function() {return "amountDebited"}; + var peg$f65 = function() {return "amountReimbursed"}; + var peg$f66 = function() { isColumnsContext = true; return "columns"; }; - var peg$f66 = function() {return "view"}; - var peg$f67 = function() {return "compare"}; - var peg$f68 = function() { return isColumnsContext; }; - var peg$f69 = function() { return "perDiem"; }; - var peg$f70 = function() { return "drafts"; }; - var peg$f71 = function() { return "originalamount"; }; - var peg$f72 = function() { return "taxAmount"; }; - var peg$f73 = function() { return "taxrate"; }; - var peg$f74 = function() { return "policyname"; }; - var peg$f75 = function() { return "withdrawalID"; }; - var peg$f76 = function() { return "bankAccount"; }; - var peg$f77 = function() { return "reportID"; }; - var peg$f78 = function() { return "base62ReportID"; }; - var peg$f79 = function() { return "exportedto"; }; - var peg$f80 = function() { return "exportedTo"; }; + var peg$f67 = function() {return "view"}; + var peg$f68 = function() {return "compare"}; + var peg$f69 = function() { return isColumnsContext; }; + var peg$f70 = function() { return "perDiem"; }; + var peg$f71 = function() { return "drafts"; }; + var peg$f72 = function() { return "originalamount"; }; + var peg$f73 = function() { return "taxAmount"; }; + var peg$f74 = function() { return "taxrate"; }; + var peg$f75 = function() { return "policyname"; }; + var peg$f76 = function() { return "withdrawalID"; }; + var peg$f77 = function() { return "bankAccount"; }; + var peg$f78 = function() { return "reportID"; }; + var peg$f79 = function() { return "base62ReportID"; }; + var peg$f80 = function() { return "exportedto"; }; var peg$f81 = function() { return "exportedTo"; }; - var peg$f82 = function() { return "exchangeRate"; }; - var peg$f83 = function() { return "reimbursableTotal"; }; - var peg$f84 = function() { return "nonReimbursableTotal"; }; - var peg$f85 = function() { return "groupFrom"; }; - var peg$f86 = function() { return "groupExpenses"; }; - var peg$f87 = function() { return "groupTotal"; }; - var peg$f88 = function() { return "groupCard"; }; - var peg$f89 = function() { return "groupFeed"; }; - var peg$f90 = function() { return "groupBankAccount"; }; - var peg$f91 = function() { return "groupWithdrawn"; }; - var peg$f92 = function() { return "groupWithdrawalID"; }; - var peg$f93 = function() { return "groupAmountDebited"; }; - var peg$f94 = function() { return "groupAmountReimbursed"; }; - var peg$f95 = function() { return "amountDebited"; }; - var peg$f96 = function() { return "amountReimbursed"; }; - var peg$f97 = function() { return "groupCategory"; }; - var peg$f98 = function() { return "groupTag"; }; - var peg$f99 = function() { return "groupMerchant"; }; - var peg$f100 = function() { return "groupday"; }; - var peg$f101 = function() { return "groupmonth"; }; - var peg$f102 = function() { return "groupweek"; }; - var peg$f103 = function() { return "groupyear"; }; - var peg$f104 = function() { return "groupquarter"; }; - var peg$f105 = function() { return "eq"; }; - var peg$f106 = function() { return "neq"; }; - var peg$f107 = function() { return "gte"; }; - var peg$f108 = function() { return "gt"; }; - var peg$f109 = function() { return "lte"; }; - var peg$f110 = function() { return "lt"; }; - var peg$f111 = function(o) { + var peg$f82 = function() { return "exportedTo"; }; + var peg$f83 = function() { return "exchangeRate"; }; + var peg$f84 = function() { return "reimbursableTotal"; }; + var peg$f85 = function() { return "nonReimbursableTotal"; }; + var peg$f86 = function() { return "groupFrom"; }; + var peg$f87 = function() { return "groupExpenses"; }; + var peg$f88 = function() { return "groupTotal"; }; + var peg$f89 = function() { return "groupCard"; }; + var peg$f90 = function() { return "groupFeed"; }; + var peg$f91 = function() { return "groupBankAccount"; }; + var peg$f92 = function() { return "groupWithdrawn"; }; + var peg$f93 = function() { return "groupWithdrawalID"; }; + var peg$f94 = function() { return "groupAmountDebited"; }; + var peg$f95 = function() { return "groupAmountReimbursed"; }; + var peg$f96 = function() { return "amountDebited"; }; + var peg$f97 = function() { return "amountReimbursed"; }; + var peg$f98 = function() { return "groupCategory"; }; + var peg$f99 = function() { return "groupTag"; }; + var peg$f100 = function() { return "groupMerchant"; }; + var peg$f101 = function() { return "groupday"; }; + var peg$f102 = function() { return "groupmonth"; }; + var peg$f103 = function() { return "groupweek"; }; + var peg$f104 = function() { return "groupyear"; }; + var peg$f105 = function() { return "groupquarter"; }; + var peg$f106 = function() { return "eq"; }; + var peg$f107 = function() { return "neq"; }; + var peg$f108 = function() { return "gte"; }; + var peg$f109 = function() { return "gt"; }; + var peg$f110 = function() { return "lte"; }; + var peg$f111 = function() { return "lt"; }; + var peg$f112 = function(o) { if (nameOperator) { expectingNestedQuote = (o === "eq"); // Use simple parser if no valid operator is found } isColumnsContext = false; return o; }; - var peg$f112 = function(c) { return c; }; - var peg$f113 = function(chars) { return chars.join("").trim(); }; - var peg$f114 = function() { + var peg$f113 = function(c) { return c; }; + var peg$f114 = function(chars) { return chars.join("").trim(); }; + var peg$f115 = function() { isColumnsContext = false; return "and"; }; - var peg$f115 = function() { return expectingNestedQuote; }; - var peg$f116 = function(start, inner, end) { //handle no-breaking space + var peg$f116 = function() { return expectingNestedQuote; }; + var peg$f117 = function(start, inner, end) { //handle no-breaking space return [...start, '"', ...inner, '"', ...end].join(""); }; - var peg$f117 = function(start) {return "“"}; - var peg$f118 = function(start) {return "”"}; - var peg$f119 = function(start) {return "\""}; - var peg$f120 = function(start, inner, end) { + var peg$f118 = function(start) {return "“"}; + var peg$f119 = function(start) {return "”"}; + var peg$f120 = function(start) {return "\""}; + var peg$f121 = function(start, inner, end) { return [...start, '"', ...inner, '"'].join(""); }; var peg$currPos = options.peg$currPos | 0; @@ -1269,21 +1272,24 @@ function peg$parse(input, options) { if (s1 === peg$FAILED) { s1 = peg$parsebillable(); if (s1 === peg$FAILED) { - s1 = peg$parseaction(); + s1 = peg$parsedeclined(); if (s1 === peg$FAILED) { - s1 = peg$parsehas(); + s1 = peg$parseaction(); if (s1 === peg$FAILED) { - s1 = peg$parseis(); + s1 = peg$parsehas(); if (s1 === peg$FAILED) { - s1 = peg$parsepurchaseCurrency(); + s1 = peg$parseis(); if (s1 === peg$FAILED) { - s1 = peg$parsepurchaseAmount(); + s1 = peg$parsepurchaseCurrency(); if (s1 === peg$FAILED) { - s1 = peg$parsepolicyID(); + s1 = peg$parsepurchaseAmount(); if (s1 === peg$FAILED) { - s1 = peg$parsestatus(); + s1 = peg$parsepolicyID(); if (s1 === peg$FAILED) { - s1 = peg$parsereportFieldDynamic(); + s1 = peg$parsestatus(); + if (s1 === peg$FAILED) { + s1 = peg$parsereportFieldDynamic(); + } } } } @@ -2208,13 +2214,13 @@ function peg$parse(input, options) { return s0; } - function peg$parsereimbursable() { + function peg$parsedeclined() { var s0, s1; s0 = peg$currPos; - s1 = input.substr(peg$currPos, 12); + s1 = input.substr(peg$currPos, 8); if (s1.toLowerCase() === peg$c45) { - peg$currPos += 12; + peg$currPos += 8; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$e50); } @@ -2228,13 +2234,13 @@ function peg$parse(input, options) { return s0; } - function peg$parsetype() { + function peg$parsereimbursable() { var s0, s1; s0 = peg$currPos; - s1 = input.substr(peg$currPos, 4); + s1 = input.substr(peg$currPos, 12); if (s1.toLowerCase() === peg$c46) { - peg$currPos += 4; + peg$currPos += 12; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$e51); } @@ -2248,13 +2254,13 @@ function peg$parse(input, options) { return s0; } - function peg$parsestatus() { + function peg$parsetype() { var s0, s1; s0 = peg$currPos; - s1 = input.substr(peg$currPos, 6); + s1 = input.substr(peg$currPos, 4); if (s1.toLowerCase() === peg$c47) { - peg$currPos += 6; + peg$currPos += 4; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$e52); } @@ -2268,28 +2274,48 @@ function peg$parse(input, options) { return s0; } + function peg$parsestatus() { + var s0, s1; + + s0 = peg$currPos; + s1 = input.substr(peg$currPos, 6); + if (s1.toLowerCase() === peg$c48) { + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e53); } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f39(); + } + s0 = s1; + + return s0; + } + function peg$parsesortBy() { var s0, s1; - if (input.substr(peg$currPos, 6) === peg$c48) { - s0 = peg$c48; + if (input.substr(peg$currPos, 6) === peg$c49) { + s0 = peg$c49; peg$currPos += 6; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e53); } + if (peg$silentFails === 0) { peg$fail(peg$e54); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 7); - if (s1.toLowerCase() === peg$c49) { + if (s1.toLowerCase() === peg$c50) { peg$currPos += 7; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e54); } + if (peg$silentFails === 0) { peg$fail(peg$e55); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f39(); + s1 = peg$f40(); } s0 = s1; } @@ -2300,25 +2326,25 @@ function peg$parse(input, options) { function peg$parsesortOrder() { var s0, s1; - if (input.substr(peg$currPos, 9) === peg$c50) { - s0 = peg$c50; + if (input.substr(peg$currPos, 9) === peg$c51) { + s0 = peg$c51; peg$currPos += 9; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e55); } + if (peg$silentFails === 0) { peg$fail(peg$e56); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c51) { + if (s1.toLowerCase() === peg$c52) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e56); } + if (peg$silentFails === 0) { peg$fail(peg$e57); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f40(); + s1 = peg$f41(); } s0 = s1; } @@ -2329,25 +2355,25 @@ function peg$parse(input, options) { function peg$parsepolicyID() { var s0, s1; - if (input.substr(peg$currPos, 8) === peg$c52) { - s0 = peg$c52; + if (input.substr(peg$currPos, 8) === peg$c53) { + s0 = peg$c53; peg$currPos += 8; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e57); } + if (peg$silentFails === 0) { peg$fail(peg$e58); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 9); - if (s1.toLowerCase() === peg$c53) { + if (s1.toLowerCase() === peg$c54) { peg$currPos += 9; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e58); } + if (peg$silentFails === 0) { peg$fail(peg$e59); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f41(); + s1 = peg$f42(); } s0 = s1; } @@ -2360,15 +2386,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 9); - if (s1.toLowerCase() === peg$c54) { + if (s1.toLowerCase() === peg$c55) { peg$currPos += 9; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e59); } + if (peg$silentFails === 0) { peg$fail(peg$e60); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f42(); + s1 = peg$f43(); } s0 = s1; @@ -2380,15 +2406,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 8); - if (s1.toLowerCase() === peg$c55) { + if (s1.toLowerCase() === peg$c56) { peg$currPos += 8; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e60); } + if (peg$silentFails === 0) { peg$fail(peg$e61); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f43(); + s1 = peg$f44(); } s0 = s1; @@ -2400,15 +2426,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 4); - if (s1.toLowerCase() === peg$c56) { + if (s1.toLowerCase() === peg$c57) { peg$currPos += 4; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e61); } + if (peg$silentFails === 0) { peg$fail(peg$e62); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f44(); + s1 = peg$f45(); } s0 = s1; @@ -2420,15 +2446,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 8); - if (s1.toLowerCase() === peg$c57) { + if (s1.toLowerCase() === peg$c58) { peg$currPos += 8; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e62); } + if (peg$silentFails === 0) { peg$fail(peg$e63); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f45(); + s1 = peg$f46(); } s0 = s1; @@ -2440,15 +2466,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 6); - if (s1.toLowerCase() === peg$c58) { + if (s1.toLowerCase() === peg$c59) { peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e63); } + if (peg$silentFails === 0) { peg$fail(peg$e64); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f46(); + s1 = peg$f47(); } s0 = s1; @@ -2460,15 +2486,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 9); - if (s1.toLowerCase() === peg$c59) { + if (s1.toLowerCase() === peg$c60) { peg$currPos += 9; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e64); } + if (peg$silentFails === 0) { peg$fail(peg$e65); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f47(); + s1 = peg$f48(); } s0 = s1; @@ -2479,24 +2505,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 7); - if (s0.toLowerCase() === peg$c60) { + if (s0.toLowerCase() === peg$c61) { peg$currPos += 7; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e65); } + if (peg$silentFails === 0) { peg$fail(peg$e66); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 8); - if (s1.toLowerCase() === peg$c61) { + if (s1.toLowerCase() === peg$c62) { peg$currPos += 8; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e66); } + if (peg$silentFails === 0) { peg$fail(peg$e67); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f48(); + s1 = peg$f49(); } s0 = s1; } @@ -2509,15 +2535,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 5); - if (s1.toLowerCase() === peg$c62) { + if (s1.toLowerCase() === peg$c63) { peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e67); } + if (peg$silentFails === 0) { peg$fail(peg$e68); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f49(); + s1 = peg$f50(); } s0 = s1; @@ -2529,15 +2555,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 4); - if (s1.toLowerCase() === peg$c63) { + if (s1.toLowerCase() === peg$c64) { peg$currPos += 4; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e68); } + if (peg$silentFails === 0) { peg$fail(peg$e69); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f50(); + s1 = peg$f51(); } s0 = s1; @@ -2549,15 +2575,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 5); - if (s1.toLowerCase() === peg$c64) { + if (s1.toLowerCase() === peg$c65) { peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e69); } + if (peg$silentFails === 0) { peg$fail(peg$e70); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f51(); + s1 = peg$f52(); } s0 = s1; @@ -2568,24 +2594,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 15); - if (s0.toLowerCase() === peg$c65) { + if (s0.toLowerCase() === peg$c66) { peg$currPos += 15; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e70); } + if (peg$silentFails === 0) { peg$fail(peg$e71); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 17); - if (s1.toLowerCase() === peg$c66) { + if (s1.toLowerCase() === peg$c67) { peg$currPos += 17; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e71); } + if (peg$silentFails === 0) { peg$fail(peg$e72); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f52(); + s1 = peg$f53(); } s0 = s1; } @@ -2597,24 +2623,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 18); - if (s0.toLowerCase() === peg$c67) { + if (s0.toLowerCase() === peg$c68) { peg$currPos += 18; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e72); } + if (peg$silentFails === 0) { peg$fail(peg$e73); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 20); - if (s1.toLowerCase() === peg$c68) { + if (s1.toLowerCase() === peg$c69) { peg$currPos += 20; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e73); } + if (peg$silentFails === 0) { peg$fail(peg$e74); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f53(); + s1 = peg$f54(); } s0 = s1; } @@ -2626,24 +2652,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 16); - if (s0.toLowerCase() === peg$c69) { + if (s0.toLowerCase() === peg$c70) { peg$currPos += 16; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e74); } + if (peg$silentFails === 0) { peg$fail(peg$e75); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 18); - if (s1.toLowerCase() === peg$c70) { + if (s1.toLowerCase() === peg$c71) { peg$currPos += 18; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e75); } + if (peg$silentFails === 0) { peg$fail(peg$e76); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f54(); + s1 = peg$f55(); } s0 = s1; } @@ -2656,15 +2682,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 8); - if (s1.toLowerCase() === peg$c71) { + if (s1.toLowerCase() === peg$c72) { peg$currPos += 8; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e76); } + if (peg$silentFails === 0) { peg$fail(peg$e77); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f55(); + s1 = peg$f56(); } s0 = s1; @@ -2675,24 +2701,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 9); - if (s0.toLowerCase() === peg$c72) { + if (s0.toLowerCase() === peg$c73) { peg$currPos += 9; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e77); } + if (peg$silentFails === 0) { peg$fail(peg$e78); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c73) { + if (s1.toLowerCase() === peg$c74) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e78); } + if (peg$silentFails === 0) { peg$fail(peg$e79); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f56(); + s1 = peg$f57(); } s0 = s1; } @@ -2705,15 +2731,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 6); - if (s1.toLowerCase() === peg$c74) { + if (s1.toLowerCase() === peg$c75) { peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e79); } + if (peg$silentFails === 0) { peg$fail(peg$e80); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f57(); + s1 = peg$f58(); } s0 = s1; @@ -2725,15 +2751,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 5); - if (s1.toLowerCase() === peg$c75) { + if (s1.toLowerCase() === peg$c76) { peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e80); } + if (peg$silentFails === 0) { peg$fail(peg$e81); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f58(); + s1 = peg$f59(); } s0 = s1; @@ -2745,15 +2771,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 3); - if (s1.toLowerCase() === peg$c76) { + if (s1.toLowerCase() === peg$c77) { peg$currPos += 3; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e81); } + if (peg$silentFails === 0) { peg$fail(peg$e82); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f59(); + s1 = peg$f60(); } s0 = s1; @@ -2765,15 +2791,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 2); - if (s1.toLowerCase() === peg$c77) { + if (s1.toLowerCase() === peg$c78) { peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e82); } + if (peg$silentFails === 0) { peg$fail(peg$e83); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f60(); + s1 = peg$f61(); } s0 = s1; @@ -2784,24 +2810,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 14); - if (s0.toLowerCase() === peg$c78) { + if (s0.toLowerCase() === peg$c79) { peg$currPos += 14; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e83); } + if (peg$silentFails === 0) { peg$fail(peg$e84); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 15); - if (s1.toLowerCase() === peg$c79) { + if (s1.toLowerCase() === peg$c80) { peg$currPos += 15; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e84); } + if (peg$silentFails === 0) { peg$fail(peg$e85); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f61(); + s1 = peg$f62(); } s0 = s1; } @@ -2813,24 +2839,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 16); - if (s0.toLowerCase() === peg$c80) { + if (s0.toLowerCase() === peg$c81) { peg$currPos += 16; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e85); } + if (peg$silentFails === 0) { peg$fail(peg$e86); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 17); - if (s1.toLowerCase() === peg$c81) { + if (s1.toLowerCase() === peg$c82) { peg$currPos += 17; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e86); } + if (peg$silentFails === 0) { peg$fail(peg$e87); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f62(); + s1 = peg$f63(); } s0 = s1; } @@ -2842,24 +2868,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 13); - if (s0.toLowerCase() === peg$c82) { + if (s0.toLowerCase() === peg$c83) { peg$currPos += 13; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e87); } + if (peg$silentFails === 0) { peg$fail(peg$e88); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c83) { + if (s1.toLowerCase() === peg$c84) { peg$currPos += 14; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e88); } + if (peg$silentFails === 0) { peg$fail(peg$e89); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f63(); + s1 = peg$f64(); } s0 = s1; } @@ -2871,24 +2897,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 16); - if (s0.toLowerCase() === peg$c84) { + if (s0.toLowerCase() === peg$c85) { peg$currPos += 16; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e89); } + if (peg$silentFails === 0) { peg$fail(peg$e90); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 17); - if (s1.toLowerCase() === peg$c85) { + if (s1.toLowerCase() === peg$c86) { peg$currPos += 17; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e90); } + if (peg$silentFails === 0) { peg$fail(peg$e91); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f64(); + s1 = peg$f65(); } s0 = s1; } @@ -2901,15 +2927,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 7); - if (s1.toLowerCase() === peg$c86) { + if (s1.toLowerCase() === peg$c87) { peg$currPos += 7; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e91); } + if (peg$silentFails === 0) { peg$fail(peg$e92); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f65(); + s1 = peg$f66(); } s0 = s1; @@ -2921,15 +2947,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 4); - if (s1.toLowerCase() === peg$c87) { + if (s1.toLowerCase() === peg$c88) { peg$currPos += 4; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e92); } + if (peg$silentFails === 0) { peg$fail(peg$e93); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f66(); + s1 = peg$f67(); } s0 = s1; @@ -2941,15 +2967,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 7); - if (s1.toLowerCase() === peg$c88) { + if (s1.toLowerCase() === peg$c89) { peg$currPos += 7; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e93); } + if (peg$silentFails === 0) { peg$fail(peg$e94); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f67(); + s1 = peg$f68(); } s0 = s1; @@ -2961,7 +2987,7 @@ function peg$parse(input, options) { s0 = peg$currPos; peg$savedPos = peg$currPos; - s1 = peg$f68(); + s1 = peg$f69(); if (s1) { s1 = undefined; } else { @@ -3096,11 +3122,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 8); - if (s1.toLowerCase() === peg$c89) { + if (s1.toLowerCase() === peg$c90) { peg$currPos += 8; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e94); } + if (peg$silentFails === 0) { peg$fail(peg$e95); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3115,7 +3141,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f69(); + s0 = peg$f70(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3133,19 +3159,19 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 6); - if (s1.toLowerCase() === peg$c90) { + if (s1.toLowerCase() === peg$c91) { peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e95); } + if (peg$silentFails === 0) { peg$fail(peg$e96); } } if (s1 === peg$FAILED) { s1 = input.substr(peg$currPos, 5); - if (s1.toLowerCase() === peg$c91) { + if (s1.toLowerCase() === peg$c92) { peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e96); } + if (peg$silentFails === 0) { peg$fail(peg$e97); } } } if (s1 !== peg$FAILED) { @@ -3161,7 +3187,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f70(); + s0 = peg$f71(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3179,11 +3205,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 15); - if (s1.toLowerCase() === peg$c79) { + if (s1.toLowerCase() === peg$c80) { peg$currPos += 15; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e84); } + if (peg$silentFails === 0) { peg$fail(peg$e85); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3198,7 +3224,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f71(); + s0 = peg$f72(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3216,11 +3242,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 3); - if (s1.toLowerCase() === peg$c92) { + if (s1.toLowerCase() === peg$c93) { peg$currPos += 3; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e97); } + if (peg$silentFails === 0) { peg$fail(peg$e98); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3235,7 +3261,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f72(); + s0 = peg$f73(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3272,7 +3298,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f73(); + s0 = peg$f74(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3290,11 +3316,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c93) { + if (s1.toLowerCase() === peg$c94) { peg$currPos += 11; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e98); } + if (peg$silentFails === 0) { peg$fail(peg$e99); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3309,7 +3335,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f74(); + s0 = peg$f75(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3346,7 +3372,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f75(); + s0 = peg$f76(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3383,7 +3409,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f76(); + s0 = peg$f77(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3401,11 +3427,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c94) { + if (s1.toLowerCase() === peg$c95) { peg$currPos += 14; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e99); } + if (peg$silentFails === 0) { peg$fail(peg$e100); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3420,7 +3446,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f77(); + s0 = peg$f78(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3457,7 +3483,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f78(); + s0 = peg$f79(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3475,11 +3501,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c95) { + if (s1.toLowerCase() === peg$c96) { peg$currPos += 11; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e100); } + if (peg$silentFails === 0) { peg$fail(peg$e101); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3494,7 +3520,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f79(); + s0 = peg$f80(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3519,7 +3545,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e101); } + if (peg$silentFails === 0) { peg$fail(peg$e102); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; @@ -3538,11 +3564,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c96) { + if (s1.toLowerCase() === peg$c97) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e102); } + if (peg$silentFails === 0) { peg$fail(peg$e103); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3557,7 +3583,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f80(); + s0 = peg$f81(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3569,11 +3595,11 @@ function peg$parse(input, options) { if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c95) { + if (s1.toLowerCase() === peg$c96) { peg$currPos += 11; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e100); } + if (peg$silentFails === 0) { peg$fail(peg$e101); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3588,7 +3614,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f81(); + s0 = peg$f82(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3607,11 +3633,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 13); - if (s1.toLowerCase() === peg$c97) { + if (s1.toLowerCase() === peg$c98) { peg$currPos += 13; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e103); } + if (peg$silentFails === 0) { peg$fail(peg$e104); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3626,7 +3652,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f82(); + s0 = peg$f83(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3644,11 +3670,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 18); - if (s1.toLowerCase() === peg$c98) { + if (s1.toLowerCase() === peg$c99) { peg$currPos += 18; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e104); } + if (peg$silentFails === 0) { peg$fail(peg$e105); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3663,7 +3689,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f83(); + s0 = peg$f84(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3681,11 +3707,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 22); - if (s1.toLowerCase() === peg$c99) { + if (s1.toLowerCase() === peg$c100) { peg$currPos += 22; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e105); } + if (peg$silentFails === 0) { peg$fail(peg$e106); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3700,7 +3726,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f84(); + s0 = peg$f85(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3718,11 +3744,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c100) { + if (s1.toLowerCase() === peg$c101) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e106); } + if (peg$silentFails === 0) { peg$fail(peg$e107); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3737,7 +3763,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f85(); + s0 = peg$f86(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3755,11 +3781,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c101) { + if (s1.toLowerCase() === peg$c102) { peg$currPos += 14; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e107); } + if (peg$silentFails === 0) { peg$fail(peg$e108); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3774,7 +3800,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f86(); + s0 = peg$f87(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3792,11 +3818,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c102) { + if (s1.toLowerCase() === peg$c103) { peg$currPos += 11; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e108); } + if (peg$silentFails === 0) { peg$fail(peg$e109); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3811,7 +3837,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f87(); + s0 = peg$f88(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3829,11 +3855,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c103) { + if (s1.toLowerCase() === peg$c104) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e109); } + if (peg$silentFails === 0) { peg$fail(peg$e110); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3848,7 +3874,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f88(); + s0 = peg$f89(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3866,11 +3892,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c104) { + if (s1.toLowerCase() === peg$c105) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e110); } + if (peg$silentFails === 0) { peg$fail(peg$e111); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3885,7 +3911,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f89(); + s0 = peg$f90(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3903,11 +3929,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 18); - if (s1.toLowerCase() === peg$c105) { + if (s1.toLowerCase() === peg$c106) { peg$currPos += 18; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e111); } + if (peg$silentFails === 0) { peg$fail(peg$e112); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3922,7 +3948,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f90(); + s0 = peg$f91(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3940,11 +3966,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 15); - if (s1.toLowerCase() === peg$c106) { + if (s1.toLowerCase() === peg$c107) { peg$currPos += 15; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e112); } + if (peg$silentFails === 0) { peg$fail(peg$e113); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3959,7 +3985,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f91(); + s0 = peg$f92(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3977,11 +4003,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 19); - if (s1.toLowerCase() === peg$c107) { + if (s1.toLowerCase() === peg$c108) { peg$currPos += 19; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e113); } + if (peg$silentFails === 0) { peg$fail(peg$e114); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3996,7 +4022,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f92(); + s0 = peg$f93(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4014,11 +4040,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 20); - if (s1.toLowerCase() === peg$c108) { + if (s1.toLowerCase() === peg$c109) { peg$currPos += 20; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e114); } + if (peg$silentFails === 0) { peg$fail(peg$e115); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4033,7 +4059,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f93(); + s0 = peg$f94(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4051,11 +4077,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 23); - if (s1.toLowerCase() === peg$c109) { + if (s1.toLowerCase() === peg$c110) { peg$currPos += 23; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e115); } + if (peg$silentFails === 0) { peg$fail(peg$e116); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4070,7 +4096,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f94(); + s0 = peg$f95(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4088,11 +4114,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c83) { + if (s1.toLowerCase() === peg$c84) { peg$currPos += 14; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e88); } + if (peg$silentFails === 0) { peg$fail(peg$e89); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4107,7 +4133,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f95(); + s0 = peg$f96(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4125,11 +4151,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 17); - if (s1.toLowerCase() === peg$c85) { + if (s1.toLowerCase() === peg$c86) { peg$currPos += 17; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e90); } + if (peg$silentFails === 0) { peg$fail(peg$e91); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4144,7 +4170,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f96(); + s0 = peg$f97(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4162,11 +4188,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c110) { + if (s1.toLowerCase() === peg$c111) { peg$currPos += 14; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e116); } + if (peg$silentFails === 0) { peg$fail(peg$e117); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4181,7 +4207,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f97(); + s0 = peg$f98(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4199,11 +4225,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 9); - if (s1.toLowerCase() === peg$c111) { + if (s1.toLowerCase() === peg$c112) { peg$currPos += 9; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e117); } + if (peg$silentFails === 0) { peg$fail(peg$e118); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4218,7 +4244,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f98(); + s0 = peg$f99(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4236,11 +4262,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c112) { + if (s1.toLowerCase() === peg$c113) { peg$currPos += 14; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e118); } + if (peg$silentFails === 0) { peg$fail(peg$e119); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4255,7 +4281,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f99(); + s0 = peg$f100(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4273,11 +4299,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 9); - if (s1.toLowerCase() === peg$c113) { + if (s1.toLowerCase() === peg$c114) { peg$currPos += 9; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e119); } + if (peg$silentFails === 0) { peg$fail(peg$e120); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4292,7 +4318,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f100(); + s0 = peg$f101(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4310,11 +4336,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c114) { + if (s1.toLowerCase() === peg$c115) { peg$currPos += 11; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e120); } + if (peg$silentFails === 0) { peg$fail(peg$e121); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4329,7 +4355,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f101(); + s0 = peg$f102(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4347,11 +4373,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c115) { + if (s1.toLowerCase() === peg$c116) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e121); } + if (peg$silentFails === 0) { peg$fail(peg$e122); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4366,7 +4392,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f102(); + s0 = peg$f103(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4384,11 +4410,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c116) { + if (s1.toLowerCase() === peg$c117) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e122); } + if (peg$silentFails === 0) { peg$fail(peg$e123); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4403,7 +4429,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f103(); + s0 = peg$f104(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4421,11 +4447,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 13); - if (s1.toLowerCase() === peg$c117) { + if (s1.toLowerCase() === peg$c118) { peg$currPos += 13; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e123); } + if (peg$silentFails === 0) { peg$fail(peg$e124); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4440,7 +4466,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f104(); + s0 = peg$f105(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4463,81 +4489,81 @@ function peg$parse(input, options) { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e101); } + if (peg$silentFails === 0) { peg$fail(peg$e102); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f105(); + s1 = peg$f106(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c118) { - s1 = peg$c118; + if (input.substr(peg$currPos, 2) === peg$c119) { + s1 = peg$c119; peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e125); } + if (peg$silentFails === 0) { peg$fail(peg$e126); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f106(); + s1 = peg$f107(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c119) { - s1 = peg$c119; + if (input.substr(peg$currPos, 2) === peg$c120) { + s1 = peg$c120; peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e126); } + if (peg$silentFails === 0) { peg$fail(peg$e127); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f107(); + s1 = peg$f108(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 62) { - s1 = peg$c120; + s1 = peg$c121; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e127); } + if (peg$silentFails === 0) { peg$fail(peg$e128); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f108(); + s1 = peg$f109(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c121) { - s1 = peg$c121; + if (input.substr(peg$currPos, 2) === peg$c122) { + s1 = peg$c122; peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e128); } + if (peg$silentFails === 0) { peg$fail(peg$e129); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f109(); + s1 = peg$f110(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 60) { - s1 = peg$c122; + s1 = peg$c123; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e129); } + if (peg$silentFails === 0) { peg$fail(peg$e130); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f110(); + s1 = peg$f111(); } s0 = s1; } @@ -4548,7 +4574,7 @@ function peg$parse(input, options) { peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e124); } + if (peg$silentFails === 0) { peg$fail(peg$e125); } } return s0; @@ -4561,7 +4587,7 @@ function peg$parse(input, options) { s1 = peg$parseoperator(); if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f111(s1); + s1 = peg$f112(s1); } s0 = s1; @@ -4573,11 +4599,11 @@ function peg$parse(input, options) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 92) { - s1 = peg$c123; + s1 = peg$c124; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e130); } + if (peg$silentFails === 0) { peg$fail(peg$e131); } } if (s1 !== peg$FAILED) { s2 = input.charAt(peg$currPos); @@ -4585,11 +4611,11 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e131); } + if (peg$silentFails === 0) { peg$fail(peg$e132); } } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f112(s2); + s0 = peg$f113(s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4615,7 +4641,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e133); } + if (peg$silentFails === 0) { peg$fail(peg$e134); } } } if (s2 !== peg$FAILED) { @@ -4628,7 +4654,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e133); } + if (peg$silentFails === 0) { peg$fail(peg$e134); } } } } @@ -4637,13 +4663,13 @@ function peg$parse(input, options) { } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f113(s1); + s1 = peg$f114(s1); } s0 = s1; peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e132); } + if (peg$silentFails === 0) { peg$fail(peg$e133); } } return s0; @@ -4655,7 +4681,7 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = peg$parse_(); peg$savedPos = s0; - s1 = peg$f114(); + s1 = peg$f115(); s0 = s1; return s0; @@ -4671,7 +4697,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e135); } + if (peg$silentFails === 0) { peg$fail(peg$e136); } } while (s1 !== peg$FAILED) { s0.push(s1); @@ -4680,12 +4706,12 @@ function peg$parse(input, options) { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e135); } + if (peg$silentFails === 0) { peg$fail(peg$e136); } } } peg$silentFails--; s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e134); } + if (peg$silentFails === 0) { peg$fail(peg$e135); } return s0; } @@ -4695,7 +4721,7 @@ function peg$parse(input, options) { s0 = peg$currPos; peg$savedPos = peg$currPos; - s1 = peg$f115(); + s1 = peg$f116(); if (s1) { s1 = undefined; } else { @@ -4732,7 +4758,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e137); } + if (peg$silentFails === 0) { peg$fail(peg$e138); } } while (s2 !== peg$FAILED) { s1.push(s2); @@ -4741,7 +4767,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e137); } + if (peg$silentFails === 0) { peg$fail(peg$e138); } } } s2 = input.charAt(peg$currPos); @@ -4749,7 +4775,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e138); } + if (peg$silentFails === 0) { peg$fail(peg$e139); } } if (s2 !== peg$FAILED) { s3 = []; @@ -4760,7 +4786,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e139); } + if (peg$silentFails === 0) { peg$fail(peg$e140); } } } while (s4 !== peg$FAILED) { @@ -4772,7 +4798,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e139); } + if (peg$silentFails === 0) { peg$fail(peg$e140); } } } } @@ -4781,7 +4807,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e138); } + if (peg$silentFails === 0) { peg$fail(peg$e139); } } if (s4 !== peg$FAILED) { s5 = []; @@ -4790,7 +4816,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e133); } + if (peg$silentFails === 0) { peg$fail(peg$e134); } } while (s6 !== peg$FAILED) { s5.push(s6); @@ -4799,11 +4825,11 @@ function peg$parse(input, options) { peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e133); } + if (peg$silentFails === 0) { peg$fail(peg$e134); } } } peg$savedPos = s0; - s0 = peg$f116(s1, s3, s5); + s0 = peg$f117(s1, s3, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4815,7 +4841,7 @@ function peg$parse(input, options) { peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e136); } + if (peg$silentFails === 0) { peg$fail(peg$e137); } } return s0; @@ -4832,7 +4858,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e137); } + if (peg$silentFails === 0) { peg$fail(peg$e138); } } while (s2 !== peg$FAILED) { s1.push(s2); @@ -4841,7 +4867,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e137); } + if (peg$silentFails === 0) { peg$fail(peg$e138); } } } s2 = input.charAt(peg$currPos); @@ -4849,7 +4875,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e138); } + if (peg$silentFails === 0) { peg$fail(peg$e139); } } if (s2 !== peg$FAILED) { s3 = []; @@ -4860,7 +4886,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e139); } + if (peg$silentFails === 0) { peg$fail(peg$e140); } } if (s4 === peg$FAILED) { s4 = peg$currPos; @@ -4876,15 +4902,15 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 8220) { - s6 = peg$c124; + s6 = peg$c125; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e140); } + if (peg$silentFails === 0) { peg$fail(peg$e141); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; - s4 = peg$f117(s1); + s4 = peg$f118(s1); } else { peg$currPos = s4; s4 = peg$FAILED; @@ -4907,15 +4933,15 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 8221) { - s6 = peg$c125; + s6 = peg$c126; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e141); } + if (peg$silentFails === 0) { peg$fail(peg$e142); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; - s4 = peg$f118(s1); + s4 = peg$f119(s1); } else { peg$currPos = s4; s4 = peg$FAILED; @@ -4938,15 +4964,15 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 34) { - s6 = peg$c126; + s6 = peg$c127; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e142); } + if (peg$silentFails === 0) { peg$fail(peg$e143); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; - s4 = peg$f119(s1); + s4 = peg$f120(s1); } else { peg$currPos = s4; s4 = peg$FAILED; @@ -4968,7 +4994,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e139); } + if (peg$silentFails === 0) { peg$fail(peg$e140); } } if (s4 === peg$FAILED) { s4 = peg$currPos; @@ -4984,15 +5010,15 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 8220) { - s6 = peg$c124; + s6 = peg$c125; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e140); } + if (peg$silentFails === 0) { peg$fail(peg$e141); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; - s4 = peg$f117(s1); + s4 = peg$f118(s1); } else { peg$currPos = s4; s4 = peg$FAILED; @@ -5015,15 +5041,15 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 8221) { - s6 = peg$c125; + s6 = peg$c126; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e141); } + if (peg$silentFails === 0) { peg$fail(peg$e142); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; - s4 = peg$f118(s1); + s4 = peg$f119(s1); } else { peg$currPos = s4; s4 = peg$FAILED; @@ -5046,15 +5072,15 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 34) { - s6 = peg$c126; + s6 = peg$c127; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e142); } + if (peg$silentFails === 0) { peg$fail(peg$e143); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; - s4 = peg$f119(s1); + s4 = peg$f120(s1); } else { peg$currPos = s4; s4 = peg$FAILED; @@ -5071,7 +5097,7 @@ function peg$parse(input, options) { s4 = peg$parseclosingQuote(); if (s4 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f120(s1, s3, s4); + s0 = peg$f121(s1, s3, s4); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -5083,7 +5109,7 @@ function peg$parse(input, options) { peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e136); } + if (peg$silentFails === 0) { peg$fail(peg$e137); } } return s0; @@ -5098,7 +5124,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e138); } + if (peg$silentFails === 0) { peg$fail(peg$e139); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -5136,7 +5162,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e143); } + if (peg$silentFails === 0) { peg$fail(peg$e144); } } while (s2 !== peg$FAILED) { s1.push(s2); @@ -5145,7 +5171,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e143); } + if (peg$silentFails === 0) { peg$fail(peg$e144); } } } s2 = []; @@ -5154,7 +5180,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e144); } + if (peg$silentFails === 0) { peg$fail(peg$e145); } } while (s3 !== peg$FAILED) { s2.push(s3); @@ -5163,7 +5189,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e144); } + if (peg$silentFails === 0) { peg$fail(peg$e145); } } } s3 = []; @@ -5172,7 +5198,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e145); } + if (peg$silentFails === 0) { peg$fail(peg$e146); } } while (s4 !== peg$FAILED) { s3.push(s4); @@ -5181,7 +5207,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e145); } + if (peg$silentFails === 0) { peg$fail(peg$e146); } } } s4 = peg$parseoperator(); @@ -5200,7 +5226,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e146); } + if (peg$silentFails === 0) { peg$fail(peg$e147); } } while (s2 !== peg$FAILED) { s1.push(s2); @@ -5209,7 +5235,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e146); } + if (peg$silentFails === 0) { peg$fail(peg$e147); } } } s2 = peg$currPos; @@ -5256,7 +5282,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e147); } + if (peg$silentFails === 0) { peg$fail(peg$e148); } } } } @@ -5272,7 +5298,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e148); } + if (peg$silentFails === 0) { peg$fail(peg$e149); } } if (s0 === peg$FAILED) { s0 = peg$currPos; diff --git a/src/libs/SearchParser/searchParser.peggy b/src/libs/SearchParser/searchParser.peggy index 09585572ecd6..c670ed38ca78 100644 --- a/src/libs/SearchParser/searchParser.peggy +++ b/src/libs/SearchParser/searchParser.peggy @@ -304,6 +304,7 @@ key "key" / createdBy / reimbursable / billable + / declined / action / has / is diff --git a/src/libs/SearchQueryUtils.ts b/src/libs/SearchQueryUtils.ts index 26dce59eef47..9249c8e5c671 100644 --- a/src/libs/SearchQueryUtils.ts +++ b/src/libs/SearchQueryUtils.ts @@ -1258,6 +1258,7 @@ function buildQueryStringFromFilterFormValues(filterValues: Partial filterValues.at(0) === value); } diff --git a/src/libs/SearchUIUtils.ts b/src/libs/SearchUIUtils.ts index 59034706b53b..980b26f7552f 100644 --- a/src/libs/SearchUIUtils.ts +++ b/src/libs/SearchUIUtils.ts @@ -5550,6 +5550,10 @@ const FILTER_VIEW_MAP = { labelKey: 'common.currency', icon: 'MoneyCircle', }, + [CONST.SEARCH.SYNTAX_FILTER_KEYS.DECLINED]: { + labelKey: 'search.filters.rejected', + icon: 'ThumbsDown', + }, [CONST.SEARCH.SYNTAX_FILTER_KEYS.DESCRIPTION]: { labelKey: 'common.description', icon: 'Document', @@ -5864,7 +5868,7 @@ function getDisplayValue( return form[key]?.sort(localeCompare).join(', '); } - if (key === FILTER_KEYS.BILLABLE || key === FILTER_KEYS.REIMBURSABLE) { + if (key === FILTER_KEYS.BILLABLE || key === FILTER_KEYS.REIMBURSABLE || key === FILTER_KEYS.DECLINED) { const formValue = form[key]; return formValue ? translate(`common.${formValue}`) : undefined; } @@ -6153,7 +6157,7 @@ function mapFiltersFormToLabelValueList( } function getSingleSelectFilterOptions(filterKey: SearchAdvancedFiltersKey, translate: LocalizedTranslate) { - if (filterKey === FILTER_KEYS.BILLABLE || filterKey === FILTER_KEYS.REIMBURSABLE) { + if (filterKey === FILTER_KEYS.BILLABLE || filterKey === FILTER_KEYS.REIMBURSABLE || filterKey === FILTER_KEYS.DECLINED) { return Object.values(CONST.SEARCH.BOOLEAN).map((value) => ({value, text: translate(`common.${value}`)})); } diff --git a/src/types/form/SearchAdvancedFiltersForm.ts b/src/types/form/SearchAdvancedFiltersForm.ts index f0b17df5675a..8362f6ee575e 100644 --- a/src/types/form/SearchAdvancedFiltersForm.ts +++ b/src/types/form/SearchAdvancedFiltersForm.ts @@ -237,6 +237,9 @@ const FILTER_KEYS = { BILLABLE_NOT: 'billableNot', BILLABLE: 'billable', + DECLINED_NOT: 'declinedNot', + DECLINED: 'declined', + ACTION_NOT: 'actionNot', ACTION: 'action', @@ -339,6 +342,8 @@ const ALLOWED_TYPE_FILTERS: Record> = { FILTER_KEYS.REIMBURSABLE_NOT, FILTER_KEYS.BILLABLE, FILTER_KEYS.BILLABLE_NOT, + FILTER_KEYS.DECLINED, + FILTER_KEYS.DECLINED_NOT, FILTER_KEYS.REPORT_ID, FILTER_KEYS.REPORT_ID_NOT, FILTER_KEYS.SUBMITTED_ON, @@ -434,6 +439,8 @@ const ALLOWED_TYPE_FILTERS: Record> = { FILTER_KEYS.WITHDRAWAL_STATUS_NOT, FILTER_KEYS.PAID_STATUS, FILTER_KEYS.PAID_STATUS_NOT, + FILTER_KEYS.DECLINED, + FILTER_KEYS.DECLINED_NOT, FILTER_KEYS.WITHDRAWN_AFTER, FILTER_KEYS.WITHDRAWN_BEFORE, FILTER_KEYS.WITHDRAWN_ON, @@ -894,6 +901,9 @@ type SearchAdvancedFiltersForm = Form< [FILTER_KEYS.BILLABLE]: BooleanValue; [FILTER_KEYS.BILLABLE_NOT]: BooleanValue; + [FILTER_KEYS.DECLINED]: BooleanValue; + [FILTER_KEYS.DECLINED_NOT]: BooleanValue; + [FILTER_KEYS.ACTION]: string; [FILTER_KEYS.ACTION_NOT]: string; diff --git a/tests/unit/Search/SearchQueryUtilsTest.ts b/tests/unit/Search/SearchQueryUtilsTest.ts index 4dc18a32f76c..848fc0225010 100644 --- a/tests/unit/Search/SearchQueryUtilsTest.ts +++ b/tests/unit/Search/SearchQueryUtilsTest.ts @@ -595,6 +595,34 @@ describe('SearchQueryUtils', () => { expect(result).toEqual('type:expense -transactionStatus:pending'); }); + test('declined filter value', () => { + // Given the Rejected filter set to yes on an expense report search + const filterValues: Partial = { + type: 'expense-report', + declined: 'yes', + }; + + // When the query string is built from the form + const result = buildQueryStringFromFilterFormValues(filterValues); + + // Then the filter is written with the declined key used by the backend + expect(result).toEqual('type:expense-report declined:yes'); + }); + + test('negated declined filter value', () => { + // Given the Rejected filter negated on an expense search + const filterValues: Partial = { + type: 'expense', + declinedNot: 'no', + }; + + // When the query string is built from the form + const result = buildQueryStringFromFilterFormValues(filterValues); + + // Then the declined key gets the "-" prefix + expect(result).toEqual('type:expense -declined:no'); + }); + test('negated receipt type filter value', () => { const filterValues: Partial = { type: 'expense', @@ -2062,6 +2090,52 @@ describe('SearchQueryUtils', () => { expect(result.transactionStatus).toBeUndefined(); }); + test('declined filter populates the form with a yes or no value', () => { + // Given a query that filters expenses on whether they were rejected + const queryJSON = buildSearchQueryJSON('sortBy:date sortOrder:desc type:expense declined:yes'); + + if (!queryJSON) { + throw new Error('Failed to parse query string'); + } + + // When the form values are built from the query + const result = buildFilterFormValuesFromQuery(queryJSON, {}, {}, {}, {}, {}, {}); + + // Then the Rejected filter holds the yes value + expect(result.declined).toEqual('yes'); + }); + + test('declined filter ignores values other than yes and no', () => { + // Given a hand-typed query with a value the boolean filter does not accept + const queryJSON = buildSearchQueryJSON('sortBy:date sortOrder:desc type:expense declined:maybe'); + + if (!queryJSON) { + throw new Error('Failed to parse query string'); + } + + // When the form values are built from the query + const result = buildFilterFormValuesFromQuery(queryJSON, {}, {}, {}, {}, {}, {}); + + // Then the invalid value is dropped instead of being shown as a selection + expect(result.declined).toBeUndefined(); + }); + + test('negated declined filter populates declinedNot', () => { + // Given a query that excludes rejected expense reports with the "-" prefix + const queryJSON = buildSearchQueryJSON('sortBy:date sortOrder:desc type:expense-report -declined:yes'); + + if (!queryJSON) { + throw new Error('Failed to parse query string'); + } + + // When the form values are built from the query + const result = buildFilterFormValuesFromQuery(queryJSON, {}, {}, {}, {}, {}, {}); + + // Then the value lands in the negated form key only + expect(result.declinedNot).toEqual('yes'); + expect(result.declined).toBeUndefined(); + }); + test('negated receipt type filter populates receiptTypeNot', () => { // Negation in the query syntax uses the "-" prefix, which round-trips to the receiptTypeNot form value. const queryString = 'sortBy:date sortOrder:desc type:expense -receipt-type:hotel'; diff --git a/tests/unit/SearchParserTest.ts b/tests/unit/SearchParserTest.ts index fed36462ff0c..265ec776a358 100644 --- a/tests/unit/SearchParserTest.ts +++ b/tests/unit/SearchParserTest.ts @@ -1229,6 +1229,34 @@ const keywordTests = [ }, }, }, + { + query: 'declined:yes', + expected: { + type: 'expense', + sortBy: 'date', + sortOrder: 'desc', + view: 'table', + filters: { + operator: 'eq', + left: 'declined', + right: 'yes', + }, + }, + }, + { + query: 'type:expense-report -declined:no', + expected: { + type: 'expense-report', + sortBy: 'date', + sortOrder: 'desc', + view: 'table', + filters: { + operator: 'neq', + left: 'declined', + right: 'no', + }, + }, + }, { query: 'columns:per-diem,drafts,draft,tax-rate,policy-name,withdrawal-id,bank-account', expected: { diff --git a/tests/unit/hooks/useAutocompleteSuggestions.test.ts b/tests/unit/hooks/useAutocompleteSuggestions.test.ts index 689233186b42..ecac817093e8 100644 --- a/tests/unit/hooks/useAutocompleteSuggestions.test.ts +++ b/tests/unit/hooks/useAutocompleteSuggestions.test.ts @@ -442,6 +442,21 @@ describe('useAutocompleteSuggestions', () => { expect(result.current.at(0)?.filterKey).toBe(CONST.SEARCH.SYNTAX_FILTER_KEYS.REIMBURSABLE); }); + it('returns yes and no suggestions for declined key', () => { + // Given the user has typed the declined key with no value yet + parseForAutocomplete.mockReturnValue({ + autocomplete: {key: CONST.SEARCH.SYNTAX_FILTER_KEYS.DECLINED, value: ''}, + ranges: [], + }); + + // When suggestions are computed + const {result} = renderHook(() => useAutocompleteSuggestions({...defaultParams, autocompleteQueryValue: 'declined:'})); + + // Then both boolean values are suggested for the declined key + expect(result.current.map((suggestion) => suggestion.text)).toEqual([CONST.SEARCH.BOOLEAN.NO, CONST.SEARCH.BOOLEAN.YES]); + expect(result.current.at(0)?.filterKey).toBe(CONST.SEARCH.SYNTAX_FILTER_KEYS.DECLINED); + }); + it('returns in: suggestions for chat reports', () => { parseForAutocomplete.mockReturnValue({ autocomplete: {key: CONST.SEARCH.SYNTAX_FILTER_KEYS.IN, value: 'gen'}, From 83d1cac21e55d5ebc18e4e09c268c1f13d1837f1 Mon Sep 17 00:00:00 2001 From: Krishna Chaitanya Date: Thu, 15 Oct 2026 16:47:16 +0530 Subject: [PATCH 2/2] Translate negated yes/no filter values in search filter labels --- src/libs/SearchUIUtils.ts | 9 ++++++++- tests/unit/Search/SearchUIUtilsTest.ts | 11 +++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/libs/SearchUIUtils.ts b/src/libs/SearchUIUtils.ts index 7ecdaec69846..f5045e16b278 100644 --- a/src/libs/SearchUIUtils.ts +++ b/src/libs/SearchUIUtils.ts @@ -5977,7 +5977,14 @@ function getDisplayValue( return form[key]?.sort(localeCompare).join(', '); } - if (key === FILTER_KEYS.BILLABLE || key === FILTER_KEYS.REIMBURSABLE || key === FILTER_KEYS.DECLINED) { + if ( + key === FILTER_KEYS.BILLABLE || + key === FILTER_KEYS.BILLABLE_NOT || + key === FILTER_KEYS.REIMBURSABLE || + key === FILTER_KEYS.REIMBURSABLE_NOT || + key === FILTER_KEYS.DECLINED || + key === FILTER_KEYS.DECLINED_NOT + ) { const formValue = form[key]; return formValue ? translate(`common.${formValue}`) : undefined; } diff --git a/tests/unit/Search/SearchUIUtilsTest.ts b/tests/unit/Search/SearchUIUtilsTest.ts index 45f1871d8342..bc2c450713c4 100644 --- a/tests/unit/Search/SearchUIUtilsTest.ts +++ b/tests/unit/Search/SearchUIUtilsTest.ts @@ -14832,6 +14832,17 @@ describe('SearchUIUtils', () => { // Then the match type is part of the translated label, so a missing operator reads as contains expect(result).toBe(translateLocal(translationKey, 'I')); }); + + test.each([FILTER_KEYS.BILLABLE_NOT, FILTER_KEYS.REIMBURSABLE_NOT, FILTER_KEYS.DECLINED_NOT] as const)('translates the yes/no value of a negated %s filter', (key) => { + // Given a negated yes/no filter, as stored when the query is "-billable:yes", "-reimbursable:yes" or "-declined:yes" + const form = {[key]: CONST.SEARCH.BOOLEAN.YES}; + + // When the filter label is built + const result = SearchUIUtils.getDisplayValue(key, form, CONST.SEARCH.DATA_TYPES.EXPENSE, translateLocal, localeCompare); + + // Then the label uses the localized value instead of the raw query token, matching the non-negated filter + expect(result).toBe(translateLocal('common.yes')); + }); }); describe('filterValidHasValues', () => {