diff --git a/src/CONST/index.ts b/src/CONST/index.ts index 76c7824328e9..af3b5e02b849 100644 --- a/src/CONST/index.ts +++ b/src/CONST/index.ts @@ -7427,6 +7427,11 @@ const CONST = { search: true, reportView: true, }, + VENDOR: { + column: this.TABLE_COLUMNS.VENDOR, + search: true, + reportView: true, + }, DESCRIPTION: { column: this.TABLE_COLUMNS.DESCRIPTION, search: true, @@ -7794,6 +7799,7 @@ const CONST = { POSTED: 'posted', EXPORTED: 'exported', MERCHANT: 'merchant', + VENDOR: 'vendor', DESCRIPTION: 'description', FROM: 'from', TO: 'to', @@ -7905,6 +7911,7 @@ const CONST = { EXPORTER: 'exporter', CATEGORY: 'category', TAG: 'tag', + VENDOR: 'vendor', TAX_RATE: 'taxRate', CARD_ID: 'cardID', FEED: 'feed', @@ -7956,6 +7963,7 @@ const CONST = { TAG_EMPTY_VALUE: 'none', CATEGORY_EMPTY_VALUE: 'none', CATEGORY_DEFAULT_VALUE: 'Uncategorized', + VENDOR_EMPTY_VALUE: 'none', MERCHANT_EMPTY_VALUE: 'none', SEARCH_ROUTER_ITEM_TYPE: { CONTEXTUAL_SUGGESTION: 'contextualSuggestion', @@ -7991,6 +7999,7 @@ const CONST = { EXPORTER: 'exporter', CATEGORY: 'category', TAG: 'tag', + VENDOR: 'vendor', TAX_RATE: 'tax-rate', CARD_ID: 'card', FEED: 'feed', @@ -8037,6 +8046,7 @@ const CONST = { [this.TABLE_COLUMNS.POSTED]: 'posted', [this.TABLE_COLUMNS.EXPORTED]: 'exported', [this.TABLE_COLUMNS.MERCHANT]: 'merchant', + [this.TABLE_COLUMNS.VENDOR]: 'vendor', [this.TABLE_COLUMNS.DESCRIPTION]: 'description', [this.TABLE_COLUMNS.FROM]: 'from', [this.TABLE_COLUMNS.TO]: 'to', diff --git a/src/ONYXKEYS.ts b/src/ONYXKEYS.ts index fe06c39425dc..5f6c7b928f36 100755 --- a/src/ONYXKEYS.ts +++ b/src/ONYXKEYS.ts @@ -498,6 +498,12 @@ const ONYXKEYS = { /** Set while search filter category data is loading */ RAM_ONLY_IS_LOADING_SEARCH_FILTERS_CATEGORY_DATA: 'isLoadingSearchFiltersCategoryData', + /** Set whether the search filters vendor data has loaded */ + IS_SEARCH_FILTERS_VENDOR_DATA_LOADED: 'isSearchFiltersVendorDataLoaded', + + /** Set while search filter vendor data is loading */ + RAM_ONLY_IS_LOADING_SEARCH_FILTERS_VENDOR_DATA: 'isLoadingSearchFiltersVendorData', + HAS_LOADED_APP: 'hasLoadedApp', IS_TEST_TOOLS_MODAL_OPEN: 'isTestToolsModalOpen', @@ -1746,6 +1752,8 @@ type OnyxValuesMapping = { [ONYXKEYS.IS_SEARCH_FILTERS_CARD_DATA_LOADED]: boolean; [ONYXKEYS.IS_SEARCH_FILTERS_CATEGORY_DATA_LOADED]: boolean; [ONYXKEYS.RAM_ONLY_IS_LOADING_SEARCH_FILTERS_CATEGORY_DATA]: boolean; + [ONYXKEYS.IS_SEARCH_FILTERS_VENDOR_DATA_LOADED]: boolean; + [ONYXKEYS.RAM_ONLY_IS_LOADING_SEARCH_FILTERS_VENDOR_DATA]: boolean; [ONYXKEYS.IS_LOADING_SUBSCRIPTION_DATA]: boolean; [ONYXKEYS.IS_PENDING_UPDATE_PERSONAL_KARMA]: boolean; [ONYXKEYS.IS_TEST_TOOLS_MODAL_OPEN]: boolean; diff --git a/src/components/MoneyRequestReportView/MoneyRequestReportTransactionList.tsx b/src/components/MoneyRequestReportView/MoneyRequestReportTransactionList.tsx index 2ce48fa2bba1..a50c26142ada 100644 --- a/src/components/MoneyRequestReportView/MoneyRequestReportTransactionList.tsx +++ b/src/components/MoneyRequestReportView/MoneyRequestReportTransactionList.tsx @@ -12,6 +12,7 @@ import useMobileSelectionMode from '@hooks/useMobileSelectionMode'; import useNavigateToTransactionThread from '@hooks/useNavigateToTransactionThread'; import useNetwork from '@hooks/useNetwork'; import useOnyx from '@hooks/useOnyx'; +import usePermissions from '@hooks/usePermissions'; import useResponsiveLayout from '@hooks/useResponsiveLayout'; import useResponsiveLayoutOnWideRHP from '@hooks/useResponsiveLayoutOnWideRHP'; import useTheme from '@hooks/useTheme'; @@ -23,7 +24,7 @@ import {clearActiveTransactionIDs, getActiveTransactionIDs, setActiveTransaction import {resolveTransactionCardFields} from '@libs/CardUtils'; import {isBillableEnabledOnPolicy} from '@libs/MoneyRequestReportUtils'; import {navigationRef} from '@libs/Navigation/Navigation'; -import {isPolicyTaxEnabled} from '@libs/PolicyUtils'; +import {hasVendorFeature, isPolicyTaxEnabled} from '@libs/PolicyUtils'; import {getOriginalMessage, isMoneyRequestAction} from '@libs/ReportActionsUtils'; import {groupTransactionsByCategory, groupTransactionsByTag} from '@libs/ReportLayoutUtils'; import { @@ -269,6 +270,7 @@ function MoneyRequestReportTransactionList({ const longPressModalRef = useRef(null); const {reportPendingAction} = getReportOfflinePendingActionAndErrors(report); const {isOffline} = useNetwork(); + const {isBetaEnabled} = usePermissions(); const isTaxEnabled = isPolicyTaxEnabled(policy); const {totalDisplaySpend} = getMoneyRequestSpendBreakdown(report); @@ -446,12 +448,15 @@ function MoneyRequestReportTransactionList({ const isExpenseReportViewFromIOUReport = isIOUReport(report); const shouldShowBillableColumn = isBillableEnabledOnPolicy(policy); const shouldShowCommentsColumn = useMemo(() => Object.values(reportActions ?? {}).some((action) => (action?.childVisibleActionCount ?? 0) > 0), [reportActions]); + // The saved column list is account-wide, so drop the vendor column on reports whose workspace lacks the vendor feature. + const isVendorColumnAvailable = hasVendorFeature(policy, isBetaEnabled(CONST.BETAS.VENDOR_MATCHING)); const columnsToShow = useMemo(() => { + const savedColumns = (reportDetailsColumns ?? []).filter((column) => isVendorColumnAvailable || column !== CONST.SEARCH.TABLE_COLUMNS.VENDOR); return getColumnsToShow({ currentAccountID: currentUserDetails?.accountID, data: transactions, report, - visibleColumns: (isExpenseReportViewFromIOUReport ? [] : (reportDetailsColumns ?? [])) as SearchCustomColumnIds[], + visibleColumns: (isExpenseReportViewFromIOUReport ? [] : savedColumns) as SearchCustomColumnIds[], isExpenseReportView: true, isExpenseReportViewFromIOUReport, shouldShowBillableColumn, @@ -467,6 +472,7 @@ function MoneyRequestReportTransactionList({ shouldShowBillableColumn, shouldShowCommentsColumn, reportDetailsColumns, + isVendorColumnAvailable, report, isTaxEnabled, shouldShowExpenseReportBreakDown, diff --git a/src/components/Search/FilterComponents/ListFilterContent.tsx b/src/components/Search/FilterComponents/ListFilterContent.tsx index 3bf19e429523..4409842c0602 100644 --- a/src/components/Search/FilterComponents/ListFilterContent.tsx +++ b/src/components/Search/FilterComponents/ListFilterContent.tsx @@ -31,6 +31,7 @@ import TagSelector from './TagSelector'; import TaxRateSelector from './TaxRateSelector'; import TypeSelector from './TypeSelector'; import UserSelector from './UserSelector'; +import VendorSelector from './VendorSelector'; import WorkspaceSelector from './WorkspaceSelector'; type FilterKeys = Exclude; @@ -174,6 +175,7 @@ function ListFilterContent({ case CONST.SEARCH.SYNTAX_FILTER_KEYS.TAX_RATE: case CONST.SEARCH.SYNTAX_FILTER_KEYS.EXPORTED_TO: case CONST.SEARCH.SYNTAX_FILTER_KEYS.TAG: + case CONST.SEARCH.SYNTAX_FILTER_KEYS.VENDOR: case CONST.SEARCH.SYNTAX_FILTER_KEYS.CATEGORY: { const Component = { [CONST.SEARCH.SYNTAX_FILTER_KEYS.FEED]: FeedSelector, @@ -183,6 +185,7 @@ function ListFilterContent({ [CONST.SEARCH.SYNTAX_FILTER_KEYS.TAX_RATE]: TaxRateSelector, [CONST.SEARCH.SYNTAX_FILTER_KEYS.EXPORTED_TO]: ExportedToSelector, [CONST.SEARCH.SYNTAX_FILTER_KEYS.TAG]: TagSelector, + [CONST.SEARCH.SYNTAX_FILTER_KEYS.VENDOR]: VendorSelector, [CONST.SEARCH.SYNTAX_FILTER_KEYS.CATEGORY]: CategorySelector, }[baseFilterKey]; content = ( diff --git a/src/components/Search/FilterComponents/VendorSelector.tsx b/src/components/Search/FilterComponents/VendorSelector.tsx new file mode 100644 index 000000000000..84fc959dd390 --- /dev/null +++ b/src/components/Search/FilterComponents/VendorSelector.tsx @@ -0,0 +1,98 @@ +import ActivityIndicator from '@components/ActivityIndicator'; +import type {Filter, SearchFilterCommonProps} from '@components/Search/types'; + +import useLoadSearchVendorData from '@hooks/useLoadSearchVendorData'; +import useLocalize from '@hooks/useLocalize'; +import useOnyx from '@hooks/useOnyx'; +import usePermissions from '@hooks/usePermissions'; +import useTheme from '@hooks/useTheme'; +import useThemeStyles from '@hooks/useThemeStyles'; + +import {getVendorFeaturePolicyIDs} from '@libs/PolicyUtils'; +import {getAllPolicyValues, sortOptionsWithEmptyValue} from '@libs/SearchQueryUtils'; + +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; +import type {Policy, PolicyVendors} from '@src/types/onyx'; +import {getEmptyObject} from '@src/types/utils/EmptyObject'; + +import type {OnyxCollection} from 'react-native-onyx'; + +import React, {useCallback} from 'react'; +import {View} from 'react-native'; + +import MultiSelect from './MultiSelect'; + +type VendorSelectorProps = SearchFilterCommonProps & { + policyID: Filter | undefined; +}; + +function VendorSelector({value = [], policyID, selectionListTextInputStyle, selectionListStyle, autoFocus, footer, onChange}: VendorSelectorProps) { + const {translate, localeCompare} = useLocalize(); + const {isBetaEnabled} = usePermissions(); + const isVendorMatchingBetaEnabled = isBetaEnabled(CONST.BETAS.VENDOR_MATCHING); + const {isLoadingInitialVendors} = useLoadSearchVendorData({shouldRefresh: true}); + const theme = useTheme(); + const styles = useThemeStyles(); + const vendorFeaturePolicyIDsSelector = useCallback( + (allPolicies: OnyxCollection) => getVendorFeaturePolicyIDs(allPolicies, isVendorMatchingBetaEnabled), + [isVendorMatchingBetaEnabled], + ); + const [vendorFeaturePolicyIDs] = useOnyx(ONYXKEYS.COLLECTION.POLICY, {selector: vendorFeaturePolicyIDsSelector}); + const [allPolicyVendors = getEmptyObject>>()] = useOnyx(ONYXKEYS.COLLECTION.POLICY_VENDORS); + + const noVendorLabel = translate('search.noVendor'); + const selectedVendorItems = value.map((vendor) => { + if (vendor === CONST.SEARCH.VENDOR_EMPTY_VALUE) { + return {text: noVendorLabel, value: vendor}; + } + return {text: vendor, value: vendor}; + }); + + // Vendor lists are only offered for the workspaces where the vendor feature is on, so stale lists left behind by a + // disconnected integration never surface in the picker. + const eligiblePolicyIDs = new Set(vendorFeaturePolicyIDs); + const eligiblePolicyVendors: OnyxCollection = Object.fromEntries( + Object.entries(allPolicyVendors).filter(([key]) => eligiblePolicyIDs.has(key.replace(ONYXKEYS.COLLECTION.POLICY_VENDORS, ''))), + ); + + const vendorItems = [{text: noVendorLabel, value: CONST.SEARCH.VENDOR_EMPTY_VALUE as string}]; + const uniqueVendorNames = new Set( + getAllPolicyValues(policyID?.value?.length ? policyID : undefined, ONYXKEYS.COLLECTION.POLICY_VENDORS, eligiblePolicyVendors).flatMap((policyVendors) => + Object.values(policyVendors ?? {}).map((vendor) => vendor.name), + ), + ); + vendorItems.push( + ...Array.from(uniqueVendorNames) + .filter(Boolean) + .map((vendorName) => ({text: vendorName, value: vendorName})) + .toSorted((a, b) => sortOptionsWithEmptyValue(a.text, b.text, localeCompare)), + ); + + if (isLoadingInitialVendors) { + return ( + + + + ); + } + + return ( + = CONST.STANDARD_LIST_ITEM_LIMIT} + autoFocus={autoFocus} + selectionListTextInputStyle={selectionListTextInputStyle} + selectionListStyle={selectionListStyle} + footer={footer} + onChange={(vendors) => onChange(vendors.map((vendor) => vendor.value))} + /> + ); +} + +export default VendorSelector; diff --git a/src/components/Search/SearchTableHeader.tsx b/src/components/Search/SearchTableHeader.tsx index 92cdbd8346cc..f43122e190bf 100644 --- a/src/components/Search/SearchTableHeader.tsx +++ b/src/components/Search/SearchTableHeader.tsx @@ -67,6 +67,11 @@ const getExpenseHeaders = (groupBy?: SearchGroupBy): SearchColumnConfig[] => [ translationKey: 'common.merchant', canEdit: true, }, + { + columnName: CONST.SEARCH.TABLE_COLUMNS.VENDOR, + translationKey: 'common.vendor', + isColumnSortable: false, + }, { columnName: CONST.SEARCH.TABLE_COLUMNS.DESCRIPTION, translationKey: 'common.description', diff --git a/src/components/TransactionItemRow/TransactionItemRowWide.tsx b/src/components/TransactionItemRow/TransactionItemRowWide.tsx index bcf69deb6697..13610187f0f8 100644 --- a/src/components/TransactionItemRow/TransactionItemRowWide.tsx +++ b/src/components/TransactionItemRow/TransactionItemRowWide.tsx @@ -25,7 +25,7 @@ import useThemeStyles from '@hooks/useThemeStyles'; import {getCategoryGLCode} from '@libs/CategoryUtils'; import getBase62ReportID from '@libs/getBase62ReportID'; -import {isTaxCodeCustomized, getTagGLCode} from '@libs/PolicyUtils'; +import {getTagGLCode, getVendorDisplayName, isTaxCodeCustomized} from '@libs/PolicyUtils'; import {getReportName} from '@libs/ReportNameUtils'; import {getReimbursableTotal, isExpenseReport} from '@libs/ReportUtils'; import {getViolationsForTransaction} from '@libs/SearchUIUtils'; @@ -391,6 +391,15 @@ function TransactionItemRowWide({ /> ); + case CONST.SEARCH.TABLE_COLUMNS.VENDOR: + return ( + + + + ); case CONST.SEARCH.TABLE_COLUMNS.DESCRIPTION: return ( >>()] = useOnyx(ONYXKEYS.COLLECTION.POLICY, {selector: advancedSearchPoliciesSelector}); const [policyDerived] = useOnyx(ONYXKEYS.COLLECTION.POLICY, {selector: policyDerivedSelector}); + const {isBetaEnabled} = usePermissions(); + const isVendorMatchingBetaEnabled = isBetaEnabled(CONST.BETAS.VENDOR_MATCHING); + const isVendorFilterAvailableSelector = useCallback( + (allPolicies: OnyxCollection) => hasVendorFeatureOnAnyPolicy(allPolicies, isVendorMatchingBetaEnabled), + [isVendorMatchingBetaEnabled], + ); + const [isVendorFilterAvailable = false] = useOnyx(ONYXKEYS.COLLECTION.POLICY, {selector: isVendorFilterAvailableSelector}); const [allPolicyTagLists = getEmptyObject>>()] = useOnyx(ONYXKEYS.COLLECTION.POLICY_TAGS); const selectedPolicyTagLists = policyID?.value?.length ? getAllPolicyValues(policyID, ONYXKEYS.COLLECTION.POLICY_TAGS, allPolicyTagLists) : []; const [hasTags] = useOnyx(ONYXKEYS.COLLECTION.POLICY_TAGS, {selector: hasTagsSelector}); @@ -353,6 +363,9 @@ function useAdvancedSearchFilters(type: SearchDataTypes | undefined, policyID: F if (key === CONST.SEARCH.SYNTAX_FILTER_KEYS.TAG && !shouldDisplayTagFilter) { return; } + if (key === CONST.SEARCH.SYNTAX_FILTER_KEYS.VENDOR && !isVendorFilterAvailable) { + return; + } if ( (key === CONST.SEARCH.SYNTAX_FILTER_KEYS.CARD_ID || key === CONST.SEARCH.SYNTAX_FILTER_KEYS.POSTED || key === CONST.SEARCH.SYNTAX_FILTER_KEYS.FEED) && !shouldDisplayCardFilter diff --git a/src/hooks/useLoadSearchVendorData.ts b/src/hooks/useLoadSearchVendorData.ts new file mode 100644 index 000000000000..0995cfab7082 --- /dev/null +++ b/src/hooks/useLoadSearchVendorData.ts @@ -0,0 +1,59 @@ +import {openSearchVendorFiltersPage} from '@libs/actions/Search'; + +import ONYXKEYS from '@src/ONYXKEYS'; + +import {useEffect, useRef} from 'react'; + +import useNetwork from './useNetwork'; +import useOnyx from './useOnyx'; + +type UseLoadSearchVendorDataParams = { + /** Whether vendor data should be loaded. */ + shouldLoad?: boolean; + + /** Whether already loaded vendor data should be refreshed. */ + shouldRefresh?: boolean; +}; + +function useLoadSearchVendorData({shouldLoad = true, shouldRefresh = false}: UseLoadSearchVendorDataParams = {}) { + const {isOffline} = useNetwork(); + const [areVendorsLoaded] = useOnyx(ONYXKEYS.IS_SEARCH_FILTERS_VENDOR_DATA_LOADED); + const [isLoadingVendors] = useOnyx(ONYXKEYS.RAM_ONLY_IS_LOADING_SEARCH_FILTERS_VENDOR_DATA); + const hasRequestedVendorDataRef = useRef(false); + const hasObservedVendorRequestStateRef = useRef(!!areVendorsLoaded || isLoadingVendors !== undefined); + + useEffect(() => { + if (areVendorsLoaded || isLoadingVendors !== undefined) { + hasObservedVendorRequestStateRef.current = true; + } + + const wasVendorRequestStateCleared = hasRequestedVendorDataRef.current && hasObservedVendorRequestStateRef.current && !areVendorsLoaded && isLoadingVendors === undefined; + if (wasVendorRequestStateCleared) { + hasRequestedVendorDataRef.current = false; + hasObservedVendorRequestStateRef.current = false; + } + + if (!shouldLoad) { + hasRequestedVendorDataRef.current = false; + hasObservedVendorRequestStateRef.current = false; + return; + } + + if (isLoadingVendors) { + hasRequestedVendorDataRef.current = true; + return; + } + + if (isOffline || hasRequestedVendorDataRef.current || (areVendorsLoaded && !shouldRefresh)) { + return; + } + hasRequestedVendorDataRef.current = true; + openSearchVendorFiltersPage(); + }, [areVendorsLoaded, isLoadingVendors, isOffline, shouldLoad, shouldRefresh]); + + const isLoadingInitialVendors = shouldLoad && !areVendorsLoaded && !isOffline && isLoadingVendors !== false; + + return {areVendorsLoaded, isLoadingInitialVendors, isOffline}; +} + +export default useLoadSearchVendorData; diff --git a/src/languages/de.ts b/src/languages/de.ts index d26830826e39..bd2a6490d3f3 100644 --- a/src/languages/de.ts +++ b/src/languages/de.ts @@ -9756,6 +9756,7 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc noCategory: 'Keine Kategorie', noMerchant: 'Kein Händler', noTag: 'Kein Tag', + noVendor: 'Kein Lieferant', expenseType: 'Ausgabenart', receiptType: 'Belegart', receiptTypeValues: { diff --git a/src/languages/el.ts b/src/languages/el.ts index eae744280bc8..a67ed639d6fc 100644 --- a/src/languages/el.ts +++ b/src/languages/el.ts @@ -9970,6 +9970,7 @@ ${reportName}`, noCategory: 'Χωρίς κατηγορία', noMerchant: 'Χωρίς έμπορο', noTag: 'Χωρίς ετικέτα', + noVendor: 'Χωρίς προμηθευτή', expenseType: 'Τύπος εξόδου', receiptType: 'Τύπος απόδειξης', receiptTypeValues: { diff --git a/src/languages/en.ts b/src/languages/en.ts index a95c7188e898..3f7db9e709ab 100644 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -9932,6 +9932,7 @@ const translations = { noCategory: 'No category', noMerchant: 'No merchant', noTag: 'No tag', + noVendor: 'No vendor', expenseType: 'Expense type', receiptType: 'Receipt type', receiptTypeValues: { diff --git a/src/languages/es.ts b/src/languages/es.ts index 5c351ccfee07..15aee94c9b75 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -9604,6 +9604,7 @@ ${reportName}`, noCategory: 'Sin categoría', noMerchant: 'Sin comerciante', noTag: 'Sin etiqueta', + noVendor: 'Sin proveedor', expenseType: 'Tipo de gasto', receiptType: 'Tipo de recibo', receiptTypeValues: { diff --git a/src/languages/fr.ts b/src/languages/fr.ts index 8a79862fe728..fa05d569b49e 100644 --- a/src/languages/fr.ts +++ b/src/languages/fr.ts @@ -9775,6 +9775,7 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e noCategory: 'Aucune catégorie', noMerchant: 'Aucun commerçant', noTag: 'Aucun tag', + noVendor: 'Aucun fournisseur', expenseType: 'Type de dépense', receiptType: 'Type de reçu', receiptTypeValues: { diff --git a/src/languages/it.ts b/src/languages/it.ts index 979f59b6aed7..c5c017371205 100644 --- a/src/languages/it.ts +++ b/src/languages/it.ts @@ -9712,6 +9712,7 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`, noCategory: 'Nessuna categoria', noMerchant: 'Nessun esercente', noTag: 'Nessun tag', + noVendor: 'Nessun fornitore', expenseType: 'Tipo di spesa', receiptType: 'Tipo di ricevuta', receiptTypeValues: { diff --git a/src/languages/ja.ts b/src/languages/ja.ts index a946e46b10c1..a019c8bf1431 100644 --- a/src/languages/ja.ts +++ b/src/languages/ja.ts @@ -9578,6 +9578,7 @@ ${reportName}`, noCategory: 'カテゴリなし', noMerchant: '店舗なし', noTag: 'タグなし', + noVendor: 'ベンダーなし', expenseType: '経費の種類', receiptType: '領収書の種類', receiptTypeValues: { diff --git a/src/languages/nl.ts b/src/languages/nl.ts index 68988138f36f..b63bcb9ab802 100644 --- a/src/languages/nl.ts +++ b/src/languages/nl.ts @@ -9667,6 +9667,7 @@ er bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`, noCategory: 'Geen categorie', noMerchant: 'Geen handelaar', noTag: 'Geen tag', + noVendor: 'Geen leverancier', expenseType: 'Onkostentype', receiptType: 'Bontype', receiptTypeValues: { diff --git a/src/languages/pl.ts b/src/languages/pl.ts index 1691115b4b81..8d0407e349cc 100644 --- a/src/languages/pl.ts +++ b/src/languages/pl.ts @@ -9700,6 +9700,7 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`, noCategory: 'Brak kategorii', noMerchant: 'Brak sprzedawcy', noTag: 'Brak tagu', + noVendor: 'Brak dostawcy', expenseType: 'Typ wydatku', receiptType: 'Typ paragonu', receiptTypeValues: { diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts index de6aaf536f80..ecbc0db99ebc 100644 --- a/src/languages/pt-BR.ts +++ b/src/languages/pt-BR.ts @@ -9664,6 +9664,7 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`, noCategory: 'Sem categoria', noMerchant: 'Sem comerciante', noTag: 'Sem tag', + noVendor: 'Sem fornecedor', expenseType: 'Tipo de despesa', receiptType: 'Tipo de recibo', receiptTypeValues: { diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts index 141657693b1d..8946871e2d26 100644 --- a/src/languages/zh-hans.ts +++ b/src/languages/zh-hans.ts @@ -9326,6 +9326,7 @@ ${reportName}`, noCategory: '无类别', noMerchant: '无商家', noTag: '无标签', + noVendor: '无供应商', expenseType: '报销类型', receiptType: '收据类型', receiptTypeValues: { diff --git a/src/libs/API/types.ts b/src/libs/API/types.ts index 25289805d9b2..402eb7ab1af1 100644 --- a/src/libs/API/types.ts +++ b/src/libs/API/types.ts @@ -1501,6 +1501,7 @@ const READ_COMMANDS = { OPEN_SEARCH_PAGE: 'OpenSearchPage', OPEN_SEARCH_CARD_FILTERS_PAGE: 'OpenSearchCardFiltersPage', OPEN_SEARCH_CATEGORY_FILTERS_PAGE: 'OpenSearchCategoryFiltersPage', + OPEN_SEARCH_VENDOR_FILTERS_PAGE: 'OpenSearchVendorFiltersPage', SEARCH: 'Search', GET_INSIGHTS: 'GetInsights', GET_TRANSACTIONS_CONVERTED_AMOUNT: 'GetTransactionsConvertedAmount', @@ -1676,6 +1677,7 @@ type ReadCommandParameters = { [READ_COMMANDS.OPEN_DRAFT_DISTANCE_EXPENSE]: null; [READ_COMMANDS.OPEN_SEARCH_CARD_FILTERS_PAGE]: null; [READ_COMMANDS.OPEN_SEARCH_CATEGORY_FILTERS_PAGE]: null; + [READ_COMMANDS.OPEN_SEARCH_VENDOR_FILTERS_PAGE]: null; [READ_COMMANDS.START_ISSUE_NEW_CARD_FLOW]: Parameters.StartIssueNewCardFlowParams; [READ_COMMANDS.OPEN_CARD_DETAILS_PAGE]: Parameters.OpenCardDetailsPageParams; [READ_COMMANDS.GET_CORPAY_ONBOARDING_FIELDS]: Parameters.GetCorpayOnboardingFieldsParams; diff --git a/src/libs/PolicyUtils.ts b/src/libs/PolicyUtils.ts index 39814246c0b1..8d435a20a1b6 100644 --- a/src/libs/PolicyUtils.ts +++ b/src/libs/PolicyUtils.ts @@ -41,6 +41,7 @@ import type { } from '@src/types/onyx/Policy'; import type PolicyEmployee from '@src/types/onyx/PolicyEmployee'; import type Rule from '@src/types/onyx/Rule'; +import type {TransactionCommentVendor} from '@src/types/onyx/Transaction'; import type {WorkspaceTravelSettings} from '@src/types/onyx/TravelSettings'; import {isEmptyObject} from '@src/types/utils/EmptyObject'; @@ -2747,6 +2748,26 @@ function hasVendorFeature(policy: OnyxEntry, isVendorMatchingBetaEnabled return isVendorMatchingBetaEnabled && (isXeroVendorMatchingActive(policy) || isRilletVendorMatchingActive(policy)); } +/** + * Search spans every workspace at once, so the vendor filter and column are offered when any workspace has the vendor feature. + */ +function hasVendorFeatureOnAnyPolicy(policies: OnyxCollection, isVendorMatchingBetaEnabled: boolean): boolean { + return Object.values(policies ?? {}).some((policy) => hasVendorFeature(policy, isVendorMatchingBetaEnabled)); +} + +/** + * IDs of the workspaces that have the vendor feature, so the Search vendor filter only offers their vendor lists. + */ +function getVendorFeaturePolicyIDs(policies: OnyxCollection, isVendorMatchingBetaEnabled: boolean): string[] { + const policyIDs: string[] = []; + for (const policy of Object.values(policies ?? {})) { + if (policy?.id && hasVendorFeature(policy, isVendorMatchingBetaEnabled)) { + policyIDs.push(policy.id); + } + } + return policyIDs; +} + /** * Single source of truth for which connected integration scopes the vendor field for this workspace * (QBO, Sage Intacct, Xero, Rillet, or DualEntry) and what its vendor list looks like. Returns `undefined` when no @@ -2932,6 +2953,18 @@ function findVendorByID(policy: OnyxEntry, vendorID: string | undefined) return getDualEntryVendors(policy).find((vendor) => vendor.id === vendorID); } +/** + * Display name of a transaction's vendor, or an empty string when none is assigned. The workspace's synced vendor list + * wins so renames in the accounting system show through. The name stored on the transaction covers vendors since + * removed from that list. + */ +function getVendorDisplayName(policy: OnyxEntry, vendor: TransactionCommentVendor | undefined): string { + if (!vendor?.externalID) { + return ''; + } + return findVendorByID(policy, vendor.externalID)?.name ?? vendor.name ?? ''; +} + /** * Resolves the text shown for a stored merchant-rule vendor ID. Prefer the active vendor-matching * source, use the unavailable label when its loaded list no longer contains the vendor, and retain @@ -3497,6 +3530,7 @@ export { getConnectedIntegration, getConnectionExporters, findVendorByID, + getVendorDisplayName, getActiveVendorMatchingIntegration, getMatchingVendorByID, getMatchingVendors, @@ -3511,6 +3545,8 @@ export { isXeroActiveMatchingSource, isXeroVendorMatchingActive, hasVendorFeature, + hasVendorFeatureOnAnyPolicy, + getVendorFeaturePolicyIDs, isMatchingVendorListLoaded, getValidConnectedIntegration, getCountOfEnabledTagsOfList, diff --git a/src/libs/SearchParser/autocompleteParser.js b/src/libs/SearchParser/autocompleteParser.js index ecb564919bef..843d27f8f62d 100644 --- a/src/libs/SearchParser/autocompleteParser.js +++ b/src/libs/SearchParser/autocompleteParser.js @@ -200,113 +200,114 @@ function peg$parse(input, options) { var peg$c14 = "group-currency"; var peg$c15 = "tag"; var peg$c16 = "category"; - var peg$c17 = "to"; - var peg$c18 = "exporter"; - var peg$c19 = "payer"; - var peg$c20 = "paidBy"; - var peg$c21 = "paid-by"; - var peg$c22 = "taxrate"; - var peg$c23 = "tax-rate"; - var peg$c24 = "cardID"; - var peg$c25 = "card"; - var peg$c26 = "bankAccount"; - var peg$c27 = "bank-account"; - var peg$c28 = "from"; - var peg$c29 = "attendee"; - var peg$c30 = "expenseType"; - var peg$c31 = "expense-type"; - var peg$c32 = "receiptType"; - var peg$c33 = "receipt-type"; - var peg$c34 = "withdrawalType"; - var peg$c35 = "withdrawal-type"; - var peg$c36 = "withdrawalStatus"; - var peg$c37 = "withdrawal-status"; - var peg$c38 = "paidStatus"; - var peg$c39 = "paid-status"; - var peg$c40 = "withdrawalid"; - var peg$c41 = "withdrawal-id"; - var peg$c42 = "billable"; - var peg$c43 = "reimbursable"; - var peg$c44 = "type"; - var peg$c45 = "status"; - var peg$c46 = "sortBy"; - var peg$c47 = "sort-by"; - var peg$c48 = "sortOrder"; - var peg$c49 = "sort-order"; - var peg$c50 = "policyID"; - var peg$c51 = "workspace"; - var peg$c52 = "submitted"; - var peg$c53 = "approved"; - var peg$c54 = "paid"; - var peg$c55 = "exported"; - var peg$c56 = "posted"; - var peg$c57 = "withdrawn"; - var peg$c58 = "groupby"; - var peg$c59 = "group-by"; - var peg$c60 = "limit"; - var peg$c61 = "feed"; - var peg$c62 = "title"; - var peg$c63 = "submitteruserid"; - var peg$c64 = "submitter-user-id"; - var peg$c65 = "submitterpayrollid"; - var peg$c66 = "submitter-payroll-id"; - var peg$c67 = "orderdealnumbers"; - var peg$c68 = "order-deal-numbers"; - var peg$c69 = "assignee"; - var peg$c70 = "createdby"; - var peg$c71 = "created-by"; - var peg$c72 = "action"; - var peg$c73 = "total"; - var peg$c74 = "has"; - var peg$c75 = "is"; - var peg$c76 = "purchaseamount"; - var peg$c77 = "purchase-amount"; - var peg$c78 = "purchasecurrency"; - var peg$c79 = "purchase-currency"; - var peg$c80 = "amountdebited"; - var peg$c81 = "amount-debited"; - var peg$c82 = "amountreimbursed"; - var peg$c83 = "amount-reimbursed"; - var peg$c84 = "columns"; - var peg$c85 = "view"; - var peg$c86 = "per-diem"; - var peg$c87 = "drafts"; - var peg$c88 = "draft"; - var peg$c89 = "tax"; - var peg$c90 = "policy-name"; - var peg$c91 = "long-report-id"; - var peg$c92 = "exported-to"; - var peg$c93 = "exportedto"; - var peg$c94 = "exchange-rate"; - var peg$c95 = "reimbursable-total"; - var peg$c96 = "non-reimbursable-total"; - var peg$c97 = "group-from"; - var peg$c98 = "group-expenses"; - var peg$c99 = "group-total"; - var peg$c100 = "group-card"; - var peg$c101 = "group-feed"; - var peg$c102 = "group-bank-account"; - var peg$c103 = "group-withdrawn"; - var peg$c104 = "group-withdrawal-id"; - var peg$c105 = "group-amount-debited"; - var peg$c106 = "group-amount-reimbursed"; - var peg$c107 = "group-category"; - var peg$c108 = "group-tag"; - var peg$c109 = "group-merchant"; - var peg$c110 = "group-day"; - var peg$c111 = "group-month"; - var peg$c112 = "group-week"; - var peg$c113 = "group-year"; - var peg$c114 = "group-quarter"; - var peg$c115 = "!="; - var peg$c116 = ">="; - var peg$c117 = ">"; - var peg$c118 = "<="; - var peg$c119 = "<"; - var peg$c120 = "\\"; - var peg$c121 = "\u201C"; - var peg$c122 = "\u201D"; - var peg$c123 = "\""; + var peg$c17 = "vendor"; + var peg$c18 = "to"; + var peg$c19 = "exporter"; + var peg$c20 = "payer"; + var peg$c21 = "paidBy"; + var peg$c22 = "paid-by"; + var peg$c23 = "taxrate"; + var peg$c24 = "tax-rate"; + var peg$c25 = "cardID"; + var peg$c26 = "card"; + var peg$c27 = "bankAccount"; + var peg$c28 = "bank-account"; + var peg$c29 = "from"; + var peg$c30 = "attendee"; + var peg$c31 = "expenseType"; + var peg$c32 = "expense-type"; + var peg$c33 = "receiptType"; + var peg$c34 = "receipt-type"; + var peg$c35 = "withdrawalType"; + var peg$c36 = "withdrawal-type"; + var peg$c37 = "withdrawalStatus"; + var peg$c38 = "withdrawal-status"; + var peg$c39 = "paidStatus"; + var peg$c40 = "paid-status"; + var peg$c41 = "withdrawalid"; + var peg$c42 = "withdrawal-id"; + var peg$c43 = "billable"; + var peg$c44 = "reimbursable"; + var peg$c45 = "type"; + var peg$c46 = "status"; + var peg$c47 = "sortBy"; + var peg$c48 = "sort-by"; + var peg$c49 = "sortOrder"; + var peg$c50 = "sort-order"; + var peg$c51 = "policyID"; + var peg$c52 = "workspace"; + var peg$c53 = "submitted"; + var peg$c54 = "approved"; + var peg$c55 = "paid"; + var peg$c56 = "exported"; + var peg$c57 = "posted"; + var peg$c58 = "withdrawn"; + var peg$c59 = "groupby"; + var peg$c60 = "group-by"; + var peg$c61 = "limit"; + var peg$c62 = "feed"; + var peg$c63 = "title"; + var peg$c64 = "submitteruserid"; + var peg$c65 = "submitter-user-id"; + var peg$c66 = "submitterpayrollid"; + var peg$c67 = "submitter-payroll-id"; + var peg$c68 = "orderdealnumbers"; + var peg$c69 = "order-deal-numbers"; + var peg$c70 = "assignee"; + var peg$c71 = "createdby"; + var peg$c72 = "created-by"; + var peg$c73 = "action"; + var peg$c74 = "total"; + var peg$c75 = "has"; + var peg$c76 = "is"; + var peg$c77 = "purchaseamount"; + var peg$c78 = "purchase-amount"; + var peg$c79 = "purchasecurrency"; + var peg$c80 = "purchase-currency"; + var peg$c81 = "amountdebited"; + var peg$c82 = "amount-debited"; + var peg$c83 = "amountreimbursed"; + var peg$c84 = "amount-reimbursed"; + var peg$c85 = "columns"; + var peg$c86 = "view"; + var peg$c87 = "per-diem"; + var peg$c88 = "drafts"; + var peg$c89 = "draft"; + var peg$c90 = "tax"; + var peg$c91 = "policy-name"; + var peg$c92 = "long-report-id"; + var peg$c93 = "exported-to"; + var peg$c94 = "exportedto"; + var peg$c95 = "exchange-rate"; + var peg$c96 = "reimbursable-total"; + var peg$c97 = "non-reimbursable-total"; + var peg$c98 = "group-from"; + var peg$c99 = "group-expenses"; + var peg$c100 = "group-total"; + var peg$c101 = "group-card"; + var peg$c102 = "group-feed"; + var peg$c103 = "group-bank-account"; + var peg$c104 = "group-withdrawn"; + var peg$c105 = "group-withdrawal-id"; + var peg$c106 = "group-amount-debited"; + var peg$c107 = "group-amount-reimbursed"; + var peg$c108 = "group-category"; + var peg$c109 = "group-tag"; + var peg$c110 = "group-merchant"; + var peg$c111 = "group-day"; + var peg$c112 = "group-month"; + var peg$c113 = "group-week"; + var peg$c114 = "group-year"; + var peg$c115 = "group-quarter"; + var peg$c116 = "!="; + var peg$c117 = ">="; + var peg$c118 = ">"; + var peg$c119 = "<="; + var peg$c120 = "<"; + var peg$c121 = "\\"; + var peg$c122 = "\u201C"; + var peg$c123 = "\u201D"; + var peg$c124 = "\""; var peg$r0 = /^[ \t\r\n\xA0,:=<>!]/; var peg$r1 = /^[:=]/; @@ -343,130 +344,131 @@ function peg$parse(input, options) { var peg$e17 = peg$literalExpectation("group-currency", true); var peg$e18 = peg$literalExpectation("tag", true); var peg$e19 = peg$literalExpectation("category", true); - var peg$e20 = peg$literalExpectation("to", true); - var peg$e21 = peg$literalExpectation("exporter", true); - var peg$e22 = peg$literalExpectation("payer", true); - var peg$e23 = peg$literalExpectation("paidBy", false); - var peg$e24 = peg$literalExpectation("paid-by", true); - var peg$e25 = peg$literalExpectation("taxRate", true); - var peg$e26 = peg$literalExpectation("tax-rate", true); - var peg$e27 = peg$literalExpectation("cardID", false); - var peg$e28 = peg$literalExpectation("card", true); - var peg$e29 = peg$literalExpectation("bankAccount", false); - var peg$e30 = peg$literalExpectation("bank-account", true); - var peg$e31 = peg$literalExpectation("from", true); - var peg$e32 = peg$literalExpectation("attendee", true); - var peg$e33 = peg$literalExpectation("expenseType", false); - var peg$e34 = peg$literalExpectation("expense-type", true); - var peg$e35 = peg$literalExpectation("receiptType", false); - var peg$e36 = peg$literalExpectation("receipt-type", true); - var peg$e37 = peg$literalExpectation("withdrawalType", false); - var peg$e38 = peg$literalExpectation("withdrawal-type", true); - var peg$e39 = peg$literalExpectation("withdrawalStatus", false); - var peg$e40 = peg$literalExpectation("withdrawal-status", true); - var peg$e41 = peg$literalExpectation("paidStatus", false); - var peg$e42 = peg$literalExpectation("paid-status", true); - var peg$e43 = peg$literalExpectation("withdrawalID", true); - var peg$e44 = peg$literalExpectation("withdrawal-id", true); - var peg$e45 = peg$literalExpectation("billable", true); - var peg$e46 = peg$literalExpectation("reimbursable", true); - var peg$e47 = peg$literalExpectation("type", true); - var peg$e48 = peg$literalExpectation("status", true); - var peg$e49 = peg$literalExpectation("sortBy", false); - var peg$e50 = peg$literalExpectation("sort-by", true); - var peg$e51 = peg$literalExpectation("sortOrder", false); - var peg$e52 = peg$literalExpectation("sort-order", true); - var peg$e53 = peg$literalExpectation("policyID", false); - var peg$e54 = peg$literalExpectation("workspace", true); - var peg$e55 = peg$literalExpectation("submitted", true); - var peg$e56 = peg$literalExpectation("approved", true); - var peg$e57 = peg$literalExpectation("paid", true); - var peg$e58 = peg$literalExpectation("exported", true); - var peg$e59 = peg$literalExpectation("posted", true); - var peg$e60 = peg$literalExpectation("withdrawn", true); - var peg$e61 = peg$literalExpectation("groupBy", true); - var peg$e62 = peg$literalExpectation("group-by", true); - var peg$e63 = peg$literalExpectation("limit", true); - var peg$e64 = peg$literalExpectation("feed", true); - var peg$e65 = peg$literalExpectation("title", true); - var peg$e66 = peg$literalExpectation("submitterUserID", true); - var peg$e67 = peg$literalExpectation("submitter-user-id", true); - var peg$e68 = peg$literalExpectation("submitterPayrollID", true); - var peg$e69 = peg$literalExpectation("submitter-payroll-id", true); - var peg$e70 = peg$literalExpectation("orderDealNumbers", true); - var peg$e71 = peg$literalExpectation("order-deal-numbers", true); - var peg$e72 = peg$literalExpectation("assignee", true); - var peg$e73 = peg$literalExpectation("createdBy", true); - var peg$e74 = peg$literalExpectation("created-by", true); - var peg$e75 = peg$literalExpectation("action", true); - var peg$e76 = peg$literalExpectation("total", true); - var peg$e77 = peg$literalExpectation("has", true); - var peg$e78 = peg$literalExpectation("is", true); - var peg$e79 = peg$literalExpectation("purchaseAmount", true); - var peg$e80 = peg$literalExpectation("purchase-amount", true); - var peg$e81 = peg$literalExpectation("purchaseCurrency", true); - var peg$e82 = peg$literalExpectation("purchase-currency", true); - var peg$e83 = peg$literalExpectation("amountDebited", true); - var peg$e84 = peg$literalExpectation("amount-debited", true); - var peg$e85 = peg$literalExpectation("amountReimbursed", true); - var peg$e86 = peg$literalExpectation("amount-reimbursed", true); - var peg$e87 = peg$literalExpectation("columns", true); - var peg$e88 = peg$literalExpectation("view", true); - var peg$e89 = peg$literalExpectation("per-diem", true); - var peg$e90 = peg$literalExpectation("drafts", true); - var peg$e91 = peg$literalExpectation("draft", true); - var peg$e92 = peg$literalExpectation("tax", true); - var peg$e93 = peg$literalExpectation("policy-name", true); - var peg$e94 = peg$literalExpectation("long-report-id", true); - var peg$e95 = peg$literalExpectation("exported-to", true); - var peg$e96 = peg$classExpectation([":", "="], false, false); - var peg$e97 = peg$literalExpectation("exportedTo", true); - var peg$e98 = peg$literalExpectation("exchange-rate", true); - var peg$e99 = peg$literalExpectation("reimbursable-total", true); - var peg$e100 = peg$literalExpectation("non-reimbursable-total", true); - var peg$e101 = peg$literalExpectation("group-from", true); - var peg$e102 = peg$literalExpectation("group-expenses", true); - var peg$e103 = peg$literalExpectation("group-total", true); - var peg$e104 = peg$literalExpectation("group-card", true); - var peg$e105 = peg$literalExpectation("group-feed", true); - var peg$e106 = peg$literalExpectation("group-bank-account", true); - var peg$e107 = peg$literalExpectation("group-withdrawn", true); - var peg$e108 = peg$literalExpectation("group-withdrawal-id", true); - var peg$e109 = peg$literalExpectation("group-amount-debited", true); - var peg$e110 = peg$literalExpectation("group-amount-reimbursed", true); - var peg$e111 = peg$literalExpectation("group-category", true); - var peg$e112 = peg$literalExpectation("group-tag", true); - var peg$e113 = peg$literalExpectation("group-merchant", true); - var peg$e114 = peg$literalExpectation("group-day", true); - var peg$e115 = peg$literalExpectation("group-month", true); - var peg$e116 = peg$literalExpectation("group-week", true); - var peg$e117 = peg$literalExpectation("group-year", true); - var peg$e118 = peg$literalExpectation("group-quarter", true); - var peg$e119 = peg$otherExpectation("operator"); - var peg$e120 = peg$literalExpectation("!=", false); - var peg$e121 = peg$literalExpectation(">=", false); - var peg$e122 = peg$literalExpectation(">", false); - var peg$e123 = peg$literalExpectation("<=", false); - var peg$e124 = peg$literalExpectation("<", false); - var peg$e125 = peg$literalExpectation("\\", false); - var peg$e126 = peg$classExpectation([",", "\"", "\u201D", "\u201C", "\\"], false, false); - var peg$e127 = peg$otherExpectation("word"); - var peg$e128 = peg$classExpectation([" ", ",", "\t", "\n", "\r", "\xA0"], true, false); - var peg$e129 = peg$otherExpectation("whitespace"); - var peg$e130 = peg$classExpectation([" ", "\t", "\r", "\n", "\xA0"], false, false); - var peg$e131 = peg$otherExpectation("quote"); - var peg$e132 = peg$classExpectation([" ", ",", "\"", "\u201D", "\u201C", "\t", "\n", "\r", "\xA0"], true, false); - var peg$e133 = peg$classExpectation(["\"", ["\u201C", "\u201D"]], false, false); - var peg$e134 = peg$classExpectation(["\"", "\u201D", "\u201C", "\r", "\n"], true, false); - var peg$e135 = peg$literalExpectation("\u201C", false); - var peg$e136 = peg$literalExpectation("\u201D", false); - var peg$e137 = peg$literalExpectation("\"", false); - var peg$e138 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ["a", "z"], ["A", "Z"], ["0", "9"]], false, false); - var peg$e139 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"]], false, false); - var peg$e140 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0"], false, false); - var peg$e141 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ["a", "z"], ["A", "Z"]], false, false); - var peg$e142 = peg$classExpectation([","], false, false); - var peg$e143 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ","], false, false); + var peg$e20 = peg$literalExpectation("vendor", true); + var peg$e21 = peg$literalExpectation("to", true); + var peg$e22 = peg$literalExpectation("exporter", true); + var peg$e23 = peg$literalExpectation("payer", true); + var peg$e24 = peg$literalExpectation("paidBy", false); + var peg$e25 = peg$literalExpectation("paid-by", true); + var peg$e26 = peg$literalExpectation("taxRate", true); + var peg$e27 = peg$literalExpectation("tax-rate", true); + var peg$e28 = peg$literalExpectation("cardID", false); + var peg$e29 = peg$literalExpectation("card", true); + var peg$e30 = peg$literalExpectation("bankAccount", false); + var peg$e31 = peg$literalExpectation("bank-account", true); + var peg$e32 = peg$literalExpectation("from", true); + var peg$e33 = peg$literalExpectation("attendee", true); + var peg$e34 = peg$literalExpectation("expenseType", false); + var peg$e35 = peg$literalExpectation("expense-type", true); + var peg$e36 = peg$literalExpectation("receiptType", false); + var peg$e37 = peg$literalExpectation("receipt-type", true); + var peg$e38 = peg$literalExpectation("withdrawalType", false); + var peg$e39 = peg$literalExpectation("withdrawal-type", true); + var peg$e40 = peg$literalExpectation("withdrawalStatus", false); + var peg$e41 = peg$literalExpectation("withdrawal-status", true); + var peg$e42 = peg$literalExpectation("paidStatus", false); + var peg$e43 = peg$literalExpectation("paid-status", true); + var peg$e44 = peg$literalExpectation("withdrawalID", true); + var peg$e45 = peg$literalExpectation("withdrawal-id", true); + var peg$e46 = peg$literalExpectation("billable", true); + var peg$e47 = peg$literalExpectation("reimbursable", true); + var peg$e48 = peg$literalExpectation("type", true); + var peg$e49 = peg$literalExpectation("status", true); + var peg$e50 = peg$literalExpectation("sortBy", false); + var peg$e51 = peg$literalExpectation("sort-by", true); + var peg$e52 = peg$literalExpectation("sortOrder", false); + var peg$e53 = peg$literalExpectation("sort-order", true); + var peg$e54 = peg$literalExpectation("policyID", false); + var peg$e55 = peg$literalExpectation("workspace", true); + var peg$e56 = peg$literalExpectation("submitted", true); + var peg$e57 = peg$literalExpectation("approved", true); + var peg$e58 = peg$literalExpectation("paid", true); + var peg$e59 = peg$literalExpectation("exported", true); + var peg$e60 = peg$literalExpectation("posted", true); + var peg$e61 = peg$literalExpectation("withdrawn", true); + var peg$e62 = peg$literalExpectation("groupBy", true); + var peg$e63 = peg$literalExpectation("group-by", true); + var peg$e64 = peg$literalExpectation("limit", true); + var peg$e65 = peg$literalExpectation("feed", true); + var peg$e66 = peg$literalExpectation("title", true); + var peg$e67 = peg$literalExpectation("submitterUserID", true); + var peg$e68 = peg$literalExpectation("submitter-user-id", true); + var peg$e69 = peg$literalExpectation("submitterPayrollID", true); + var peg$e70 = peg$literalExpectation("submitter-payroll-id", true); + var peg$e71 = peg$literalExpectation("orderDealNumbers", true); + var peg$e72 = peg$literalExpectation("order-deal-numbers", true); + var peg$e73 = peg$literalExpectation("assignee", true); + var peg$e74 = peg$literalExpectation("createdBy", true); + var peg$e75 = peg$literalExpectation("created-by", true); + var peg$e76 = peg$literalExpectation("action", true); + var peg$e77 = peg$literalExpectation("total", true); + var peg$e78 = peg$literalExpectation("has", true); + var peg$e79 = peg$literalExpectation("is", true); + var peg$e80 = peg$literalExpectation("purchaseAmount", true); + var peg$e81 = peg$literalExpectation("purchase-amount", true); + var peg$e82 = peg$literalExpectation("purchaseCurrency", true); + var peg$e83 = peg$literalExpectation("purchase-currency", true); + var peg$e84 = peg$literalExpectation("amountDebited", true); + var peg$e85 = peg$literalExpectation("amount-debited", true); + var peg$e86 = peg$literalExpectation("amountReimbursed", true); + var peg$e87 = peg$literalExpectation("amount-reimbursed", true); + var peg$e88 = peg$literalExpectation("columns", true); + var peg$e89 = peg$literalExpectation("view", true); + var peg$e90 = peg$literalExpectation("per-diem", true); + var peg$e91 = peg$literalExpectation("drafts", true); + var peg$e92 = peg$literalExpectation("draft", true); + var peg$e93 = peg$literalExpectation("tax", true); + var peg$e94 = peg$literalExpectation("policy-name", true); + var peg$e95 = peg$literalExpectation("long-report-id", true); + var peg$e96 = peg$literalExpectation("exported-to", true); + var peg$e97 = peg$classExpectation([":", "="], false, false); + var peg$e98 = peg$literalExpectation("exportedTo", true); + var peg$e99 = peg$literalExpectation("exchange-rate", true); + var peg$e100 = peg$literalExpectation("reimbursable-total", true); + var peg$e101 = peg$literalExpectation("non-reimbursable-total", true); + var peg$e102 = peg$literalExpectation("group-from", true); + var peg$e103 = peg$literalExpectation("group-expenses", true); + var peg$e104 = peg$literalExpectation("group-total", true); + var peg$e105 = peg$literalExpectation("group-card", true); + var peg$e106 = peg$literalExpectation("group-feed", true); + var peg$e107 = peg$literalExpectation("group-bank-account", true); + var peg$e108 = peg$literalExpectation("group-withdrawn", true); + var peg$e109 = peg$literalExpectation("group-withdrawal-id", true); + var peg$e110 = peg$literalExpectation("group-amount-debited", true); + var peg$e111 = peg$literalExpectation("group-amount-reimbursed", true); + var peg$e112 = peg$literalExpectation("group-category", true); + var peg$e113 = peg$literalExpectation("group-tag", true); + var peg$e114 = peg$literalExpectation("group-merchant", true); + var peg$e115 = peg$literalExpectation("group-day", true); + var peg$e116 = peg$literalExpectation("group-month", true); + var peg$e117 = peg$literalExpectation("group-week", true); + var peg$e118 = peg$literalExpectation("group-year", true); + var peg$e119 = peg$literalExpectation("group-quarter", true); + var peg$e120 = peg$otherExpectation("operator"); + var peg$e121 = peg$literalExpectation("!=", false); + var peg$e122 = peg$literalExpectation(">=", false); + 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$classExpectation([",", "\"", "\u201D", "\u201C", "\\"], false, false); + var peg$e128 = peg$otherExpectation("word"); + var peg$e129 = peg$classExpectation([" ", ",", "\t", "\n", "\r", "\xA0"], true, false); + var peg$e130 = peg$otherExpectation("whitespace"); + var peg$e131 = peg$classExpectation([" ", "\t", "\r", "\n", "\xA0"], false, false); + var peg$e132 = peg$otherExpectation("quote"); + var peg$e133 = peg$classExpectation([" ", ",", "\"", "\u201D", "\u201C", "\t", "\n", "\r", "\xA0"], true, false); + var peg$e134 = peg$classExpectation(["\"", ["\u201C", "\u201D"]], false, false); + var peg$e135 = peg$classExpectation(["\"", "\u201D", "\u201C", "\r", "\n"], true, false); + var peg$e136 = peg$literalExpectation("\u201C", false); + var peg$e137 = peg$literalExpectation("\u201D", false); + var peg$e138 = peg$literalExpectation("\"", false); + var peg$e139 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ["a", "z"], ["A", "Z"], ["0", "9"]], false, false); + var peg$e140 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"]], false, false); + var peg$e141 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0"], false, false); + var peg$e142 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ["a", "z"], ["A", "Z"]], false, false); + var peg$e143 = peg$classExpectation([","], false, false); + var peg$e144 = 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(); }; @@ -542,120 +544,121 @@ function peg$parse(input, options) { var peg$f16 = function() { return "groupCurrency"; }; var peg$f17 = function() { return "tag"; }; var peg$f18 = function() { return "category"; }; - var peg$f19 = function() { return "to"; }; - var peg$f20 = function() { return "exporter"; }; - var peg$f21 = function() { return "payer"; }; - var peg$f22 = function() { return "paidBy"; }; - var peg$f23 = function() { return "taxRate"; }; - var peg$f24 = function() { return "cardID"; }; - var peg$f25 = function() { return "bankAccount"; }; - var peg$f26 = function() { return "from"; }; - var peg$f27 = function() {return "attendee"}; - var peg$f28 = function() { return "expenseType"; }; - var peg$f29 = function() { return "receiptType"; }; - var peg$f30 = function() { return "withdrawalType"; }; - var peg$f31 = function() { return "withdrawalStatus"; }; - var peg$f32 = function() { return "paidStatus"; }; - var peg$f33 = function() { return "withdrawalID"; }; - var peg$f34 = function() { return "billable"; }; - var peg$f35 = function() { return "reimbursable"; }; - var peg$f36 = function() { return "type"; }; - var peg$f37 = function() { return "status"; }; - var peg$f38 = function() { return "sortBy"; }; - var peg$f39 = function() { return "sortOrder"; }; - var peg$f40 = function() { return "policyID"; }; - var peg$f41 = function() { return "submitted"; }; - var peg$f42 = function() { return "approved"; }; - var peg$f43 = function() { return "paid"; }; - var peg$f44 = function() { return "exported"; }; - var peg$f45 = function() { return "posted"; }; - var peg$f46 = function() { return "withdrawn"; }; - var peg$f47 = function() { return "groupBy"; }; - var peg$f48 = function() { return "limit"; }; - var peg$f49 = function() { return "feed"; }; - var peg$f50 = function() { return "title"; }; - var peg$f51 = function() { return "submitterUserID"; }; - var peg$f52 = function() { return "submitterPayrollID"; }; - var peg$f53 = function() { return "orderDealNumbers"; }; - var peg$f54 = function() { return "assignee"; }; - var peg$f55 = function() { return "createdBy"; }; - var peg$f56 = function() { return "action"; }; - var peg$f57 = function() {return "total"; }; - var peg$f58 = function() {return "has"; }; - var peg$f59 = function() {return "is"; }; - var peg$f60 = function() {return "purchaseAmount"}; - var peg$f61 = function() {return "purchaseCurrency"}; - var peg$f62 = function() {return "amountDebited"}; - var peg$f63 = function() {return "amountReimbursed"}; - var peg$f64 = function() { + var peg$f19 = function() { return "vendor"; }; + var peg$f20 = function() { return "to"; }; + var peg$f21 = function() { return "exporter"; }; + var peg$f22 = function() { return "payer"; }; + var peg$f23 = function() { return "paidBy"; }; + var peg$f24 = function() { return "taxRate"; }; + var peg$f25 = function() { return "cardID"; }; + var peg$f26 = function() { return "bankAccount"; }; + var peg$f27 = function() { return "from"; }; + var peg$f28 = function() {return "attendee"}; + var peg$f29 = function() { return "expenseType"; }; + var peg$f30 = function() { return "receiptType"; }; + var peg$f31 = function() { return "withdrawalType"; }; + var peg$f32 = function() { return "withdrawalStatus"; }; + 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() { isColumnsContext = true; return "columns"; }; - var peg$f65 = function() {return "view"}; - var peg$f66 = function() { return isColumnsContext; }; - var peg$f67 = function() { return "perDiem"; }; - var peg$f68 = function() { return "drafts"; }; - var peg$f69 = function() { return "originalamount"; }; - var peg$f70 = function() { return "taxAmount"; }; - var peg$f71 = function() { return "taxrate"; }; - var peg$f72 = function() { return "policyname"; }; - var peg$f73 = function() { return "withdrawalID"; }; - var peg$f74 = function() { return "bankAccount"; }; - var peg$f75 = function() { return "reportID"; }; - var peg$f76 = function() { return "base62ReportID"; }; - var peg$f77 = function() { return "exportedto"; }; - var peg$f78 = function() { return "exportedTo"; }; + var peg$f66 = function() {return "view"}; + var peg$f67 = function() { return isColumnsContext; }; + var peg$f68 = function() { return "perDiem"; }; + var peg$f69 = function() { return "drafts"; }; + var peg$f70 = function() { return "originalamount"; }; + var peg$f71 = function() { return "taxAmount"; }; + var peg$f72 = function() { return "taxrate"; }; + var peg$f73 = function() { return "policyname"; }; + var peg$f74 = function() { return "withdrawalID"; }; + var peg$f75 = function() { return "bankAccount"; }; + var peg$f76 = function() { return "reportID"; }; + var peg$f77 = function() { return "base62ReportID"; }; + var peg$f78 = function() { return "exportedto"; }; var peg$f79 = function() { return "exportedTo"; }; - var peg$f80 = function() { return "exchangeRate"; }; - var peg$f81 = function() { return "reimbursableTotal"; }; - var peg$f82 = function() { return "nonReimbursableTotal"; }; - var peg$f83 = function() { return "groupFrom"; }; - var peg$f84 = function() { return "groupExpenses"; }; - var peg$f85 = function() { return "groupTotal"; }; - var peg$f86 = function() { return "groupCard"; }; - var peg$f87 = function() { return "groupFeed"; }; - var peg$f88 = function() { return "groupBankAccount"; }; - var peg$f89 = function() { return "groupWithdrawn"; }; - var peg$f90 = function() { return "groupWithdrawalID"; }; - var peg$f91 = function() { return "groupAmountDebited"; }; - var peg$f92 = function() { return "groupAmountReimbursed"; }; - var peg$f93 = function() { return "amountDebited"; }; - var peg$f94 = function() { return "amountReimbursed"; }; - var peg$f95 = function() { return "groupCategory"; }; - var peg$f96 = function() { return "groupTag"; }; - var peg$f97 = function() { return "groupMerchant"; }; - var peg$f98 = function() { return "groupday"; }; - var peg$f99 = function() { return "groupmonth"; }; - var peg$f100 = function() { return "groupweek"; }; - var peg$f101 = function() { return "groupyear"; }; - var peg$f102 = function() { return "groupquarter"; }; - var peg$f103 = function() { return "eq"; }; - var peg$f104 = function() { return "neq"; }; - var peg$f105 = function() { return "gte"; }; - var peg$f106 = function() { return "gt"; }; - var peg$f107 = function() { return "lte"; }; - var peg$f108 = function() { return "lt"; }; - var peg$f109 = function(o) { + var peg$f80 = function() { return "exportedTo"; }; + var peg$f81 = function() { return "exchangeRate"; }; + var peg$f82 = function() { return "reimbursableTotal"; }; + var peg$f83 = function() { return "nonReimbursableTotal"; }; + var peg$f84 = function() { return "groupFrom"; }; + var peg$f85 = function() { return "groupExpenses"; }; + var peg$f86 = function() { return "groupTotal"; }; + var peg$f87 = function() { return "groupCard"; }; + var peg$f88 = function() { return "groupFeed"; }; + var peg$f89 = function() { return "groupBankAccount"; }; + var peg$f90 = function() { return "groupWithdrawn"; }; + var peg$f91 = function() { return "groupWithdrawalID"; }; + var peg$f92 = function() { return "groupAmountDebited"; }; + var peg$f93 = function() { return "groupAmountReimbursed"; }; + var peg$f94 = function() { return "amountDebited"; }; + var peg$f95 = function() { return "amountReimbursed"; }; + var peg$f96 = function() { return "groupCategory"; }; + var peg$f97 = function() { return "groupTag"; }; + var peg$f98 = function() { return "groupMerchant"; }; + var peg$f99 = function() { return "groupday"; }; + var peg$f100 = function() { return "groupmonth"; }; + var peg$f101 = function() { return "groupweek"; }; + var peg$f102 = function() { return "groupyear"; }; + var peg$f103 = function() { return "groupquarter"; }; + var peg$f104 = function() { return "eq"; }; + var peg$f105 = function() { return "neq"; }; + var peg$f106 = function() { return "gte"; }; + var peg$f107 = function() { return "gt"; }; + var peg$f108 = function() { return "lte"; }; + var peg$f109 = function() { return "lt"; }; + var peg$f110 = function(o) { if (nameOperator) { expectingNestedQuote = (o === "eq"); // Use simple parser if no valid operator is found } isColumnsContext = false; return o; }; - var peg$f110 = function(c) { return c; }; - var peg$f111 = function(chars) { return chars.join("").trim(); }; - var peg$f112 = function() { + var peg$f111 = function(c) { return c; }; + var peg$f112 = function(chars) { return chars.join("").trim(); }; + var peg$f113 = function() { isColumnsContext = false; return "and"; }; - var peg$f113 = function() { return expectingNestedQuote; }; - var peg$f114 = function(start, inner, end) { //handle no-breaking space + var peg$f114 = function() { return expectingNestedQuote; }; + var peg$f115 = function(start, inner, end) { //handle no-breaking space return [...start, '"', ...inner, '"', ...end].join(""); }; - var peg$f115 = function(start) {return "“"}; - var peg$f116 = function(start) {return "”"}; - var peg$f117 = function(start) {return "\""}; - var peg$f118 = function(start, inner, end) { + var peg$f116 = function(start) {return "“"}; + var peg$f117 = function(start) {return "”"}; + var peg$f118 = function(start) {return "\""}; + var peg$f119 = function(start, inner, end) { return [...start, '"', ...inner, '"'].join(""); }; var peg$currPos = options.peg$currPos | 0; @@ -1080,107 +1083,110 @@ function peg$parse(input, options) { if (s1 === peg$FAILED) { s1 = peg$parsecategory(); if (s1 === peg$FAILED) { - s1 = peg$parseto(); + s1 = peg$parsevendor(); if (s1 === peg$FAILED) { - s1 = peg$parsetaxRate(); + s1 = peg$parseto(); if (s1 === peg$FAILED) { - s1 = peg$parsefrom(); + s1 = peg$parsetaxRate(); if (s1 === peg$FAILED) { - s1 = peg$parseattendee(); + s1 = peg$parsefrom(); if (s1 === peg$FAILED) { - s1 = peg$parsepayer(); + s1 = peg$parseattendee(); if (s1 === peg$FAILED) { - s1 = peg$parsepaidBy(); + s1 = peg$parsepayer(); if (s1 === peg$FAILED) { - s1 = peg$parseexporter(); + s1 = peg$parsepaidBy(); if (s1 === peg$FAILED) { - s1 = peg$parsecreatedBy(); + s1 = peg$parseexporter(); if (s1 === peg$FAILED) { - s1 = peg$parseassignee(); + s1 = peg$parsecreatedBy(); if (s1 === peg$FAILED) { - s1 = peg$parseexpenseType(); + s1 = peg$parseassignee(); if (s1 === peg$FAILED) { - s1 = peg$parsereceiptType(); + s1 = peg$parseexpenseType(); if (s1 === peg$FAILED) { - s1 = peg$parsewithdrawalType(); + s1 = peg$parsereceiptType(); if (s1 === peg$FAILED) { - s1 = peg$parsewithdrawalStatus(); + s1 = peg$parsewithdrawalType(); if (s1 === peg$FAILED) { - s1 = peg$parsepaidStatus(); + s1 = peg$parsewithdrawalStatus(); if (s1 === peg$FAILED) { - s1 = peg$parsetype(); + s1 = peg$parsepaidStatus(); if (s1 === peg$FAILED) { - s1 = peg$parsestatus(); + s1 = peg$parsetype(); if (s1 === peg$FAILED) { - s1 = peg$parsecardID(); + s1 = peg$parsestatus(); if (s1 === peg$FAILED) { - s1 = peg$parsebankAccount(); + s1 = peg$parsecardID(); if (s1 === peg$FAILED) { - s1 = peg$parsefeed(); + s1 = peg$parsebankAccount(); if (s1 === peg$FAILED) { - s1 = peg$parsegroupBy(); + s1 = peg$parsefeed(); if (s1 === peg$FAILED) { - s1 = peg$parseview(); + s1 = peg$parsegroupBy(); if (s1 === peg$FAILED) { - s1 = peg$parsereimbursable(); + s1 = peg$parseview(); if (s1 === peg$FAILED) { - s1 = peg$parsebillable(); + s1 = peg$parsereimbursable(); if (s1 === peg$FAILED) { - s1 = peg$parsepolicyID(); + s1 = peg$parsebillable(); 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(); + } } } } @@ -1577,13 +1583,13 @@ function peg$parse(input, options) { return s0; } - function peg$parseto() { + function peg$parsevendor() { var s0, s1; s0 = peg$currPos; - s1 = input.substr(peg$currPos, 2); + s1 = input.substr(peg$currPos, 6); if (s1.toLowerCase() === peg$c17) { - peg$currPos += 2; + peg$currPos += 6; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$e20); } @@ -1597,13 +1603,13 @@ function peg$parse(input, options) { return s0; } - function peg$parseexporter() { + function peg$parseto() { var s0, s1; s0 = peg$currPos; - s1 = input.substr(peg$currPos, 8); + s1 = input.substr(peg$currPos, 2); if (s1.toLowerCase() === peg$c18) { - peg$currPos += 8; + peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$e21); } @@ -1617,13 +1623,13 @@ function peg$parse(input, options) { return s0; } - function peg$parsepayer() { + function peg$parseexporter() { var s0, s1; s0 = peg$currPos; - s1 = input.substr(peg$currPos, 5); + s1 = input.substr(peg$currPos, 8); if (s1.toLowerCase() === peg$c19) { - peg$currPos += 5; + peg$currPos += 8; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$e22); } @@ -1637,28 +1643,48 @@ function peg$parse(input, options) { return s0; } + function peg$parsepayer() { + var s0, s1; + + s0 = peg$currPos; + s1 = input.substr(peg$currPos, 5); + if (s1.toLowerCase() === peg$c20) { + peg$currPos += 5; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e23); } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f22(); + } + s0 = s1; + + return s0; + } + function peg$parsepaidBy() { var s0, s1; - if (input.substr(peg$currPos, 6) === peg$c20) { - s0 = peg$c20; + if (input.substr(peg$currPos, 6) === peg$c21) { + s0 = peg$c21; peg$currPos += 6; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e23); } + if (peg$silentFails === 0) { peg$fail(peg$e24); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 7); - if (s1.toLowerCase() === peg$c21) { + if (s1.toLowerCase() === peg$c22) { peg$currPos += 7; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e24); } + if (peg$silentFails === 0) { peg$fail(peg$e25); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f22(); + s1 = peg$f23(); } s0 = s1; } @@ -1670,24 +1696,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 7); - if (s0.toLowerCase() === peg$c22) { + if (s0.toLowerCase() === peg$c23) { peg$currPos += 7; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e25); } + if (peg$silentFails === 0) { peg$fail(peg$e26); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 8); - if (s1.toLowerCase() === peg$c23) { + if (s1.toLowerCase() === peg$c24) { peg$currPos += 8; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e26); } + if (peg$silentFails === 0) { peg$fail(peg$e27); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f23(); + s1 = peg$f24(); } s0 = s1; } @@ -1698,25 +1724,25 @@ function peg$parse(input, options) { function peg$parsecardID() { var s0, s1; - if (input.substr(peg$currPos, 6) === peg$c24) { - s0 = peg$c24; + if (input.substr(peg$currPos, 6) === peg$c25) { + s0 = peg$c25; peg$currPos += 6; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e27); } + if (peg$silentFails === 0) { peg$fail(peg$e28); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 4); - if (s1.toLowerCase() === peg$c25) { + if (s1.toLowerCase() === peg$c26) { peg$currPos += 4; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e28); } + if (peg$silentFails === 0) { peg$fail(peg$e29); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f24(); + s1 = peg$f25(); } s0 = s1; } @@ -1727,25 +1753,25 @@ function peg$parse(input, options) { function peg$parsebankAccount() { var s0, s1; - if (input.substr(peg$currPos, 11) === peg$c26) { - s0 = peg$c26; + if (input.substr(peg$currPos, 11) === peg$c27) { + s0 = peg$c27; peg$currPos += 11; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e29); } + if (peg$silentFails === 0) { peg$fail(peg$e30); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 12); - if (s1.toLowerCase() === peg$c27) { + if (s1.toLowerCase() === peg$c28) { peg$currPos += 12; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e30); } + if (peg$silentFails === 0) { peg$fail(peg$e31); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f25(); + s1 = peg$f26(); } s0 = s1; } @@ -1758,15 +1784,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 4); - if (s1.toLowerCase() === peg$c28) { + if (s1.toLowerCase() === peg$c29) { peg$currPos += 4; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e31); } + if (peg$silentFails === 0) { peg$fail(peg$e32); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f26(); + s1 = peg$f27(); } s0 = s1; @@ -1778,15 +1804,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 8); - if (s1.toLowerCase() === peg$c29) { + if (s1.toLowerCase() === peg$c30) { peg$currPos += 8; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e32); } + if (peg$silentFails === 0) { peg$fail(peg$e33); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f27(); + s1 = peg$f28(); } s0 = s1; @@ -1796,25 +1822,25 @@ function peg$parse(input, options) { function peg$parseexpenseType() { var s0, s1; - if (input.substr(peg$currPos, 11) === peg$c30) { - s0 = peg$c30; + if (input.substr(peg$currPos, 11) === peg$c31) { + s0 = peg$c31; peg$currPos += 11; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e33); } + if (peg$silentFails === 0) { peg$fail(peg$e34); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 12); - if (s1.toLowerCase() === peg$c31) { + if (s1.toLowerCase() === peg$c32) { peg$currPos += 12; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e34); } + if (peg$silentFails === 0) { peg$fail(peg$e35); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f28(); + s1 = peg$f29(); } s0 = s1; } @@ -1825,25 +1851,25 @@ function peg$parse(input, options) { function peg$parsereceiptType() { var s0, s1; - if (input.substr(peg$currPos, 11) === peg$c32) { - s0 = peg$c32; + if (input.substr(peg$currPos, 11) === peg$c33) { + s0 = peg$c33; peg$currPos += 11; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e35); } + if (peg$silentFails === 0) { peg$fail(peg$e36); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 12); - if (s1.toLowerCase() === peg$c33) { + if (s1.toLowerCase() === peg$c34) { peg$currPos += 12; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e36); } + if (peg$silentFails === 0) { peg$fail(peg$e37); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f29(); + s1 = peg$f30(); } s0 = s1; } @@ -1854,25 +1880,25 @@ function peg$parse(input, options) { function peg$parsewithdrawalType() { var s0, s1; - if (input.substr(peg$currPos, 14) === peg$c34) { - s0 = peg$c34; + if (input.substr(peg$currPos, 14) === peg$c35) { + s0 = peg$c35; peg$currPos += 14; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e37); } + if (peg$silentFails === 0) { peg$fail(peg$e38); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 15); - if (s1.toLowerCase() === peg$c35) { + if (s1.toLowerCase() === peg$c36) { peg$currPos += 15; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e38); } + if (peg$silentFails === 0) { peg$fail(peg$e39); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f30(); + s1 = peg$f31(); } s0 = s1; } @@ -1883,25 +1909,25 @@ function peg$parse(input, options) { function peg$parsewithdrawalStatus() { var s0, s1; - if (input.substr(peg$currPos, 16) === peg$c36) { - s0 = peg$c36; + if (input.substr(peg$currPos, 16) === peg$c37) { + s0 = peg$c37; peg$currPos += 16; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e39); } + if (peg$silentFails === 0) { peg$fail(peg$e40); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 17); - if (s1.toLowerCase() === peg$c37) { + if (s1.toLowerCase() === peg$c38) { peg$currPos += 17; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e40); } + if (peg$silentFails === 0) { peg$fail(peg$e41); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f31(); + s1 = peg$f32(); } s0 = s1; } @@ -1912,25 +1938,25 @@ function peg$parse(input, options) { function peg$parsepaidStatus() { var s0, s1; - if (input.substr(peg$currPos, 10) === peg$c38) { - s0 = peg$c38; + if (input.substr(peg$currPos, 10) === peg$c39) { + s0 = peg$c39; peg$currPos += 10; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e41); } + if (peg$silentFails === 0) { peg$fail(peg$e42); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c39) { + if (s1.toLowerCase() === peg$c40) { peg$currPos += 11; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e42); } + if (peg$silentFails === 0) { peg$fail(peg$e43); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f32(); + s1 = peg$f33(); } s0 = s1; } @@ -1942,24 +1968,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 12); - if (s0.toLowerCase() === peg$c40) { + if (s0.toLowerCase() === peg$c41) { peg$currPos += 12; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e43); } + if (peg$silentFails === 0) { peg$fail(peg$e44); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 13); - if (s1.toLowerCase() === peg$c41) { + if (s1.toLowerCase() === peg$c42) { peg$currPos += 13; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e44); } + if (peg$silentFails === 0) { peg$fail(peg$e45); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f33(); + s1 = peg$f34(); } s0 = s1; } @@ -1972,15 +1998,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 8); - if (s1.toLowerCase() === peg$c42) { + if (s1.toLowerCase() === peg$c43) { peg$currPos += 8; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e45); } + if (peg$silentFails === 0) { peg$fail(peg$e46); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f34(); + s1 = peg$f35(); } s0 = s1; @@ -1992,15 +2018,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 12); - if (s1.toLowerCase() === peg$c43) { + if (s1.toLowerCase() === peg$c44) { peg$currPos += 12; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e46); } + if (peg$silentFails === 0) { peg$fail(peg$e47); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f35(); + s1 = peg$f36(); } s0 = s1; @@ -2012,15 +2038,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 4); - if (s1.toLowerCase() === peg$c44) { + if (s1.toLowerCase() === peg$c45) { peg$currPos += 4; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e47); } + if (peg$silentFails === 0) { peg$fail(peg$e48); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f36(); + s1 = peg$f37(); } s0 = s1; @@ -2032,15 +2058,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 6); - if (s1.toLowerCase() === peg$c45) { + if (s1.toLowerCase() === peg$c46) { peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e48); } + if (peg$silentFails === 0) { peg$fail(peg$e49); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f37(); + s1 = peg$f38(); } s0 = s1; @@ -2050,25 +2076,25 @@ function peg$parse(input, options) { function peg$parsesortBy() { var s0, s1; - if (input.substr(peg$currPos, 6) === peg$c46) { - s0 = peg$c46; + if (input.substr(peg$currPos, 6) === peg$c47) { + s0 = peg$c47; peg$currPos += 6; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e49); } + if (peg$silentFails === 0) { peg$fail(peg$e50); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 7); - if (s1.toLowerCase() === peg$c47) { + if (s1.toLowerCase() === peg$c48) { peg$currPos += 7; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e50); } + if (peg$silentFails === 0) { peg$fail(peg$e51); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f38(); + s1 = peg$f39(); } s0 = s1; } @@ -2079,25 +2105,25 @@ function peg$parse(input, options) { function peg$parsesortOrder() { var s0, s1; - if (input.substr(peg$currPos, 9) === peg$c48) { - s0 = peg$c48; + if (input.substr(peg$currPos, 9) === peg$c49) { + s0 = peg$c49; peg$currPos += 9; } 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, 10); - if (s1.toLowerCase() === peg$c49) { + if (s1.toLowerCase() === peg$c50) { peg$currPos += 10; } 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; } @@ -2108,25 +2134,25 @@ function peg$parse(input, options) { function peg$parsepolicyID() { var s0, s1; - if (input.substr(peg$currPos, 8) === peg$c50) { - s0 = peg$c50; + if (input.substr(peg$currPos, 8) === peg$c51) { + s0 = peg$c51; peg$currPos += 8; } 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, 9); - if (s1.toLowerCase() === peg$c51) { + if (s1.toLowerCase() === peg$c52) { peg$currPos += 9; } 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; } @@ -2139,15 +2165,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 9); - if (s1.toLowerCase() === peg$c52) { + if (s1.toLowerCase() === peg$c53) { peg$currPos += 9; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e55); } + if (peg$silentFails === 0) { peg$fail(peg$e56); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f41(); + s1 = peg$f42(); } s0 = s1; @@ -2159,15 +2185,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 8); - if (s1.toLowerCase() === peg$c53) { + if (s1.toLowerCase() === peg$c54) { peg$currPos += 8; } 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$f42(); + s1 = peg$f43(); } s0 = s1; @@ -2179,15 +2205,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 4); - if (s1.toLowerCase() === peg$c54) { + if (s1.toLowerCase() === peg$c55) { peg$currPos += 4; } 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$f43(); + s1 = peg$f44(); } 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$f44(); + s1 = peg$f45(); } s0 = s1; @@ -2219,15 +2245,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 6); - if (s1.toLowerCase() === peg$c56) { + if (s1.toLowerCase() === peg$c57) { peg$currPos += 6; } 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$f45(); + s1 = peg$f46(); } s0 = s1; @@ -2239,15 +2265,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 9); - if (s1.toLowerCase() === peg$c57) { + if (s1.toLowerCase() === peg$c58) { peg$currPos += 9; } 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$f46(); + s1 = peg$f47(); } s0 = s1; @@ -2258,24 +2284,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 7); - if (s0.toLowerCase() === peg$c58) { + if (s0.toLowerCase() === peg$c59) { peg$currPos += 7; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e61); } + if (peg$silentFails === 0) { peg$fail(peg$e62); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 8); - if (s1.toLowerCase() === peg$c59) { + if (s1.toLowerCase() === peg$c60) { 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$f47(); + s1 = peg$f48(); } s0 = s1; } @@ -2288,15 +2314,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 5); - if (s1.toLowerCase() === peg$c60) { + if (s1.toLowerCase() === peg$c61) { peg$currPos += 5; } 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$f48(); + s1 = peg$f49(); } s0 = s1; @@ -2308,15 +2334,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 4); - if (s1.toLowerCase() === peg$c61) { + if (s1.toLowerCase() === peg$c62) { peg$currPos += 4; } 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$f49(); + s1 = peg$f50(); } 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$f50(); + s1 = peg$f51(); } s0 = s1; @@ -2347,24 +2373,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 15); - if (s0.toLowerCase() === peg$c63) { + if (s0.toLowerCase() === peg$c64) { peg$currPos += 15; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e66); } + if (peg$silentFails === 0) { peg$fail(peg$e67); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 17); - if (s1.toLowerCase() === peg$c64) { + if (s1.toLowerCase() === peg$c65) { peg$currPos += 17; } 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; } @@ -2376,24 +2402,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 18); - if (s0.toLowerCase() === peg$c65) { + if (s0.toLowerCase() === peg$c66) { peg$currPos += 18; } 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, 20); - if (s1.toLowerCase() === peg$c66) { + if (s1.toLowerCase() === peg$c67) { peg$currPos += 20; } 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; } @@ -2405,24 +2431,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 16); - if (s0.toLowerCase() === peg$c67) { + if (s0.toLowerCase() === peg$c68) { peg$currPos += 16; } 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, 18); - if (s1.toLowerCase() === peg$c68) { + if (s1.toLowerCase() === peg$c69) { peg$currPos += 18; } 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; } @@ -2435,15 +2461,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 8); - if (s1.toLowerCase() === peg$c69) { + if (s1.toLowerCase() === peg$c70) { peg$currPos += 8; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e72); } + if (peg$silentFails === 0) { peg$fail(peg$e73); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f54(); + s1 = peg$f55(); } s0 = s1; @@ -2454,24 +2480,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 9); - if (s0.toLowerCase() === peg$c70) { + if (s0.toLowerCase() === peg$c71) { peg$currPos += 9; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e73); } + if (peg$silentFails === 0) { peg$fail(peg$e74); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c71) { + if (s1.toLowerCase() === peg$c72) { peg$currPos += 10; } 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; } @@ -2484,15 +2510,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 6); - if (s1.toLowerCase() === peg$c72) { + if (s1.toLowerCase() === peg$c73) { peg$currPos += 6; } 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$f56(); + s1 = peg$f57(); } s0 = s1; @@ -2504,15 +2530,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 5); - if (s1.toLowerCase() === peg$c73) { + if (s1.toLowerCase() === peg$c74) { peg$currPos += 5; } 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$f57(); + s1 = peg$f58(); } s0 = s1; @@ -2524,15 +2550,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 3); - if (s1.toLowerCase() === peg$c74) { + if (s1.toLowerCase() === peg$c75) { peg$currPos += 3; } 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$f58(); + s1 = peg$f59(); } s0 = s1; @@ -2544,15 +2570,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 2); - if (s1.toLowerCase() === peg$c75) { + if (s1.toLowerCase() === peg$c76) { peg$currPos += 2; } 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$f59(); + s1 = peg$f60(); } s0 = s1; @@ -2563,24 +2589,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 14); - if (s0.toLowerCase() === peg$c76) { + if (s0.toLowerCase() === peg$c77) { peg$currPos += 14; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e79); } + if (peg$silentFails === 0) { peg$fail(peg$e80); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 15); - if (s1.toLowerCase() === peg$c77) { + if (s1.toLowerCase() === peg$c78) { peg$currPos += 15; } 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; } @@ -2592,24 +2618,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 16); - if (s0.toLowerCase() === peg$c78) { + if (s0.toLowerCase() === peg$c79) { peg$currPos += 16; } 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, 17); - if (s1.toLowerCase() === peg$c79) { + if (s1.toLowerCase() === peg$c80) { peg$currPos += 17; } 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; } @@ -2621,24 +2647,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 13); - if (s0.toLowerCase() === peg$c80) { + if (s0.toLowerCase() === peg$c81) { peg$currPos += 13; } 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, 14); - if (s1.toLowerCase() === peg$c81) { + if (s1.toLowerCase() === peg$c82) { peg$currPos += 14; } 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; } @@ -2650,24 +2676,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 16); - if (s0.toLowerCase() === peg$c82) { + if (s0.toLowerCase() === peg$c83) { 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$c83) { + if (s1.toLowerCase() === peg$c84) { 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$f63(); + s1 = peg$f64(); } s0 = s1; } @@ -2680,15 +2706,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 7); - if (s1.toLowerCase() === peg$c84) { + if (s1.toLowerCase() === peg$c85) { peg$currPos += 7; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e87); } + if (peg$silentFails === 0) { peg$fail(peg$e88); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f64(); + s1 = peg$f65(); } s0 = s1; @@ -2700,15 +2726,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 4); - if (s1.toLowerCase() === peg$c85) { + if (s1.toLowerCase() === peg$c86) { peg$currPos += 4; } 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$f65(); + s1 = peg$f66(); } s0 = s1; @@ -2720,7 +2746,7 @@ function peg$parse(input, options) { s0 = peg$currPos; peg$savedPos = peg$currPos; - s1 = peg$f66(); + s1 = peg$f67(); if (s1) { s1 = undefined; } else { @@ -2855,11 +2881,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 8); - if (s1.toLowerCase() === peg$c86) { + if (s1.toLowerCase() === peg$c87) { peg$currPos += 8; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e89); } + if (peg$silentFails === 0) { peg$fail(peg$e90); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -2874,7 +2900,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f67(); + s0 = peg$f68(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -2892,19 +2918,19 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 6); - if (s1.toLowerCase() === peg$c87) { + if (s1.toLowerCase() === peg$c88) { peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e90); } + if (peg$silentFails === 0) { peg$fail(peg$e91); } } if (s1 === peg$FAILED) { s1 = input.substr(peg$currPos, 5); - if (s1.toLowerCase() === peg$c88) { + if (s1.toLowerCase() === peg$c89) { peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e91); } + if (peg$silentFails === 0) { peg$fail(peg$e92); } } } if (s1 !== peg$FAILED) { @@ -2920,7 +2946,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f68(); + s0 = peg$f69(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -2938,11 +2964,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 15); - if (s1.toLowerCase() === peg$c77) { + if (s1.toLowerCase() === peg$c78) { peg$currPos += 15; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e80); } + if (peg$silentFails === 0) { peg$fail(peg$e81); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -2957,7 +2983,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; @@ -2975,11 +3001,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 3); - if (s1.toLowerCase() === peg$c89) { + if (s1.toLowerCase() === peg$c90) { peg$currPos += 3; } 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; @@ -2994,7 +3020,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; @@ -3012,11 +3038,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 8); - if (s1.toLowerCase() === peg$c23) { + if (s1.toLowerCase() === peg$c24) { peg$currPos += 8; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e26); } + if (peg$silentFails === 0) { peg$fail(peg$e27); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3031,7 +3057,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; @@ -3049,11 +3075,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c90) { + if (s1.toLowerCase() === peg$c91) { peg$currPos += 11; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e93); } + if (peg$silentFails === 0) { peg$fail(peg$e94); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3068,7 +3094,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; @@ -3086,11 +3112,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 13); - if (s1.toLowerCase() === peg$c41) { + if (s1.toLowerCase() === peg$c42) { peg$currPos += 13; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e44); } + if (peg$silentFails === 0) { peg$fail(peg$e45); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3105,7 +3131,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; @@ -3123,11 +3149,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 12); - if (s1.toLowerCase() === peg$c27) { + if (s1.toLowerCase() === peg$c28) { peg$currPos += 12; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e30); } + if (peg$silentFails === 0) { peg$fail(peg$e31); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3142,7 +3168,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; @@ -3160,11 +3186,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c91) { + if (s1.toLowerCase() === peg$c92) { peg$currPos += 14; } 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; @@ -3179,7 +3205,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; @@ -3216,7 +3242,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; @@ -3234,11 +3260,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c92) { + if (s1.toLowerCase() === peg$c93) { peg$currPos += 11; } 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; @@ -3253,7 +3279,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; @@ -3278,7 +3304,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e96); } + if (peg$silentFails === 0) { peg$fail(peg$e97); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; @@ -3297,11 +3323,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c93) { + if (s1.toLowerCase() === peg$c94) { peg$currPos += 10; } 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; @@ -3316,7 +3342,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; @@ -3328,11 +3354,11 @@ function peg$parse(input, options) { if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c92) { + if (s1.toLowerCase() === peg$c93) { peg$currPos += 11; } 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; @@ -3347,7 +3373,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; @@ -3366,11 +3392,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 13); - if (s1.toLowerCase() === peg$c94) { + if (s1.toLowerCase() === peg$c95) { peg$currPos += 13; } 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; @@ -3385,7 +3411,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; @@ -3403,11 +3429,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 18); - if (s1.toLowerCase() === peg$c95) { + if (s1.toLowerCase() === peg$c96) { peg$currPos += 18; } 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; @@ -3422,7 +3448,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; @@ -3440,11 +3466,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 22); - if (s1.toLowerCase() === peg$c96) { + if (s1.toLowerCase() === peg$c97) { peg$currPos += 22; } 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; @@ -3459,7 +3485,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; @@ -3477,11 +3503,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c97) { + if (s1.toLowerCase() === peg$c98) { peg$currPos += 10; } 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; @@ -3496,7 +3522,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; @@ -3514,11 +3540,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c98) { + if (s1.toLowerCase() === peg$c99) { peg$currPos += 14; } 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; @@ -3533,7 +3559,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; @@ -3551,11 +3577,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c99) { + if (s1.toLowerCase() === peg$c100) { peg$currPos += 11; } 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; @@ -3570,7 +3596,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; @@ -3588,11 +3614,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; @@ -3607,7 +3633,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; @@ -3625,11 +3651,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c101) { + if (s1.toLowerCase() === peg$c102) { peg$currPos += 10; } 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; @@ -3644,7 +3670,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; @@ -3662,11 +3688,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 18); - if (s1.toLowerCase() === peg$c102) { + if (s1.toLowerCase() === peg$c103) { peg$currPos += 18; } 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; @@ -3681,7 +3707,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; @@ -3699,11 +3725,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 15); - if (s1.toLowerCase() === peg$c103) { + if (s1.toLowerCase() === peg$c104) { peg$currPos += 15; } 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; @@ -3718,7 +3744,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; @@ -3736,11 +3762,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 19); - if (s1.toLowerCase() === peg$c104) { + if (s1.toLowerCase() === peg$c105) { peg$currPos += 19; } 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; @@ -3755,7 +3781,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; @@ -3773,11 +3799,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 20); - if (s1.toLowerCase() === peg$c105) { + if (s1.toLowerCase() === peg$c106) { peg$currPos += 20; } 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; @@ -3792,7 +3818,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; @@ -3810,11 +3836,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 23); - if (s1.toLowerCase() === peg$c106) { + if (s1.toLowerCase() === peg$c107) { peg$currPos += 23; } 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; @@ -3829,7 +3855,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; @@ -3847,11 +3873,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c81) { + if (s1.toLowerCase() === peg$c82) { peg$currPos += 14; } 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; @@ -3866,7 +3892,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; @@ -3884,11 +3910,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 17); - if (s1.toLowerCase() === peg$c83) { + if (s1.toLowerCase() === peg$c84) { 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) { s2 = peg$currPos; @@ -3903,7 +3929,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; @@ -3921,11 +3947,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c107) { + if (s1.toLowerCase() === peg$c108) { peg$currPos += 14; } 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; @@ -3940,7 +3966,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; @@ -3958,11 +3984,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 9); - if (s1.toLowerCase() === peg$c108) { + if (s1.toLowerCase() === peg$c109) { peg$currPos += 9; } 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; @@ -3977,7 +4003,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; @@ -3995,11 +4021,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c109) { + if (s1.toLowerCase() === peg$c110) { peg$currPos += 14; } 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; @@ -4014,7 +4040,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; @@ -4032,11 +4058,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 9); - if (s1.toLowerCase() === peg$c110) { + if (s1.toLowerCase() === peg$c111) { peg$currPos += 9; } 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; @@ -4051,7 +4077,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; @@ -4069,11 +4095,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c111) { + if (s1.toLowerCase() === peg$c112) { peg$currPos += 11; } 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; @@ -4088,7 +4114,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; @@ -4106,11 +4132,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c112) { + if (s1.toLowerCase() === peg$c113) { peg$currPos += 10; } 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; @@ -4125,7 +4151,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; @@ -4143,11 +4169,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c113) { + if (s1.toLowerCase() === peg$c114) { peg$currPos += 10; } 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; @@ -4162,7 +4188,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; @@ -4180,11 +4206,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 13); - if (s1.toLowerCase() === peg$c114) { + if (s1.toLowerCase() === peg$c115) { peg$currPos += 13; } 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; @@ -4199,7 +4225,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; @@ -4222,81 +4248,81 @@ function peg$parse(input, options) { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e96); } + if (peg$silentFails === 0) { peg$fail(peg$e97); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f103(); + s1 = peg$f104(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c115) { - s1 = peg$c115; + if (input.substr(peg$currPos, 2) === peg$c116) { + s1 = peg$c116; peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e120); } + if (peg$silentFails === 0) { peg$fail(peg$e121); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f104(); + s1 = peg$f105(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c116) { - s1 = peg$c116; + if (input.substr(peg$currPos, 2) === peg$c117) { + s1 = peg$c117; peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e121); } + if (peg$silentFails === 0) { peg$fail(peg$e122); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f105(); + s1 = peg$f106(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 62) { - s1 = peg$c117; + s1 = peg$c118; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e122); } + if (peg$silentFails === 0) { peg$fail(peg$e123); } } 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$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$f107(); + s1 = peg$f108(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 60) { - s1 = peg$c119; + s1 = peg$c120; peg$currPos++; } 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$f108(); + s1 = peg$f109(); } s0 = s1; } @@ -4307,7 +4333,7 @@ function peg$parse(input, options) { peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e119); } + if (peg$silentFails === 0) { peg$fail(peg$e120); } } return s0; @@ -4320,7 +4346,7 @@ function peg$parse(input, options) { s1 = peg$parseoperator(); if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f109(s1); + s1 = peg$f110(s1); } s0 = s1; @@ -4332,11 +4358,11 @@ function peg$parse(input, options) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 92) { - 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) { s2 = input.charAt(peg$currPos); @@ -4344,11 +4370,11 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e126); } + if (peg$silentFails === 0) { peg$fail(peg$e127); } } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f110(s2); + s0 = peg$f111(s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4374,7 +4400,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e128); } + if (peg$silentFails === 0) { peg$fail(peg$e129); } } } if (s2 !== peg$FAILED) { @@ -4387,7 +4413,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e128); } + if (peg$silentFails === 0) { peg$fail(peg$e129); } } } } @@ -4396,13 +4422,13 @@ function peg$parse(input, options) { } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f111(s1); + s1 = peg$f112(s1); } s0 = s1; peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e127); } + if (peg$silentFails === 0) { peg$fail(peg$e128); } } return s0; @@ -4414,7 +4440,7 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = peg$parse_(); peg$savedPos = s0; - s1 = peg$f112(); + s1 = peg$f113(); s0 = s1; return s0; @@ -4430,7 +4456,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e130); } + if (peg$silentFails === 0) { peg$fail(peg$e131); } } while (s1 !== peg$FAILED) { s0.push(s1); @@ -4439,12 +4465,12 @@ function peg$parse(input, options) { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e130); } + if (peg$silentFails === 0) { peg$fail(peg$e131); } } } peg$silentFails--; s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e129); } + if (peg$silentFails === 0) { peg$fail(peg$e130); } return s0; } @@ -4454,7 +4480,7 @@ function peg$parse(input, options) { s0 = peg$currPos; peg$savedPos = peg$currPos; - s1 = peg$f113(); + s1 = peg$f114(); if (s1) { s1 = undefined; } else { @@ -4491,7 +4517,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e132); } + if (peg$silentFails === 0) { peg$fail(peg$e133); } } while (s2 !== peg$FAILED) { s1.push(s2); @@ -4500,7 +4526,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e132); } + if (peg$silentFails === 0) { peg$fail(peg$e133); } } } s2 = input.charAt(peg$currPos); @@ -4508,7 +4534,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) { s3 = []; @@ -4519,7 +4545,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e134); } + if (peg$silentFails === 0) { peg$fail(peg$e135); } } } while (s4 !== peg$FAILED) { @@ -4531,7 +4557,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e134); } + if (peg$silentFails === 0) { peg$fail(peg$e135); } } } } @@ -4540,7 +4566,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e133); } + if (peg$silentFails === 0) { peg$fail(peg$e134); } } if (s4 !== peg$FAILED) { s5 = []; @@ -4549,7 +4575,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e128); } + if (peg$silentFails === 0) { peg$fail(peg$e129); } } while (s6 !== peg$FAILED) { s5.push(s6); @@ -4558,11 +4584,11 @@ function peg$parse(input, options) { peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e128); } + if (peg$silentFails === 0) { peg$fail(peg$e129); } } } peg$savedPos = s0; - s0 = peg$f114(s1, s3, s5); + s0 = peg$f115(s1, s3, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4574,7 +4600,7 @@ function peg$parse(input, options) { peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e131); } + if (peg$silentFails === 0) { peg$fail(peg$e132); } } return s0; @@ -4591,7 +4617,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e132); } + if (peg$silentFails === 0) { peg$fail(peg$e133); } } while (s2 !== peg$FAILED) { s1.push(s2); @@ -4600,7 +4626,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e132); } + if (peg$silentFails === 0) { peg$fail(peg$e133); } } } s2 = input.charAt(peg$currPos); @@ -4608,7 +4634,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) { s3 = []; @@ -4619,7 +4645,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e134); } + if (peg$silentFails === 0) { peg$fail(peg$e135); } } if (s4 === peg$FAILED) { s4 = peg$currPos; @@ -4635,15 +4661,15 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 8220) { - s6 = peg$c121; + s6 = peg$c122; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e135); } + if (peg$silentFails === 0) { peg$fail(peg$e136); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; - s4 = peg$f115(s1); + s4 = peg$f116(s1); } else { peg$currPos = s4; s4 = peg$FAILED; @@ -4666,15 +4692,15 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 8221) { - s6 = peg$c122; + s6 = peg$c123; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e136); } + if (peg$silentFails === 0) { peg$fail(peg$e137); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; - s4 = peg$f116(s1); + s4 = peg$f117(s1); } else { peg$currPos = s4; s4 = peg$FAILED; @@ -4697,15 +4723,15 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 34) { - s6 = peg$c123; + s6 = peg$c124; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e137); } + if (peg$silentFails === 0) { peg$fail(peg$e138); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; - s4 = peg$f117(s1); + s4 = peg$f118(s1); } else { peg$currPos = s4; s4 = peg$FAILED; @@ -4727,7 +4753,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e134); } + if (peg$silentFails === 0) { peg$fail(peg$e135); } } if (s4 === peg$FAILED) { s4 = peg$currPos; @@ -4743,15 +4769,15 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 8220) { - s6 = peg$c121; + s6 = peg$c122; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e135); } + if (peg$silentFails === 0) { peg$fail(peg$e136); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; - s4 = peg$f115(s1); + s4 = peg$f116(s1); } else { peg$currPos = s4; s4 = peg$FAILED; @@ -4774,15 +4800,15 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 8221) { - s6 = peg$c122; + s6 = peg$c123; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e136); } + if (peg$silentFails === 0) { peg$fail(peg$e137); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; - s4 = peg$f116(s1); + s4 = peg$f117(s1); } else { peg$currPos = s4; s4 = peg$FAILED; @@ -4805,15 +4831,15 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 34) { - s6 = peg$c123; + s6 = peg$c124; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e137); } + if (peg$silentFails === 0) { peg$fail(peg$e138); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; - s4 = peg$f117(s1); + s4 = peg$f118(s1); } else { peg$currPos = s4; s4 = peg$FAILED; @@ -4830,7 +4856,7 @@ function peg$parse(input, options) { s4 = peg$parseclosingQuote(); if (s4 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f118(s1, s3, s4); + s0 = peg$f119(s1, s3, s4); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4842,7 +4868,7 @@ function peg$parse(input, options) { peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e131); } + if (peg$silentFails === 0) { peg$fail(peg$e132); } } return s0; @@ -4857,7 +4883,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); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4895,7 +4921,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); } } while (s2 !== peg$FAILED) { s1.push(s2); @@ -4904,7 +4930,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); } } } s2 = []; @@ -4913,7 +4939,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e139); } + if (peg$silentFails === 0) { peg$fail(peg$e140); } } while (s3 !== peg$FAILED) { s2.push(s3); @@ -4922,7 +4948,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e139); } + if (peg$silentFails === 0) { peg$fail(peg$e140); } } } s3 = []; @@ -4931,7 +4957,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e140); } + if (peg$silentFails === 0) { peg$fail(peg$e141); } } while (s4 !== peg$FAILED) { s3.push(s4); @@ -4940,7 +4966,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e140); } + if (peg$silentFails === 0) { peg$fail(peg$e141); } } } s4 = peg$parseoperator(); @@ -4959,7 +4985,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); @@ -4968,7 +4994,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 = peg$currPos; @@ -5015,7 +5041,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e142); } + if (peg$silentFails === 0) { peg$fail(peg$e143); } } } } @@ -5031,7 +5057,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e143); } + if (peg$silentFails === 0) { peg$fail(peg$e144); } } if (s0 === peg$FAILED) { s0 = peg$currPos; diff --git a/src/libs/SearchParser/autocompleteParser.peggy b/src/libs/SearchParser/autocompleteParser.peggy index 725be1cedd3a..88ab9d41a2a7 100644 --- a/src/libs/SearchParser/autocompleteParser.peggy +++ b/src/libs/SearchParser/autocompleteParser.peggy @@ -81,6 +81,7 @@ autocompleteKey "key" / total / tag / category + / vendor / to / taxRate / from diff --git a/src/libs/SearchParser/baseRules.peggy b/src/libs/SearchParser/baseRules.peggy index db9fac4f7006..6354a4a99c60 100644 --- a/src/libs/SearchParser/baseRules.peggy +++ b/src/libs/SearchParser/baseRules.peggy @@ -29,6 +29,7 @@ groupCurrency / "group-currency"i { return "groupCurrency"; } tag = "tag"i { return "tag"; } category = "category"i { return "category"; } +vendor = "vendor"i { return "vendor"; } to = "to"i { return "to"; } exporter = "exporter"i { return "exporter"; } payer = "payer"i { return "payer"; } diff --git a/src/libs/SearchParser/searchParser.js b/src/libs/SearchParser/searchParser.js index 84e1eb888347..fdf004aab013 100644 --- a/src/libs/SearchParser/searchParser.js +++ b/src/libs/SearchParser/searchParser.js @@ -201,113 +201,114 @@ function peg$parse(input, options) { var peg$c14 = "group-currency"; var peg$c15 = "tag"; var peg$c16 = "category"; - var peg$c17 = "to"; - var peg$c18 = "exporter"; - var peg$c19 = "payer"; - var peg$c20 = "paidBy"; - var peg$c21 = "paid-by"; - var peg$c22 = "taxrate"; - var peg$c23 = "tax-rate"; - var peg$c24 = "cardID"; - var peg$c25 = "card"; - var peg$c26 = "bankAccount"; - var peg$c27 = "bank-account"; - var peg$c28 = "from"; - var peg$c29 = "attendee"; - var peg$c30 = "expenseType"; - var peg$c31 = "expense-type"; - var peg$c32 = "receiptType"; - var peg$c33 = "receipt-type"; - var peg$c34 = "withdrawalType"; - var peg$c35 = "withdrawal-type"; - var peg$c36 = "withdrawalStatus"; - var peg$c37 = "withdrawal-status"; - var peg$c38 = "paidStatus"; - var peg$c39 = "paid-status"; - var peg$c40 = "withdrawalid"; - var peg$c41 = "withdrawal-id"; - var peg$c42 = "billable"; - var peg$c43 = "reimbursable"; - var peg$c44 = "type"; - var peg$c45 = "status"; - var peg$c46 = "sortBy"; - var peg$c47 = "sort-by"; - var peg$c48 = "sortOrder"; - var peg$c49 = "sort-order"; - var peg$c50 = "policyID"; - var peg$c51 = "workspace"; - var peg$c52 = "submitted"; - var peg$c53 = "approved"; - var peg$c54 = "paid"; - var peg$c55 = "exported"; - var peg$c56 = "posted"; - var peg$c57 = "withdrawn"; - var peg$c58 = "groupby"; - var peg$c59 = "group-by"; - var peg$c60 = "limit"; - var peg$c61 = "feed"; - var peg$c62 = "title"; - var peg$c63 = "submitteruserid"; - var peg$c64 = "submitter-user-id"; - var peg$c65 = "submitterpayrollid"; - var peg$c66 = "submitter-payroll-id"; - var peg$c67 = "orderdealnumbers"; - var peg$c68 = "order-deal-numbers"; - var peg$c69 = "assignee"; - var peg$c70 = "createdby"; - var peg$c71 = "created-by"; - var peg$c72 = "action"; - var peg$c73 = "total"; - var peg$c74 = "has"; - var peg$c75 = "is"; - var peg$c76 = "purchaseamount"; - var peg$c77 = "purchase-amount"; - var peg$c78 = "purchasecurrency"; - var peg$c79 = "purchase-currency"; - var peg$c80 = "amountdebited"; - var peg$c81 = "amount-debited"; - var peg$c82 = "amountreimbursed"; - var peg$c83 = "amount-reimbursed"; - var peg$c84 = "columns"; - var peg$c85 = "view"; - var peg$c86 = "per-diem"; - var peg$c87 = "drafts"; - var peg$c88 = "draft"; - var peg$c89 = "tax"; - var peg$c90 = "policy-name"; - var peg$c91 = "long-report-id"; - var peg$c92 = "exported-to"; - var peg$c93 = "exportedto"; - var peg$c94 = "exchange-rate"; - var peg$c95 = "reimbursable-total"; - var peg$c96 = "non-reimbursable-total"; - var peg$c97 = "group-from"; - var peg$c98 = "group-expenses"; - var peg$c99 = "group-total"; - var peg$c100 = "group-card"; - var peg$c101 = "group-feed"; - var peg$c102 = "group-bank-account"; - var peg$c103 = "group-withdrawn"; - var peg$c104 = "group-withdrawal-id"; - var peg$c105 = "group-amount-debited"; - var peg$c106 = "group-amount-reimbursed"; - var peg$c107 = "group-category"; - var peg$c108 = "group-tag"; - var peg$c109 = "group-merchant"; - var peg$c110 = "group-day"; - var peg$c111 = "group-month"; - var peg$c112 = "group-week"; - var peg$c113 = "group-year"; - var peg$c114 = "group-quarter"; - var peg$c115 = "!="; - var peg$c116 = ">="; - var peg$c117 = ">"; - var peg$c118 = "<="; - var peg$c119 = "<"; - var peg$c120 = "\\"; - var peg$c121 = "\u201C"; - var peg$c122 = "\u201D"; - var peg$c123 = "\""; + var peg$c17 = "vendor"; + var peg$c18 = "to"; + var peg$c19 = "exporter"; + var peg$c20 = "payer"; + var peg$c21 = "paidBy"; + var peg$c22 = "paid-by"; + var peg$c23 = "taxrate"; + var peg$c24 = "tax-rate"; + var peg$c25 = "cardID"; + var peg$c26 = "card"; + var peg$c27 = "bankAccount"; + var peg$c28 = "bank-account"; + var peg$c29 = "from"; + var peg$c30 = "attendee"; + var peg$c31 = "expenseType"; + var peg$c32 = "expense-type"; + var peg$c33 = "receiptType"; + var peg$c34 = "receipt-type"; + var peg$c35 = "withdrawalType"; + var peg$c36 = "withdrawal-type"; + var peg$c37 = "withdrawalStatus"; + var peg$c38 = "withdrawal-status"; + var peg$c39 = "paidStatus"; + var peg$c40 = "paid-status"; + var peg$c41 = "withdrawalid"; + var peg$c42 = "withdrawal-id"; + var peg$c43 = "billable"; + var peg$c44 = "reimbursable"; + var peg$c45 = "type"; + var peg$c46 = "status"; + var peg$c47 = "sortBy"; + var peg$c48 = "sort-by"; + var peg$c49 = "sortOrder"; + var peg$c50 = "sort-order"; + var peg$c51 = "policyID"; + var peg$c52 = "workspace"; + var peg$c53 = "submitted"; + var peg$c54 = "approved"; + var peg$c55 = "paid"; + var peg$c56 = "exported"; + var peg$c57 = "posted"; + var peg$c58 = "withdrawn"; + var peg$c59 = "groupby"; + var peg$c60 = "group-by"; + var peg$c61 = "limit"; + var peg$c62 = "feed"; + var peg$c63 = "title"; + var peg$c64 = "submitteruserid"; + var peg$c65 = "submitter-user-id"; + var peg$c66 = "submitterpayrollid"; + var peg$c67 = "submitter-payroll-id"; + var peg$c68 = "orderdealnumbers"; + var peg$c69 = "order-deal-numbers"; + var peg$c70 = "assignee"; + var peg$c71 = "createdby"; + var peg$c72 = "created-by"; + var peg$c73 = "action"; + var peg$c74 = "total"; + var peg$c75 = "has"; + var peg$c76 = "is"; + var peg$c77 = "purchaseamount"; + var peg$c78 = "purchase-amount"; + var peg$c79 = "purchasecurrency"; + var peg$c80 = "purchase-currency"; + var peg$c81 = "amountdebited"; + var peg$c82 = "amount-debited"; + var peg$c83 = "amountreimbursed"; + var peg$c84 = "amount-reimbursed"; + var peg$c85 = "columns"; + var peg$c86 = "view"; + var peg$c87 = "per-diem"; + var peg$c88 = "drafts"; + var peg$c89 = "draft"; + var peg$c90 = "tax"; + var peg$c91 = "policy-name"; + var peg$c92 = "long-report-id"; + var peg$c93 = "exported-to"; + var peg$c94 = "exportedto"; + var peg$c95 = "exchange-rate"; + var peg$c96 = "reimbursable-total"; + var peg$c97 = "non-reimbursable-total"; + var peg$c98 = "group-from"; + var peg$c99 = "group-expenses"; + var peg$c100 = "group-total"; + var peg$c101 = "group-card"; + var peg$c102 = "group-feed"; + var peg$c103 = "group-bank-account"; + var peg$c104 = "group-withdrawn"; + var peg$c105 = "group-withdrawal-id"; + var peg$c106 = "group-amount-debited"; + var peg$c107 = "group-amount-reimbursed"; + var peg$c108 = "group-category"; + var peg$c109 = "group-tag"; + var peg$c110 = "group-merchant"; + var peg$c111 = "group-day"; + var peg$c112 = "group-month"; + var peg$c113 = "group-week"; + var peg$c114 = "group-year"; + var peg$c115 = "group-quarter"; + var peg$c116 = "!="; + var peg$c117 = ">="; + var peg$c118 = ">"; + var peg$c119 = "<="; + var peg$c120 = "<"; + var peg$c121 = "\\"; + var peg$c122 = "\u201C"; + var peg$c123 = "\u201D"; + var peg$c124 = "\""; var peg$r0 = /^[^ \t\r\n\xA0]/; var peg$r1 = /^[ \t\r\n\xA0,:=<>!]/; @@ -347,130 +348,131 @@ function peg$parse(input, options) { var peg$e19 = peg$literalExpectation("group-currency", true); var peg$e20 = peg$literalExpectation("tag", true); var peg$e21 = peg$literalExpectation("category", true); - var peg$e22 = peg$literalExpectation("to", true); - var peg$e23 = peg$literalExpectation("exporter", true); - var peg$e24 = peg$literalExpectation("payer", true); - var peg$e25 = peg$literalExpectation("paidBy", false); - var peg$e26 = peg$literalExpectation("paid-by", true); - var peg$e27 = peg$literalExpectation("taxRate", true); - var peg$e28 = peg$literalExpectation("tax-rate", true); - var peg$e29 = peg$literalExpectation("cardID", false); - var peg$e30 = peg$literalExpectation("card", true); - var peg$e31 = peg$literalExpectation("bankAccount", false); - var peg$e32 = peg$literalExpectation("bank-account", true); - var peg$e33 = peg$literalExpectation("from", true); - var peg$e34 = peg$literalExpectation("attendee", true); - var peg$e35 = peg$literalExpectation("expenseType", false); - var peg$e36 = peg$literalExpectation("expense-type", true); - var peg$e37 = peg$literalExpectation("receiptType", false); - var peg$e38 = peg$literalExpectation("receipt-type", true); - var peg$e39 = peg$literalExpectation("withdrawalType", false); - var peg$e40 = peg$literalExpectation("withdrawal-type", true); - var peg$e41 = peg$literalExpectation("withdrawalStatus", false); - var peg$e42 = peg$literalExpectation("withdrawal-status", true); - var peg$e43 = peg$literalExpectation("paidStatus", false); - var peg$e44 = peg$literalExpectation("paid-status", true); - 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("per-diem", true); - var peg$e92 = peg$literalExpectation("drafts", true); - var peg$e93 = peg$literalExpectation("draft", true); - var peg$e94 = peg$literalExpectation("tax", true); - var peg$e95 = peg$literalExpectation("policy-name", true); - var peg$e96 = peg$literalExpectation("long-report-id", true); - var peg$e97 = peg$literalExpectation("exported-to", true); - var peg$e98 = peg$classExpectation([":", "="], false, false); - var peg$e99 = peg$literalExpectation("exportedTo", true); - var peg$e100 = peg$literalExpectation("exchange-rate", true); - var peg$e101 = peg$literalExpectation("reimbursable-total", true); - var peg$e102 = peg$literalExpectation("non-reimbursable-total", true); - var peg$e103 = peg$literalExpectation("group-from", true); - var peg$e104 = peg$literalExpectation("group-expenses", true); - var peg$e105 = peg$literalExpectation("group-total", true); - var peg$e106 = peg$literalExpectation("group-card", true); - var peg$e107 = peg$literalExpectation("group-feed", true); - var peg$e108 = peg$literalExpectation("group-bank-account", true); - var peg$e109 = peg$literalExpectation("group-withdrawn", true); - var peg$e110 = peg$literalExpectation("group-withdrawal-id", true); - var peg$e111 = peg$literalExpectation("group-amount-debited", true); - var peg$e112 = peg$literalExpectation("group-amount-reimbursed", true); - var peg$e113 = peg$literalExpectation("group-category", true); - var peg$e114 = peg$literalExpectation("group-tag", true); - var peg$e115 = peg$literalExpectation("group-merchant", true); - var peg$e116 = peg$literalExpectation("group-day", true); - var peg$e117 = peg$literalExpectation("group-month", true); - var peg$e118 = peg$literalExpectation("group-week", true); - var peg$e119 = peg$literalExpectation("group-year", true); - var peg$e120 = peg$literalExpectation("group-quarter", true); - var peg$e121 = peg$otherExpectation("operator"); - var peg$e122 = peg$literalExpectation("!=", false); - 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$classExpectation([",", "\"", "\u201D", "\u201C", "\\"], false, false); - var peg$e129 = peg$otherExpectation("word"); - var peg$e130 = peg$classExpectation([" ", ",", "\t", "\n", "\r", "\xA0"], true, false); - var peg$e131 = peg$otherExpectation("whitespace"); - var peg$e132 = peg$classExpectation([" ", "\t", "\r", "\n", "\xA0"], false, false); - var peg$e133 = peg$otherExpectation("quote"); - var peg$e134 = peg$classExpectation([" ", ",", "\"", "\u201D", "\u201C", "\t", "\n", "\r", "\xA0"], true, false); - var peg$e135 = peg$classExpectation(["\"", ["\u201C", "\u201D"]], false, false); - var peg$e136 = peg$classExpectation(["\"", "\u201D", "\u201C", "\r", "\n"], true, false); - var peg$e137 = peg$literalExpectation("\u201C", false); - var peg$e138 = peg$literalExpectation("\u201D", false); - var peg$e139 = peg$literalExpectation("\"", false); - var peg$e140 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ["a", "z"], ["A", "Z"], ["0", "9"]], false, false); - var peg$e141 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"]], false, false); - var peg$e142 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0"], false, false); - var peg$e143 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ["a", "z"], ["A", "Z"]], false, false); - var peg$e144 = peg$classExpectation([","], false, false); - var peg$e145 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ","], false, false); + var peg$e22 = peg$literalExpectation("vendor", true); + var peg$e23 = peg$literalExpectation("to", true); + var peg$e24 = peg$literalExpectation("exporter", true); + var peg$e25 = peg$literalExpectation("payer", true); + var peg$e26 = peg$literalExpectation("paidBy", false); + var peg$e27 = peg$literalExpectation("paid-by", true); + var peg$e28 = peg$literalExpectation("taxRate", true); + var peg$e29 = peg$literalExpectation("tax-rate", true); + var peg$e30 = peg$literalExpectation("cardID", false); + var peg$e31 = peg$literalExpectation("card", true); + var peg$e32 = peg$literalExpectation("bankAccount", false); + var peg$e33 = peg$literalExpectation("bank-account", true); + var peg$e34 = peg$literalExpectation("from", true); + var peg$e35 = peg$literalExpectation("attendee", true); + var peg$e36 = peg$literalExpectation("expenseType", false); + var peg$e37 = peg$literalExpectation("expense-type", true); + var peg$e38 = peg$literalExpectation("receiptType", false); + var peg$e39 = peg$literalExpectation("receipt-type", true); + var peg$e40 = peg$literalExpectation("withdrawalType", false); + var peg$e41 = peg$literalExpectation("withdrawal-type", true); + var peg$e42 = peg$literalExpectation("withdrawalStatus", false); + var peg$e43 = peg$literalExpectation("withdrawal-status", true); + var peg$e44 = peg$literalExpectation("paidStatus", false); + var peg$e45 = peg$literalExpectation("paid-status", true); + var peg$e46 = peg$literalExpectation("withdrawalID", true); + var peg$e47 = peg$literalExpectation("withdrawal-id", true); + var peg$e48 = peg$literalExpectation("billable", 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("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$f0 = function(filters) { return applyDefaults(filters); }; var peg$f1 = function(head, tail) { @@ -568,120 +570,121 @@ function peg$parse(input, options) { var peg$f16 = function() { return "groupCurrency"; }; var peg$f17 = function() { return "tag"; }; var peg$f18 = function() { return "category"; }; - var peg$f19 = function() { return "to"; }; - var peg$f20 = function() { return "exporter"; }; - var peg$f21 = function() { return "payer"; }; - var peg$f22 = function() { return "paidBy"; }; - var peg$f23 = function() { return "taxRate"; }; - var peg$f24 = function() { return "cardID"; }; - var peg$f25 = function() { return "bankAccount"; }; - var peg$f26 = function() { return "from"; }; - var peg$f27 = function() {return "attendee"}; - var peg$f28 = function() { return "expenseType"; }; - var peg$f29 = function() { return "receiptType"; }; - var peg$f30 = function() { return "withdrawalType"; }; - var peg$f31 = function() { return "withdrawalStatus"; }; - var peg$f32 = function() { return "paidStatus"; }; - var peg$f33 = function() { return "withdrawalID"; }; - var peg$f34 = function() { return "billable"; }; - var peg$f35 = function() { return "reimbursable"; }; - var peg$f36 = function() { return "type"; }; - var peg$f37 = function() { return "status"; }; - var peg$f38 = function() { return "sortBy"; }; - var peg$f39 = function() { return "sortOrder"; }; - var peg$f40 = function() { return "policyID"; }; - var peg$f41 = function() { return "submitted"; }; - var peg$f42 = function() { return "approved"; }; - var peg$f43 = function() { return "paid"; }; - var peg$f44 = function() { return "exported"; }; - var peg$f45 = function() { return "posted"; }; - var peg$f46 = function() { return "withdrawn"; }; - var peg$f47 = function() { return "groupBy"; }; - var peg$f48 = function() { return "limit"; }; - var peg$f49 = function() { return "feed"; }; - var peg$f50 = function() { return "title"; }; - var peg$f51 = function() { return "submitterUserID"; }; - var peg$f52 = function() { return "submitterPayrollID"; }; - var peg$f53 = function() { return "orderDealNumbers"; }; - var peg$f54 = function() { return "assignee"; }; - var peg$f55 = function() { return "createdBy"; }; - var peg$f56 = function() { return "action"; }; - var peg$f57 = function() {return "total"; }; - var peg$f58 = function() {return "has"; }; - var peg$f59 = function() {return "is"; }; - var peg$f60 = function() {return "purchaseAmount"}; - var peg$f61 = function() {return "purchaseCurrency"}; - var peg$f62 = function() {return "amountDebited"}; - var peg$f63 = function() {return "amountReimbursed"}; - var peg$f64 = function() { + var peg$f19 = function() { return "vendor"; }; + var peg$f20 = function() { return "to"; }; + var peg$f21 = function() { return "exporter"; }; + var peg$f22 = function() { return "payer"; }; + var peg$f23 = function() { return "paidBy"; }; + var peg$f24 = function() { return "taxRate"; }; + var peg$f25 = function() { return "cardID"; }; + var peg$f26 = function() { return "bankAccount"; }; + var peg$f27 = function() { return "from"; }; + var peg$f28 = function() {return "attendee"}; + var peg$f29 = function() { return "expenseType"; }; + var peg$f30 = function() { return "receiptType"; }; + var peg$f31 = function() { return "withdrawalType"; }; + var peg$f32 = function() { return "withdrawalStatus"; }; + 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() { isColumnsContext = true; return "columns"; }; - var peg$f65 = function() {return "view"}; - var peg$f66 = function() { return isColumnsContext; }; - var peg$f67 = function() { return "perDiem"; }; - var peg$f68 = function() { return "drafts"; }; - var peg$f69 = function() { return "originalamount"; }; - var peg$f70 = function() { return "taxAmount"; }; - var peg$f71 = function() { return "taxrate"; }; - var peg$f72 = function() { return "policyname"; }; - var peg$f73 = function() { return "withdrawalID"; }; - var peg$f74 = function() { return "bankAccount"; }; - var peg$f75 = function() { return "reportID"; }; - var peg$f76 = function() { return "base62ReportID"; }; - var peg$f77 = function() { return "exportedto"; }; - var peg$f78 = function() { return "exportedTo"; }; + var peg$f66 = function() {return "view"}; + var peg$f67 = function() { return isColumnsContext; }; + var peg$f68 = function() { return "perDiem"; }; + var peg$f69 = function() { return "drafts"; }; + var peg$f70 = function() { return "originalamount"; }; + var peg$f71 = function() { return "taxAmount"; }; + var peg$f72 = function() { return "taxrate"; }; + var peg$f73 = function() { return "policyname"; }; + var peg$f74 = function() { return "withdrawalID"; }; + var peg$f75 = function() { return "bankAccount"; }; + var peg$f76 = function() { return "reportID"; }; + var peg$f77 = function() { return "base62ReportID"; }; + var peg$f78 = function() { return "exportedto"; }; var peg$f79 = function() { return "exportedTo"; }; - var peg$f80 = function() { return "exchangeRate"; }; - var peg$f81 = function() { return "reimbursableTotal"; }; - var peg$f82 = function() { return "nonReimbursableTotal"; }; - var peg$f83 = function() { return "groupFrom"; }; - var peg$f84 = function() { return "groupExpenses"; }; - var peg$f85 = function() { return "groupTotal"; }; - var peg$f86 = function() { return "groupCard"; }; - var peg$f87 = function() { return "groupFeed"; }; - var peg$f88 = function() { return "groupBankAccount"; }; - var peg$f89 = function() { return "groupWithdrawn"; }; - var peg$f90 = function() { return "groupWithdrawalID"; }; - var peg$f91 = function() { return "groupAmountDebited"; }; - var peg$f92 = function() { return "groupAmountReimbursed"; }; - var peg$f93 = function() { return "amountDebited"; }; - var peg$f94 = function() { return "amountReimbursed"; }; - var peg$f95 = function() { return "groupCategory"; }; - var peg$f96 = function() { return "groupTag"; }; - var peg$f97 = function() { return "groupMerchant"; }; - var peg$f98 = function() { return "groupday"; }; - var peg$f99 = function() { return "groupmonth"; }; - var peg$f100 = function() { return "groupweek"; }; - var peg$f101 = function() { return "groupyear"; }; - var peg$f102 = function() { return "groupquarter"; }; - var peg$f103 = function() { return "eq"; }; - var peg$f104 = function() { return "neq"; }; - var peg$f105 = function() { return "gte"; }; - var peg$f106 = function() { return "gt"; }; - var peg$f107 = function() { return "lte"; }; - var peg$f108 = function() { return "lt"; }; - var peg$f109 = function(o) { + var peg$f80 = function() { return "exportedTo"; }; + var peg$f81 = function() { return "exchangeRate"; }; + var peg$f82 = function() { return "reimbursableTotal"; }; + var peg$f83 = function() { return "nonReimbursableTotal"; }; + var peg$f84 = function() { return "groupFrom"; }; + var peg$f85 = function() { return "groupExpenses"; }; + var peg$f86 = function() { return "groupTotal"; }; + var peg$f87 = function() { return "groupCard"; }; + var peg$f88 = function() { return "groupFeed"; }; + var peg$f89 = function() { return "groupBankAccount"; }; + var peg$f90 = function() { return "groupWithdrawn"; }; + var peg$f91 = function() { return "groupWithdrawalID"; }; + var peg$f92 = function() { return "groupAmountDebited"; }; + var peg$f93 = function() { return "groupAmountReimbursed"; }; + var peg$f94 = function() { return "amountDebited"; }; + var peg$f95 = function() { return "amountReimbursed"; }; + var peg$f96 = function() { return "groupCategory"; }; + var peg$f97 = function() { return "groupTag"; }; + var peg$f98 = function() { return "groupMerchant"; }; + var peg$f99 = function() { return "groupday"; }; + var peg$f100 = function() { return "groupmonth"; }; + var peg$f101 = function() { return "groupweek"; }; + var peg$f102 = function() { return "groupyear"; }; + var peg$f103 = function() { return "groupquarter"; }; + var peg$f104 = function() { return "eq"; }; + var peg$f105 = function() { return "neq"; }; + var peg$f106 = function() { return "gte"; }; + var peg$f107 = function() { return "gt"; }; + var peg$f108 = function() { return "lte"; }; + var peg$f109 = function() { return "lt"; }; + var peg$f110 = function(o) { if (nameOperator) { expectingNestedQuote = (o === "eq"); // Use simple parser if no valid operator is found } isColumnsContext = false; return o; }; - var peg$f110 = function(c) { return c; }; - var peg$f111 = function(chars) { return chars.join("").trim(); }; - var peg$f112 = function() { + var peg$f111 = function(c) { return c; }; + var peg$f112 = function(chars) { return chars.join("").trim(); }; + var peg$f113 = function() { isColumnsContext = false; return "and"; }; - var peg$f113 = function() { return expectingNestedQuote; }; - var peg$f114 = function(start, inner, end) { //handle no-breaking space + var peg$f114 = function() { return expectingNestedQuote; }; + var peg$f115 = function(start, inner, end) { //handle no-breaking space return [...start, '"', ...inner, '"', ...end].join(""); }; - var peg$f115 = function(start) {return "“"}; - var peg$f116 = function(start) {return "”"}; - var peg$f117 = function(start) {return "\""}; - var peg$f118 = function(start, inner, end) { + var peg$f116 = function(start) {return "“"}; + var peg$f117 = function(start) {return "”"}; + var peg$f118 = function(start) {return "\""}; + var peg$f119 = function(start, inner, end) { return [...start, '"', ...inner, '"'].join(""); }; var peg$currPos = options.peg$currPos | 0; @@ -1197,83 +1200,86 @@ function peg$parse(input, options) { if (s1 === peg$FAILED) { s1 = peg$parsecategory(); if (s1 === peg$FAILED) { - s1 = peg$parseto(); + s1 = peg$parsevendor(); if (s1 === peg$FAILED) { - s1 = peg$parsetaxRate(); + s1 = peg$parseto(); if (s1 === peg$FAILED) { - s1 = peg$parsecardID(); + s1 = peg$parsetaxRate(); if (s1 === peg$FAILED) { - s1 = peg$parsebankAccount(); + s1 = peg$parsecardID(); if (s1 === peg$FAILED) { - s1 = peg$parsefrom(); + s1 = peg$parsebankAccount(); if (s1 === peg$FAILED) { - s1 = peg$parseattendee(); + s1 = peg$parsefrom(); if (s1 === peg$FAILED) { - s1 = peg$parsepayer(); + s1 = peg$parseattendee(); if (s1 === peg$FAILED) { - s1 = peg$parsepaidBy(); + s1 = peg$parsepayer(); if (s1 === peg$FAILED) { - s1 = peg$parseexporter(); + s1 = peg$parsepaidBy(); if (s1 === peg$FAILED) { - s1 = peg$parseexpenseType(); + s1 = peg$parseexporter(); if (s1 === peg$FAILED) { - s1 = peg$parsereceiptType(); + s1 = peg$parseexpenseType(); if (s1 === peg$FAILED) { - s1 = peg$parsewithdrawalType(); + s1 = peg$parsereceiptType(); if (s1 === peg$FAILED) { - s1 = peg$parsewithdrawalStatus(); + s1 = peg$parsewithdrawalType(); if (s1 === peg$FAILED) { - s1 = peg$parsepaidStatus(); + s1 = peg$parsewithdrawalStatus(); if (s1 === peg$FAILED) { - s1 = peg$parsewithdrawalID(); + s1 = peg$parsepaidStatus(); if (s1 === peg$FAILED) { - s1 = peg$parsesubmitted(); + s1 = peg$parsewithdrawalID(); 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$parseposted(); + s1 = peg$parseexported(); if (s1 === peg$FAILED) { - s1 = peg$parsewithdrawn(); + s1 = peg$parseposted(); if (s1 === peg$FAILED) { - s1 = peg$parsefeed(); + s1 = peg$parsewithdrawn(); if (s1 === peg$FAILED) { - s1 = peg$parsetitle(); + s1 = peg$parsefeed(); 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$parseassignee(); + s1 = peg$parseorderDealNumbers(); if (s1 === peg$FAILED) { - s1 = peg$parsecreatedBy(); + s1 = peg$parseassignee(); if (s1 === peg$FAILED) { - s1 = peg$parsereimbursable(); + s1 = peg$parsecreatedBy(); if (s1 === peg$FAILED) { - s1 = peg$parsebillable(); + s1 = peg$parsereimbursable(); if (s1 === peg$FAILED) { - s1 = peg$parseaction(); + s1 = peg$parsebillable(); 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(); + } } } } @@ -1755,13 +1761,13 @@ function peg$parse(input, options) { return s0; } - function peg$parseto() { + function peg$parsevendor() { var s0, s1; s0 = peg$currPos; - s1 = input.substr(peg$currPos, 2); + s1 = input.substr(peg$currPos, 6); if (s1.toLowerCase() === peg$c17) { - peg$currPos += 2; + peg$currPos += 6; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$e22); } @@ -1775,13 +1781,13 @@ function peg$parse(input, options) { return s0; } - function peg$parseexporter() { + function peg$parseto() { var s0, s1; s0 = peg$currPos; - s1 = input.substr(peg$currPos, 8); + s1 = input.substr(peg$currPos, 2); if (s1.toLowerCase() === peg$c18) { - peg$currPos += 8; + peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$e23); } @@ -1795,13 +1801,13 @@ function peg$parse(input, options) { return s0; } - function peg$parsepayer() { + function peg$parseexporter() { var s0, s1; s0 = peg$currPos; - s1 = input.substr(peg$currPos, 5); + s1 = input.substr(peg$currPos, 8); if (s1.toLowerCase() === peg$c19) { - peg$currPos += 5; + peg$currPos += 8; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$e24); } @@ -1815,28 +1821,48 @@ function peg$parse(input, options) { return s0; } + function peg$parsepayer() { + var s0, s1; + + s0 = peg$currPos; + s1 = input.substr(peg$currPos, 5); + if (s1.toLowerCase() === peg$c20) { + peg$currPos += 5; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e25); } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f22(); + } + s0 = s1; + + return s0; + } + function peg$parsepaidBy() { var s0, s1; - if (input.substr(peg$currPos, 6) === peg$c20) { - s0 = peg$c20; + if (input.substr(peg$currPos, 6) === peg$c21) { + s0 = peg$c21; peg$currPos += 6; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e25); } + if (peg$silentFails === 0) { peg$fail(peg$e26); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 7); - if (s1.toLowerCase() === peg$c21) { + if (s1.toLowerCase() === peg$c22) { peg$currPos += 7; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e26); } + if (peg$silentFails === 0) { peg$fail(peg$e27); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f22(); + s1 = peg$f23(); } s0 = s1; } @@ -1848,24 +1874,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 7); - if (s0.toLowerCase() === peg$c22) { + if (s0.toLowerCase() === peg$c23) { peg$currPos += 7; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e27); } + if (peg$silentFails === 0) { peg$fail(peg$e28); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 8); - if (s1.toLowerCase() === peg$c23) { + if (s1.toLowerCase() === peg$c24) { peg$currPos += 8; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e28); } + if (peg$silentFails === 0) { peg$fail(peg$e29); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f23(); + s1 = peg$f24(); } s0 = s1; } @@ -1876,25 +1902,25 @@ function peg$parse(input, options) { function peg$parsecardID() { var s0, s1; - if (input.substr(peg$currPos, 6) === peg$c24) { - s0 = peg$c24; + if (input.substr(peg$currPos, 6) === peg$c25) { + s0 = peg$c25; peg$currPos += 6; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e29); } + if (peg$silentFails === 0) { peg$fail(peg$e30); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 4); - if (s1.toLowerCase() === peg$c25) { + if (s1.toLowerCase() === peg$c26) { peg$currPos += 4; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e30); } + if (peg$silentFails === 0) { peg$fail(peg$e31); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f24(); + s1 = peg$f25(); } s0 = s1; } @@ -1905,25 +1931,25 @@ function peg$parse(input, options) { function peg$parsebankAccount() { var s0, s1; - if (input.substr(peg$currPos, 11) === peg$c26) { - s0 = peg$c26; + if (input.substr(peg$currPos, 11) === peg$c27) { + s0 = peg$c27; peg$currPos += 11; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e31); } + if (peg$silentFails === 0) { peg$fail(peg$e32); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 12); - if (s1.toLowerCase() === peg$c27) { + if (s1.toLowerCase() === peg$c28) { peg$currPos += 12; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e32); } + if (peg$silentFails === 0) { peg$fail(peg$e33); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f25(); + s1 = peg$f26(); } s0 = s1; } @@ -1936,15 +1962,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 4); - if (s1.toLowerCase() === peg$c28) { + if (s1.toLowerCase() === peg$c29) { peg$currPos += 4; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e33); } + if (peg$silentFails === 0) { peg$fail(peg$e34); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f26(); + s1 = peg$f27(); } s0 = s1; @@ -1956,15 +1982,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 8); - if (s1.toLowerCase() === peg$c29) { + if (s1.toLowerCase() === peg$c30) { peg$currPos += 8; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e34); } + if (peg$silentFails === 0) { peg$fail(peg$e35); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f27(); + s1 = peg$f28(); } s0 = s1; @@ -1974,25 +2000,25 @@ function peg$parse(input, options) { function peg$parseexpenseType() { var s0, s1; - if (input.substr(peg$currPos, 11) === peg$c30) { - s0 = peg$c30; + if (input.substr(peg$currPos, 11) === peg$c31) { + s0 = peg$c31; peg$currPos += 11; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e35); } + if (peg$silentFails === 0) { peg$fail(peg$e36); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 12); - if (s1.toLowerCase() === peg$c31) { + if (s1.toLowerCase() === peg$c32) { peg$currPos += 12; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e36); } + if (peg$silentFails === 0) { peg$fail(peg$e37); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f28(); + s1 = peg$f29(); } s0 = s1; } @@ -2003,25 +2029,25 @@ function peg$parse(input, options) { function peg$parsereceiptType() { var s0, s1; - if (input.substr(peg$currPos, 11) === peg$c32) { - s0 = peg$c32; + if (input.substr(peg$currPos, 11) === peg$c33) { + s0 = peg$c33; peg$currPos += 11; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e37); } + if (peg$silentFails === 0) { peg$fail(peg$e38); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 12); - if (s1.toLowerCase() === peg$c33) { + if (s1.toLowerCase() === peg$c34) { peg$currPos += 12; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e38); } + if (peg$silentFails === 0) { peg$fail(peg$e39); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f29(); + s1 = peg$f30(); } s0 = s1; } @@ -2032,25 +2058,25 @@ function peg$parse(input, options) { function peg$parsewithdrawalType() { var s0, s1; - if (input.substr(peg$currPos, 14) === peg$c34) { - s0 = peg$c34; + if (input.substr(peg$currPos, 14) === peg$c35) { + s0 = peg$c35; peg$currPos += 14; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e39); } + if (peg$silentFails === 0) { peg$fail(peg$e40); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 15); - if (s1.toLowerCase() === peg$c35) { + if (s1.toLowerCase() === peg$c36) { peg$currPos += 15; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e40); } + if (peg$silentFails === 0) { peg$fail(peg$e41); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f30(); + s1 = peg$f31(); } s0 = s1; } @@ -2061,25 +2087,25 @@ function peg$parse(input, options) { function peg$parsewithdrawalStatus() { var s0, s1; - if (input.substr(peg$currPos, 16) === peg$c36) { - s0 = peg$c36; + if (input.substr(peg$currPos, 16) === peg$c37) { + s0 = peg$c37; peg$currPos += 16; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e41); } + if (peg$silentFails === 0) { peg$fail(peg$e42); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 17); - if (s1.toLowerCase() === peg$c37) { + if (s1.toLowerCase() === peg$c38) { peg$currPos += 17; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e42); } + if (peg$silentFails === 0) { peg$fail(peg$e43); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f31(); + s1 = peg$f32(); } s0 = s1; } @@ -2090,25 +2116,25 @@ function peg$parse(input, options) { function peg$parsepaidStatus() { var s0, s1; - if (input.substr(peg$currPos, 10) === peg$c38) { - s0 = peg$c38; + if (input.substr(peg$currPos, 10) === peg$c39) { + s0 = peg$c39; peg$currPos += 10; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e43); } + if (peg$silentFails === 0) { peg$fail(peg$e44); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c39) { + if (s1.toLowerCase() === peg$c40) { peg$currPos += 11; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e44); } + if (peg$silentFails === 0) { peg$fail(peg$e45); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f32(); + s1 = peg$f33(); } s0 = s1; } @@ -2120,24 +2146,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 12); - if (s0.toLowerCase() === peg$c40) { + if (s0.toLowerCase() === peg$c41) { peg$currPos += 12; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e45); } + if (peg$silentFails === 0) { peg$fail(peg$e46); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 13); - if (s1.toLowerCase() === peg$c41) { + if (s1.toLowerCase() === peg$c42) { peg$currPos += 13; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e46); } + if (peg$silentFails === 0) { peg$fail(peg$e47); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f33(); + s1 = peg$f34(); } s0 = s1; } @@ -2150,15 +2176,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 8); - if (s1.toLowerCase() === peg$c42) { + if (s1.toLowerCase() === peg$c43) { peg$currPos += 8; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e47); } + if (peg$silentFails === 0) { peg$fail(peg$e48); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f34(); + s1 = peg$f35(); } s0 = s1; @@ -2170,15 +2196,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 12); - if (s1.toLowerCase() === peg$c43) { + if (s1.toLowerCase() === peg$c44) { peg$currPos += 12; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e48); } + if (peg$silentFails === 0) { peg$fail(peg$e49); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f35(); + s1 = peg$f36(); } s0 = s1; @@ -2190,15 +2216,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 4); - if (s1.toLowerCase() === peg$c44) { + if (s1.toLowerCase() === peg$c45) { peg$currPos += 4; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e49); } + if (peg$silentFails === 0) { peg$fail(peg$e50); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f36(); + s1 = peg$f37(); } s0 = s1; @@ -2210,15 +2236,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 6); - if (s1.toLowerCase() === peg$c45) { + if (s1.toLowerCase() === peg$c46) { peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e50); } + if (peg$silentFails === 0) { peg$fail(peg$e51); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f37(); + s1 = peg$f38(); } s0 = s1; @@ -2228,25 +2254,25 @@ function peg$parse(input, options) { function peg$parsesortBy() { var s0, s1; - if (input.substr(peg$currPos, 6) === peg$c46) { - s0 = peg$c46; + if (input.substr(peg$currPos, 6) === peg$c47) { + s0 = peg$c47; 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$c47) { + if (s1.toLowerCase() === peg$c48) { 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$f38(); + s1 = peg$f39(); } s0 = s1; } @@ -2257,25 +2283,25 @@ function peg$parse(input, options) { function peg$parsesortOrder() { var s0, s1; - if (input.substr(peg$currPos, 9) === peg$c48) { - s0 = peg$c48; + if (input.substr(peg$currPos, 9) === peg$c49) { + s0 = peg$c49; 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$c49) { + if (s1.toLowerCase() === peg$c50) { 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$f39(); + s1 = peg$f40(); } s0 = s1; } @@ -2286,25 +2312,25 @@ function peg$parse(input, options) { function peg$parsepolicyID() { var s0, s1; - if (input.substr(peg$currPos, 8) === peg$c50) { - s0 = peg$c50; + if (input.substr(peg$currPos, 8) === peg$c51) { + s0 = peg$c51; 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$c51) { + if (s1.toLowerCase() === peg$c52) { 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$f40(); + s1 = peg$f41(); } s0 = s1; } @@ -2317,15 +2343,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 9); - if (s1.toLowerCase() === peg$c52) { + if (s1.toLowerCase() === peg$c53) { 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$f41(); + s1 = peg$f42(); } s0 = s1; @@ -2337,15 +2363,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 8); - if (s1.toLowerCase() === peg$c53) { + if (s1.toLowerCase() === peg$c54) { 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$f42(); + s1 = peg$f43(); } s0 = s1; @@ -2357,15 +2383,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 4); - if (s1.toLowerCase() === peg$c54) { + if (s1.toLowerCase() === peg$c55) { 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$f43(); + s1 = peg$f44(); } s0 = s1; @@ -2377,15 +2403,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$f44(); + s1 = peg$f45(); } s0 = s1; @@ -2397,15 +2423,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 6); - if (s1.toLowerCase() === peg$c56) { + if (s1.toLowerCase() === peg$c57) { 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$f45(); + s1 = peg$f46(); } s0 = s1; @@ -2417,15 +2443,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 9); - if (s1.toLowerCase() === peg$c57) { + if (s1.toLowerCase() === peg$c58) { 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$f46(); + s1 = peg$f47(); } s0 = s1; @@ -2436,24 +2462,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 7); - if (s0.toLowerCase() === peg$c58) { + if (s0.toLowerCase() === peg$c59) { 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$c59) { + if (s1.toLowerCase() === peg$c60) { 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$f47(); + s1 = peg$f48(); } s0 = s1; } @@ -2466,15 +2492,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 5); - if (s1.toLowerCase() === peg$c60) { + if (s1.toLowerCase() === peg$c61) { 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$f48(); + s1 = peg$f49(); } s0 = s1; @@ -2486,15 +2512,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 4); - if (s1.toLowerCase() === peg$c61) { + if (s1.toLowerCase() === peg$c62) { 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$f49(); + s1 = peg$f50(); } s0 = s1; @@ -2506,15 +2532,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$f50(); + s1 = peg$f51(); } s0 = s1; @@ -2525,24 +2551,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 15); - if (s0.toLowerCase() === peg$c63) { + if (s0.toLowerCase() === peg$c64) { 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$c64) { + if (s1.toLowerCase() === peg$c65) { 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$f51(); + s1 = peg$f52(); } s0 = s1; } @@ -2554,24 +2580,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 18); - if (s0.toLowerCase() === peg$c65) { + if (s0.toLowerCase() === peg$c66) { 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$c66) { + if (s1.toLowerCase() === peg$c67) { 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$f52(); + s1 = peg$f53(); } s0 = s1; } @@ -2583,24 +2609,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 16); - if (s0.toLowerCase() === peg$c67) { + if (s0.toLowerCase() === peg$c68) { 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$c68) { + if (s1.toLowerCase() === peg$c69) { 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$f53(); + s1 = peg$f54(); } s0 = s1; } @@ -2613,15 +2639,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 8); - if (s1.toLowerCase() === peg$c69) { + if (s1.toLowerCase() === peg$c70) { 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$f54(); + s1 = peg$f55(); } s0 = s1; @@ -2632,24 +2658,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 9); - if (s0.toLowerCase() === peg$c70) { + if (s0.toLowerCase() === peg$c71) { 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$c71) { + if (s1.toLowerCase() === peg$c72) { 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$f55(); + s1 = peg$f56(); } s0 = s1; } @@ -2662,15 +2688,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 6); - if (s1.toLowerCase() === peg$c72) { + if (s1.toLowerCase() === peg$c73) { 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$f56(); + s1 = peg$f57(); } s0 = s1; @@ -2682,15 +2708,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 5); - if (s1.toLowerCase() === peg$c73) { + if (s1.toLowerCase() === peg$c74) { 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$f57(); + s1 = peg$f58(); } s0 = s1; @@ -2702,15 +2728,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 3); - if (s1.toLowerCase() === peg$c74) { + if (s1.toLowerCase() === peg$c75) { 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$f58(); + s1 = peg$f59(); } s0 = s1; @@ -2722,15 +2748,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 2); - if (s1.toLowerCase() === peg$c75) { + if (s1.toLowerCase() === peg$c76) { 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$f59(); + s1 = peg$f60(); } s0 = s1; @@ -2741,24 +2767,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 14); - if (s0.toLowerCase() === peg$c76) { + if (s0.toLowerCase() === peg$c77) { 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$c77) { + if (s1.toLowerCase() === peg$c78) { 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$f60(); + s1 = peg$f61(); } s0 = s1; } @@ -2770,24 +2796,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 16); - if (s0.toLowerCase() === peg$c78) { + if (s0.toLowerCase() === peg$c79) { 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$c79) { + if (s1.toLowerCase() === peg$c80) { 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$f61(); + s1 = peg$f62(); } s0 = s1; } @@ -2799,24 +2825,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 13); - if (s0.toLowerCase() === peg$c80) { + if (s0.toLowerCase() === peg$c81) { 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$c81) { + if (s1.toLowerCase() === peg$c82) { 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$f62(); + s1 = peg$f63(); } s0 = s1; } @@ -2828,24 +2854,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 16); - if (s0.toLowerCase() === peg$c82) { + if (s0.toLowerCase() === peg$c83) { 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$c83) { + if (s1.toLowerCase() === peg$c84) { 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$f63(); + s1 = peg$f64(); } s0 = s1; } @@ -2858,15 +2884,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 7); - if (s1.toLowerCase() === peg$c84) { + if (s1.toLowerCase() === peg$c85) { 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$f64(); + s1 = peg$f65(); } s0 = s1; @@ -2878,15 +2904,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 4); - if (s1.toLowerCase() === peg$c85) { + if (s1.toLowerCase() === peg$c86) { 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$f65(); + s1 = peg$f66(); } s0 = s1; @@ -2898,7 +2924,7 @@ function peg$parse(input, options) { s0 = peg$currPos; peg$savedPos = peg$currPos; - s1 = peg$f66(); + s1 = peg$f67(); if (s1) { s1 = undefined; } else { @@ -3033,11 +3059,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 8); - if (s1.toLowerCase() === peg$c86) { + if (s1.toLowerCase() === peg$c87) { peg$currPos += 8; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e91); } + if (peg$silentFails === 0) { peg$fail(peg$e92); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3052,7 +3078,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f67(); + s0 = peg$f68(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3070,19 +3096,19 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 6); - if (s1.toLowerCase() === peg$c87) { + if (s1.toLowerCase() === peg$c88) { peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e92); } + if (peg$silentFails === 0) { peg$fail(peg$e93); } } if (s1 === peg$FAILED) { s1 = input.substr(peg$currPos, 5); - if (s1.toLowerCase() === peg$c88) { + if (s1.toLowerCase() === peg$c89) { peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e93); } + if (peg$silentFails === 0) { peg$fail(peg$e94); } } } if (s1 !== peg$FAILED) { @@ -3098,7 +3124,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f68(); + s0 = peg$f69(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3116,11 +3142,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 15); - if (s1.toLowerCase() === peg$c77) { + if (s1.toLowerCase() === peg$c78) { 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; @@ -3135,7 +3161,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; @@ -3153,11 +3179,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 3); - if (s1.toLowerCase() === peg$c89) { + if (s1.toLowerCase() === peg$c90) { peg$currPos += 3; } 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; @@ -3172,7 +3198,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; @@ -3190,11 +3216,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 8); - if (s1.toLowerCase() === peg$c23) { + if (s1.toLowerCase() === peg$c24) { peg$currPos += 8; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e28); } + if (peg$silentFails === 0) { peg$fail(peg$e29); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3209,7 +3235,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; @@ -3227,11 +3253,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c90) { + if (s1.toLowerCase() === peg$c91) { peg$currPos += 11; } 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; @@ -3246,7 +3272,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; @@ -3264,11 +3290,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 13); - if (s1.toLowerCase() === peg$c41) { + if (s1.toLowerCase() === peg$c42) { peg$currPos += 13; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e46); } + if (peg$silentFails === 0) { peg$fail(peg$e47); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3283,7 +3309,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; @@ -3301,11 +3327,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 12); - if (s1.toLowerCase() === peg$c27) { + if (s1.toLowerCase() === peg$c28) { peg$currPos += 12; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e32); } + if (peg$silentFails === 0) { peg$fail(peg$e33); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3320,7 +3346,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; @@ -3338,11 +3364,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c91) { + if (s1.toLowerCase() === peg$c92) { peg$currPos += 14; } 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; @@ -3357,7 +3383,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; @@ -3394,7 +3420,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; @@ -3412,11 +3438,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c92) { + if (s1.toLowerCase() === peg$c93) { peg$currPos += 11; } 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; @@ -3431,7 +3457,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; @@ -3456,7 +3482,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e98); } + if (peg$silentFails === 0) { peg$fail(peg$e99); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; @@ -3475,11 +3501,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c93) { + if (s1.toLowerCase() === peg$c94) { peg$currPos += 10; } 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; @@ -3494,7 +3520,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; @@ -3506,11 +3532,11 @@ function peg$parse(input, options) { if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c92) { + if (s1.toLowerCase() === peg$c93) { peg$currPos += 11; } 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; @@ -3525,7 +3551,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; @@ -3544,11 +3570,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 13); - if (s1.toLowerCase() === peg$c94) { + if (s1.toLowerCase() === peg$c95) { peg$currPos += 13; } 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; @@ -3563,7 +3589,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; @@ -3581,11 +3607,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 18); - if (s1.toLowerCase() === peg$c95) { + if (s1.toLowerCase() === peg$c96) { peg$currPos += 18; } 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; @@ -3600,7 +3626,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; @@ -3618,11 +3644,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 22); - if (s1.toLowerCase() === peg$c96) { + if (s1.toLowerCase() === peg$c97) { peg$currPos += 22; } 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; @@ -3637,7 +3663,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; @@ -3655,11 +3681,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c97) { + if (s1.toLowerCase() === peg$c98) { peg$currPos += 10; } 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; @@ -3674,7 +3700,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; @@ -3692,11 +3718,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c98) { + if (s1.toLowerCase() === peg$c99) { peg$currPos += 14; } 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; @@ -3711,7 +3737,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; @@ -3729,11 +3755,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c99) { + if (s1.toLowerCase() === peg$c100) { peg$currPos += 11; } 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; @@ -3748,7 +3774,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; @@ -3766,11 +3792,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; @@ -3785,7 +3811,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; @@ -3803,11 +3829,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c101) { + if (s1.toLowerCase() === peg$c102) { 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; @@ -3822,7 +3848,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; @@ -3840,11 +3866,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 18); - if (s1.toLowerCase() === peg$c102) { + if (s1.toLowerCase() === peg$c103) { peg$currPos += 18; } 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; @@ -3859,7 +3885,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; @@ -3877,11 +3903,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 15); - if (s1.toLowerCase() === peg$c103) { + if (s1.toLowerCase() === peg$c104) { peg$currPos += 15; } 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; @@ -3896,7 +3922,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; @@ -3914,11 +3940,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 19); - if (s1.toLowerCase() === peg$c104) { + if (s1.toLowerCase() === peg$c105) { peg$currPos += 19; } 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; @@ -3933,7 +3959,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; @@ -3951,11 +3977,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 20); - if (s1.toLowerCase() === peg$c105) { + if (s1.toLowerCase() === peg$c106) { peg$currPos += 20; } 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; @@ -3970,7 +3996,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; @@ -3988,11 +4014,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 23); - if (s1.toLowerCase() === peg$c106) { + if (s1.toLowerCase() === peg$c107) { peg$currPos += 23; } 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; @@ -4007,7 +4033,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; @@ -4025,11 +4051,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c81) { + if (s1.toLowerCase() === peg$c82) { 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; @@ -4044,7 +4070,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; @@ -4062,11 +4088,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 17); - if (s1.toLowerCase() === peg$c83) { + if (s1.toLowerCase() === peg$c84) { 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; @@ -4081,7 +4107,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; @@ -4099,11 +4125,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c107) { + if (s1.toLowerCase() === peg$c108) { peg$currPos += 14; } 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; @@ -4118,7 +4144,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; @@ -4136,11 +4162,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 9); - if (s1.toLowerCase() === peg$c108) { + if (s1.toLowerCase() === peg$c109) { peg$currPos += 9; } 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; @@ -4155,7 +4181,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; @@ -4173,11 +4199,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c109) { + if (s1.toLowerCase() === peg$c110) { peg$currPos += 14; } 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; @@ -4192,7 +4218,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; @@ -4210,11 +4236,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 9); - if (s1.toLowerCase() === peg$c110) { + if (s1.toLowerCase() === peg$c111) { peg$currPos += 9; } 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; @@ -4229,7 +4255,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; @@ -4247,11 +4273,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c111) { + if (s1.toLowerCase() === peg$c112) { peg$currPos += 11; } 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; @@ -4266,7 +4292,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; @@ -4284,11 +4310,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c112) { + if (s1.toLowerCase() === peg$c113) { peg$currPos += 10; } 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; @@ -4303,7 +4329,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; @@ -4321,11 +4347,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c113) { + if (s1.toLowerCase() === peg$c114) { 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; @@ -4340,7 +4366,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; @@ -4358,11 +4384,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 13); - if (s1.toLowerCase() === peg$c114) { + if (s1.toLowerCase() === peg$c115) { peg$currPos += 13; } 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; @@ -4377,7 +4403,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; @@ -4400,81 +4426,81 @@ function peg$parse(input, options) { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e98); } + if (peg$silentFails === 0) { peg$fail(peg$e99); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f103(); + s1 = peg$f104(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c115) { - s1 = peg$c115; + if (input.substr(peg$currPos, 2) === peg$c116) { + s1 = peg$c116; peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e122); } + if (peg$silentFails === 0) { peg$fail(peg$e123); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f104(); + s1 = peg$f105(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c116) { - s1 = peg$c116; + if (input.substr(peg$currPos, 2) === peg$c117) { + s1 = peg$c117; 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$f105(); + s1 = peg$f106(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 62) { - s1 = peg$c117; + s1 = peg$c118; peg$currPos++; } 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$f106(); + s1 = peg$f107(); } 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$f107(); + s1 = peg$f108(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 60) { - s1 = peg$c119; + s1 = peg$c120; peg$currPos++; } 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$f108(); + s1 = peg$f109(); } s0 = s1; } @@ -4485,7 +4511,7 @@ function peg$parse(input, options) { peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e121); } + if (peg$silentFails === 0) { peg$fail(peg$e122); } } return s0; @@ -4498,7 +4524,7 @@ function peg$parse(input, options) { s1 = peg$parseoperator(); if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f109(s1); + s1 = peg$f110(s1); } s0 = s1; @@ -4510,11 +4536,11 @@ function peg$parse(input, options) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 92) { - 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) { s2 = input.charAt(peg$currPos); @@ -4522,11 +4548,11 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e128); } + if (peg$silentFails === 0) { peg$fail(peg$e129); } } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f110(s2); + s0 = peg$f111(s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4552,7 +4578,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e130); } + if (peg$silentFails === 0) { peg$fail(peg$e131); } } } if (s2 !== peg$FAILED) { @@ -4565,7 +4591,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e130); } + if (peg$silentFails === 0) { peg$fail(peg$e131); } } } } @@ -4574,13 +4600,13 @@ function peg$parse(input, options) { } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f111(s1); + s1 = peg$f112(s1); } s0 = s1; peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e129); } + if (peg$silentFails === 0) { peg$fail(peg$e130); } } return s0; @@ -4592,7 +4618,7 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = peg$parse_(); peg$savedPos = s0; - s1 = peg$f112(); + s1 = peg$f113(); s0 = s1; return s0; @@ -4608,7 +4634,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e132); } + if (peg$silentFails === 0) { peg$fail(peg$e133); } } while (s1 !== peg$FAILED) { s0.push(s1); @@ -4617,12 +4643,12 @@ function peg$parse(input, options) { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e132); } + if (peg$silentFails === 0) { peg$fail(peg$e133); } } } peg$silentFails--; s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e131); } + if (peg$silentFails === 0) { peg$fail(peg$e132); } return s0; } @@ -4632,7 +4658,7 @@ function peg$parse(input, options) { s0 = peg$currPos; peg$savedPos = peg$currPos; - s1 = peg$f113(); + s1 = peg$f114(); if (s1) { s1 = undefined; } else { @@ -4669,7 +4695,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e134); } + if (peg$silentFails === 0) { peg$fail(peg$e135); } } while (s2 !== peg$FAILED) { s1.push(s2); @@ -4678,7 +4704,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e134); } + if (peg$silentFails === 0) { peg$fail(peg$e135); } } } s2 = input.charAt(peg$currPos); @@ -4686,7 +4712,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); } } if (s2 !== peg$FAILED) { s3 = []; @@ -4697,7 +4723,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); } } } while (s4 !== peg$FAILED) { @@ -4709,7 +4735,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); } } } } @@ -4718,7 +4744,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e135); } + if (peg$silentFails === 0) { peg$fail(peg$e136); } } if (s4 !== peg$FAILED) { s5 = []; @@ -4727,7 +4753,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e130); } + if (peg$silentFails === 0) { peg$fail(peg$e131); } } while (s6 !== peg$FAILED) { s5.push(s6); @@ -4736,11 +4762,11 @@ function peg$parse(input, options) { peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e130); } + if (peg$silentFails === 0) { peg$fail(peg$e131); } } } peg$savedPos = s0; - s0 = peg$f114(s1, s3, s5); + s0 = peg$f115(s1, s3, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4752,7 +4778,7 @@ function peg$parse(input, options) { peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e133); } + if (peg$silentFails === 0) { peg$fail(peg$e134); } } return s0; @@ -4769,7 +4795,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e134); } + if (peg$silentFails === 0) { peg$fail(peg$e135); } } while (s2 !== peg$FAILED) { s1.push(s2); @@ -4778,7 +4804,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e134); } + if (peg$silentFails === 0) { peg$fail(peg$e135); } } } s2 = input.charAt(peg$currPos); @@ -4786,7 +4812,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); } } if (s2 !== peg$FAILED) { s3 = []; @@ -4797,7 +4823,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) { s4 = peg$currPos; @@ -4813,15 +4839,15 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 8220) { - s6 = peg$c121; + s6 = peg$c122; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e137); } + if (peg$silentFails === 0) { peg$fail(peg$e138); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; - s4 = peg$f115(s1); + s4 = peg$f116(s1); } else { peg$currPos = s4; s4 = peg$FAILED; @@ -4844,15 +4870,15 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 8221) { - s6 = peg$c122; + s6 = peg$c123; 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$f116(s1); + s4 = peg$f117(s1); } else { peg$currPos = s4; s4 = peg$FAILED; @@ -4875,15 +4901,15 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 34) { - s6 = peg$c123; + s6 = peg$c124; 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$f117(s1); + s4 = peg$f118(s1); } else { peg$currPos = s4; s4 = peg$FAILED; @@ -4905,7 +4931,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) { s4 = peg$currPos; @@ -4921,15 +4947,15 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 8220) { - s6 = peg$c121; + s6 = peg$c122; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e137); } + if (peg$silentFails === 0) { peg$fail(peg$e138); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; - s4 = peg$f115(s1); + s4 = peg$f116(s1); } else { peg$currPos = s4; s4 = peg$FAILED; @@ -4952,15 +4978,15 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 8221) { - s6 = peg$c122; + s6 = peg$c123; 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$f116(s1); + s4 = peg$f117(s1); } else { peg$currPos = s4; s4 = peg$FAILED; @@ -4983,15 +5009,15 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 34) { - s6 = peg$c123; + s6 = peg$c124; 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$f117(s1); + s4 = peg$f118(s1); } else { peg$currPos = s4; s4 = peg$FAILED; @@ -5008,7 +5034,7 @@ function peg$parse(input, options) { s4 = peg$parseclosingQuote(); if (s4 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f118(s1, s3, s4); + s0 = peg$f119(s1, s3, s4); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -5020,7 +5046,7 @@ function peg$parse(input, options) { peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e133); } + if (peg$silentFails === 0) { peg$fail(peg$e134); } } return s0; @@ -5035,7 +5061,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); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -5073,7 +5099,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e140); } + if (peg$silentFails === 0) { peg$fail(peg$e141); } } while (s2 !== peg$FAILED) { s1.push(s2); @@ -5082,7 +5108,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e140); } + if (peg$silentFails === 0) { peg$fail(peg$e141); } } } s2 = []; @@ -5091,7 +5117,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e141); } + if (peg$silentFails === 0) { peg$fail(peg$e142); } } while (s3 !== peg$FAILED) { s2.push(s3); @@ -5100,7 +5126,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e141); } + if (peg$silentFails === 0) { peg$fail(peg$e142); } } } s3 = []; @@ -5109,7 +5135,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e142); } + if (peg$silentFails === 0) { peg$fail(peg$e143); } } while (s4 !== peg$FAILED) { s3.push(s4); @@ -5118,7 +5144,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e142); } + if (peg$silentFails === 0) { peg$fail(peg$e143); } } } s4 = peg$parseoperator(); @@ -5137,7 +5163,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); @@ -5146,7 +5172,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 = peg$currPos; @@ -5193,7 +5219,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e144); } + if (peg$silentFails === 0) { peg$fail(peg$e145); } } } } @@ -5209,7 +5235,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); } } if (s0 === peg$FAILED) { s0 = peg$currPos; diff --git a/src/libs/SearchParser/searchParser.peggy b/src/libs/SearchParser/searchParser.peggy index 81bf8f306ef2..2d01d8df45cb 100644 --- a/src/libs/SearchParser/searchParser.peggy +++ b/src/libs/SearchParser/searchParser.peggy @@ -272,6 +272,7 @@ key "key" / groupCurrency / tag / category + / vendor / to / taxRate / cardID diff --git a/src/libs/SearchQueryUtils.ts b/src/libs/SearchQueryUtils.ts index f9949750244b..a1a5590686eb 100644 --- a/src/libs/SearchQueryUtils.ts +++ b/src/libs/SearchQueryUtils.ts @@ -1106,6 +1106,7 @@ function buildQueryStringFromFilterFormValues(filterValues: Partial uniqueCategories.has(name)) .concat(hasEmptyCategoriesInFilter ? [CONST.SEARCH.CATEGORY_EMPTY_VALUE] : []); } + if (filterKey === CONST.SEARCH.SYNTAX_FILTER_KEYS.VENDOR) { + // Vendor names are matched by text on the server and the synced vendor lists load lazily, so the typed values are kept as-is. + filtersForm[filterKey] = filterValues; + } if (filterKey === CONST.SEARCH.SYNTAX_FILTER_KEYS.KEYWORD) { filtersForm[filterKey] = filterValues ?.map((filter) => { diff --git a/src/libs/SearchUIUtils.ts b/src/libs/SearchUIUtils.ts index 91c6f33b3088..fce4ea0da650 100644 --- a/src/libs/SearchUIUtils.ts +++ b/src/libs/SearchUIUtils.ts @@ -322,6 +322,7 @@ const transactionColumnNamesToSortingProperty: TransactionSorting = { [CONST.SEARCH.TABLE_COLUMNS.EXPORTED]: 'exported' as const, [CONST.SEARCH.TABLE_COLUMNS.TAG]: 'tag' as const, [CONST.SEARCH.TABLE_COLUMNS.MERCHANT]: 'formattedMerchant' as const, + [CONST.SEARCH.TABLE_COLUMNS.VENDOR]: null, [CONST.SEARCH.TABLE_COLUMNS.TOTAL_AMOUNT]: 'formattedTotal' as const, [CONST.SEARCH.TABLE_COLUMNS.CATEGORY]: 'category' as const, [CONST.SEARCH.TABLE_COLUMNS.ORIGINAL_AMOUNT]: 'originalAmount' as const, @@ -4388,6 +4389,8 @@ function getSearchColumnTranslationKey(column: SearchSortBy): TranslationPaths { return 'search.filters.exported'; case CONST.SEARCH.TABLE_COLUMNS.MERCHANT: return 'common.merchant'; + case CONST.SEARCH.TABLE_COLUMNS.VENDOR: + return 'common.vendor'; case CONST.SEARCH.TABLE_COLUMNS.DESCRIPTION: return 'common.description'; case CONST.SEARCH.TABLE_COLUMNS.FROM: @@ -5560,6 +5563,10 @@ const FILTER_VIEW_MAP = { labelKey: 'common.tag', icon: 'Tag', }, + [CONST.SEARCH.SYNTAX_FILTER_KEYS.VENDOR]: { + labelKey: 'common.vendor', + icon: 'Building', + }, [CONST.SEARCH.SYNTAX_FILTER_KEYS.TAX_RATE]: { labelKey: 'workspace.taxes.taxRate', icon: 'Percent', @@ -5794,6 +5801,13 @@ function getDisplayValue( .join(', '); } + if (key === FILTER_KEYS.VENDOR) { + return form[key] + ?.sort((a, b) => sortOptionsWithEmptyValue(a, b, localeCompare)) + .map((value) => (value === CONST.SEARCH.VENDOR_EMPTY_VALUE ? translate('search.noVendor') : value)) + .join(', '); + } + if (key === FILTER_KEYS.CURRENCY || key === FILTER_KEYS.CURRENCY_NOT || key === FILTER_KEYS.PURCHASE_CURRENCY || key === FILTER_KEYS.PURCHASE_CURRENCY_NOT) { return form[key]?.sort(localeCompare).join(', '); } @@ -6427,6 +6441,7 @@ function getColumnsToShow({ [CONST.SEARCH.TABLE_COLUMNS.DATE]: true, [CONST.SEARCH.TABLE_COLUMNS.POSTED]: false, [CONST.SEARCH.TABLE_COLUMNS.MERCHANT]: false, + [CONST.SEARCH.TABLE_COLUMNS.VENDOR]: false, [CONST.SEARCH.TABLE_COLUMNS.DESCRIPTION]: false, [CONST.SEARCH.TABLE_COLUMNS.CATEGORY]: false, [CONST.SEARCH.TABLE_COLUMNS.CATEGORY_GL_CODE]: false, @@ -6457,6 +6472,7 @@ function getColumnsToShow({ [CONST.SEARCH.TABLE_COLUMNS.SUBMITTED]: false, [CONST.SEARCH.TABLE_COLUMNS.APPROVED]: false, [CONST.SEARCH.TABLE_COLUMNS.MERCHANT]: false, + [CONST.SEARCH.TABLE_COLUMNS.VENDOR]: false, [CONST.SEARCH.TABLE_COLUMNS.DESCRIPTION]: false, [CONST.SEARCH.TABLE_COLUMNS.FROM]: false, [CONST.SEARCH.TABLE_COLUMNS.TO]: false, @@ -6602,6 +6618,10 @@ function getColumnsToShow({ columns[CONST.SEARCH.TABLE_COLUMNS.CARD] = true; } + if (transaction.comment?.vendor?.externalID) { + columns[CONST.SEARCH.TABLE_COLUMNS.VENDOR] = true; + } + // Only show tax columns when the user explicitly chooses to display them. if (customResult) { // Show both TAX_RATE and TAX_AMOUNT when the transaction has a meaningful tax signal. @@ -7071,6 +7091,7 @@ function shouldShowDeleteOption( const FLEX_COLUMNS = new Set([ CONST.SEARCH.TABLE_COLUMNS.MERCHANT, + CONST.SEARCH.TABLE_COLUMNS.VENDOR, CONST.SEARCH.TABLE_COLUMNS.DESCRIPTION, CONST.SEARCH.TABLE_COLUMNS.CATEGORY, CONST.SEARCH.TABLE_COLUMNS.CATEGORY_GL_CODE, diff --git a/src/libs/actions/Search.ts b/src/libs/actions/Search.ts index d48d5a9e9196..5044d2f85982 100644 --- a/src/libs/actions/Search.ts +++ b/src/libs/actions/Search.ts @@ -1082,6 +1082,34 @@ function openSearchCategoryFiltersPage() { read(READ_COMMANDS.OPEN_SEARCH_CATEGORY_FILTERS_PAGE, null, {optimisticData, successData, finallyData}); } +function openSearchVendorFiltersPage() { + const optimisticData: Array> = [ + { + onyxMethod: Onyx.METHOD.MERGE, + key: ONYXKEYS.RAM_ONLY_IS_LOADING_SEARCH_FILTERS_VENDOR_DATA, + value: true, + }, + ]; + + const successData: Array> = [ + { + onyxMethod: Onyx.METHOD.MERGE, + key: ONYXKEYS.IS_SEARCH_FILTERS_VENDOR_DATA_LOADED, + value: true, + }, + ]; + + const finallyData: Array> = [ + { + onyxMethod: Onyx.METHOD.MERGE, + key: ONYXKEYS.RAM_ONLY_IS_LOADING_SEARCH_FILTERS_VENDOR_DATA, + value: false, + }, + ]; + + read(READ_COMMANDS.OPEN_SEARCH_VENDOR_FILTERS_PAGE, null, {optimisticData, successData, finallyData}); +} + function openBulkChangeApproverPage(reportIDList: OpenBulkChangeApproverPageParams['reportIDList']) { const optimisticData: Array> = [ { @@ -2509,6 +2537,7 @@ export { handlePreventSearchAPI, openSearchCardFiltersPage, openSearchCategoryFiltersPage, + openSearchVendorFiltersPage, getPolicyFromSearchSnapshot, getReportFromSearchSnapshot, getReportActionsFromSearchSnapshot, diff --git a/src/libs/getSearchColumnContentToMeasure.ts b/src/libs/getSearchColumnContentToMeasure.ts index 1963f24f5134..c7f8e46f792e 100644 --- a/src/libs/getSearchColumnContentToMeasure.ts +++ b/src/libs/getSearchColumnContentToMeasure.ts @@ -17,7 +17,7 @@ import type {MeasurableFont} from './measureTextWidth/types'; import {getCompanyCardDescription} from './CardUtils'; import {getCategoryGLCode, getDecodedLeafCategoryName, isCategoryMissing} from './CategoryUtils'; import getBase62ReportID from './getBase62ReportID'; -import {getTagGLCode} from './PolicyUtils'; +import {getTagGLCode, getVendorDisplayName} from './PolicyUtils'; import {getReportName} from './ReportNameUtils'; import {getReportStatusTranslation} from './ReportUtils'; import { @@ -91,6 +91,7 @@ const EDITABLE_SEARCH_COLUMNS = new Set([ const DYNAMICALLY_SIZED_SEARCH_COLUMNS = new Set([ CONST.SEARCH.TABLE_COLUMNS.STATUS, CONST.SEARCH.TABLE_COLUMNS.MERCHANT, + CONST.SEARCH.TABLE_COLUMNS.VENDOR, CONST.SEARCH.TABLE_COLUMNS.DESCRIPTION, CONST.SEARCH.TABLE_COLUMNS.CATEGORY, CONST.SEARCH.TABLE_COLUMNS.TAG, @@ -133,6 +134,7 @@ const HUGGED_SEARCH_COLUMNS = new Set([CONST.SEARCH.TABLE_COLU const SEARCH_COLUMN_HEADER_TRANSLATION_KEYS: Partial> = { [CONST.SEARCH.TABLE_COLUMNS.STATUS]: 'common.status', [CONST.SEARCH.TABLE_COLUMNS.MERCHANT]: 'common.merchant', + [CONST.SEARCH.TABLE_COLUMNS.VENDOR]: 'common.vendor', [CONST.SEARCH.TABLE_COLUMNS.DESCRIPTION]: 'common.description', [CONST.SEARCH.TABLE_COLUMNS.CATEGORY]: 'common.category', [CONST.SEARCH.TABLE_COLUMNS.TAG]: 'common.tag', @@ -219,6 +221,8 @@ function getTransactionColumnContentToMeasure( ]; case CONST.SEARCH.TABLE_COLUMNS.MERCHANT: return [{text: getMerchantName(item, translate)}]; + case CONST.SEARCH.TABLE_COLUMNS.VENDOR: + return [{text: getVendorDisplayName(item.policy, item.comment?.vendor)}]; case CONST.SEARCH.TABLE_COLUMNS.DESCRIPTION: return [{text: getDescription(item)}]; case CONST.SEARCH.TABLE_COLUMNS.CATEGORY: diff --git a/src/pages/Search/SearchColumnsPage.tsx b/src/pages/Search/SearchColumnsPage.tsx index e069b81388cc..34bb0bdc5b39 100644 --- a/src/pages/Search/SearchColumnsPage.tsx +++ b/src/pages/Search/SearchColumnsPage.tsx @@ -3,8 +3,10 @@ import {useSearchQueryContext} from '@components/Search/SearchContext'; import type {SearchCustomColumnIds} from '@components/Search/types'; import useOnyx from '@hooks/useOnyx'; +import usePermissions from '@hooks/usePermissions'; import Navigation from '@libs/Navigation/Navigation'; +import {hasVendorFeatureOnAnyPolicy} from '@libs/PolicyUtils'; import {buildQueryStringFromFilterFormValues, getCurrentSearchQueryJSON, hasValuesIncludeViolationFilter} from '@libs/SearchQueryUtils'; import {getCustomColumnDefault, getCustomColumns, insertColumnBeforeTotalAmount} from '@libs/SearchUIUtils'; @@ -12,12 +14,22 @@ import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import ROUTES from '@src/ROUTES'; import type {SearchAdvancedFiltersForm} from '@src/types/form'; +import type {Policy} from '@src/types/onyx'; -import React from 'react'; +import type {OnyxCollection} from 'react-native-onyx'; + +import React, {useCallback} from 'react'; function SearchColumnsPage() { const [searchAdvancedFiltersForm] = useOnyx(ONYXKEYS.FORMS.SEARCH_ADVANCED_FILTERS_FORM); const {currentSearchKey} = useSearchQueryContext(); + const {isBetaEnabled} = usePermissions(); + const isVendorMatchingBetaEnabled = isBetaEnabled(CONST.BETAS.VENDOR_MATCHING); + const isVendorColumnAvailableSelector = useCallback( + (allPolicies: OnyxCollection) => hasVendorFeatureOnAnyPolicy(allPolicies, isVendorMatchingBetaEnabled), + [isVendorMatchingBetaEnabled], + ); + const [isVendorColumnAvailable = false] = useOnyx(ONYXKEYS.COLLECTION.POLICY, {selector: isVendorColumnAvailableSelector}); const groupBy = searchAdvancedFiltersForm?.groupBy; const queryType = searchAdvancedFiltersForm?.type ?? CONST.SEARCH.DATA_TYPES.EXPENSE; @@ -25,11 +37,15 @@ function SearchColumnsPage() { // Violations data is only returned when these filters are set, so hide the column otherwise. const shouldRequireViolationsColumn = hasValuesIncludeViolationFilter(searchAdvancedFiltersForm?.has); - const allTypeCustomColumns = getCustomColumns(queryType).filter((column) => shouldRequireViolationsColumn || column !== CONST.SEARCH.TABLE_COLUMNS.VIOLATIONS); + // The vendor column only exists for workspaces with the vendor feature, so hide it when none of the user's workspaces has it. + const isColumnAvailable = (column: SearchCustomColumnIds) => + (shouldRequireViolationsColumn || column !== CONST.SEARCH.TABLE_COLUMNS.VIOLATIONS) && (isVendorColumnAvailable || column !== CONST.SEARCH.TABLE_COLUMNS.VENDOR); + + const allTypeCustomColumns = getCustomColumns(queryType).filter(isColumnAvailable); const allGroupCustomColumns = getCustomColumns(groupBy); const defaultGroupCustomColumns = getCustomColumnDefault(groupBy); const defaultTypeCustomColumns = [...getCustomColumnDefault(queryType)]; - const currentColumns = [...(searchAdvancedFiltersForm?.columns ?? [])].filter((column) => shouldRequireViolationsColumn || column !== CONST.SEARCH.TABLE_COLUMNS.VIOLATIONS); + const currentColumns = [...(searchAdvancedFiltersForm?.columns ?? [])].filter(isColumnAvailable); // We need at least one element with flex1 in the table to ensure the table looks good in the UI, so we don't allow removing the total columns // since it makes sense for them to show up in an expense management App and it fixes the layout issues. diff --git a/src/pages/settings/Report/ReportDetailsColumnsPage.tsx b/src/pages/settings/Report/ReportDetailsColumnsPage.tsx index 84fd8918fc7d..2428e21379e2 100644 --- a/src/pages/settings/Report/ReportDetailsColumnsPage.tsx +++ b/src/pages/settings/Report/ReportDetailsColumnsPage.tsx @@ -3,12 +3,13 @@ import type {SearchCustomColumnIds} from '@components/Search/types'; import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails'; import useOnyx from '@hooks/useOnyx'; +import usePermissions from '@hooks/usePermissions'; import {setReportDetailsColumns} from '@libs/actions/ReportLayout'; import {isBillableEnabledOnPolicy} from '@libs/MoneyRequestReportUtils'; import Navigation from '@libs/Navigation/Navigation'; import type {PlatformStackRouteProp} from '@libs/Navigation/PlatformStackNavigation/types'; -import {isPolicyTaxEnabled} from '@libs/PolicyUtils'; +import {hasVendorFeature, isPolicyTaxEnabled} from '@libs/PolicyUtils'; import {isIOUReport} from '@libs/ReportUtils'; import {getColumnsToShow} from '@libs/SearchUIUtils'; import {hasNonReimbursableTransactions} from '@libs/TransactionUtils'; @@ -65,6 +66,11 @@ function ReportDetailsColumnsPage() { }, }); const currentUserDetails = useCurrentUserPersonalDetails(); + const {isBetaEnabled} = usePermissions(); + + // The vendor column only exists for workspaces with the vendor feature, so hide it when this report's workspace lacks it. + const isVendorColumnAvailable = hasVendorFeature(policy, isBetaEnabled(CONST.BETAS.VENDOR_MATCHING)); + const isColumnAvailable = (column: SearchCustomColumnIds) => isVendorColumnAvailable || column !== CONST.SEARCH.TABLE_COLUMNS.VENDOR; // Wait for transactions to load before rendering. ColumnsSettingsList snapshots // currentColumns in useState on mount and does not sync prop updates, so we must @@ -100,12 +106,14 @@ function ReportDetailsColumnsPage() { return visibleColumns.filter(isReportDetailsCustomColumn); }, [reportDetailsColumns, reportTransactions, currentUserDetails?.accountID, report, policy]); + const allColumns = ALL_REPORT_DETAILS_CUSTOM_COLUMNS.filter(isColumnAvailable); + const currentColumns = effectiveColumns.filter(isColumnAvailable); const requiredColumns = new Set([CONST.SEARCH.TABLE_COLUMNS.TOTAL_AMOUNT]); const handleSave = (selectedColumnIds: SearchCustomColumnIds[]) => { // Skip saving if columns haven't changed from the effective state, to avoid // switching from the default path to the custom path in getColumnsToShow unnecessarily. - if (!arraysEqual(selectedColumnIds, effectiveColumns)) { + if (!arraysEqual(selectedColumnIds, currentColumns)) { setReportDetailsColumns(selectedColumnIds, reportDetailsColumns); } Navigation.goBack(); @@ -117,9 +125,9 @@ function ReportDetailsColumnsPage() { return ( diff --git a/src/styles/utils/index.ts b/src/styles/utils/index.ts index 913ba8883e30..46eda22f7a15 100644 --- a/src/styles/utils/index.ts +++ b/src/styles/utils/index.ts @@ -2149,6 +2149,7 @@ const createStyleUtils = (theme: ThemeColors, styles: ThemeStyles) => ({ case CONST.SEARCH.TABLE_COLUMNS.REPORT_ID: case CONST.SEARCH.TABLE_COLUMNS.BASE_62_REPORT_ID: case CONST.SEARCH.TABLE_COLUMNS.MERCHANT: + case CONST.SEARCH.TABLE_COLUMNS.VENDOR: case CONST.SEARCH.TABLE_COLUMNS.FROM: case CONST.SEARCH.TABLE_COLUMNS.TO: case CONST.SEARCH.TABLE_COLUMNS.FIRST_APPROVER: diff --git a/src/types/form/SearchAdvancedFiltersForm.ts b/src/types/form/SearchAdvancedFiltersForm.ts index 010091d7e4ef..647e1f232a83 100644 --- a/src/types/form/SearchAdvancedFiltersForm.ts +++ b/src/types/form/SearchAdvancedFiltersForm.ts @@ -138,6 +138,8 @@ const FILTER_KEYS = { CATEGORY_NOT: 'categoryNot', CATEGORY: 'category', + VENDOR: 'vendor', + CARD_ID_NOT: 'cardIDNot', CARD_ID: 'cardID', @@ -300,6 +302,7 @@ const ALLOWED_TYPE_FILTERS: Record> = { FILTER_KEYS.CATEGORY_NOT, FILTER_KEYS.TAG, FILTER_KEYS.TAG_NOT, + FILTER_KEYS.VENDOR, FILTER_KEYS.PAYER, FILTER_KEYS.PAYER_NOT, FILTER_KEYS.PAID_BY, @@ -785,6 +788,8 @@ type SearchAdvancedFiltersForm = Form< [FILTER_KEYS.CATEGORY]: string[]; [FILTER_KEYS.CATEGORY_NOT]: string[]; + [FILTER_KEYS.VENDOR]: string[]; + [FILTER_KEYS.POLICY_ID]: string[]; [FILTER_KEYS.POLICY_ID_NOT]: string[]; diff --git a/tests/unit/PolicyUtilsTest.ts b/tests/unit/PolicyUtilsTest.ts index d76367dc5e33..72f1981971cc 100644 --- a/tests/unit/PolicyUtilsTest.ts +++ b/tests/unit/PolicyUtilsTest.ts @@ -15,6 +15,9 @@ import { canSendInvoiceFromWorkspace, evaluateApprovalWorkflowRule, findVendorByID, + getVendorDisplayName, + hasVendorFeatureOnAnyPolicy, + getVendorFeaturePolicyIDs, getActivePolicies, getActivePoliciesWithExpenseChat, getActivePoliciesWithExpenseChatAndPerDiemEnabled, @@ -4685,6 +4688,56 @@ describe('PolicyUtils', () => { }); }); + describe('hasVendorFeatureOnAnyPolicy and getVendorFeaturePolicyIDs', () => { + const qboPolicy: Policy = {...buildQBOPolicy(CONST.QUICKBOOKS_NON_REIMBURSABLE_EXPORT_ACCOUNT_TYPE.CREDIT_CARD), id: 'qbo'}; + const xeroPolicy: Policy = {...buildXeroPolicy(), id: 'xero'}; + const plainPolicy: Policy = {...createRandomPolicy(3), connections: undefined, id: 'plain'}; + const qboKey = `${ONYXKEYS.COLLECTION.POLICY}qbo`; + const xeroKey = `${ONYXKEYS.COLLECTION.POLICY}xero`; + const plainKey = `${ONYXKEYS.COLLECTION.POLICY}plain`; + + it('is false when no workspace has the vendor feature', () => { + expect(hasVendorFeatureOnAnyPolicy({[plainKey]: plainPolicy}, true)).toBe(false); + }); + + it('is true for a QBO workspace exporting card expenses as credit card transactions, without the beta', () => { + expect(hasVendorFeatureOnAnyPolicy({[qboKey]: qboPolicy, [plainKey]: plainPolicy}, false)).toBe(true); + }); + + it('is true for a Xero workspace with the beta', () => { + expect(hasVendorFeatureOnAnyPolicy({[xeroKey]: xeroPolicy, [plainKey]: plainPolicy}, true)).toBe(true); + }); + + it('ignores beta-gated integrations while the beta is off', () => { + expect(hasVendorFeatureOnAnyPolicy({[xeroKey]: xeroPolicy}, false)).toBe(false); + }); + + it('lists the workspaces that have the vendor feature', () => { + expect(getVendorFeaturePolicyIDs({[xeroKey]: xeroPolicy, [qboKey]: qboPolicy, [plainKey]: plainPolicy}, true).toSorted()).toEqual(['qbo', 'xero']); + expect(getVendorFeaturePolicyIDs({[xeroKey]: xeroPolicy, [plainKey]: plainPolicy}, false)).toEqual([]); + }); + }); + + describe('getVendorDisplayName', () => { + const qboPolicy = buildQBOPolicy(CONST.QUICKBOOKS_NON_REIMBURSABLE_EXPORT_ACCOUNT_TYPE.CREDIT_CARD); + + it('returns an empty string when no vendor is assigned', () => { + expect(getVendorDisplayName(qboPolicy, undefined)).toBe(''); + }); + + it('prefers the synced vendor name over the name stored on the transaction', () => { + expect(getVendorDisplayName(qboPolicy, {externalID: 'v-1', name: 'Old Acme', wasManuallySet: true})).toBe('Acme Co'); + }); + + it('falls back to the stored name when the vendor is no longer in the synced list', () => { + expect(getVendorDisplayName(qboPolicy, {externalID: 'gone', name: 'Former Vendor', wasManuallySet: true})).toBe('Former Vendor'); + }); + + it('returns an empty string for a legacy vendor with neither a synced nor a stored name', () => { + expect(getVendorDisplayName(undefined, {externalID: 'v-9', wasManuallySet: true})).toBe(''); + }); + }); + describe('findVendorByID', () => { it('resolves a QBO vendor even when the current export mode is no longer vendor-matching (Vendor Bill)', () => { const policy = buildQBOPolicy(CONST.QUICKBOOKS_NON_REIMBURSABLE_EXPORT_ACCOUNT_TYPE.VENDOR_BILL, [{id: 'v-1', name: 'Acme', currency: 'USD'}]); diff --git a/tests/unit/Search/SearchQueryUtilsTest.ts b/tests/unit/Search/SearchQueryUtilsTest.ts index 88595f0389ce..eb452ae485ff 100644 --- a/tests/unit/Search/SearchQueryUtilsTest.ts +++ b/tests/unit/Search/SearchQueryUtilsTest.ts @@ -399,6 +399,17 @@ describe('SearchQueryUtils', () => { expect(result).toEqual('type:expense policyID:12345 amount<100'); }); + test('vendor filter value', () => { + const filterValues: Partial = { + type: 'expense', + vendor: ['Acme', 'none'], + }; + + const result = buildQueryStringFromFilterFormValues(filterValues); + + expect(result).toEqual('type:expense vendor:Acme,none'); + }); + test('receipt type filter value', () => { const filterValues: Partial = { type: 'expense', @@ -1210,6 +1221,22 @@ describe('SearchQueryUtils', () => { }); }); + test('vendor filter keeps the typed names and the empty value', () => { + const queryString = 'sortBy:date sortOrder:desc type:expense vendor:"Acme Tools",none'; + const queryJSON = buildSearchQueryJSON(queryString); + + if (!queryJSON) { + throw new Error('Failed to parse query string'); + } + + const result = buildFilterFormValuesFromQuery(queryJSON, {}, {}, {}, {}, {}, {}, {}); + + expect(result).toEqual({ + type: 'expense', + vendor: ['Acme Tools', 'none'], + }); + }); + test('action filter should be set to undefined if the input value is invalid', () => { const policyCategories = {}; const policyTags = {}; diff --git a/tests/unit/Search/SearchUIUtilsTest.ts b/tests/unit/Search/SearchUIUtilsTest.ts index 55500de9bfab..9b3dceb8077b 100644 --- a/tests/unit/Search/SearchUIUtilsTest.ts +++ b/tests/unit/Search/SearchUIUtilsTest.ts @@ -50,6 +50,7 @@ import type {OnyxCollection} from 'react-native-onyx'; import Onyx from 'react-native-onyx'; import createRandomPolicy from '../../utils/collections/policies'; +import createRandomTransaction from '../../utils/collections/transaction'; import createMock from '../../utils/createMock'; import getOnyxValue from '../../utils/getOnyxValue'; import {convertToDisplayString, formatPhoneNumber, getCurrencyDecimalsLocal, localeCompare, translateLocal} from '../../utils/TestHelper'; @@ -11196,6 +11197,25 @@ describe('SearchUIUtils', () => { }); describe('Test getColumnsToShow', () => { + test('Should show the vendor column on Search only when picked, and in the report view when an expense has a vendor assigned', () => { + const transactionWithoutVendor = createRandomTransaction(1); + const transactionWithVendor = {...createRandomTransaction(2), comment: {vendor: {externalID: 'qbo-1', name: 'Acme Tools', wasManuallySet: true}}}; + const pickedColumns = [CONST.SEARCH.TABLE_COLUMNS.DATE, CONST.SEARCH.TABLE_COLUMNS.VENDOR, CONST.SEARCH.TABLE_COLUMNS.TOTAL_AMOUNT]; + + expect(SearchUIUtils.getColumnsToShow({currentAccountID: 1, data: [transactionWithVendor], visibleColumns: [], type: CONST.SEARCH.DATA_TYPES.EXPENSE})).not.toContain( + CONST.SEARCH.TABLE_COLUMNS.VENDOR, + ); + expect(SearchUIUtils.getColumnsToShow({currentAccountID: 1, data: [transactionWithVendor], visibleColumns: pickedColumns, type: CONST.SEARCH.DATA_TYPES.EXPENSE})).toContain( + CONST.SEARCH.TABLE_COLUMNS.VENDOR, + ); + expect( + SearchUIUtils.getColumnsToShow({currentAccountID: 1, data: [transactionWithoutVendor], visibleColumns: [], type: CONST.SEARCH.DATA_TYPES.EXPENSE, isExpenseReportView: true}), + ).not.toContain(CONST.SEARCH.TABLE_COLUMNS.VENDOR); + expect( + SearchUIUtils.getColumnsToShow({currentAccountID: 1, data: [transactionWithVendor], visibleColumns: [], type: CONST.SEARCH.DATA_TYPES.EXPENSE, isExpenseReportView: true}), + ).toContain(CONST.SEARCH.TABLE_COLUMNS.VENDOR); + }); + test('Should show all default columns when no custom columns are saved & viewing expense reports', () => { expect(SearchUIUtils.getColumnsToShow({currentAccountID: 1, data: [], visibleColumns: [], type: CONST.SEARCH.DATA_TYPES.EXPENSE_REPORT})).toEqual([ CONST.SEARCH.TABLE_COLUMNS.AVATAR, @@ -14073,6 +14093,12 @@ describe('SearchUIUtils', () => { }); }); + describe('vendor column label', () => { + test('Should label the vendor column as Vendor', () => { + expect(SearchUIUtils.getSearchColumnTranslationKey(CONST.SEARCH.TABLE_COLUMNS.VENDOR)).toBe('common.vendor'); + }); + }); + describe('getDisplayValue', () => { test('returns translated has option labels from getHasOptions', () => { const result = SearchUIUtils.getDisplayValue('has', {has: [CONST.SEARCH.HAS_VALUES.SUBMITTED_VIOLATION]}, CONST.SEARCH.DATA_TYPES.EXPENSE, translateLocal, localeCompare); diff --git a/tests/unit/Search/__snapshots__/ColumnAvailabilityTest.ts.snap b/tests/unit/Search/__snapshots__/ColumnAvailabilityTest.ts.snap index d415876f37bb..c85a7d23b544 100644 --- a/tests/unit/Search/__snapshots__/ColumnAvailabilityTest.ts.snap +++ b/tests/unit/Search/__snapshots__/ColumnAvailabilityTest.ts.snap @@ -6,6 +6,7 @@ exports[`Column availability single source of truth the derived picker lists mat "date", "posted", "merchant", + "vendor", "description", "card", "category", @@ -41,6 +42,7 @@ exports[`Column availability single source of truth the derived picker lists mat "posted", "exported", "merchant", + "vendor", "description", "from", "to", diff --git a/tests/unit/hooks/useAdvancedSearchFilters.test.ts b/tests/unit/hooks/useAdvancedSearchFilters.test.ts index 5b301f6ab233..0bc13c298d46 100644 --- a/tests/unit/hooks/useAdvancedSearchFilters.test.ts +++ b/tests/unit/hooks/useAdvancedSearchFilters.test.ts @@ -7,6 +7,7 @@ import useAdvancedSearchFilters from '@hooks/useAdvancedSearchFilters'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import type {Policy, PolicyTagLists} from '@src/types/onyx'; +import type {Connections} from '@src/types/onyx/Policy'; import type * as NativeNavigation from '@react-navigation/native'; @@ -14,6 +15,7 @@ import React from 'react'; import Onyx from 'react-native-onyx'; import createRandomPolicy from '../../utils/collections/policies'; +import createMock from '../../utils/createMock'; import waitForBatchedUpdates from '../../utils/waitForBatchedUpdates'; jest.mock('@src/libs/Log'); @@ -199,6 +201,37 @@ describe('useAdvancedSearchFilters', () => { }); }); + describe('vendor filter visibility', () => { + it('hides the vendor filter when no workspace has the vendor feature', async () => { + await Onyx.merge(`${ONYXKEYS.COLLECTION.POLICY}1`, buildPolicy(1, {connections: undefined})); + + const {result} = renderHook(() => useAdvancedSearchFilters(undefined, undefined), {wrapper}); + + await waitFor(() => { + const allKeys = result.current.flat(); + expect(allKeys).toContain(CONST.SEARCH.SYNTAX_FILTER_KEYS.CATEGORY); + expect(allKeys).not.toContain(CONST.SEARCH.SYNTAX_FILTER_KEYS.VENDOR); + }); + }); + + it('shows the vendor filter when a workspace exports QBO card expenses as credit card transactions', async () => { + const connections = createMock({ + [CONST.POLICY.CONNECTIONS.NAME.QBO]: { + config: {nonReimbursableExpensesExportDestination: CONST.QUICKBOOKS_NON_REIMBURSABLE_EXPORT_ACCOUNT_TYPE.CREDIT_CARD}, + data: {vendors: []}, + }, + }); + await Onyx.merge(`${ONYXKEYS.COLLECTION.POLICY}1`, buildPolicy(1, {connections})); + + const {result} = renderHook(() => useAdvancedSearchFilters(undefined, undefined), {wrapper}); + + await waitFor(() => { + const allKeys = result.current.flat(); + expect(allKeys).toContain(CONST.SEARCH.SYNTAX_FILTER_KEYS.VENDOR); + }); + }); + }); + describe('tax filter visibility', () => { it('hides tax filter when no policies have taxes enabled', async () => { const policy = buildPolicy(1, {tax: {trackingEnabled: false}});