{"version":3,"file":"payment-page-DUstctJL.js","sources":["../../../node_modules/use-debounce/dist/index.module.js","../../payment-page/src/components/Collapsible/CollapsibleState.ts","../../payment-page/src/components/Collapsible/Collapsible.tsx","../../payment-page/src/components/CurrencyField/currencyUtils.ts","../../payment-page/src/components/CurrencyField/CurrencyField.tsx","../../payment-page/src/components/FileAttachments/FileIconTypes.ts","../../payment-page/src/utilities/FilenameTools.ts","../../payment-page/src/components/FileAttachments/FileIcons.tsx","../../payment-page/src/components/FileAttachments/FileUploadItem.tsx","../../payment-page/src/components/FileAttachments/FileAttachments.tsx","../../payment-page/src/components/TextareaField/TextareaField.tsx","../../payment-page/src/features/PaymentInfo/PaymentInfo.types.ts","../../payment-page/src/features/PaymentInfo/PaymentInfoDetails.ts","../../payment-page/src/components/ReCaptcha/ReCaptcha.tsx","../../payment-page/src/components/Confirmation/OkModal.tsx","../../payment-page/src/features/AutoPay/AutoPayLearnMore.tsx","../../payment-page/src/components/TitleText/TitleText.tsx","../../payment-page/src/components/ToggleSwitch/ToggleSwitch.tsx","../../payment-page/src/features/AutoPay/AutoPayToggle.tsx","../../payment-page/src/utilities/Sorting.ts","../../payment-page/src/features/Invoices/InvoiceGridHeaderButton.tsx","../../payment-page/src/features/Invoices/InvoiceAttributeValues.tsx","../../../node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs","../../../node_modules/@floating-ui/react/dist/floating-ui.react.utils.mjs","../../../node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs","../../../node_modules/@floating-ui/core/dist/floating-ui.core.mjs","../../../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs","../../../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs","../../../node_modules/tabbable/dist/index.esm.js","../../../node_modules/@floating-ui/react/dist/floating-ui.react.mjs","../../payment-page/src/components/Tooltip/ToolTipArrowPaths.ts","../../payment-page/src/components/Tooltip/Tooltip.tsx","../../payment-page/src/utilities/debounce.ts","../../payment-page/src/hooks/useTooltip.ts","../../payment-page/src/features/Invoices/OverDueOrPaid.tsx","../../payment-page/src/components/Select/Select.tsx","../../payment-page/src/utilities/Currency.tsx","../../../node_modules/react-dom/cjs/react-dom-test-utils.production.min.js","../../../node_modules/react-dom/test-utils.js","../../../node_modules/pretty-format/node_modules/ansi-styles/index.js","../../../node_modules/pretty-format/build/collections.js","../../../node_modules/pretty-format/build/plugins/AsymmetricMatcher.js","../../../node_modules/ansi-regex/index.js","../../../node_modules/pretty-format/build/plugins/ConvertAnsi.js","../../../node_modules/pretty-format/build/plugins/DOMCollection.js","../../../node_modules/pretty-format/build/plugins/lib/escapeHTML.js","../../../node_modules/pretty-format/build/plugins/lib/markup.js","../../../node_modules/pretty-format/build/plugins/DOMElement.js","../../../node_modules/pretty-format/build/plugins/Immutable.js","../../../node_modules/pretty-format/node_modules/react-is/cjs/react-is.production.min.js","../../../node_modules/pretty-format/node_modules/react-is/index.js","../../../node_modules/pretty-format/build/plugins/ReactElement.js","../../../node_modules/pretty-format/build/plugins/ReactTestComponent.js","../../../node_modules/pretty-format/build/index.js","../../../node_modules/dom-accessibility-api/dist/polyfills/array.from.mjs","../../../node_modules/dom-accessibility-api/dist/polyfills/SetLike.mjs","../../../node_modules/dom-accessibility-api/dist/getRole.mjs","../../../node_modules/dom-accessibility-api/dist/util.mjs","../../../node_modules/dom-accessibility-api/dist/accessible-name-and-description.mjs","../../../node_modules/dom-accessibility-api/dist/accessible-description.mjs","../../../node_modules/dom-accessibility-api/dist/accessible-name.mjs","../../../node_modules/aria-query/lib/util/iteratorProxy.js","../../../node_modules/aria-query/lib/util/iterationDecorator.js","../../../node_modules/aria-query/lib/ariaPropsMap.js","../../../node_modules/aria-query/lib/domMap.js","../../../node_modules/aria-query/lib/etc/roles/abstract/commandRole.js","../../../node_modules/aria-query/lib/etc/roles/abstract/compositeRole.js","../../../node_modules/aria-query/lib/etc/roles/abstract/inputRole.js","../../../node_modules/aria-query/lib/etc/roles/abstract/landmarkRole.js","../../../node_modules/aria-query/lib/etc/roles/abstract/rangeRole.js","../../../node_modules/aria-query/lib/etc/roles/abstract/roletypeRole.js","../../../node_modules/aria-query/lib/etc/roles/abstract/sectionRole.js","../../../node_modules/aria-query/lib/etc/roles/abstract/sectionheadRole.js","../../../node_modules/aria-query/lib/etc/roles/abstract/selectRole.js","../../../node_modules/aria-query/lib/etc/roles/abstract/structureRole.js","../../../node_modules/aria-query/lib/etc/roles/abstract/widgetRole.js","../../../node_modules/aria-query/lib/etc/roles/abstract/windowRole.js","../../../node_modules/aria-query/lib/etc/roles/ariaAbstractRoles.js","../../../node_modules/aria-query/lib/etc/roles/literal/alertRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/alertdialogRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/applicationRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/articleRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/bannerRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/blockquoteRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/buttonRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/captionRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/cellRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/checkboxRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/codeRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/columnheaderRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/comboboxRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/complementaryRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/contentinfoRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/definitionRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/deletionRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/dialogRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/directoryRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/documentRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/emphasisRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/feedRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/figureRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/formRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/genericRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/gridRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/gridcellRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/groupRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/headingRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/imgRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/insertionRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/linkRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/listRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/listboxRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/listitemRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/logRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/mainRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/markRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/marqueeRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/mathRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/menuRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/menubarRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/menuitemRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/menuitemcheckboxRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/menuitemradioRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/meterRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/navigationRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/noneRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/noteRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/optionRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/paragraphRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/presentationRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/progressbarRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/radioRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/radiogroupRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/regionRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/rowRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/rowgroupRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/rowheaderRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/scrollbarRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/searchRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/searchboxRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/separatorRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/sliderRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/spinbuttonRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/statusRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/strongRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/subscriptRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/superscriptRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/switchRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/tabRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/tableRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/tablistRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/tabpanelRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/termRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/textboxRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/timeRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/timerRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/toolbarRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/tooltipRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/treeRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/treegridRole.js","../../../node_modules/aria-query/lib/etc/roles/literal/treeitemRole.js","../../../node_modules/aria-query/lib/etc/roles/ariaLiteralRoles.js","../../../node_modules/aria-query/lib/etc/roles/dpub/docAbstractRole.js","../../../node_modules/aria-query/lib/etc/roles/dpub/docAcknowledgmentsRole.js","../../../node_modules/aria-query/lib/etc/roles/dpub/docAfterwordRole.js","../../../node_modules/aria-query/lib/etc/roles/dpub/docAppendixRole.js","../../../node_modules/aria-query/lib/etc/roles/dpub/docBacklinkRole.js","../../../node_modules/aria-query/lib/etc/roles/dpub/docBiblioentryRole.js","../../../node_modules/aria-query/lib/etc/roles/dpub/docBibliographyRole.js","../../../node_modules/aria-query/lib/etc/roles/dpub/docBibliorefRole.js","../../../node_modules/aria-query/lib/etc/roles/dpub/docChapterRole.js","../../../node_modules/aria-query/lib/etc/roles/dpub/docColophonRole.js","../../../node_modules/aria-query/lib/etc/roles/dpub/docConclusionRole.js","../../../node_modules/aria-query/lib/etc/roles/dpub/docCoverRole.js","../../../node_modules/aria-query/lib/etc/roles/dpub/docCreditRole.js","../../../node_modules/aria-query/lib/etc/roles/dpub/docCreditsRole.js","../../../node_modules/aria-query/lib/etc/roles/dpub/docDedicationRole.js","../../../node_modules/aria-query/lib/etc/roles/dpub/docEndnoteRole.js","../../../node_modules/aria-query/lib/etc/roles/dpub/docEndnotesRole.js","../../../node_modules/aria-query/lib/etc/roles/dpub/docEpigraphRole.js","../../../node_modules/aria-query/lib/etc/roles/dpub/docEpilogueRole.js","../../../node_modules/aria-query/lib/etc/roles/dpub/docErrataRole.js","../../../node_modules/aria-query/lib/etc/roles/dpub/docExampleRole.js","../../../node_modules/aria-query/lib/etc/roles/dpub/docFootnoteRole.js","../../../node_modules/aria-query/lib/etc/roles/dpub/docForewordRole.js","../../../node_modules/aria-query/lib/etc/roles/dpub/docGlossaryRole.js","../../../node_modules/aria-query/lib/etc/roles/dpub/docGlossrefRole.js","../../../node_modules/aria-query/lib/etc/roles/dpub/docIndexRole.js","../../../node_modules/aria-query/lib/etc/roles/dpub/docIntroductionRole.js","../../../node_modules/aria-query/lib/etc/roles/dpub/docNoterefRole.js","../../../node_modules/aria-query/lib/etc/roles/dpub/docNoticeRole.js","../../../node_modules/aria-query/lib/etc/roles/dpub/docPagebreakRole.js","../../../node_modules/aria-query/lib/etc/roles/dpub/docPagelistRole.js","../../../node_modules/aria-query/lib/etc/roles/dpub/docPartRole.js","../../../node_modules/aria-query/lib/etc/roles/dpub/docPrefaceRole.js","../../../node_modules/aria-query/lib/etc/roles/dpub/docPrologueRole.js","../../../node_modules/aria-query/lib/etc/roles/dpub/docPullquoteRole.js","../../../node_modules/aria-query/lib/etc/roles/dpub/docQnaRole.js","../../../node_modules/aria-query/lib/etc/roles/dpub/docSubtitleRole.js","../../../node_modules/aria-query/lib/etc/roles/dpub/docTipRole.js","../../../node_modules/aria-query/lib/etc/roles/dpub/docTocRole.js","../../../node_modules/aria-query/lib/etc/roles/ariaDpubRoles.js","../../../node_modules/aria-query/lib/etc/roles/graphics/graphicsDocumentRole.js","../../../node_modules/aria-query/lib/etc/roles/graphics/graphicsObjectRole.js","../../../node_modules/aria-query/lib/etc/roles/graphics/graphicsSymbolRole.js","../../../node_modules/aria-query/lib/etc/roles/ariaGraphicsRoles.js","../../../node_modules/aria-query/lib/rolesMap.js","../../../node_modules/dequal/lite/index.js","../../../node_modules/aria-query/lib/elementRoleMap.js","../../../node_modules/aria-query/lib/roleElementMap.js","../../../node_modules/aria-query/lib/index.js","../../../node_modules/lz-string/libs/lz-string.js","../../../node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js","../../../node_modules/@testing-library/react/dist/@testing-library/react.esm.js","../../../node_modules/@testing-library/user-event/dist/utils/click/getMouseEventOptions.js","../../../node_modules/@testing-library/user-event/dist/utils/misc/isElementType.js","../../../node_modules/@testing-library/user-event/dist/utils/click/isClickableInput.js","../../../node_modules/@testing-library/user-event/dist/utils/edit/buildTimeValue.js","../../../node_modules/@testing-library/user-event/dist/utils/edit/selectionRange.js","../../../node_modules/@testing-library/user-event/dist/utils/edit/isContentEditable.js","../../../node_modules/@testing-library/user-event/dist/utils/edit/getValue.js","../../../node_modules/@testing-library/user-event/dist/utils/edit/isValidDateValue.js","../../../node_modules/@testing-library/user-event/dist/utils/edit/isValidInputTimeValue.js","../../../node_modules/@testing-library/user-event/dist/utils/edit/calculateNewValue.js","../../../node_modules/@testing-library/user-event/dist/utils/edit/cursorPosition.js","../../../node_modules/@testing-library/user-event/dist/utils/edit/hasUnreliableEmptyValue.js","../../../node_modules/@testing-library/user-event/dist/utils/edit/isEditable.js","../../../node_modules/@testing-library/user-event/dist/utils/edit/maxLength.js","../../../node_modules/@testing-library/user-event/dist/utils/misc/isDisabled.js","../../../node_modules/@testing-library/user-event/dist/utils/focus/getActiveElement.js","../../../node_modules/@testing-library/user-event/dist/utils/misc/isLabelWithInternallyDisabledControl.js","../../../node_modules/@testing-library/user-event/dist/utils/focus/selector.js","../../../node_modules/@testing-library/user-event/dist/utils/focus/isFocusable.js","../../../node_modules/@testing-library/user-event/dist/utils/misc/eventWrapper.js","../../../node_modules/@testing-library/dom/dist/helpers.js","../../../node_modules/@testing-library/user-event/dist/utils/misc/isVisible.js","../../../node_modules/@testing-library/user-event/dist/utils/misc/isDocument.js","../../../node_modules/@testing-library/user-event/dist/utils/misc/wait.js","../../../node_modules/@testing-library/user-event/dist/utils/misc/hasPointerEvents.js","../../../node_modules/@testing-library/user-event/dist/utils/misc/hasFormSubmit.js","../../../node_modules/@testing-library/user-event/dist/utils/index.js","../../../node_modules/@testing-library/user-event/dist/hover.js","../../../node_modules/@testing-library/user-event/dist/blur.js","../../../node_modules/@testing-library/user-event/dist/focus.js","../../../node_modules/@testing-library/user-event/dist/click.js","../../../node_modules/@testing-library/user-event/dist/keyboard/getNextKeyDef.js","../../../node_modules/@testing-library/user-event/dist/keyboard/plugins/arrow.js","../../../node_modules/@testing-library/user-event/dist/keyboard/shared/carryValue.js","../../../node_modules/@testing-library/user-event/dist/keyboard/shared/fireChangeForInputTimeIfValid.js","../../../node_modules/@testing-library/user-event/dist/keyboard/shared/fireInputEvent.js","../../../node_modules/@testing-library/user-event/dist/keyboard/shared/index.js","../../../node_modules/@testing-library/user-event/dist/keyboard/plugins/control.js","../../../node_modules/@testing-library/user-event/dist/keyboard/plugins/character.js","../../../node_modules/@testing-library/user-event/dist/keyboard/getEventProps.js","../../../node_modules/@testing-library/user-event/dist/keyboard/plugins/functional.js","../../../node_modules/@testing-library/user-event/dist/keyboard/plugins/index.js","../../../node_modules/@testing-library/user-event/dist/keyboard/keyboardImplementation.js","../../../node_modules/@testing-library/user-event/dist/keyboard/types.js","../../../node_modules/@testing-library/user-event/dist/keyboard/keyMap.js","../../../node_modules/@testing-library/user-event/dist/keyboard/specialCharMap.js","../../../node_modules/@testing-library/user-event/dist/keyboard/index.js","../../../node_modules/@testing-library/user-event/dist/type/typeImplementation.js","../../../node_modules/@testing-library/user-event/dist/type/index.js","../../../node_modules/@testing-library/user-event/dist/clear.js","../../../node_modules/@testing-library/user-event/dist/tab.js","../../../node_modules/@testing-library/user-event/dist/upload.js","../../../node_modules/@testing-library/user-event/dist/select-options.js","../../../node_modules/@testing-library/user-event/dist/paste.js","../../../node_modules/@testing-library/user-event/dist/index.js","../../payment-page/src/utilities/TestTools/StandardMethods.ts","../../payment-page/src/features/Invoices/InvoiceItem.tsx","../../payment-page/src/features/Invoices/InvoiceGrid.tsx","../../payment-page/src/utilities/Filtering.ts","../../../node_modules/decimal.js-light/decimal.mjs","../../payment-page/src/utilities/FinanceArithmetic.ts","../../payment-page/src/features/Invoices/invoiceHelpers.tsx","../../payment-page/src/features/PaymentMethodForm/FinanceDisclaimer.tsx","../../payment-page/src/features/PaymentMethodForm/PaymentDisclaimer.tsx","../../payment-page/src/features/PaymentMethodForm/PaymentFormErrors.tsx","../../payment-page/src/features/PaymentMethodForm/PaymentTypeHeader.tsx","../../payment-page/src/components/Icons/CreditCardIcons.ts","../../payment-page/src/features/PaymentMethodForm/PayerToken.tsx","../../payment-page/src/features/PaymentMethodForm/SavedPayerTokens.tsx","../../payment-page/src/features/PaymentInfo/PaymentInfo.tsx","../../payment-page/src/features/AutoPayPaylessEnrollmentPage/AutoPayPaylessEnrollmentPage.tsx","../../payment-page/src/features/Invoices/AutopayPaylessEnrollment.tsx","../../payment-page/src/features/Invoices/InvoiceConstants.ts","../../payment-page/src/features/Invoices/MobileInvoiceSort.tsx","../../payment-page/src/components/Divider/Divider.tsx","../../payment-page/src/features/Invoices/InvoiceHeaderControls.tsx","../../payment-page/src/features/Invoices/InvoiceSummary.tsx","../../payment-page/src/features/AutoPay/AutoPayInfo.tsx","../../payment-page/src/features/Invoices/InvoicesContainer.tsx","../../payment-page/src/features/Invoices/Models/InvoiceTypes.ts","../../payment-page/src/components/Table/Table.tsx","../../payment-page/src/components/Table/TableBody.tsx","../../payment-page/src/components/Table/TableData.tsx","../../payment-page/src/components/Table/TableRow.tsx","../../payment-page/src/features/ManagedInvoice/BreakdownSection.tsx","../../payment-page/src/features/ManagedInvoice/PremiumBreakdownModal.tsx","../../payment-page/src/features/ManagedInvoice/ManagedInvoice.tsx","../../payment-page/src/features/PayerFees/usePayerFees.ts","../../payment-page/src/features/PaymentMethodForm/CustomFields.tsx","../../payment-page/src/features/PremiumFinanceAgreement/FinanceAutopay.tsx","../../payment-page/src/utilities/PhoneNumber.ts","../../payment-page/src/features/PremiumFinanceAgreement/PremiumFinanceAgreement.tsx","../../payment-page/src/features/PremiumFinanceAgreement/FinanceDetails.tsx","../../payment-page/src/components/DateInput/DateInput.tsx","../../payment-page/src/features/RecurringPaymentsForm/RecurringPaymentsForm.tsx","../../payment-page/src/features/SubmitPayment/SubmitInvoicePayment.ts","../../payment-page/src/features/SubmitPayment/SubmitPayment.ts","../../payment-page/src/hooks/useReCaptcha.ts","../../payment-page/src/utilities/ViewTransition.ts","../../payment-page/src/pages/PaymentPage.tsx","../../payment-page/src/pages/PaymentPageRoot.tsx","../../payment-page/src/pages/PaymentPageApp.tsx"],"sourcesContent":["import{useRef as r,useEffect as n,useMemo as t,useReducer as e,useCallback as u}from\"react\";function c(e,u,c){var i=this,a=r(null),o=r(0),f=r(null),l=r([]),v=r(),m=r(),d=r(e),g=r(!0);d.current=e;var p=\"undefined\"!=typeof window,w=!u&&0!==u&&p;if(\"function\"!=typeof e)throw new TypeError(\"Expected a function\");u=+u||0;var s=!!(c=c||{}).leading,x=!(\"trailing\"in c)||!!c.trailing,h=\"maxWait\"in c,y=\"debounceOnServer\"in c&&!!c.debounceOnServer,F=h?Math.max(+c.maxWait||0,u):null;n(function(){return g.current=!0,function(){g.current=!1}},[]);var A=t(function(){var r=function(r){var n=l.current,t=v.current;return l.current=v.current=null,o.current=r,m.current=d.current.apply(t,n)},n=function(r,n){w&&cancelAnimationFrame(f.current),f.current=w?requestAnimationFrame(r):setTimeout(r,n)},t=function(r){if(!g.current)return!1;var n=r-a.current;return!a.current||n>=u||n<0||h&&r-o.current>=F},e=function(n){return f.current=null,x&&l.current?r(n):(l.current=v.current=null,m.current)},c=function r(){var c=Date.now();if(t(c))return e(c);if(g.current){var i=u-(c-a.current),f=h?Math.min(i,F-(c-o.current)):i;n(r,f)}},A=function(){if(p||y){var e=Date.now(),d=t(e);if(l.current=[].slice.call(arguments),v.current=i,a.current=e,d){if(!f.current&&g.current)return o.current=a.current,n(c,u),s?r(a.current):m.current;if(h)return n(c,u),r(a.current)}return f.current||n(c,u),m.current}};return A.cancel=function(){f.current&&(w?cancelAnimationFrame(f.current):clearTimeout(f.current)),o.current=0,l.current=a.current=v.current=f.current=null},A.isPending=function(){return!!f.current},A.flush=function(){return f.current?e(Date.now()):m.current},A},[s,h,u,F,x,w,p,y]);return A}function i(r,n){return r===n}function a(r,n){return n}function o(n,t,o){var f=o&&o.equalityFn||i,l=e(a,n),v=l[0],m=l[1],d=c(u(function(r){return m(r)},[m]),t,o),g=r(n);return f(g.current,n)||(d(n),g.current=n),[v,d]}function f(r,n,t){var e=void 0===t?{}:t,u=e.leading,i=e.trailing;return c(r,n,{maxWait:n,leading:void 0===u||u,trailing:void 0===i||i})}export{o as useDebounce,c as useDebouncedCallback,f as useThrottledCallback};\n//# sourceMappingURL=index.module.js.map\n","export enum CollapsibleState {\r\n open = \"open\",\r\n closed = \"closed\",\r\n}\r\n","import \"./collapsible.css\";\r\nimport { ReactNode, useId, useState } from \"react\";\r\nimport { CollapsibleState } from \"./CollapsibleState\";\r\nimport Icon from \"#components/Icons/Icon\";\r\n\r\ninterface CollapsibleProps {\r\n className?: string;\r\n title: ReactNode;\r\n subtitle?: ReactNode;\r\n children: ReactNode;\r\n state?: CollapsibleState;\r\n defaultState?: CollapsibleState;\r\n onStateChange?: (newState: CollapsibleState) => void;\r\n label?: string;\r\n disabled?: boolean;\r\n hideHeader?: boolean;\r\n}\r\n\r\n/**\r\n * Creates an independent collapsible section\r\n *\r\n * reference for accessability {@link https://www.w3.org/WAI/ARIA/apg/patterns/accordion/examples/accordion/}\r\n *\r\n * @param {string} className - A class name to be passed through.\r\n * @param {ReactNode} title - the title for this section. Should not contain any items that can gain focus.\r\n * @param {ReactNode} subtitle - optional - the subtitle for this section. Renders under the title.\r\n * @param {ReactNode} children - the contents of the section to be collapsed\r\n * @param {CollapsibleState} state - optional - overrides the internal state\r\n * @param {CollapsibleState} defaultState - optional - the starting internal state, Defaults to open\r\n * @param {function} onStateChange - optional - notifies the opening and closing of the section\r\n * @param {string} label - optional - aria label for the button\r\n * @param {boolean} disabled - optional - disables the collapsible\r\n * @param {boolean} hideHeader - optional - stops the header from rendering\r\n */\r\nexport const Collapsible = ({\r\n className,\r\n title,\r\n subtitle,\r\n state,\r\n defaultState,\r\n onStateChange,\r\n children,\r\n label,\r\n hideHeader,\r\n disabled = false,\r\n}: CollapsibleProps) => {\r\n const identifier = useId();\r\n const [internalState, setInternalState] = useState<CollapsibleState>(\r\n defaultState ?? CollapsibleState.open\r\n );\r\n\r\n const currentState = state ?? internalState;\r\n\r\n const setState = (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {\r\n e.preventDefault();\r\n\r\n if (disabled) {\r\n return;\r\n }\r\n\r\n const newValue =\r\n CollapsibleState.open === currentState ? CollapsibleState.closed : CollapsibleState.open;\r\n setInternalState(newValue);\r\n onStateChange?.(newValue);\r\n };\r\n\r\n // a button is used for the header since it can take focus and has a tab order\r\n // this allows for accessibility stuff to magically happen for the expanding of the section\r\n return (\r\n <div\r\n className={`collapsible-container ${CollapsibleState.open === currentState ? \"expanded\" : \"collapsed\"} ${disabled ? \"disabled\" : \"\"} ${className ? className : \"\"}`}\r\n id={identifier}\r\n >\r\n {!hideHeader ? (\r\n <div className=\"collapsible-header\">\r\n <button\r\n aria-label={label}\r\n className=\"clickable\"\r\n onClick={(e) => {\r\n setState(e);\r\n }}\r\n aria-controls={`content-${identifier}`}\r\n aria-labelledby={`label-${identifier}`}\r\n aria-expanded={CollapsibleState.open === currentState ? \"true\" : \"false\"}\r\n aria-disabled={disabled ? \"true\" : \"false\"}\r\n id={`header-${identifier}`}\r\n >\r\n <h3 className=\"collapsible-title\" id={`label-${identifier}`}>\r\n {title}\r\n </h3>\r\n <Icon\r\n className=\"collapsible-icon\"\r\n toolTip=\"click to toggle this section open and closed\"\r\n >\r\n expand_more\r\n </Icon>\r\n </button>\r\n {subtitle ? <div className=\"collapsible-subtitle\">{subtitle}</div> : null}\r\n </div>\r\n ) : null}\r\n {CollapsibleState.open === currentState && (\r\n <div\r\n className=\"collapsible-content\"\r\n role=\"region\"\r\n aria-labelledby={`header-${identifier}`}\r\n id={`content-${identifier}`}\r\n >\r\n {children}\r\n </div>\r\n )}\r\n </div>\r\n );\r\n};\r\n","/**\r\n * A regex for validating currency\r\n */\r\nconst currencyPattern: RegExp = /^-?\\d{0,8}\\.?\\d{0,2}$/;\r\n\r\n/**\r\n * Does a given value look like currency\r\n *\r\n * @param {string|number} value the value to check to see if it looks like currency\r\n * @returns boolean\r\n */\r\nexport const looksLikeCurrency = (value: string | number) => currencyPattern.test(`${value}`);\r\n\r\n/**\r\n * given a numeric string or a number, format to two decimal places\r\n *\r\n * @param {string|number} value the value to format\r\n * @returns string\r\n */\r\nexport const formatWithTwoDecimals = (value: string | number) => {\r\n const valueAsNumber = Number(value);\r\n\r\n return valueAsNumber.toFixed(2);\r\n};\r\n\r\nexport const validateCurrency = (fieldValue: number | string, credit: boolean = false) => {\r\n if (!fieldValue) {\r\n return true;\r\n }\r\n\r\n let forceToNumber: number = 0;\r\n if (typeof fieldValue === \"string\") {\r\n forceToNumber = parseFloat(fieldValue);\r\n } else {\r\n forceToNumber = fieldValue as number;\r\n }\r\n\r\n if (isNaN(forceToNumber)) {\r\n return `Amount '${fieldValue}' is invalid.`;\r\n }\r\n\r\n if (credit && forceToNumber > -0.01) {\r\n return \"Amount must be less than zero.\";\r\n } else if (!credit && forceToNumber < 0.01) {\r\n return \"Amount must be greater than zero.\";\r\n }\r\n\r\n if (Math.abs(forceToNumber) > 10000000) {\r\n return `Amount must be ${credit ? \"more\" : \"less\"} than ${credit ? \"-\" : \"\"}10,000,000.`;\r\n }\r\n\r\n if (!looksLikeCurrency(fieldValue)) {\r\n return `Amount '${fieldValue}' is invalid.`;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nexport const validatePositiveCurrency = (fieldValue: number | string) =>\r\n validateCurrency(fieldValue, false);\r\n","import \"./currencyField.css\";\r\nimport React, { ReactNode, useEffect, useRef, useState } from \"react\";\r\nimport { ControllerRenderProps, FieldError } from \"react-hook-form\";\r\nimport { formatWithTwoDecimals, looksLikeCurrency } from \"#components/CurrencyField/currencyUtils\";\r\nimport Icon from \"#components/Icons/Icon\";\r\nimport { InputWrapper } from \"#components/Shared/InputWrapper\";\r\nimport { errorFormatter } from \"#components/Shared/InputWrapperUtil\";\r\n\r\ninterface CurrencyProps extends React.HTMLProps<HTMLInputElement> {\r\n label: string;\r\n labelHidden?: boolean;\r\n triggerValidation?: (name) => void;\r\n error?: FieldError;\r\n tooltipContent?: ReactNode;\r\n icon?: ReactNode;\r\n onChange: ControllerRenderProps[\"onChange\"];\r\n onMount?: () => void;\r\n}\r\n\r\n/**\r\n * Currency input field - must be a controlled field\r\n * to prevent typing bad values\r\n */\r\nexport const CurrencyField = React.forwardRef<HTMLInputElement, CurrencyProps>(\r\n (\r\n {\r\n label,\r\n labelHidden,\r\n error,\r\n tooltipContent,\r\n onChange,\r\n onBlur,\r\n onMount,\r\n name,\r\n triggerValidation,\r\n value,\r\n className,\r\n icon,\r\n ...props\r\n }: CurrencyProps,\r\n ref\r\n ) => {\r\n // to handle a bad default value, we initialize interval value to an empty string if\r\n // it's an invalid value and then only update if user types a valid value\r\n const [internalValue, setInternalValue] = useState<string>(\r\n formatWithTwoDecimals(looksLikeCurrency(value as string) ? (value as string) : \"\")\r\n );\r\n\r\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\r\n // only allow the change to go through if the value matches the pattern\r\n if (looksLikeCurrency(e.target.value)) {\r\n onChange(Number(e.target.value));\r\n setInternalValue(e.target.value);\r\n // easiest way to trigger validation onChange for a single field\r\n triggerValidation?.(name);\r\n }\r\n };\r\n\r\n const onMountRef = useRef(onMount);\r\n useEffect(() => {\r\n onMountRef.current?.();\r\n }, []);\r\n\r\n // make sure the value is formatted correctly\r\n const handleBlur = (event: React.FocusEvent<HTMLInputElement, Element>): void => {\r\n const intVal = formatWithTwoDecimals(internalValue);\r\n if (internalValue !== intVal) {\r\n setInternalValue(intVal);\r\n }\r\n\r\n onBlur?.(event);\r\n };\r\n\r\n return (\r\n <InputWrapper\r\n name={name}\r\n label={label}\r\n labelHidden={labelHidden}\r\n fieldType=\"currency-field\"\r\n className={className}\r\n style={props.style}\r\n error={error}\r\n tooltipContent={tooltipContent}\r\n >\r\n <div className=\"currency-symbol\">\r\n <Icon>attach_money</Icon>\r\n </div>\r\n <input\r\n inputMode=\"decimal\"\r\n ref={ref}\r\n id={name}\r\n name={name}\r\n placeholder={props.placeholder ? props.placeholder : label}\r\n aria-invalid={error?.message ? \"true\" : \"false\"}\r\n aria-describedby={errorFormatter(name, error)}\r\n disabled={props.disabled}\r\n value={internalValue}\r\n onChange={handleChange}\r\n onBlur={handleBlur}\r\n {...props}\r\n />\r\n {icon && <div className={`input-icon ${error ? \"error\" : \"\"}`}>{icon}</div>}\r\n </InputWrapper>\r\n );\r\n }\r\n);\r\n","export const defaultIcon = \"description_outline\";\r\n\r\nexport const iconMap = {\r\n \".pdf\": \"picture_as_pdf\",\r\n \".png\": \"image\",\r\n \".jpg\": \"image\",\r\n \".jpeg\": \"image\",\r\n \".zip\": \"folder_zip\",\r\n \".csv\": \"grid_on\",\r\n \".doc\": defaultIcon,\r\n \".docx\": defaultIcon,\r\n \".xlsx\": \"grid_on\",\r\n};\r\n","export const FileExtension = (filename?: string) => {\r\n if (!filename) {\r\n return null;\r\n }\r\n\r\n const lastIndex = filename.lastIndexOf(\".\");\r\n if (lastIndex === -1) {\r\n return null;\r\n }\r\n\r\n return filename.slice(lastIndex).toLowerCase();\r\n};\r\n","import { defaultIcon, iconMap } from \"./FileIconTypes\";\r\nimport Icon from \"#components/Icons/Icon\";\r\nimport { FileExtension } from \"#utilities/FilenameTools\";\r\n\r\ninterface FileIconProps {\r\n filename: string;\r\n className?: string;\r\n}\r\n\r\nexport const FileIcon = ({ filename, className }: FileIconProps) => {\r\n const extension = FileExtension(filename);\r\n let iconName = defaultIcon;\r\n if (iconMap[extension]) {\r\n iconName = iconMap[extension];\r\n }\r\n\r\n return <Icon className={className}>{iconName}</Icon>;\r\n};\r\n","import { useRef, useState } from \"react\";\r\nimport { FileIcon } from \"./FileIcons\";\r\nimport { iconMap } from \"./FileIconTypes\";\r\nimport { IconButton } from \"#components/Button/IconButton\";\r\nimport {\r\n ClientOnlyFileModel,\r\n FileAttachmentStatus,\r\n FileModel,\r\n} from \"#features/PaymentMethodForm/PaymentInfoModel\";\r\nimport { useOnFirstRender } from \"#hooks/useOnFirstRender\";\r\nimport { ApiClient } from \"#utilities/ApiClient\";\r\nimport { cx } from \"#utilities/cx\";\r\nimport { FileExtension } from \"#utilities/FilenameTools\";\r\nimport { getPageData } from \"#utilities/GetPageData\";\r\n\r\nconst maxUploadSize = 10485760; /* 10MB */\r\n\r\ninterface FileUploadItemProps {\r\n fileItem: ClientOnlyFileModel;\r\n updateFileStatus: (fileItem: ClientOnlyFileModel) => void;\r\n removeFile: (fileItem: ClientOnlyFileModel) => void;\r\n}\r\n\r\nexport const FileUploadItem = ({ fileItem, updateFileStatus, removeFile }: FileUploadItemProps) => {\r\n const xhrRef = useRef<XMLHttpRequest>(null);\r\n const [percentComplete, setPercentComplete] = useState<number>(fileItem.Id ? 100 : -1);\r\n const [status, setStatus] = useState<FileAttachmentStatus>(\r\n fileItem.status || (fileItem.Id ? FileAttachmentStatus.complete : FileAttachmentStatus.pending)\r\n );\r\n const [errorMessage, setErrorMessage] = useState<string>(\"\");\r\n const [deleteEnabled, setDeleteEnabled] = useState<boolean>(true);\r\n\r\n const isComplete = () => {\r\n return (\r\n fileItem.Id ||\r\n status === FileAttachmentStatus.complete ||\r\n status === FileAttachmentStatus.error\r\n );\r\n };\r\n\r\n const handleError = (statusCode: number) => {\r\n let errorMsg = \"\";\r\n switch (statusCode) {\r\n case 413:\r\n errorMsg = \"File is too large.\";\r\n break;\r\n case 414:\r\n errorMsg = \"File name is too long.\";\r\n break;\r\n case 415:\r\n errorMsg = \"File type is not supported.\";\r\n break;\r\n case 500:\r\n default:\r\n errorMsg = \"There was an issue uploading the file.\";\r\n break;\r\n }\r\n\r\n setPercentComplete(-1);\r\n setStatus(FileAttachmentStatus.error);\r\n setErrorMessage(errorMsg);\r\n updateFileStatus({ ...fileItem, status: FileAttachmentStatus.error, file: null });\r\n };\r\n\r\n const handleProgressUpdate = (event: ProgressEvent<EventTarget>): void =>\r\n setPercentComplete(Math.round((event.loaded * 100) / event.total));\r\n\r\n const handleComplete = (response: FileModel) => {\r\n setPercentComplete(100);\r\n setStatus(FileAttachmentStatus.complete);\r\n updateFileStatus({\r\n uid: fileItem.uid,\r\n file: null,\r\n status: FileAttachmentStatus.complete,\r\n ...response,\r\n });\r\n };\r\n\r\n const onUploadcomplete = () => {\r\n const xhr = xhrRef.current;\r\n if (xhr.status === 200) {\r\n if (xhr.response) {\r\n handleComplete(xhr.response[0] as FileModel);\r\n }\r\n } else {\r\n handleError(xhr.status);\r\n }\r\n };\r\n\r\n const uploadFile = () => {\r\n const extention = FileExtension(fileItem.file.name);\r\n if (!iconMap[extention]) {\r\n // unsupported type\r\n handleError(415);\r\n return;\r\n }\r\n\r\n if (fileItem?.FileSize > maxUploadSize) {\r\n handleError(413);\r\n return;\r\n }\r\n\r\n setStatus(FileAttachmentStatus.uploading);\r\n setPercentComplete(0);\r\n\r\n const xhr = new XMLHttpRequest();\r\n xhr.responseType = \"json\";\r\n xhr.upload.onprogress = (event) => handleProgressUpdate(event);\r\n xhr.onloadend = onUploadcomplete;\r\n xhr.open(\"POST\", `${getPageData().ApiBaseUrl}Attachments/Upload`);\r\n xhr.onreadystatechange = () => {\r\n if (xhr.readyState === XMLHttpRequest.DONE && xhr.responseURL.includes(\"/Error\")) {\r\n handleError(500);\r\n }\r\n };\r\n\r\n const fileData = new FormData();\r\n fileData.append(\"file\", fileItem.file);\r\n\r\n xhr.send(fileData);\r\n xhrRef.current = xhr;\r\n };\r\n\r\n useOnFirstRender(() => {\r\n // only attempt to upload a file if it isn't already uploaded\r\n if (!fileItem.Id) {\r\n uploadFile();\r\n }\r\n });\r\n\r\n // if we don't do this then we will get a pointer to the 'updateFileStatus' function from the parent\r\n // without an updated version of the state and everything will just go sideways. Update the pointer\r\n // on the xhr with every re-render\r\n if (xhrRef.current) {\r\n xhrRef.current.onloadend = onUploadcomplete;\r\n }\r\n\r\n const handleUploadDelete = async () => {\r\n setDeleteEnabled(false);\r\n if (fileItem.Id) {\r\n // this is a fire and forget since there is nothing the user can do\r\n // about it failing. Because of this, don't awit this call.\r\n ApiClient.post(\"Attachments/Remove\", { id: fileItem.Id });\r\n }\r\n removeFile(fileItem);\r\n };\r\n\r\n return (\r\n <div\r\n className={cx(\r\n \"file-upload-item\",\r\n isComplete() ? \"complete\" : \"in-progress\",\r\n status === FileAttachmentStatus.error && \"has-error\"\r\n )}\r\n >\r\n <div className=\"file-header\">\r\n <FileIcon filename={fileItem.Name} className=\"file-icon\" />\r\n <span className=\"file-name\" title={fileItem.Name}>\r\n {fileItem.Name}\r\n </span>\r\n {(isComplete() || fileItem.Id) && (\r\n <IconButton\r\n className={cx(\"file-delete\", !deleteEnabled && \"spin-icon\")}\r\n iconName={deleteEnabled ? \"cancel\" : \"sync\"}\r\n title={deleteEnabled ? \"remove this upload\" : \"deleting this upload.\"}\r\n onClick={handleUploadDelete}\r\n disabled={!deleteEnabled}\r\n name=\"file-delete\"\r\n />\r\n )}\r\n </div>\r\n {!isComplete() && (\r\n <div>\r\n <progress title={`${percentComplete}%`} value={percentComplete} max=\"100\" />\r\n </div>\r\n )}\r\n {status === FileAttachmentStatus.error && errorMessage && (\r\n <div className=\"error-text\" id={`error-${fileItem.Id}`} role=\"alert\">\r\n {errorMessage}\r\n </div>\r\n )}\r\n </div>\r\n );\r\n};\r\n","import \"./FileAttachments.css\";\r\nimport { useRef, useState } from \"react\";\r\nimport { FieldError, useFormContext } from \"react-hook-form\";\r\nimport { FileUploadItem } from \"./FileUploadItem\";\r\nimport Icon from \"#components/Icons/Icon\";\r\nimport { InputError } from \"#components/Shared/InputError\";\r\nimport { useToast } from \"#context/Toaster\";\r\nimport {\r\n ClientOnlyFileModel,\r\n FileAttachmentStatus,\r\n PaymentPageFormValues,\r\n} from \"#features/PaymentMethodForm/PaymentInfoModel\";\r\nimport { useOnFirstRender } from \"#hooks/useOnFirstRender\";\r\nimport { cx } from \"#utilities/cx\";\r\n\r\n// make it easier for testing to be able to set a much smaller max upload number\r\ninterface Props {\r\n maxFileUploadCount?: number;\r\n}\r\n\r\nexport const FileAttachments = ({ maxFileUploadCount = 50 }: Props) => {\r\n const formContext = useFormContext<PaymentPageFormValues>();\r\n const { clearToast, setErrorToast } = useToast();\r\n const [dropZoneActive, setDropZoneActive] = useState<boolean>(false);\r\n const fileDropRoot = useRef<HTMLDivElement>(null);\r\n const fileList = formContext.watch(\"fileModels\");\r\n const fileModelsError = formContext.formState.errors[\"fileModels\"] as FieldError;\r\n\r\n const handleFileUpload = (files: FileList): void => {\r\n clearToast();\r\n\r\n // check to see if this puts us over the upload limit\r\n if (fileList.size + files.length > maxFileUploadCount) {\r\n setErrorToast(\r\n `Attempting to attach too many files. Maximum ${maxFileUploadCount} files can be attached.`\r\n );\r\n return;\r\n }\r\n\r\n // loop over the attached files\r\n const updatedFileList = new Map([...fileList]);\r\n\r\n for (const file of files) {\r\n const newFileToUpload: ClientOnlyFileModel = {\r\n Name: file.name,\r\n FileSize: file.size,\r\n uid: crypto.randomUUID(),\r\n file: file,\r\n status: FileAttachmentStatus.pending,\r\n };\r\n\r\n updatedFileList.set(newFileToUpload.uid, newFileToUpload);\r\n }\r\n\r\n formContext.setValue(\"fileModels\", updatedFileList, {\r\n shouldValidate: formContext.formState.isSubmitted,\r\n });\r\n };\r\n\r\n const handleFileSelection = (event: React.ChangeEvent<HTMLInputElement>): void => {\r\n if (event.target.files) {\r\n handleFileUpload(event.target.files);\r\n }\r\n\r\n // need to clear the file input otherwise\r\n // if you upload X then delete it then try and upload X again - nothing will happen since the input didn't change\r\n event.target.value = \"\";\r\n };\r\n\r\n const updateFileStatus = (fileItem: ClientOnlyFileModel) => {\r\n const updatedFileList = new Map([...fileList]);\r\n if (updatedFileList.has(fileItem.uid)) {\r\n updatedFileList.set(fileItem.uid, {\r\n ...updatedFileList[fileItem.uid],\r\n ...fileItem,\r\n });\r\n formContext.setValue(\"fileModels\", updatedFileList, {\r\n shouldValidate: formContext.formState.isSubmitted,\r\n });\r\n }\r\n };\r\n\r\n const removeFile = (fileItem: ClientOnlyFileModel) => {\r\n const updatedFileList = new Map([...fileList]);\r\n updatedFileList.delete(fileItem.uid);\r\n formContext.setValue(\"fileModels\", updatedFileList, {\r\n shouldValidate: formContext.formState.isSubmitted,\r\n });\r\n };\r\n\r\n useOnFirstRender(() => {\r\n formContext.register(\"fileModels\", {\r\n validate: {\r\n validateUploads: (files) => {\r\n const allFilesUploaded = Array.from(files.values());\r\n\r\n // if we do have uploads then lets see if any have no ids and are pending\r\n if (allFilesUploaded.find((f) => !f.Id && f.status === FileAttachmentStatus.pending)) {\r\n // at least 1 upload is still in progress\r\n return \"Please wait for the uploads to complete before completing the payment.\";\r\n }\r\n\r\n if (allFilesUploaded.length > maxFileUploadCount) {\r\n return `Too many files attached. Maximum ${maxFileUploadCount} files can be attached.`;\r\n }\r\n\r\n return true;\r\n },\r\n },\r\n });\r\n });\r\n\r\n const stopBaseEventAction = (event: React.DragEvent<HTMLDivElement>) => {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n };\r\n\r\n const showDropZone = (event: React.DragEvent<HTMLDivElement>): void => {\r\n stopBaseEventAction(event);\r\n setDropZoneActive(true);\r\n };\r\n\r\n const hideDropZone = (event: React.DragEvent<HTMLDivElement>): void => {\r\n stopBaseEventAction(event);\r\n\r\n // - we will get leaving events for every element we leave. So when the drop\r\n // zone first appears, we are leaving the header node (or where ever the user entered from)\r\n // and if we are in the drop zone but over the text, then when we leave it is\r\n // the text node we are leaving.\r\n //\r\n // - we only care if we are leaving the drop zone or one of it's children\r\n // and just ignore all of the other drop events out there\r\n const leavingTheNode = event.target as HTMLElement;\r\n if (fileDropRoot.current === leavingTheNode || fileDropRoot.current.contains(leavingTheNode)) {\r\n setDropZoneActive(false);\r\n }\r\n };\r\n\r\n const filesDropped = (event: React.DragEvent<HTMLDivElement>): void => {\r\n stopBaseEventAction(event);\r\n\r\n setDropZoneActive(false);\r\n if (event.dataTransfer?.files) {\r\n handleFileUpload(event.dataTransfer?.files);\r\n }\r\n };\r\n\r\n return (\r\n <div\r\n className=\"file-attachments\"\r\n onDragEnter={showDropZone}\r\n onDragOver={showDropZone}\r\n onDragLeave={hideDropZone}\r\n onDrop={filesDropped}\r\n >\r\n <div className={cx(\"drop-zone\", dropZoneActive && \"active\")} ref={fileDropRoot}>\r\n <div>Drop Files Here</div>\r\n </div>\r\n <div className=\"header\">\r\n <h3 className=\"text\">Attachments</h3>\r\n <div>\r\n <label htmlFor=\"file-up\" className=\"button outline\" aria-label=\"Upload Documents\">\r\n <Icon>file_upload</Icon>\r\n <span className=\"upload-text\">Upload Documents</span>\r\n {/* \r\n - If the accept list changes then make sure to change:\r\n epay3.Common.Configuration.AttachmentWhitelist.WhitelistedAttachmentFileExtensions \r\n */}\r\n <input\r\n type=\"file\"\r\n className=\"visually-hidden\"\r\n id=\"file-up\"\r\n name=\"file-up\"\r\n accept=\".pdf,.csv,.png,.jpg,.jpeg,.doc,.docx,.zip,.xlsx\"\r\n multiple={true}\r\n onChange={handleFileSelection}\r\n />\r\n </label>\r\n </div>\r\n </div>\r\n <InputError error={fileModelsError} name=\"fileModels\" className=\"big-error\" />\r\n <div className=\"uploads\">\r\n {fileList.size === 0 && <div>No Attachment Uploaded</div>}\r\n {[...fileList].map(([key, fileItem]) => (\r\n <FileUploadItem\r\n fileItem={fileItem}\r\n key={key}\r\n updateFileStatus={updateFileStatus}\r\n removeFile={removeFile}\r\n />\r\n ))}\r\n </div>\r\n </div>\r\n );\r\n};\r\n","import \"./textareaField.css\";\r\nimport React, { forwardRef, ReactNode } from \"react\";\r\nimport { FieldErrors, get } from \"react-hook-form\";\r\nimport { BasicError } from \"#components/Shared/BasicError\";\r\n\r\ninterface TextareaFieldProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {\r\n label?: string;\r\n errors?: FieldErrors;\r\n tooltipContent?: ReactNode;\r\n}\r\n\r\nexport const TextareaField = forwardRef<HTMLTextAreaElement, TextareaFieldProps>(\r\n (\r\n { label, name, errors, className, style, rows = 1, onKeyUp, ...props }: TextareaFieldProps,\r\n ref\r\n ) => {\r\n const errorMessage = get(errors, name)?.message;\r\n const hasError = !!errorMessage;\r\n\r\n // handle the stretching of the textarea.\r\n // inputs/textareas will resize nicely for width but not for height\r\n const handleOnKeyUp = (onKeyUpEvent?: React.KeyboardEvent<HTMLTextAreaElement>) => {\r\n const ta = onKeyUpEvent.target as HTMLTextAreaElement;\r\n\r\n // we don't want to keep auto reszing forever - auto-resize to a max of 500 px\r\n if (ta.scrollHeight > ta.clientHeight && ta.clientHeight < 500) {\r\n ta.style.height = `${ta.scrollHeight}px`;\r\n }\r\n\r\n onKeyUp?.(onKeyUpEvent);\r\n };\r\n\r\n return (\r\n <div\r\n className={`form-input textarea-input ${hasError ? \"error\" : \"\"} ${className ? className : \"\"}`}\r\n style={style}\r\n >\r\n <div className=\"textarea-field\">\r\n <textarea\r\n name={name}\r\n id={name}\r\n ref={ref}\r\n aria-invalid={errorMessage ? \"true\" : \"false\"}\r\n aria-describedby={`error-${errorMessage}`}\r\n rows={rows}\r\n onKeyUp={handleOnKeyUp}\r\n {...props}\r\n />\r\n <label htmlFor={name} className=\"text-label\">\r\n {label}\r\n </label>\r\n </div>\r\n {hasError && <BasicError error={errorMessage} name={name} />}\r\n </div>\r\n );\r\n }\r\n);\r\n","import { FieldNamesMarkedBoolean } from \"react-hook-form\";\r\nimport { PaymentPageFormValues } from \"#features/PaymentMethodForm/PaymentInfoModel\";\r\n\r\nexport enum PaymentFlow {\r\n Manual,\r\n AutoPay,\r\n}\r\n\r\nexport type DirtyFields = Partial<FieldNamesMarkedBoolean<PaymentPageFormValues>>;\r\n","import { DirtyFields } from \"./PaymentInfo.types\";\r\n\r\nexport const hasEnteredPaymentDetails = (dirtyFields: DirtyFields): boolean =>\r\n !!dirtyFields.cardAccountHolder ||\r\n !!dirtyFields.cardNumber ||\r\n !!dirtyFields.validThrough ||\r\n !!dirtyFields.cvc ||\r\n !!dirtyFields.bankAccountHolder ||\r\n !!dirtyFields.routingNumber ||\r\n !!dirtyFields.accountNumber ||\r\n !!dirtyFields.confirmAccountNumber;\r\n","import ReCAPTCHA from \"react-google-recaptcha\";\r\nimport { FieldErrors, useFormContext, UseFormRegister, UseFormSetValue } from \"react-hook-form\";\r\nimport { BasicError } from \"#components/Shared/BasicError\";\r\nimport { PaymentPageFormValues } from \"#features/PaymentMethodForm/PaymentInfoModel\";\r\n\r\nexport interface ReCaptchaProps {\r\n register: UseFormRegister<PaymentPageFormValues>;\r\n errors: FieldErrors<PaymentPageFormValues>;\r\n setValue: UseFormSetValue<PaymentPageFormValues>;\r\n recaptchaKey: string;\r\n}\r\n\r\nexport const ReCaptcha = ({ recaptchaKey, register, errors, setValue }: ReCaptchaProps) => {\r\n const formContext = useFormContext<PaymentPageFormValues>();\r\n return (\r\n <div className={`std-component-space recaptcha ${errors[\"reCaptchaToken\"] ? \"error\" : \"\"}`}>\r\n <ReCAPTCHA\r\n sitekey={recaptchaKey}\r\n onChange={(token: string) => {\r\n setValue(\"reCaptchaToken\", token, { shouldValidate: formContext.formState.isSubmitted });\r\n }}\r\n />\r\n <input\r\n type=\"hidden\"\r\n name=\"reCaptchaToken\"\r\n {...register(\"reCaptchaToken\", {\r\n required: \"Please complete the reCaptcha\",\r\n })}\r\n />\r\n {errors[\"reCaptchaToken\"] && (\r\n <BasicError error={errors[\"reCaptchaToken\"]?.message} name=\"reCaptchaToken\" />\r\n )}\r\n </div>\r\n );\r\n};\r\n","import \"./confirmationModal.css\";\r\nimport { Button } from \"#components/Button/Button\";\r\nimport { BasicModalProps, Modal } from \"#components/Modal/Modal\";\r\n\r\ninterface Props extends BasicModalProps {\r\n handleOkClick: () => void;\r\n}\r\n\r\nexport const OkModal = ({\r\n title = \"\",\r\n children,\r\n isOpen = false,\r\n handleClose,\r\n handleOkClick,\r\n className,\r\n}: Props) => {\r\n return (\r\n <Modal\r\n isOpen={isOpen}\r\n title={title}\r\n handleClose={handleClose}\r\n className={`confirmation ok-modal ${className ? className : \"\"}`}\r\n >\r\n <div className=\"confirmation-modal\">\r\n <div className=\"confirmation-content\">{children}</div>\r\n <div className=\"confirmation-action\">\r\n <Button onClick={handleOkClick}>OK</Button>\r\n </div>\r\n </div>\r\n </Modal>\r\n );\r\n};\r\n","import { useState } from \"react\";\r\nimport { Button } from \"../../components/Button/Button\";\r\nimport { OkModal } from \"../../components/Confirmation/OkModal\";\r\nimport { ButtonVariants } from \"#components/Button/buttonTypes\";\r\n\r\ninterface props {\r\n autoPayEmailOffsetDays?: number;\r\n}\r\n\r\nexport const AutoPayLearnMore = ({ autoPayEmailOffsetDays }: props) => {\r\n const [showAutopayModal, setShowAutopayModal] = useState<boolean>(false);\r\n\r\n return (\r\n <>\r\n <Button\r\n name=\"viewModal\"\r\n variant={ButtonVariants.plain}\r\n className=\"learn-more-button small\"\r\n onClick={() => setShowAutopayModal(true)}\r\n >\r\n Learn More\r\n </Button>\r\n\r\n <div className=\"autopay-modal\">\r\n <OkModal\r\n className=\"autopay-modal\"\r\n isOpen={showAutopayModal}\r\n title=\"AutoPay Information\"\r\n children={\r\n <div className=\"flow\">\r\n <p>\r\n AutoPay is a convenient feature that ensures your invoices are paid automatically\r\n using the payment information you enter.\r\n </p>\r\n <p>\r\n {`You will receive an email notification ${autoPayEmailOffsetDays} days before the automatic payment so you\r\n can review and cancel the payment as needed.`}\r\n </p>\r\n </div>\r\n }\r\n handleClose={() => setShowAutopayModal(false)}\r\n handleOkClick={() => setShowAutopayModal(false)}\r\n />\r\n </div>\r\n </>\r\n );\r\n};\r\n","import \"./TitleText.css\";\r\nimport React, { ReactNode } from \"react\";\r\nimport { cx } from \"#utilities/cx\";\r\n\r\ntype Props = {\r\n children: ReactNode;\r\n color?: string;\r\n className?: string;\r\n size?: string;\r\n};\r\n\r\nconst TitleText = ({ children, color = \"\", className = \"\", size = \"md\", ...props }: Props) => {\r\n return (\r\n <p className={cx(\"titletext\", color, className, size)} {...props}>\r\n {children}\r\n </p>\r\n );\r\n};\r\n\r\nexport default TitleText;\r\n","import \"./ToggleSwitch.css\";\r\nimport React from \"react\";\r\nimport TitleText from \"../TitleText/TitleText\";\r\nimport { cx } from \"#utilities/cx\";\r\n\r\ninterface ToggleSwitchProps extends React.InputHTMLAttributes<HTMLInputElement> {\r\n label: string;\r\n}\r\n\r\nconst ToggleSwitch = React.forwardRef<HTMLInputElement, ToggleSwitchProps>(\r\n ({ label, name, className, ...props }: ToggleSwitchProps, ref) => {\r\n return (\r\n <div className={cx(\"switch-wrapper\", className)}>\r\n <label className=\"switch-label\" htmlFor={name}>\r\n <span className=\"switch\">\r\n <input type=\"checkbox\" id={name} name={name} ref={ref} {...props} />\r\n <span className=\"slider round\"></span>\r\n </span>\r\n <TitleText className=\"bold\">{label}</TitleText>\r\n </label>\r\n </div>\r\n );\r\n }\r\n);\r\n\r\nexport default ToggleSwitch;\r\n","import \"./AutoPayContainer.css\";\r\nimport { useState } from \"react\";\r\nimport { useFormContext } from \"react-hook-form\";\r\nimport { AutoPayLearnMore } from \"./AutoPayLearnMore\";\r\nimport { ConfirmationModal } from \"#components/Confirmation/ConfirmationModal\";\r\nimport ToggleSwitch from \"#components/ToggleSwitch/ToggleSwitch\";\r\nimport { PaymentPageFormValues } from \"#features/PaymentMethodForm/PaymentInfoModel\";\r\n\r\ninterface props {\r\n autoPayEmailOffsetDays?: number;\r\n}\r\n\r\nexport const AutoPayToggle = ({ autoPayEmailOffsetDays }: props) => {\r\n const formContext = useFormContext<PaymentPageFormValues>();\r\n const [autopayEnabled, setAutopayEnabled] = useState<boolean>(false);\r\n const [showModal, setShowModal] = useState<boolean>(false);\r\n\r\n return (\r\n <>\r\n <div className=\"autopay-container\">\r\n <ToggleSwitch\r\n name=\"enableAutopay\"\r\n label=\"Enable AutoPay for future invoices\"\r\n onClick={() => {\r\n if (!autopayEnabled) {\r\n setShowModal(true);\r\n } else {\r\n setAutopayEnabled(!autopayEnabled);\r\n }\r\n }}\r\n checked={autopayEnabled}\r\n {...formContext.register(\"enableAutoPay\")}\r\n />\r\n <AutoPayLearnMore autoPayEmailOffsetDays={autoPayEmailOffsetDays} />\r\n </div>\r\n\r\n <ConfirmationModal\r\n isOpen={showModal}\r\n title=\"Confirm AutoPay Enrollment\"\r\n allowEscape={false}\r\n handleConfirm={() => {\r\n setAutopayEnabled(true);\r\n setShowModal(false);\r\n }}\r\n handleClose={() => {\r\n setAutopayEnabled(false);\r\n setShowModal(false);\r\n }}\r\n >\r\n <p>\r\n You've opted to enable AutoPay for future payments. After completing this payment, future\r\n invoices will be paid automatically.\r\n </p>\r\n\r\n <p>Are you sure you want to proceed?</p>\r\n </ConfirmationModal>\r\n </>\r\n );\r\n};\r\n","// this is needed since I am adding a prototype to Array\r\nexport {};\r\n\r\ndeclare global {\r\n interface Array<T> {\r\n /**\r\n * Non-destructive object sort\r\n * @param propName the property name to sort by\r\n * @param direction the direction to sort in\r\n */\r\n sortObject(propName: string, direction: SortDirection): Array<T>;\r\n }\r\n}\r\n\r\nif (!Array.prototype.sortObject) {\r\n /**\r\n * Non-destructive object sort\r\n * @param propName the property name to sort by\r\n * @param direction the direction to sort in\r\n */\r\n Array.prototype.sortObject = function <T>(propName: string, direction: SortDirection): T[] {\r\n // see if we have anything that MUST stay at the end regardless of sort\r\n const ab = this.find((f) => (f as SortingAttributes<T>)?.alwaysBottom === true);\r\n const toSort = this.filter((f) => (f as SortingAttributes<T>)?.alwaysBottom !== true);\r\n\r\n // do the sort\r\n toSort.sort((i1, i2) => objectSorter(i1, i2, propName, direction));\r\n\r\n // force magic value to the end\r\n if (ab) {\r\n toSort.push(ab);\r\n }\r\n\r\n return toSort;\r\n };\r\n}\r\n\r\n/**\r\n * How a collection can be sorted\r\n */\r\nexport enum SortDirection {\r\n Asc = \"Asc\",\r\n Desc = \"Desc\",\r\n None = \"None\",\r\n}\r\n\r\n/**\r\n * How a current collection is sorted\r\n */\r\nexport interface CurrentSort {\r\n columnName: string;\r\n sortDirection?: SortDirection;\r\n}\r\n\r\n/**\r\n * Supported special features for sorting\r\n * Tag individual rows with this value\r\n */\r\nexport type SortingAttributes<T> = T & {\r\n alwaysBottom: boolean;\r\n};\r\n\r\n/**\r\n * to be used in [].sort() to sort properties of an object in a particular direction\r\n * @param obj1\r\n * @param obj2\r\n * @param propName\r\n * @param direction\r\n * @returns\r\n */\r\nconst objectSorter = (\r\n obj1: unknown,\r\n obj2: unknown,\r\n propName: string,\r\n direction: SortDirection\r\n): number => {\r\n return dataSorterWithDirection(direction, obj1?.[propName], obj2?.[propName]);\r\n};\r\n\r\n/**\r\n * Sort 2 values in a particular direction\r\n * @param direction\r\n * @param v1\r\n * @param v2\r\n * @returns\r\n */\r\nconst dataSorterWithDirection = (direction: SortDirection, v1: unknown, v2: unknown): number => {\r\n if (direction === SortDirection.Asc) {\r\n return dataSorter(v1, v2);\r\n }\r\n return dataSorter(v2, v1);\r\n};\r\n\r\n/**\r\n * Sorts particular data types properly. Handles string, number, boolean and Date properly\r\n * @param v1\r\n * @param v2\r\n * @returns\r\n */\r\nconst dataSorter = (v1: unknown, v2: unknown): number => {\r\n // because typeof returns 'object' for too many hings\r\n const dataType = Object.prototype.toString.call(v1 ?? v2);\r\n let result = 0;\r\n switch (dataType) {\r\n case \"[object Date]\":\r\n result =\r\n ((v1 as Date)?.getTime() ?? -1) > ((v2 as Date)?.getTime() ?? -1)\r\n ? 1\r\n : ((v1 as Date)?.getTime() ?? -1) < ((v2 as Date)?.getTime() ?? -1)\r\n ? -1\r\n : 0;\r\n break;\r\n case \"[object String]\":\r\n case \"[object Number]\":\r\n case \"[object Boolean]\":\r\n default:\r\n result = v1 > v2 ? 1 : v1 < v2 ? -1 : 0;\r\n break;\r\n }\r\n\r\n return result;\r\n};\r\n","import { Button } from \"#components/Button/Button\";\r\nimport { ButtonVariants } from \"#components/Button/buttonTypes\";\r\nimport { IconPosition } from \"#components/Icons/iconTypes\";\r\nimport { CurrentSort, SortDirection } from \"#utilities/Sorting\";\r\n\r\ninterface InvoiceGridHeaderButtonProps {\r\n displayName?: string;\r\n columnName: string;\r\n currentSort?: CurrentSort;\r\n setSort?: (sort: CurrentSort) => void;\r\n}\r\n\r\nconst IconMapping = {\r\n [SortDirection.None]: \"swap_vert\",\r\n [SortDirection.Asc]: \"arrow_upward\",\r\n [SortDirection.Desc]: \"arrow_downward\",\r\n};\r\n\r\nexport const InvoiceGridHeaderButton = ({\r\n displayName,\r\n columnName,\r\n currentSort,\r\n setSort,\r\n}: InvoiceGridHeaderButtonProps) => {\r\n const getIcon = () => {\r\n if (currentSort?.columnName !== columnName) {\r\n return IconMapping[SortDirection.None];\r\n }\r\n return IconMapping[currentSort.sortDirection];\r\n };\r\n\r\n function setGridSort(): void {\r\n const newSort: CurrentSort = { columnName: columnName, sortDirection: SortDirection.Asc };\r\n\r\n // already sorted by this column\r\n if (currentSort?.columnName === columnName) {\r\n // just toggle through the different sort modes\r\n switch (currentSort.sortDirection) {\r\n case SortDirection.None:\r\n newSort.sortDirection = SortDirection.Asc;\r\n break;\r\n case SortDirection.Asc:\r\n newSort.sortDirection = SortDirection.Desc;\r\n break;\r\n case SortDirection.Desc:\r\n newSort.sortDirection = SortDirection.None;\r\n break;\r\n }\r\n }\r\n\r\n setSort(newSort);\r\n }\r\n\r\n return (\r\n <Button\r\n icon={getIcon()}\r\n iconPosition={IconPosition.right}\r\n variant={ButtonVariants.plain}\r\n onClick={setGridSort}\r\n name={columnName.toLowerCase()}\r\n >\r\n {displayName ?? columnName}\r\n </Button>\r\n );\r\n};\r\n","import { InvoiceModel } from \"./Models/InvoiceTypes\";\r\n\r\ninterface Props {\r\n item: InvoiceModel;\r\n}\r\n\r\nexport const InvoiceAttributeValues = ({ item }: Props) => {\r\n return (\r\n <div className=\"item-attributes\" role=\"row\">\r\n {item.AttributeValues.map((md) => {\r\n if (md.Name) {\r\n return (\r\n <div className=\"item-md-item\" key={md.ParameterName} role=\"cell\">\r\n <span className=\"label\">{md.Name}</span>\r\n <span className=\"value\">{md.Value}</span>\r\n </div>\r\n );\r\n }\r\n return null;\r\n })}\r\n </div>\r\n );\r\n};\r\n","function getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n // Browsers without `ShadowRoot` support.\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);\n}\nfunction isTableElement(element) {\n return ['table', 'td', 'th'].includes(getNodeName(element));\n}\nfunction isContainingBlock(element) {\n const webkit = isWebKit();\n const css = getComputedStyle(element);\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else {\n currentNode = getParentNode(currentNode);\n }\n }\n return null;\n}\nfunction isWebKit() {\n if (typeof CSS === 'undefined' || !CSS.supports) return false;\n return CSS.supports('-webkit-backdrop-filter', 'none');\n}\nfunction isLastTraversableNode(node) {\n return ['html', 'body', '#document'].includes(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.pageXOffset,\n scrollTop: element.pageYOffset\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n const result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return node.ownerDocument ? node.ownerDocument.body : node.body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], win.frameElement && traverseIframes ? getOverflowAncestors(win.frameElement) : []);\n }\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isWebKit };\n","import { isShadowRoot, isHTMLElement } from '@floating-ui/utils/dom';\n\nfunction activeElement(doc) {\n let activeElement = doc.activeElement;\n while (((_activeElement = activeElement) == null || (_activeElement = _activeElement.shadowRoot) == null ? void 0 : _activeElement.activeElement) != null) {\n var _activeElement;\n activeElement = activeElement.shadowRoot.activeElement;\n }\n return activeElement;\n}\nfunction contains(parent, child) {\n if (!parent || !child) {\n return false;\n }\n const rootNode = child.getRootNode == null ? void 0 : child.getRootNode();\n\n // First, attempt with faster native method\n if (parent.contains(child)) {\n return true;\n }\n\n // then fallback to custom implementation with Shadow DOM support\n if (rootNode && isShadowRoot(rootNode)) {\n let next = child;\n while (next) {\n if (parent === next) {\n return true;\n }\n // @ts-ignore\n next = next.parentNode || next.host;\n }\n }\n\n // Give up, the result is false\n return false;\n}\n// Avoid Chrome DevTools blue warning.\nfunction getPlatform() {\n const uaData = navigator.userAgentData;\n if (uaData != null && uaData.platform) {\n return uaData.platform;\n }\n return navigator.platform;\n}\nfunction getUserAgent() {\n const uaData = navigator.userAgentData;\n if (uaData && Array.isArray(uaData.brands)) {\n return uaData.brands.map(_ref => {\n let {\n brand,\n version\n } = _ref;\n return brand + \"/\" + version;\n }).join(' ');\n }\n return navigator.userAgent;\n}\n\n// License: https://github.com/adobe/react-spectrum/blob/b35d5c02fe900badccd0cf1a8f23bb593419f238/packages/@react-aria/utils/src/isVirtualEvent.ts\nfunction isVirtualClick(event) {\n // FIXME: Firefox is now emitting a deprecation warning for `mozInputSource`.\n // Try to find a workaround for this. `react-aria` source still has the check.\n if (event.mozInputSource === 0 && event.isTrusted) {\n return true;\n }\n if (isAndroid() && event.pointerType) {\n return event.type === 'click' && event.buttons === 1;\n }\n return event.detail === 0 && !event.pointerType;\n}\nfunction isVirtualPointerEvent(event) {\n if (isJSDOM()) return false;\n return !isAndroid() && event.width === 0 && event.height === 0 || isAndroid() && event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'mouse' ||\n // iOS VoiceOver returns 0.333• for width/height.\n event.width < 1 && event.height < 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'touch';\n}\nfunction isSafari() {\n // Chrome DevTools does not complain about navigator.vendor\n return /apple/i.test(navigator.vendor);\n}\nfunction isAndroid() {\n const re = /android/i;\n return re.test(getPlatform()) || re.test(getUserAgent());\n}\nfunction isMac() {\n return getPlatform().toLowerCase().startsWith('mac') && !navigator.maxTouchPoints;\n}\nfunction isJSDOM() {\n return getUserAgent().includes('jsdom/');\n}\nfunction isMouseLikePointerType(pointerType, strict) {\n // On some Linux machines with Chromium, mouse inputs return a `pointerType`\n // of \"pen\": https://github.com/floating-ui/floating-ui/issues/2015\n const values = ['mouse', 'pen'];\n if (!strict) {\n values.push('', undefined);\n }\n return values.includes(pointerType);\n}\nfunction isReactEvent(event) {\n return 'nativeEvent' in event;\n}\nfunction isRootElement(element) {\n return element.matches('html,body');\n}\nfunction getDocument(node) {\n return (node == null ? void 0 : node.ownerDocument) || document;\n}\nfunction isEventTargetWithin(event, node) {\n if (node == null) {\n return false;\n }\n if ('composedPath' in event) {\n return event.composedPath().includes(node);\n }\n\n // TS thinks `event` is of type never as it assumes all browsers support composedPath, but browsers without shadow dom don't\n const e = event;\n return e.target != null && node.contains(e.target);\n}\nfunction getTarget(event) {\n if ('composedPath' in event) {\n return event.composedPath()[0];\n }\n\n // TS thinks `event` is of type never as it assumes all browsers support\n // `composedPath()`, but browsers without shadow DOM don't.\n return event.target;\n}\nconst TYPEABLE_SELECTOR = \"input:not([type='hidden']):not([disabled]),\" + \"[contenteditable]:not([contenteditable='false']),textarea:not([disabled])\";\nfunction isTypeableElement(element) {\n return isHTMLElement(element) && element.matches(TYPEABLE_SELECTOR);\n}\nfunction stopEvent(event) {\n event.preventDefault();\n event.stopPropagation();\n}\nfunction isTypeableCombobox(element) {\n if (!element) return false;\n return element.getAttribute('role') === 'combobox' && isTypeableElement(element);\n}\n\nexport { TYPEABLE_SELECTOR, activeElement, contains, getDocument, getPlatform, getTarget, getUserAgent, isAndroid, isEventTargetWithin, isJSDOM, isMac, isMouseLikePointerType, isReactEvent, isRootElement, isSafari, isTypeableCombobox, isTypeableElement, isVirtualClick, isVirtualPointerEvent, stopEvent };\n","/**\n * Custom positioning reference element.\n * @see https://floating-ui.com/docs/virtual-elements\n */\n\nconst sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n x: v,\n y: v\n});\nconst oppositeSideMap = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nconst oppositeAlignmentMap = {\n start: 'end',\n end: 'start'\n};\nfunction clamp(start, value, end) {\n return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n return typeof value === 'function' ? value(param) : value;\n}\nfunction getSide(placement) {\n return placement.split('-')[0];\n}\nfunction getAlignment(placement) {\n return placement.split('-')[1];\n}\nfunction getOppositeAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}\nfunction getAxisLength(axis) {\n return axis === 'y' ? 'height' : 'width';\n}\nfunction getSideAxis(placement) {\n return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';\n}\nfunction getAlignmentAxis(placement) {\n return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n if (rtl === void 0) {\n rtl = false;\n }\n const alignment = getAlignment(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const length = getAxisLength(alignmentAxis);\n let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n if (rects.reference[length] > rects.floating[length]) {\n mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n }\n return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n const oppositePlacement = getOppositePlacement(placement);\n return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);\n}\nfunction getSideList(side, isStart, rtl) {\n const lr = ['left', 'right'];\n const rl = ['right', 'left'];\n const tb = ['top', 'bottom'];\n const bt = ['bottom', 'top'];\n switch (side) {\n case 'top':\n case 'bottom':\n if (rtl) return isStart ? rl : lr;\n return isStart ? lr : rl;\n case 'left':\n case 'right':\n return isStart ? tb : bt;\n default:\n return [];\n }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n const alignment = getAlignment(placement);\n let list = getSideList(getSide(placement), direction === 'start', rtl);\n if (alignment) {\n list = list.map(side => side + \"-\" + alignment);\n if (flipAlignment) {\n list = list.concat(list.map(getOppositeAlignmentPlacement));\n }\n }\n return list;\n}\nfunction getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);\n}\nfunction expandPaddingObject(padding) {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...padding\n };\n}\nfunction getPaddingObject(padding) {\n return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n}\nfunction rectToClientRect(rect) {\n return {\n ...rect,\n top: rect.y,\n left: rect.x,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n };\n}\n\nexport { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };\n","import { getSideAxis, getAlignmentAxis, getAxisLength, getSide, getAlignment, evaluate, getPaddingObject, rectToClientRect, min, clamp, placements, getAlignmentSides, getOppositeAlignmentPlacement, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, sides, max, getOppositeAxis } from '@floating-ui/utils';\nexport { rectToClientRect } from '@floating-ui/utils';\n\nfunction computeCoordsFromPlacement(_ref, placement, rtl) {\n let {\n reference,\n floating\n } = _ref;\n const sideAxis = getSideAxis(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const alignLength = getAxisLength(alignmentAxis);\n const side = getSide(placement);\n const isVertical = sideAxis === 'y';\n const commonX = reference.x + reference.width / 2 - floating.width / 2;\n const commonY = reference.y + reference.height / 2 - floating.height / 2;\n const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;\n let coords;\n switch (side) {\n case 'top':\n coords = {\n x: commonX,\n y: reference.y - floating.height\n };\n break;\n case 'bottom':\n coords = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n case 'right':\n coords = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n case 'left':\n coords = {\n x: reference.x - floating.width,\n y: commonY\n };\n break;\n default:\n coords = {\n x: reference.x,\n y: reference.y\n };\n }\n switch (getAlignment(placement)) {\n case 'start':\n coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n case 'end':\n coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n }\n return coords;\n}\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n *\n * This export does not have any `platform` interface logic. You will need to\n * write one for the platform you are using Floating UI with.\n */\nconst computePosition = async (reference, floating, config) => {\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform\n } = config;\n const validMiddleware = middleware.filter(Boolean);\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));\n let rects = await platform.getElementRects({\n reference,\n floating,\n strategy\n });\n let {\n x,\n y\n } = computeCoordsFromPlacement(rects, placement, rtl);\n let statefulPlacement = placement;\n let middlewareData = {};\n let resetCount = 0;\n for (let i = 0; i < validMiddleware.length; i++) {\n const {\n name,\n fn\n } = validMiddleware[i];\n const {\n x: nextX,\n y: nextY,\n data,\n reset\n } = await fn({\n x,\n y,\n initialPlacement: placement,\n placement: statefulPlacement,\n strategy,\n middlewareData,\n rects,\n platform,\n elements: {\n reference,\n floating\n }\n });\n x = nextX != null ? nextX : x;\n y = nextY != null ? nextY : y;\n middlewareData = {\n ...middlewareData,\n [name]: {\n ...middlewareData[name],\n ...data\n }\n };\n if (reset && resetCount <= 50) {\n resetCount++;\n if (typeof reset === 'object') {\n if (reset.placement) {\n statefulPlacement = reset.placement;\n }\n if (reset.rects) {\n rects = reset.rects === true ? await platform.getElementRects({\n reference,\n floating,\n strategy\n }) : reset.rects;\n }\n ({\n x,\n y\n } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));\n }\n i = -1;\n }\n }\n return {\n x,\n y,\n placement: statefulPlacement,\n strategy,\n middlewareData\n };\n};\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nasync function detectOverflow(state, options) {\n var _await$platform$isEle;\n if (options === void 0) {\n options = {};\n }\n const {\n x,\n y,\n platform,\n rects,\n elements,\n strategy\n } = state;\n const {\n boundary = 'clippingAncestors',\n rootBoundary = 'viewport',\n elementContext = 'floating',\n altBoundary = false,\n padding = 0\n } = evaluate(options, state);\n const paddingObject = getPaddingObject(padding);\n const altContext = elementContext === 'floating' ? 'reference' : 'floating';\n const element = elements[altBoundary ? altContext : elementContext];\n const clippingClientRect = rectToClientRect(await platform.getClippingRect({\n element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),\n boundary,\n rootBoundary,\n strategy\n }));\n const rect = elementContext === 'floating' ? {\n ...rects.floating,\n x,\n y\n } : rects.reference;\n const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));\n const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {\n x: 1,\n y: 1\n } : {\n x: 1,\n y: 1\n };\n const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n elements,\n rect,\n offsetParent,\n strategy\n }) : rect);\n return {\n top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,\n bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,\n left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,\n right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x\n };\n}\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = options => ({\n name: 'arrow',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n platform,\n elements,\n middlewareData\n } = state;\n // Since `element` is required, we don't Partial<> the type.\n const {\n element,\n padding = 0\n } = evaluate(options, state) || {};\n if (element == null) {\n return {};\n }\n const paddingObject = getPaddingObject(padding);\n const coords = {\n x,\n y\n };\n const axis = getAlignmentAxis(placement);\n const length = getAxisLength(axis);\n const arrowDimensions = await platform.getDimensions(element);\n const isYAxis = axis === 'y';\n const minProp = isYAxis ? 'top' : 'left';\n const maxProp = isYAxis ? 'bottom' : 'right';\n const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';\n const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n const startDiff = coords[axis] - rects.reference[axis];\n const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));\n let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;\n\n // DOM platform can return `window` as the `offsetParent`.\n if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {\n clientSize = elements.floating[clientProp] || rects.floating[length];\n }\n const centerToReference = endDiff / 2 - startDiff / 2;\n\n // If the padding is large enough that it causes the arrow to no longer be\n // centered, modify the padding so that it is centered.\n const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;\n const minPadding = min(paddingObject[minProp], largestPossiblePadding);\n const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);\n\n // Make sure the arrow doesn't overflow the floating element if the center\n // point is outside the floating element's bounds.\n const min$1 = minPadding;\n const max = clientSize - arrowDimensions[length] - maxPadding;\n const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n const offset = clamp(min$1, center, max);\n\n // If the reference is small enough that the arrow's padding causes it to\n // to point to nothing for an aligned placement, adjust the offset of the\n // floating element itself. To ensure `shift()` continues to take action,\n // a single reset is performed when this is true.\n const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;\n return {\n [axis]: coords[axis] + alignmentOffset,\n data: {\n [axis]: offset,\n centerOffset: center - offset - alignmentOffset,\n ...(shouldAddOffset && {\n alignmentOffset\n })\n },\n reset: shouldAddOffset\n };\n }\n});\n\nfunction getPlacementList(alignment, autoAlignment, allowedPlacements) {\n const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);\n return allowedPlacementsSortedByAlignment.filter(placement => {\n if (alignment) {\n return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);\n }\n return true;\n });\n}\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'autoPlacement',\n options,\n async fn(state) {\n var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;\n const {\n rects,\n middlewareData,\n placement,\n platform,\n elements\n } = state;\n const {\n crossAxis = false,\n alignment,\n allowedPlacements = placements,\n autoAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;\n const currentPlacement = placements$1[currentIndex];\n if (currentPlacement == null) {\n return {};\n }\n const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));\n\n // Make `computeCoords` start from the right place.\n if (placement !== currentPlacement) {\n return {\n reset: {\n placement: placements$1[0]\n }\n };\n }\n const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];\n const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {\n placement: currentPlacement,\n overflows: currentOverflows\n }];\n const nextPlacement = placements$1[currentIndex + 1];\n\n // There are more placements to check.\n if (nextPlacement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n const placementsSortedByMostSpace = allOverflows.map(d => {\n const alignment = getAlignment(d.placement);\n return [d.placement, alignment && crossAxis ?\n // Check along the mainAxis and main crossAxis side.\n d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :\n // Check only the mainAxis.\n d.overflows[0], d.overflows];\n }).sort((a, b) => a[1] - b[1]);\n const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,\n // Aligned placements should not check their opposite crossAxis\n // side.\n getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));\n const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];\n if (resetPlacement !== placement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: resetPlacement\n }\n };\n }\n return {};\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'flip',\n options,\n async fn(state) {\n var _middlewareData$arrow, _middlewareData$flip;\n const {\n placement,\n middlewareData,\n rects,\n initialPlacement,\n platform,\n elements\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true,\n fallbackPlacements: specifiedFallbackPlacements,\n fallbackStrategy = 'bestFit',\n fallbackAxisSideDirection = 'none',\n flipAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n\n // If a reset by the arrow was caused due to an alignment offset being\n // added, we should skip any logic now since `flip()` has already done its\n // work.\n // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643\n if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n const side = getSide(placement);\n const isBasePlacement = getSide(initialPlacement) === initialPlacement;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));\n if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== 'none') {\n fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));\n }\n const placements = [initialPlacement, ...fallbackPlacements];\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const overflows = [];\n let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];\n if (checkMainAxis) {\n overflows.push(overflow[side]);\n }\n if (checkCrossAxis) {\n const sides = getAlignmentSides(placement, rects, rtl);\n overflows.push(overflow[sides[0]], overflow[sides[1]]);\n }\n overflowsData = [...overflowsData, {\n placement,\n overflows\n }];\n\n // One or more sides is overflowing.\n if (!overflows.every(side => side <= 0)) {\n var _middlewareData$flip2, _overflowsData$filter;\n const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;\n const nextPlacement = placements[nextIndex];\n if (nextPlacement) {\n // Try next placement and re-run the lifecycle.\n return {\n data: {\n index: nextIndex,\n overflows: overflowsData\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n\n // First, find the candidates that fit on the mainAxis side of overflow,\n // then find the placement that fits the best on the main crossAxis side.\n let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;\n\n // Otherwise fallback.\n if (!resetPlacement) {\n switch (fallbackStrategy) {\n case 'bestFit':\n {\n var _overflowsData$map$so;\n const placement = (_overflowsData$map$so = overflowsData.map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$map$so[0];\n if (placement) {\n resetPlacement = placement;\n }\n break;\n }\n case 'initialPlacement':\n resetPlacement = initialPlacement;\n break;\n }\n }\n if (placement !== resetPlacement) {\n return {\n reset: {\n placement: resetPlacement\n }\n };\n }\n }\n return {};\n }\n };\n};\n\nfunction getSideOffsets(overflow, rect) {\n return {\n top: overflow.top - rect.height,\n right: overflow.right - rect.width,\n bottom: overflow.bottom - rect.height,\n left: overflow.left - rect.width\n };\n}\nfunction isAnySideFullyClipped(overflow) {\n return sides.some(side => overflow[side] >= 0);\n}\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'hide',\n options,\n async fn(state) {\n const {\n rects\n } = state;\n const {\n strategy = 'referenceHidden',\n ...detectOverflowOptions\n } = evaluate(options, state);\n switch (strategy) {\n case 'referenceHidden':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n elementContext: 'reference'\n });\n const offsets = getSideOffsets(overflow, rects.reference);\n return {\n data: {\n referenceHiddenOffsets: offsets,\n referenceHidden: isAnySideFullyClipped(offsets)\n }\n };\n }\n case 'escaped':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n altBoundary: true\n });\n const offsets = getSideOffsets(overflow, rects.floating);\n return {\n data: {\n escapedOffsets: offsets,\n escaped: isAnySideFullyClipped(offsets)\n }\n };\n }\n default:\n {\n return {};\n }\n }\n }\n };\n};\n\nfunction getBoundingRect(rects) {\n const minX = min(...rects.map(rect => rect.left));\n const minY = min(...rects.map(rect => rect.top));\n const maxX = max(...rects.map(rect => rect.right));\n const maxY = max(...rects.map(rect => rect.bottom));\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n}\nfunction getRectsByLine(rects) {\n const sortedRects = rects.slice().sort((a, b) => a.y - b.y);\n const groups = [];\n let prevRect = null;\n for (let i = 0; i < sortedRects.length; i++) {\n const rect = sortedRects[i];\n if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {\n groups.push([rect]);\n } else {\n groups[groups.length - 1].push(rect);\n }\n prevRect = rect;\n }\n return groups.map(rect => rectToClientRect(getBoundingRect(rect)));\n}\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'inline',\n options,\n async fn(state) {\n const {\n placement,\n elements,\n rects,\n platform,\n strategy\n } = state;\n // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a\n // ClientRect's bounds, despite the event listener being triggered. A\n // padding of 2 seems to handle this issue.\n const {\n padding = 2,\n x,\n y\n } = evaluate(options, state);\n const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);\n const clientRects = getRectsByLine(nativeClientRects);\n const fallback = rectToClientRect(getBoundingRect(nativeClientRects));\n const paddingObject = getPaddingObject(padding);\n function getBoundingClientRect() {\n // There are two rects and they are disjoined.\n if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {\n // Find the first rect in which the point is fully inside.\n return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;\n }\n\n // There are 2 or more connected rects.\n if (clientRects.length >= 2) {\n if (getSideAxis(placement) === 'y') {\n const firstRect = clientRects[0];\n const lastRect = clientRects[clientRects.length - 1];\n const isTop = getSide(placement) === 'top';\n const top = firstRect.top;\n const bottom = lastRect.bottom;\n const left = isTop ? firstRect.left : lastRect.left;\n const right = isTop ? firstRect.right : lastRect.right;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n const isLeftSide = getSide(placement) === 'left';\n const maxRight = max(...clientRects.map(rect => rect.right));\n const minLeft = min(...clientRects.map(rect => rect.left));\n const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);\n const top = measureRects[0].top;\n const bottom = measureRects[measureRects.length - 1].bottom;\n const left = minLeft;\n const right = maxRight;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n return fallback;\n }\n const resetRects = await platform.getElementRects({\n reference: {\n getBoundingClientRect\n },\n floating: elements.floating,\n strategy\n });\n if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {\n return {\n reset: {\n rects: resetRects\n }\n };\n }\n return {};\n }\n };\n};\n\n// For type backwards-compatibility, the `OffsetOptions` type was also\n// Derivable.\n\nasync function convertValueToCoords(state, options) {\n const {\n placement,\n platform,\n elements\n } = state;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isVertical = getSideAxis(placement) === 'y';\n const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;\n const crossAxisMulti = rtl && isVertical ? -1 : 1;\n const rawValue = evaluate(options, state);\n let {\n mainAxis,\n crossAxis,\n alignmentAxis\n } = typeof rawValue === 'number' ? {\n mainAxis: rawValue,\n crossAxis: 0,\n alignmentAxis: null\n } : {\n mainAxis: 0,\n crossAxis: 0,\n alignmentAxis: null,\n ...rawValue\n };\n if (alignment && typeof alignmentAxis === 'number') {\n crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;\n }\n return isVertical ? {\n x: crossAxis * crossAxisMulti,\n y: mainAxis * mainAxisMulti\n } : {\n x: mainAxis * mainAxisMulti,\n y: crossAxis * crossAxisMulti\n };\n}\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = function (options) {\n if (options === void 0) {\n options = 0;\n }\n return {\n name: 'offset',\n options,\n async fn(state) {\n var _middlewareData$offse, _middlewareData$arrow;\n const {\n x,\n y,\n placement,\n middlewareData\n } = state;\n const diffCoords = await convertValueToCoords(state, options);\n\n // If the placement is the same and the arrow caused an alignment offset\n // then we don't need to change the positioning coordinates.\n if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n return {\n x: x + diffCoords.x,\n y: y + diffCoords.y,\n data: {\n ...diffCoords,\n placement\n }\n };\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'shift',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = false,\n limiter = {\n fn: _ref => {\n let {\n x,\n y\n } = _ref;\n return {\n x,\n y\n };\n }\n },\n ...detectOverflowOptions\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const crossAxis = getSideAxis(getSide(placement));\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n if (checkMainAxis) {\n const minSide = mainAxis === 'y' ? 'top' : 'left';\n const maxSide = mainAxis === 'y' ? 'bottom' : 'right';\n const min = mainAxisCoord + overflow[minSide];\n const max = mainAxisCoord - overflow[maxSide];\n mainAxisCoord = clamp(min, mainAxisCoord, max);\n }\n if (checkCrossAxis) {\n const minSide = crossAxis === 'y' ? 'top' : 'left';\n const maxSide = crossAxis === 'y' ? 'bottom' : 'right';\n const min = crossAxisCoord + overflow[minSide];\n const max = crossAxisCoord - overflow[maxSide];\n crossAxisCoord = clamp(min, crossAxisCoord, max);\n }\n const limitedCoords = limiter.fn({\n ...state,\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n });\n return {\n ...limitedCoords,\n data: {\n x: limitedCoords.x - x,\n y: limitedCoords.y - y\n }\n };\n }\n };\n};\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n options,\n fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n middlewareData\n } = state;\n const {\n offset = 0,\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const crossAxis = getSideAxis(placement);\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n const rawOffset = evaluate(offset, state);\n const computedOffset = typeof rawOffset === 'number' ? {\n mainAxis: rawOffset,\n crossAxis: 0\n } : {\n mainAxis: 0,\n crossAxis: 0,\n ...rawOffset\n };\n if (checkMainAxis) {\n const len = mainAxis === 'y' ? 'height' : 'width';\n const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;\n const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;\n if (mainAxisCoord < limitMin) {\n mainAxisCoord = limitMin;\n } else if (mainAxisCoord > limitMax) {\n mainAxisCoord = limitMax;\n }\n }\n if (checkCrossAxis) {\n var _middlewareData$offse, _middlewareData$offse2;\n const len = mainAxis === 'y' ? 'width' : 'height';\n const isOriginSide = ['top', 'left'].includes(getSide(placement));\n const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);\n const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);\n if (crossAxisCoord < limitMin) {\n crossAxisCoord = limitMin;\n } else if (crossAxisCoord > limitMax) {\n crossAxisCoord = limitMax;\n }\n }\n return {\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n };\n }\n };\n};\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'size',\n options,\n async fn(state) {\n const {\n placement,\n rects,\n platform,\n elements\n } = state;\n const {\n apply = () => {},\n ...detectOverflowOptions\n } = evaluate(options, state);\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isYAxis = getSideAxis(placement) === 'y';\n const {\n width,\n height\n } = rects.floating;\n let heightSide;\n let widthSide;\n if (side === 'top' || side === 'bottom') {\n heightSide = side;\n widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';\n } else {\n widthSide = side;\n heightSide = alignment === 'end' ? 'top' : 'bottom';\n }\n const overflowAvailableHeight = height - overflow[heightSide];\n const overflowAvailableWidth = width - overflow[widthSide];\n const noShift = !state.middlewareData.shift;\n let availableHeight = overflowAvailableHeight;\n let availableWidth = overflowAvailableWidth;\n if (isYAxis) {\n const maximumClippingWidth = width - overflow.left - overflow.right;\n availableWidth = alignment || noShift ? min(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth;\n } else {\n const maximumClippingHeight = height - overflow.top - overflow.bottom;\n availableHeight = alignment || noShift ? min(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;\n }\n if (noShift && !alignment) {\n const xMin = max(overflow.left, 0);\n const xMax = max(overflow.right, 0);\n const yMin = max(overflow.top, 0);\n const yMax = max(overflow.bottom, 0);\n if (isYAxis) {\n availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));\n } else {\n availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));\n }\n }\n await apply({\n ...state,\n availableWidth,\n availableHeight\n });\n const nextDimensions = await platform.getDimensions(elements.floating);\n if (width !== nextDimensions.width || height !== nextDimensions.height) {\n return {\n reset: {\n rects: true\n }\n };\n }\n return {};\n }\n };\n};\n\nexport { arrow, autoPlacement, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, shift, size };\n","import { rectToClientRect, autoPlacement as autoPlacement$1, shift as shift$1, flip as flip$1, size as size$1, hide as hide$1, arrow as arrow$1, inline as inline$1, limitShift as limitShift$1, computePosition as computePosition$1 } from '@floating-ui/core';\nexport { detectOverflow, offset } from '@floating-ui/core';\nimport { round, createCoords, max, min, floor } from '@floating-ui/utils';\nimport { getComputedStyle, isHTMLElement, isElement, getWindow, isWebKit, getDocumentElement, getNodeName, isOverflowElement, getNodeScroll, getOverflowAncestors, getParentNode, isLastTraversableNode, isContainingBlock, isTableElement, getContainingBlock } from '@floating-ui/utils/dom';\nexport { getOverflowAncestors } from '@floating-ui/utils/dom';\n\nfunction getCssDimensions(element) {\n const css = getComputedStyle(element);\n // In testing environments, the `width` and `height` properties are empty\n // strings for SVG elements, returning NaN. Fallback to `0` in this case.\n let width = parseFloat(css.width) || 0;\n let height = parseFloat(css.height) || 0;\n const hasOffset = isHTMLElement(element);\n const offsetWidth = hasOffset ? element.offsetWidth : width;\n const offsetHeight = hasOffset ? element.offsetHeight : height;\n const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n if (shouldFallback) {\n width = offsetWidth;\n height = offsetHeight;\n }\n return {\n width,\n height,\n $: shouldFallback\n };\n}\n\nfunction unwrapElement(element) {\n return !isElement(element) ? element.contextElement : element;\n}\n\nfunction getScale(element) {\n const domElement = unwrapElement(element);\n if (!isHTMLElement(domElement)) {\n return createCoords(1);\n }\n const rect = domElement.getBoundingClientRect();\n const {\n width,\n height,\n $\n } = getCssDimensions(domElement);\n let x = ($ ? round(rect.width) : rect.width) / width;\n let y = ($ ? round(rect.height) : rect.height) / height;\n\n // 0, NaN, or Infinity should always fallback to 1.\n\n if (!x || !Number.isFinite(x)) {\n x = 1;\n }\n if (!y || !Number.isFinite(y)) {\n y = 1;\n }\n return {\n x,\n y\n };\n}\n\nconst noOffsets = /*#__PURE__*/createCoords(0);\nfunction getVisualOffsets(element) {\n const win = getWindow(element);\n if (!isWebKit() || !win.visualViewport) {\n return noOffsets;\n }\n return {\n x: win.visualViewport.offsetLeft,\n y: win.visualViewport.offsetTop\n };\n}\nfunction shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {\n return false;\n }\n return isFixed;\n}\n\nfunction getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n const clientRect = element.getBoundingClientRect();\n const domElement = unwrapElement(element);\n let scale = createCoords(1);\n if (includeScale) {\n if (offsetParent) {\n if (isElement(offsetParent)) {\n scale = getScale(offsetParent);\n }\n } else {\n scale = getScale(element);\n }\n }\n const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);\n let x = (clientRect.left + visualOffsets.x) / scale.x;\n let y = (clientRect.top + visualOffsets.y) / scale.y;\n let width = clientRect.width / scale.x;\n let height = clientRect.height / scale.y;\n if (domElement) {\n const win = getWindow(domElement);\n const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n let currentWin = win;\n let currentIFrame = currentWin.frameElement;\n while (currentIFrame && offsetParent && offsetWin !== currentWin) {\n const iframeScale = getScale(currentIFrame);\n const iframeRect = currentIFrame.getBoundingClientRect();\n const css = getComputedStyle(currentIFrame);\n const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;\n const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;\n x *= iframeScale.x;\n y *= iframeScale.y;\n width *= iframeScale.x;\n height *= iframeScale.y;\n x += left;\n y += top;\n currentWin = getWindow(currentIFrame);\n currentIFrame = currentWin.frameElement;\n }\n }\n return rectToClientRect({\n width,\n height,\n x,\n y\n });\n}\n\nconst topLayerSelectors = [':popover-open', ':modal'];\nfunction isTopLayer(floating) {\n return topLayerSelectors.some(selector => {\n try {\n return floating.matches(selector);\n } catch (e) {\n return false;\n }\n });\n}\n\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n let {\n elements,\n rect,\n offsetParent,\n strategy\n } = _ref;\n const isFixed = strategy === 'fixed';\n const documentElement = getDocumentElement(offsetParent);\n const topLayer = elements ? isTopLayer(elements.floating) : false;\n if (offsetParent === documentElement || topLayer && isFixed) {\n return rect;\n }\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n let scale = createCoords(1);\n const offsets = createCoords(0);\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isHTMLElement(offsetParent)) {\n const offsetRect = getBoundingClientRect(offsetParent);\n scale = getScale(offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n }\n return {\n width: rect.width * scale.x,\n height: rect.height * scale.y,\n x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,\n y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y\n };\n}\n\nfunction getClientRects(element) {\n return Array.from(element.getClientRects());\n}\n\nfunction getWindowScrollBarX(element) {\n // If <html> has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;\n}\n\n// Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable.\nfunction getDocumentRect(element) {\n const html = getDocumentElement(element);\n const scroll = getNodeScroll(element);\n const body = element.ownerDocument.body;\n const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n let x = -scroll.scrollLeft + getWindowScrollBarX(element);\n const y = -scroll.scrollTop;\n if (getComputedStyle(body).direction === 'rtl') {\n x += max(html.clientWidth, body.clientWidth) - width;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\nfunction getViewportRect(element, strategy) {\n const win = getWindow(element);\n const html = getDocumentElement(element);\n const visualViewport = win.visualViewport;\n let width = html.clientWidth;\n let height = html.clientHeight;\n let x = 0;\n let y = 0;\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n const visualViewportBased = isWebKit();\n if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// Returns the inner client rect, subtracting scrollbars if present.\nfunction getInnerBoundingClientRect(element, strategy) {\n const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');\n const top = clientRect.top + element.clientTop;\n const left = clientRect.left + element.clientLeft;\n const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);\n const width = element.clientWidth * scale.x;\n const height = element.clientHeight * scale.y;\n const x = left * scale.x;\n const y = top * scale.y;\n return {\n width,\n height,\n x,\n y\n };\n}\nfunction getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n let rect;\n if (clippingAncestor === 'viewport') {\n rect = getViewportRect(element, strategy);\n } else if (clippingAncestor === 'document') {\n rect = getDocumentRect(getDocumentElement(element));\n } else if (isElement(clippingAncestor)) {\n rect = getInnerBoundingClientRect(clippingAncestor, strategy);\n } else {\n const visualOffsets = getVisualOffsets(element);\n rect = {\n ...clippingAncestor,\n x: clippingAncestor.x - visualOffsets.x,\n y: clippingAncestor.y - visualOffsets.y\n };\n }\n return rectToClientRect(rect);\n}\nfunction hasFixedPositionAncestor(element, stopNode) {\n const parentNode = getParentNode(element);\n if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {\n return false;\n }\n return getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);\n}\n\n// A \"clipping ancestor\" is an `overflow` element with the characteristic of\n// clipping (or hiding) child elements. This returns all clipping ancestors\n// of the given element up the tree.\nfunction getClippingElementAncestors(element, cache) {\n const cachedResult = cache.get(element);\n if (cachedResult) {\n return cachedResult;\n }\n let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');\n let currentContainingBlockComputedStyle = null;\n const elementIsFixed = getComputedStyle(element).position === 'fixed';\n let currentNode = elementIsFixed ? getParentNode(element) : element;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n const computedStyle = getComputedStyle(currentNode);\n const currentNodeIsContaining = isContainingBlock(currentNode);\n if (!currentNodeIsContaining && computedStyle.position === 'fixed') {\n currentContainingBlockComputedStyle = null;\n }\n const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);\n if (shouldDropCurrentNode) {\n // Drop non-containing blocks.\n result = result.filter(ancestor => ancestor !== currentNode);\n } else {\n // Record last containing block for next iteration.\n currentContainingBlockComputedStyle = computedStyle;\n }\n currentNode = getParentNode(currentNode);\n }\n cache.set(element, result);\n return result;\n}\n\n// Gets the maximum area that the element is visible in due to any number of\n// clipping ancestors.\nfunction getClippingRect(_ref) {\n let {\n element,\n boundary,\n rootBoundary,\n strategy\n } = _ref;\n const elementClippingAncestors = boundary === 'clippingAncestors' ? getClippingElementAncestors(element, this._c) : [].concat(boundary);\n const clippingAncestors = [...elementClippingAncestors, rootBoundary];\n const firstClippingAncestor = clippingAncestors[0];\n const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {\n const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));\n return {\n width: clippingRect.right - clippingRect.left,\n height: clippingRect.bottom - clippingRect.top,\n x: clippingRect.left,\n y: clippingRect.top\n };\n}\n\nfunction getDimensions(element) {\n const {\n width,\n height\n } = getCssDimensions(element);\n return {\n width,\n height\n };\n}\n\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n const documentElement = getDocumentElement(offsetParent);\n const isFixed = strategy === 'fixed';\n const rect = getBoundingClientRect(element, true, isFixed, offsetParent);\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n const offsets = createCoords(0);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n const x = rect.left + scroll.scrollLeft - offsets.x;\n const y = rect.top + scroll.scrollTop - offsets.y;\n return {\n x,\n y,\n width: rect.width,\n height: rect.height\n };\n}\n\nfunction getTrueOffsetParent(element, polyfill) {\n if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {\n return null;\n }\n if (polyfill) {\n return polyfill(element);\n }\n return element.offsetParent;\n}\n\n// Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\nfunction getOffsetParent(element, polyfill) {\n const window = getWindow(element);\n if (!isHTMLElement(element) || isTopLayer(element)) {\n return window;\n }\n let offsetParent = getTrueOffsetParent(element, polyfill);\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent, polyfill);\n }\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {\n return window;\n }\n return offsetParent || getContainingBlock(element) || window;\n}\n\nconst getElementRects = async function (data) {\n const getOffsetParentFn = this.getOffsetParent || getOffsetParent;\n const getDimensionsFn = this.getDimensions;\n return {\n reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),\n floating: {\n x: 0,\n y: 0,\n ...(await getDimensionsFn(data.floating))\n }\n };\n};\n\nfunction isRTL(element) {\n return getComputedStyle(element).direction === 'rtl';\n}\n\nconst platform = {\n convertOffsetParentRelativeRectToViewportRelativeRect,\n getDocumentElement,\n getClippingRect,\n getOffsetParent,\n getElementRects,\n getClientRects,\n getDimensions,\n getScale,\n isElement,\n isRTL\n};\n\n// https://samthor.au/2021/observing-dom/\nfunction observeMove(element, onMove) {\n let io = null;\n let timeoutId;\n const root = getDocumentElement(element);\n function cleanup() {\n var _io;\n clearTimeout(timeoutId);\n (_io = io) == null || _io.disconnect();\n io = null;\n }\n function refresh(skip, threshold) {\n if (skip === void 0) {\n skip = false;\n }\n if (threshold === void 0) {\n threshold = 1;\n }\n cleanup();\n const {\n left,\n top,\n width,\n height\n } = element.getBoundingClientRect();\n if (!skip) {\n onMove();\n }\n if (!width || !height) {\n return;\n }\n const insetTop = floor(top);\n const insetRight = floor(root.clientWidth - (left + width));\n const insetBottom = floor(root.clientHeight - (top + height));\n const insetLeft = floor(left);\n const rootMargin = -insetTop + \"px \" + -insetRight + \"px \" + -insetBottom + \"px \" + -insetLeft + \"px\";\n const options = {\n rootMargin,\n threshold: max(0, min(1, threshold)) || 1\n };\n let isFirstUpdate = true;\n function handleObserve(entries) {\n const ratio = entries[0].intersectionRatio;\n if (ratio !== threshold) {\n if (!isFirstUpdate) {\n return refresh();\n }\n if (!ratio) {\n timeoutId = setTimeout(() => {\n refresh(false, 1e-7);\n }, 100);\n } else {\n refresh(false, ratio);\n }\n }\n isFirstUpdate = false;\n }\n\n // Older browsers don't support a `document` as the root and will throw an\n // error.\n try {\n io = new IntersectionObserver(handleObserve, {\n ...options,\n // Handle <iframe>s\n root: root.ownerDocument\n });\n } catch (e) {\n io = new IntersectionObserver(handleObserve, options);\n }\n io.observe(element);\n }\n refresh(true);\n return cleanup;\n}\n\n/**\n * Automatically updates the position of the floating element when necessary.\n * Should only be called when the floating element is mounted on the DOM or\n * visible on the screen.\n * @returns cleanup function that should be invoked when the floating element is\n * removed from the DOM or hidden from the screen.\n * @see https://floating-ui.com/docs/autoUpdate\n */\nfunction autoUpdate(reference, floating, update, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n ancestorScroll = true,\n ancestorResize = true,\n elementResize = typeof ResizeObserver === 'function',\n layoutShift = typeof IntersectionObserver === 'function',\n animationFrame = false\n } = options;\n const referenceEl = unwrapElement(reference);\n const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.addEventListener('scroll', update, {\n passive: true\n });\n ancestorResize && ancestor.addEventListener('resize', update);\n });\n const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;\n let reobserveFrame = -1;\n let resizeObserver = null;\n if (elementResize) {\n resizeObserver = new ResizeObserver(_ref => {\n let [firstEntry] = _ref;\n if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {\n // Prevent update loops when using the `size` middleware.\n // https://github.com/floating-ui/floating-ui/issues/1740\n resizeObserver.unobserve(floating);\n cancelAnimationFrame(reobserveFrame);\n reobserveFrame = requestAnimationFrame(() => {\n var _resizeObserver;\n (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);\n });\n }\n update();\n });\n if (referenceEl && !animationFrame) {\n resizeObserver.observe(referenceEl);\n }\n resizeObserver.observe(floating);\n }\n let frameId;\n let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;\n if (animationFrame) {\n frameLoop();\n }\n function frameLoop() {\n const nextRefRect = getBoundingClientRect(reference);\n if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {\n update();\n }\n prevRefRect = nextRefRect;\n frameId = requestAnimationFrame(frameLoop);\n }\n update();\n return () => {\n var _resizeObserver2;\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.removeEventListener('scroll', update);\n ancestorResize && ancestor.removeEventListener('resize', update);\n });\n cleanupIo == null || cleanupIo();\n (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();\n resizeObserver = null;\n if (animationFrame) {\n cancelAnimationFrame(frameId);\n }\n };\n}\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = autoPlacement$1;\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = shift$1;\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = flip$1;\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = size$1;\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = hide$1;\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = arrow$1;\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = inline$1;\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = limitShift$1;\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n */\nconst computePosition = (reference, floating, options) => {\n // This caches the expensive `getClippingElementAncestors` function so that\n // multiple lifecycle resets re-use the same result. It only lives for a\n // single call. If other functions become expensive, we can add them as well.\n const cache = new Map();\n const mergedOptions = {\n platform,\n ...options\n };\n const platformWithCache = {\n ...mergedOptions.platform,\n _c: cache\n };\n return computePosition$1(reference, floating, {\n ...mergedOptions,\n platform: platformWithCache\n });\n};\n\nexport { arrow, autoPlacement, autoUpdate, computePosition, flip, hide, inline, limitShift, platform, shift, size };\n","import { arrow as arrow$1, computePosition } from '@floating-ui/dom';\nexport { autoPlacement, autoUpdate, computePosition, detectOverflow, flip, getOverflowAncestors, hide, inline, limitShift, offset, platform, shift, size } from '@floating-ui/dom';\nimport * as React from 'react';\nimport { useLayoutEffect, useEffect } from 'react';\nimport * as ReactDOM from 'react-dom';\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * This wraps the core `arrow` middleware to allow React refs as the element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = options => {\n function isRef(value) {\n return {}.hasOwnProperty.call(value, 'current');\n }\n return {\n name: 'arrow',\n options,\n fn(state) {\n const {\n element,\n padding\n } = typeof options === 'function' ? options(state) : options;\n if (element && isRef(element)) {\n if (element.current != null) {\n return arrow$1({\n element: element.current,\n padding\n }).fn(state);\n }\n return {};\n }\n if (element) {\n return arrow$1({\n element,\n padding\n }).fn(state);\n }\n return {};\n }\n };\n};\n\nvar index = typeof document !== 'undefined' ? useLayoutEffect : useEffect;\n\n// Fork of `fast-deep-equal` that only does the comparisons we need and compares\n// functions\nfunction deepEqual(a, b) {\n if (a === b) {\n return true;\n }\n if (typeof a !== typeof b) {\n return false;\n }\n if (typeof a === 'function' && a.toString() === b.toString()) {\n return true;\n }\n let length;\n let i;\n let keys;\n if (a && b && typeof a === 'object') {\n if (Array.isArray(a)) {\n length = a.length;\n if (length !== b.length) return false;\n for (i = length; i-- !== 0;) {\n if (!deepEqual(a[i], b[i])) {\n return false;\n }\n }\n return true;\n }\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) {\n return false;\n }\n for (i = length; i-- !== 0;) {\n if (!{}.hasOwnProperty.call(b, keys[i])) {\n return false;\n }\n }\n for (i = length; i-- !== 0;) {\n const key = keys[i];\n if (key === '_owner' && a.$$typeof) {\n continue;\n }\n if (!deepEqual(a[key], b[key])) {\n return false;\n }\n }\n return true;\n }\n\n // biome-ignore lint/suspicious/noSelfCompare: in source\n return a !== a && b !== b;\n}\n\nfunction getDPR(element) {\n if (typeof window === 'undefined') {\n return 1;\n }\n const win = element.ownerDocument.defaultView || window;\n return win.devicePixelRatio || 1;\n}\n\nfunction roundByDPR(element, value) {\n const dpr = getDPR(element);\n return Math.round(value * dpr) / dpr;\n}\n\nfunction useLatestRef(value) {\n const ref = React.useRef(value);\n index(() => {\n ref.current = value;\n });\n return ref;\n}\n\n/**\n * Provides data to position a floating element.\n * @see https://floating-ui.com/docs/useFloating\n */\nfunction useFloating(options) {\n if (options === void 0) {\n options = {};\n }\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform,\n elements: {\n reference: externalReference,\n floating: externalFloating\n } = {},\n transform = true,\n whileElementsMounted,\n open\n } = options;\n const [data, setData] = React.useState({\n x: 0,\n y: 0,\n strategy,\n placement,\n middlewareData: {},\n isPositioned: false\n });\n const [latestMiddleware, setLatestMiddleware] = React.useState(middleware);\n if (!deepEqual(latestMiddleware, middleware)) {\n setLatestMiddleware(middleware);\n }\n const [_reference, _setReference] = React.useState(null);\n const [_floating, _setFloating] = React.useState(null);\n const setReference = React.useCallback(node => {\n if (node !== referenceRef.current) {\n referenceRef.current = node;\n _setReference(node);\n }\n }, []);\n const setFloating = React.useCallback(node => {\n if (node !== floatingRef.current) {\n floatingRef.current = node;\n _setFloating(node);\n }\n }, []);\n const referenceEl = externalReference || _reference;\n const floatingEl = externalFloating || _floating;\n const referenceRef = React.useRef(null);\n const floatingRef = React.useRef(null);\n const dataRef = React.useRef(data);\n const hasWhileElementsMounted = whileElementsMounted != null;\n const whileElementsMountedRef = useLatestRef(whileElementsMounted);\n const platformRef = useLatestRef(platform);\n const update = React.useCallback(() => {\n if (!referenceRef.current || !floatingRef.current) {\n return;\n }\n const config = {\n placement,\n strategy,\n middleware: latestMiddleware\n };\n if (platformRef.current) {\n config.platform = platformRef.current;\n }\n computePosition(referenceRef.current, floatingRef.current, config).then(data => {\n const fullData = {\n ...data,\n isPositioned: true\n };\n if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {\n dataRef.current = fullData;\n ReactDOM.flushSync(() => {\n setData(fullData);\n });\n }\n });\n }, [latestMiddleware, placement, strategy, platformRef]);\n index(() => {\n if (open === false && dataRef.current.isPositioned) {\n dataRef.current.isPositioned = false;\n setData(data => ({\n ...data,\n isPositioned: false\n }));\n }\n }, [open]);\n const isMountedRef = React.useRef(false);\n index(() => {\n isMountedRef.current = true;\n return () => {\n isMountedRef.current = false;\n };\n }, []);\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: `hasWhileElementsMounted` is intentionally included.\n index(() => {\n if (referenceEl) referenceRef.current = referenceEl;\n if (floatingEl) floatingRef.current = floatingEl;\n if (referenceEl && floatingEl) {\n if (whileElementsMountedRef.current) {\n return whileElementsMountedRef.current(referenceEl, floatingEl, update);\n }\n update();\n }\n }, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);\n const refs = React.useMemo(() => ({\n reference: referenceRef,\n floating: floatingRef,\n setReference,\n setFloating\n }), [setReference, setFloating]);\n const elements = React.useMemo(() => ({\n reference: referenceEl,\n floating: floatingEl\n }), [referenceEl, floatingEl]);\n const floatingStyles = React.useMemo(() => {\n const initialStyles = {\n position: strategy,\n left: 0,\n top: 0\n };\n if (!elements.floating) {\n return initialStyles;\n }\n const x = roundByDPR(elements.floating, data.x);\n const y = roundByDPR(elements.floating, data.y);\n if (transform) {\n return {\n ...initialStyles,\n transform: \"translate(\" + x + \"px, \" + y + \"px)\",\n ...(getDPR(elements.floating) >= 1.5 && {\n willChange: 'transform'\n })\n };\n }\n return {\n position: strategy,\n left: x,\n top: y\n };\n }, [strategy, transform, elements.floating, data.x, data.y]);\n return React.useMemo(() => ({\n ...data,\n update,\n refs,\n elements,\n floatingStyles\n }), [data, update, refs, elements, floatingStyles]);\n}\n\nexport { arrow, useFloating };\n","/*!\n* tabbable 6.2.0\n* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE\n*/\n// NOTE: separate `:not()` selectors has broader browser support than the newer\n// `:not([inert], [inert] *)` (Feb 2023)\n// CAREFUL: JSDom does not support `:not([inert] *)` as a selector; using it causes\n// the entire query to fail, resulting in no nodes found, which will break a lot\n// of things... so we have to rely on JS to identify nodes inside an inert container\nvar candidateSelectors = ['input:not([inert])', 'select:not([inert])', 'textarea:not([inert])', 'a[href]:not([inert])', 'button:not([inert])', '[tabindex]:not(slot):not([inert])', 'audio[controls]:not([inert])', 'video[controls]:not([inert])', '[contenteditable]:not([contenteditable=\"false\"]):not([inert])', 'details>summary:first-of-type:not([inert])', 'details:not([inert])'];\nvar candidateSelector = /* #__PURE__ */candidateSelectors.join(',');\nvar NoElement = typeof Element === 'undefined';\nvar matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\nvar getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {\n var _element$getRootNode;\n return element === null || element === void 0 ? void 0 : (_element$getRootNode = element.getRootNode) === null || _element$getRootNode === void 0 ? void 0 : _element$getRootNode.call(element);\n} : function (element) {\n return element === null || element === void 0 ? void 0 : element.ownerDocument;\n};\n\n/**\n * Determines if a node is inert or in an inert ancestor.\n * @param {Element} [node]\n * @param {boolean} [lookUp] If true and `node` is not inert, looks up at ancestors to\n * see if any of them are inert. If false, only `node` itself is considered.\n * @returns {boolean} True if inert itself or by way of being in an inert ancestor.\n * False if `node` is falsy.\n */\nvar isInert = function isInert(node, lookUp) {\n var _node$getAttribute;\n if (lookUp === void 0) {\n lookUp = true;\n }\n // CAREFUL: JSDom does not support inert at all, so we can't use the `HTMLElement.inert`\n // JS API property; we have to check the attribute, which can either be empty or 'true';\n // if it's `null` (not specified) or 'false', it's an active element\n var inertAtt = node === null || node === void 0 ? void 0 : (_node$getAttribute = node.getAttribute) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.call(node, 'inert');\n var inert = inertAtt === '' || inertAtt === 'true';\n\n // NOTE: this could also be handled with `node.matches('[inert], :is([inert] *)')`\n // if it weren't for `matches()` not being a function on shadow roots; the following\n // code works for any kind of node\n // CAREFUL: JSDom does not appear to support certain selectors like `:not([inert] *)`\n // so it likely would not support `:is([inert] *)` either...\n var result = inert || lookUp && node && isInert(node.parentNode); // recursive\n\n return result;\n};\n\n/**\n * Determines if a node's content is editable.\n * @param {Element} [node]\n * @returns True if it's content-editable; false if it's not or `node` is falsy.\n */\nvar isContentEditable = function isContentEditable(node) {\n var _node$getAttribute2;\n // CAREFUL: JSDom does not support the `HTMLElement.isContentEditable` API so we have\n // to use the attribute directly to check for this, which can either be empty or 'true';\n // if it's `null` (not specified) or 'false', it's a non-editable element\n var attValue = node === null || node === void 0 ? void 0 : (_node$getAttribute2 = node.getAttribute) === null || _node$getAttribute2 === void 0 ? void 0 : _node$getAttribute2.call(node, 'contenteditable');\n return attValue === '' || attValue === 'true';\n};\n\n/**\n * @param {Element} el container to check in\n * @param {boolean} includeContainer add container to check\n * @param {(node: Element) => boolean} filter filter candidates\n * @returns {Element[]}\n */\nvar getCandidates = function getCandidates(el, includeContainer, filter) {\n // even if `includeContainer=false`, we still have to check it for inertness because\n // if it's inert, all its children are inert\n if (isInert(el)) {\n return [];\n }\n var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));\n if (includeContainer && matches.call(el, candidateSelector)) {\n candidates.unshift(el);\n }\n candidates = candidates.filter(filter);\n return candidates;\n};\n\n/**\n * @callback GetShadowRoot\n * @param {Element} element to check for shadow root\n * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.\n */\n\n/**\n * @callback ShadowRootFilter\n * @param {Element} shadowHostNode the element which contains shadow content\n * @returns {boolean} true if a shadow root could potentially contain valid candidates.\n */\n\n/**\n * @typedef {Object} CandidateScope\n * @property {Element} scopeParent contains inner candidates\n * @property {Element[]} candidates list of candidates found in the scope parent\n */\n\n/**\n * @typedef {Object} IterativeOptions\n * @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;\n * if a function, implies shadow support is enabled and either returns the shadow root of an element\n * or a boolean stating if it has an undisclosed shadow root\n * @property {(node: Element) => boolean} filter filter candidates\n * @property {boolean} flatten if true then result will flatten any CandidateScope into the returned list\n * @property {ShadowRootFilter} shadowRootFilter filter shadow roots;\n */\n\n/**\n * @param {Element[]} elements list of element containers to match candidates from\n * @param {boolean} includeContainer add container list to check\n * @param {IterativeOptions} options\n * @returns {Array.<Element|CandidateScope>}\n */\nvar getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {\n var candidates = [];\n var elementsToCheck = Array.from(elements);\n while (elementsToCheck.length) {\n var element = elementsToCheck.shift();\n if (isInert(element, false)) {\n // no need to look up since we're drilling down\n // anything inside this container will also be inert\n continue;\n }\n if (element.tagName === 'SLOT') {\n // add shadow dom slot scope (slot itself cannot be focusable)\n var assigned = element.assignedElements();\n var content = assigned.length ? assigned : element.children;\n var nestedCandidates = getCandidatesIteratively(content, true, options);\n if (options.flatten) {\n candidates.push.apply(candidates, nestedCandidates);\n } else {\n candidates.push({\n scopeParent: element,\n candidates: nestedCandidates\n });\n }\n } else {\n // check candidate element\n var validCandidate = matches.call(element, candidateSelector);\n if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {\n candidates.push(element);\n }\n\n // iterate over shadow content if possible\n var shadowRoot = element.shadowRoot ||\n // check for an undisclosed shadow\n typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);\n\n // no inert look up because we're already drilling down and checking for inertness\n // on the way down, so all containers to this root node should have already been\n // vetted as non-inert\n var validShadowRoot = !isInert(shadowRoot, false) && (!options.shadowRootFilter || options.shadowRootFilter(element));\n if (shadowRoot && validShadowRoot) {\n // add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed\n // shadow exists, so look at light dom children as fallback BUT create a scope for any\n // child candidates found because they're likely slotted elements (elements that are\n // children of the web component element (which has the shadow), in the light dom, but\n // slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,\n // _after_ we return from this recursive call\n var _nestedCandidates = getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);\n if (options.flatten) {\n candidates.push.apply(candidates, _nestedCandidates);\n } else {\n candidates.push({\n scopeParent: element,\n candidates: _nestedCandidates\n });\n }\n } else {\n // there's not shadow so just dig into the element's (light dom) children\n // __without__ giving the element special scope treatment\n elementsToCheck.unshift.apply(elementsToCheck, element.children);\n }\n }\n }\n return candidates;\n};\n\n/**\n * @private\n * Determines if the node has an explicitly specified `tabindex` attribute.\n * @param {HTMLElement} node\n * @returns {boolean} True if so; false if not.\n */\nvar hasTabIndex = function hasTabIndex(node) {\n return !isNaN(parseInt(node.getAttribute('tabindex'), 10));\n};\n\n/**\n * Determine the tab index of a given node.\n * @param {HTMLElement} node\n * @returns {number} Tab order (negative, 0, or positive number).\n * @throws {Error} If `node` is falsy.\n */\nvar getTabIndex = function getTabIndex(node) {\n if (!node) {\n throw new Error('No node provided');\n }\n if (node.tabIndex < 0) {\n // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default\n // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,\n // yet they are still part of the regular tab order; in FF, they get a default\n // `tabIndex` of 0; since Chrome still puts those elements in the regular tab\n // order, consider their tab index to be 0.\n // Also browsers do not return `tabIndex` correctly for contentEditable nodes;\n // so if they don't have a tabindex attribute specifically set, assume it's 0.\n if ((/^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && !hasTabIndex(node)) {\n return 0;\n }\n }\n return node.tabIndex;\n};\n\n/**\n * Determine the tab index of a given node __for sort order purposes__.\n * @param {HTMLElement} node\n * @param {boolean} [isScope] True for a custom element with shadow root or slot that, by default,\n * has tabIndex -1, but needs to be sorted by document order in order for its content to be\n * inserted into the correct sort position.\n * @returns {number} Tab order (negative, 0, or positive number).\n */\nvar getSortOrderTabIndex = function getSortOrderTabIndex(node, isScope) {\n var tabIndex = getTabIndex(node);\n if (tabIndex < 0 && isScope && !hasTabIndex(node)) {\n return 0;\n }\n return tabIndex;\n};\nvar sortOrderedTabbables = function sortOrderedTabbables(a, b) {\n return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;\n};\nvar isInput = function isInput(node) {\n return node.tagName === 'INPUT';\n};\nvar isHiddenInput = function isHiddenInput(node) {\n return isInput(node) && node.type === 'hidden';\n};\nvar isDetailsWithSummary = function isDetailsWithSummary(node) {\n var r = node.tagName === 'DETAILS' && Array.prototype.slice.apply(node.children).some(function (child) {\n return child.tagName === 'SUMMARY';\n });\n return r;\n};\nvar getCheckedRadio = function getCheckedRadio(nodes, form) {\n for (var i = 0; i < nodes.length; i++) {\n if (nodes[i].checked && nodes[i].form === form) {\n return nodes[i];\n }\n }\n};\nvar isTabbableRadio = function isTabbableRadio(node) {\n if (!node.name) {\n return true;\n }\n var radioScope = node.form || getRootNode(node);\n var queryRadios = function queryRadios(name) {\n return radioScope.querySelectorAll('input[type=\"radio\"][name=\"' + name + '\"]');\n };\n var radioSet;\n if (typeof window !== 'undefined' && typeof window.CSS !== 'undefined' && typeof window.CSS.escape === 'function') {\n radioSet = queryRadios(window.CSS.escape(node.name));\n } else {\n try {\n radioSet = queryRadios(node.name);\n } catch (err) {\n // eslint-disable-next-line no-console\n console.error('Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s', err.message);\n return false;\n }\n }\n var checked = getCheckedRadio(radioSet, node.form);\n return !checked || checked === node;\n};\nvar isRadio = function isRadio(node) {\n return isInput(node) && node.type === 'radio';\n};\nvar isNonTabbableRadio = function isNonTabbableRadio(node) {\n return isRadio(node) && !isTabbableRadio(node);\n};\n\n// determines if a node is ultimately attached to the window's document\nvar isNodeAttached = function isNodeAttached(node) {\n var _nodeRoot;\n // The root node is the shadow root if the node is in a shadow DOM; some document otherwise\n // (but NOT _the_ document; see second 'If' comment below for more).\n // If rootNode is shadow root, it'll have a host, which is the element to which the shadow\n // is attached, and the one we need to check if it's in the document or not (because the\n // shadow, and all nodes it contains, is never considered in the document since shadows\n // behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,\n // is hidden, or is not in the document itself but is detached, it will affect the shadow's\n // visibility, including all the nodes it contains). The host could be any normal node,\n // or a custom element (i.e. web component). Either way, that's the one that is considered\n // part of the document, not the shadow root, nor any of its children (i.e. the node being\n // tested).\n // To further complicate things, we have to look all the way up until we find a shadow HOST\n // that is attached (or find none) because the node might be in nested shadows...\n // If rootNode is not a shadow root, it won't have a host, and so rootNode should be the\n // document (per the docs) and while it's a Document-type object, that document does not\n // appear to be the same as the node's `ownerDocument` for some reason, so it's safer\n // to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,\n // using `rootNode.contains(node)` will _always_ be true we'll get false-positives when\n // node is actually detached.\n // NOTE: If `nodeRootHost` or `node` happens to be the `document` itself (which is possible\n // if a tabbable/focusable node was quickly added to the DOM, focused, and then removed\n // from the DOM as in https://github.com/focus-trap/focus-trap-react/issues/905), then\n // `ownerDocument` will be `null`, hence the optional chaining on it.\n var nodeRoot = node && getRootNode(node);\n var nodeRootHost = (_nodeRoot = nodeRoot) === null || _nodeRoot === void 0 ? void 0 : _nodeRoot.host;\n\n // in some cases, a detached node will return itself as the root instead of a document or\n // shadow root object, in which case, we shouldn't try to look further up the host chain\n var attached = false;\n if (nodeRoot && nodeRoot !== node) {\n var _nodeRootHost, _nodeRootHost$ownerDo, _node$ownerDocument;\n attached = !!((_nodeRootHost = nodeRootHost) !== null && _nodeRootHost !== void 0 && (_nodeRootHost$ownerDo = _nodeRootHost.ownerDocument) !== null && _nodeRootHost$ownerDo !== void 0 && _nodeRootHost$ownerDo.contains(nodeRootHost) || node !== null && node !== void 0 && (_node$ownerDocument = node.ownerDocument) !== null && _node$ownerDocument !== void 0 && _node$ownerDocument.contains(node));\n while (!attached && nodeRootHost) {\n var _nodeRoot2, _nodeRootHost2, _nodeRootHost2$ownerD;\n // since it's not attached and we have a root host, the node MUST be in a nested shadow DOM,\n // which means we need to get the host's host and check if that parent host is contained\n // in (i.e. attached to) the document\n nodeRoot = getRootNode(nodeRootHost);\n nodeRootHost = (_nodeRoot2 = nodeRoot) === null || _nodeRoot2 === void 0 ? void 0 : _nodeRoot2.host;\n attached = !!((_nodeRootHost2 = nodeRootHost) !== null && _nodeRootHost2 !== void 0 && (_nodeRootHost2$ownerD = _nodeRootHost2.ownerDocument) !== null && _nodeRootHost2$ownerD !== void 0 && _nodeRootHost2$ownerD.contains(nodeRootHost));\n }\n }\n return attached;\n};\nvar isZeroArea = function isZeroArea(node) {\n var _node$getBoundingClie = node.getBoundingClientRect(),\n width = _node$getBoundingClie.width,\n height = _node$getBoundingClie.height;\n return width === 0 && height === 0;\n};\nvar isHidden = function isHidden(node, _ref) {\n var displayCheck = _ref.displayCheck,\n getShadowRoot = _ref.getShadowRoot;\n // NOTE: visibility will be `undefined` if node is detached from the document\n // (see notes about this further down), which means we will consider it visible\n // (this is legacy behavior from a very long way back)\n // NOTE: we check this regardless of `displayCheck=\"none\"` because this is a\n // _visibility_ check, not a _display_ check\n if (getComputedStyle(node).visibility === 'hidden') {\n return true;\n }\n var isDirectSummary = matches.call(node, 'details>summary:first-of-type');\n var nodeUnderDetails = isDirectSummary ? node.parentElement : node;\n if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {\n return true;\n }\n if (!displayCheck || displayCheck === 'full' || displayCheck === 'legacy-full') {\n if (typeof getShadowRoot === 'function') {\n // figure out if we should consider the node to be in an undisclosed shadow and use the\n // 'non-zero-area' fallback\n var originalNode = node;\n while (node) {\n var parentElement = node.parentElement;\n var rootNode = getRootNode(node);\n if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow\n ) {\n // node has an undisclosed shadow which means we can only treat it as a black box, so we\n // fall back to a non-zero-area test\n return isZeroArea(node);\n } else if (node.assignedSlot) {\n // iterate up slot\n node = node.assignedSlot;\n } else if (!parentElement && rootNode !== node.ownerDocument) {\n // cross shadow boundary\n node = rootNode.host;\n } else {\n // iterate up normal dom\n node = parentElement;\n }\n }\n node = originalNode;\n }\n // else, `getShadowRoot` might be true, but all that does is enable shadow DOM support\n // (i.e. it does not also presume that all nodes might have undisclosed shadows); or\n // it might be a falsy value, which means shadow DOM support is disabled\n\n // Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)\n // now we can just test to see if it would normally be visible or not, provided it's\n // attached to the main document.\n // NOTE: We must consider case where node is inside a shadow DOM and given directly to\n // `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.\n\n if (isNodeAttached(node)) {\n // this works wherever the node is: if there's at least one client rect, it's\n // somehow displayed; it also covers the CSS 'display: contents' case where the\n // node itself is hidden in place of its contents; and there's no need to search\n // up the hierarchy either\n return !node.getClientRects().length;\n }\n\n // Else, the node isn't attached to the document, which means the `getClientRects()`\n // API will __always__ return zero rects (this can happen, for example, if React\n // is used to render nodes onto a detached tree, as confirmed in this thread:\n // https://github.com/facebook/react/issues/9117#issuecomment-284228870)\n //\n // It also means that even window.getComputedStyle(node).display will return `undefined`\n // because styles are only computed for nodes that are in the document.\n //\n // NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable\n // somehow. Though it was never stated officially, anyone who has ever used tabbable\n // APIs on nodes in detached containers has actually implicitly used tabbable in what\n // was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck=\"none\"` mode -- essentially\n // considering __everything__ to be visible because of the innability to determine styles.\n //\n // v6.0.0: As of this major release, the default 'full' option __no longer treats detached\n // nodes as visible with the 'none' fallback.__\n if (displayCheck !== 'legacy-full') {\n return true; // hidden\n }\n // else, fallback to 'none' mode and consider the node visible\n } else if (displayCheck === 'non-zero-area') {\n // NOTE: Even though this tests that the node's client rect is non-zero to determine\n // whether it's displayed, and that a detached node will __always__ have a zero-area\n // client rect, we don't special-case for whether the node is attached or not. In\n // this mode, we do want to consider nodes that have a zero area to be hidden at all\n // times, and that includes attached or not.\n return isZeroArea(node);\n }\n\n // visible, as far as we can tell, or per current `displayCheck=none` mode, we assume\n // it's visible\n return false;\n};\n\n// form fields (nested) inside a disabled fieldset are not focusable/tabbable\n// unless they are in the _first_ <legend> element of the top-most disabled\n// fieldset\nvar isDisabledFromFieldset = function isDisabledFromFieldset(node) {\n if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {\n var parentNode = node.parentElement;\n // check if `node` is contained in a disabled <fieldset>\n while (parentNode) {\n if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {\n // look for the first <legend> among the children of the disabled <fieldset>\n for (var i = 0; i < parentNode.children.length; i++) {\n var child = parentNode.children.item(i);\n // when the first <legend> (in document order) is found\n if (child.tagName === 'LEGEND') {\n // if its parent <fieldset> is not nested in another disabled <fieldset>,\n // return whether `node` is a descendant of its first <legend>\n return matches.call(parentNode, 'fieldset[disabled] *') ? true : !child.contains(node);\n }\n }\n // the disabled <fieldset> containing `node` has no <legend>\n return true;\n }\n parentNode = parentNode.parentElement;\n }\n }\n\n // else, node's tabbable/focusable state should not be affected by a fieldset's\n // enabled/disabled state\n return false;\n};\nvar isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {\n if (node.disabled ||\n // we must do an inert look up to filter out any elements inside an inert ancestor\n // because we're limited in the type of selectors we can use in JSDom (see related\n // note related to `candidateSelectors`)\n isInert(node) || isHiddenInput(node) || isHidden(node, options) ||\n // For a details element with a summary, the summary element gets the focus\n isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {\n return false;\n }\n return true;\n};\nvar isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {\n if (isNonTabbableRadio(node) || getTabIndex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {\n return false;\n }\n return true;\n};\nvar isValidShadowRootTabbable = function isValidShadowRootTabbable(shadowHostNode) {\n var tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);\n if (isNaN(tabIndex) || tabIndex >= 0) {\n return true;\n }\n // If a custom element has an explicit negative tabindex,\n // browsers will not allow tab targeting said element's children.\n return false;\n};\n\n/**\n * @param {Array.<Element|CandidateScope>} candidates\n * @returns Element[]\n */\nvar sortByOrder = function sortByOrder(candidates) {\n var regularTabbables = [];\n var orderedTabbables = [];\n candidates.forEach(function (item, i) {\n var isScope = !!item.scopeParent;\n var element = isScope ? item.scopeParent : item;\n var candidateTabindex = getSortOrderTabIndex(element, isScope);\n var elements = isScope ? sortByOrder(item.candidates) : element;\n if (candidateTabindex === 0) {\n isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);\n } else {\n orderedTabbables.push({\n documentOrder: i,\n tabIndex: candidateTabindex,\n item: item,\n isScope: isScope,\n content: elements\n });\n }\n });\n return orderedTabbables.sort(sortOrderedTabbables).reduce(function (acc, sortable) {\n sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);\n return acc;\n }, []).concat(regularTabbables);\n};\nvar tabbable = function tabbable(container, options) {\n options = options || {};\n var candidates;\n if (options.getShadowRoot) {\n candidates = getCandidatesIteratively([container], options.includeContainer, {\n filter: isNodeMatchingSelectorTabbable.bind(null, options),\n flatten: false,\n getShadowRoot: options.getShadowRoot,\n shadowRootFilter: isValidShadowRootTabbable\n });\n } else {\n candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));\n }\n return sortByOrder(candidates);\n};\nvar focusable = function focusable(container, options) {\n options = options || {};\n var candidates;\n if (options.getShadowRoot) {\n candidates = getCandidatesIteratively([container], options.includeContainer, {\n filter: isNodeMatchingSelectorFocusable.bind(null, options),\n flatten: true,\n getShadowRoot: options.getShadowRoot\n });\n } else {\n candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));\n }\n return candidates;\n};\nvar isTabbable = function isTabbable(node, options) {\n options = options || {};\n if (!node) {\n throw new Error('No node provided');\n }\n if (matches.call(node, candidateSelector) === false) {\n return false;\n }\n return isNodeMatchingSelectorTabbable(options, node);\n};\nvar focusableCandidateSelector = /* #__PURE__ */candidateSelectors.concat('iframe').join(',');\nvar isFocusable = function isFocusable(node, options) {\n options = options || {};\n if (!node) {\n throw new Error('No node provided');\n }\n if (matches.call(node, focusableCandidateSelector) === false) {\n return false;\n }\n return isNodeMatchingSelectorFocusable(options, node);\n};\n\nexport { focusable, getTabIndex, isFocusable, isTabbable, tabbable };\n//# sourceMappingURL=index.esm.js.map\n","import * as React from 'react';\nimport { useLayoutEffect, useEffect, useRef } from 'react';\nimport { stopEvent, getDocument, isMouseLikePointerType, contains, activeElement, isSafari, isTypeableCombobox, isVirtualClick, isVirtualPointerEvent, getTarget, getPlatform, isTypeableElement, isReactEvent, isRootElement, isEventTargetWithin, isMac, getUserAgent } from '@floating-ui/react/utils';\nimport { floor } from '@floating-ui/utils';\nimport { platform, getOverflowAncestors, useFloating as useFloating$1, offset, detectOverflow } from '@floating-ui/react-dom';\nexport { arrow, autoPlacement, autoUpdate, computePosition, detectOverflow, flip, getOverflowAncestors, hide, inline, limitShift, offset, platform, shift, size } from '@floating-ui/react-dom';\nimport { isElement, isHTMLElement, getNodeName, getWindow, isLastTraversableNode, getParentNode, getComputedStyle } from '@floating-ui/utils/dom';\nimport { tabbable, isTabbable } from 'tabbable';\nimport { createPortal, flushSync } from 'react-dom';\n\n/**\n * Merges an array of refs into a single memoized callback ref or `null`.\n * @see https://floating-ui.com/docs/react-utils#usemergerefs\n */\nfunction useMergeRefs(refs) {\n return React.useMemo(() => {\n if (refs.every(ref => ref == null)) {\n return null;\n }\n return value => {\n refs.forEach(ref => {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref != null) {\n ref.current = value;\n }\n });\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, refs);\n}\n\n// https://github.com/mui/material-ui/issues/41190#issuecomment-2040873379\nconst SafeReact = {\n ...React\n};\n\nconst useInsertionEffect = SafeReact.useInsertionEffect;\nconst useSafeInsertionEffect = useInsertionEffect || (fn => fn());\nfunction useEffectEvent(callback) {\n const ref = React.useRef(() => {\n if (process.env.NODE_ENV !== \"production\") {\n throw new Error('Cannot call an event handler while rendering.');\n }\n });\n useSafeInsertionEffect(() => {\n ref.current = callback;\n });\n return React.useCallback(function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return ref.current == null ? void 0 : ref.current(...args);\n }, []);\n}\n\nconst ARROW_UP = 'ArrowUp';\nconst ARROW_DOWN = 'ArrowDown';\nconst ARROW_LEFT = 'ArrowLeft';\nconst ARROW_RIGHT = 'ArrowRight';\nfunction isDifferentRow(index, cols, prevRow) {\n return Math.floor(index / cols) !== prevRow;\n}\nfunction isIndexOutOfBounds(listRef, index) {\n return index < 0 || index >= listRef.current.length;\n}\nfunction getMinIndex(listRef, disabledIndices) {\n return findNonDisabledIndex(listRef, {\n disabledIndices\n });\n}\nfunction getMaxIndex(listRef, disabledIndices) {\n return findNonDisabledIndex(listRef, {\n decrement: true,\n startingIndex: listRef.current.length,\n disabledIndices\n });\n}\nfunction findNonDisabledIndex(listRef, _temp) {\n let {\n startingIndex = -1,\n decrement = false,\n disabledIndices,\n amount = 1\n } = _temp === void 0 ? {} : _temp;\n const list = listRef.current;\n const isDisabledIndex = disabledIndices ? index => disabledIndices.includes(index) : index => {\n const element = list[index];\n return element == null || element.hasAttribute('disabled') || element.getAttribute('aria-disabled') === 'true';\n };\n let index = startingIndex;\n do {\n index += decrement ? -amount : amount;\n } while (index >= 0 && index <= list.length - 1 && isDisabledIndex(index));\n return index;\n}\nfunction getGridNavigatedIndex(elementsRef, _ref) {\n let {\n event,\n orientation,\n loop,\n cols,\n disabledIndices,\n minIndex,\n maxIndex,\n prevIndex,\n stopEvent: stop = false\n } = _ref;\n let nextIndex = prevIndex;\n if (event.key === ARROW_UP) {\n stop && stopEvent(event);\n if (prevIndex === -1) {\n nextIndex = maxIndex;\n } else {\n nextIndex = findNonDisabledIndex(elementsRef, {\n startingIndex: nextIndex,\n amount: cols,\n decrement: true,\n disabledIndices\n });\n if (loop && (prevIndex - cols < minIndex || nextIndex < 0)) {\n const col = prevIndex % cols;\n const maxCol = maxIndex % cols;\n const offset = maxIndex - (maxCol - col);\n if (maxCol === col) {\n nextIndex = maxIndex;\n } else {\n nextIndex = maxCol > col ? offset : offset - cols;\n }\n }\n }\n if (isIndexOutOfBounds(elementsRef, nextIndex)) {\n nextIndex = prevIndex;\n }\n }\n if (event.key === ARROW_DOWN) {\n stop && stopEvent(event);\n if (prevIndex === -1) {\n nextIndex = minIndex;\n } else {\n nextIndex = findNonDisabledIndex(elementsRef, {\n startingIndex: prevIndex,\n amount: cols,\n disabledIndices\n });\n if (loop && prevIndex + cols > maxIndex) {\n nextIndex = findNonDisabledIndex(elementsRef, {\n startingIndex: prevIndex % cols - cols,\n amount: cols,\n disabledIndices\n });\n }\n }\n if (isIndexOutOfBounds(elementsRef, nextIndex)) {\n nextIndex = prevIndex;\n }\n }\n\n // Remains on the same row/column.\n if (orientation === 'both') {\n const prevRow = floor(prevIndex / cols);\n if (event.key === ARROW_RIGHT) {\n stop && stopEvent(event);\n if (prevIndex % cols !== cols - 1) {\n nextIndex = findNonDisabledIndex(elementsRef, {\n startingIndex: prevIndex,\n disabledIndices\n });\n if (loop && isDifferentRow(nextIndex, cols, prevRow)) {\n nextIndex = findNonDisabledIndex(elementsRef, {\n startingIndex: prevIndex - prevIndex % cols - 1,\n disabledIndices\n });\n }\n } else if (loop) {\n nextIndex = findNonDisabledIndex(elementsRef, {\n startingIndex: prevIndex - prevIndex % cols - 1,\n disabledIndices\n });\n }\n if (isDifferentRow(nextIndex, cols, prevRow)) {\n nextIndex = prevIndex;\n }\n }\n if (event.key === ARROW_LEFT) {\n stop && stopEvent(event);\n if (prevIndex % cols !== 0) {\n nextIndex = findNonDisabledIndex(elementsRef, {\n startingIndex: prevIndex,\n disabledIndices,\n decrement: true\n });\n if (loop && isDifferentRow(nextIndex, cols, prevRow)) {\n nextIndex = findNonDisabledIndex(elementsRef, {\n startingIndex: prevIndex + (cols - prevIndex % cols),\n decrement: true,\n disabledIndices\n });\n }\n } else if (loop) {\n nextIndex = findNonDisabledIndex(elementsRef, {\n startingIndex: prevIndex + (cols - prevIndex % cols),\n decrement: true,\n disabledIndices\n });\n }\n if (isDifferentRow(nextIndex, cols, prevRow)) {\n nextIndex = prevIndex;\n }\n }\n const lastRow = floor(maxIndex / cols) === prevRow;\n if (isIndexOutOfBounds(elementsRef, nextIndex)) {\n if (loop && lastRow) {\n nextIndex = event.key === ARROW_LEFT ? maxIndex : findNonDisabledIndex(elementsRef, {\n startingIndex: prevIndex - prevIndex % cols - 1,\n disabledIndices\n });\n } else {\n nextIndex = prevIndex;\n }\n }\n }\n return nextIndex;\n}\n\n/** For each cell index, gets the item index that occupies that cell */\nfunction buildCellMap(sizes, cols, dense) {\n const cellMap = [];\n let startIndex = 0;\n sizes.forEach((_ref2, index) => {\n let {\n width,\n height\n } = _ref2;\n if (width > cols) {\n if (process.env.NODE_ENV !== \"production\") {\n throw new Error(\"[Floating UI]: Invalid grid - item width at index \" + index + \" is greater than grid columns\");\n }\n }\n let itemPlaced = false;\n if (dense) {\n startIndex = 0;\n }\n while (!itemPlaced) {\n const targetCells = [];\n for (let i = 0; i < width; i++) {\n for (let j = 0; j < height; j++) {\n targetCells.push(startIndex + i + j * cols);\n }\n }\n if (startIndex % cols + width <= cols && targetCells.every(cell => cellMap[cell] == null)) {\n targetCells.forEach(cell => {\n cellMap[cell] = index;\n });\n itemPlaced = true;\n } else {\n startIndex++;\n }\n }\n });\n\n // convert into a non-sparse array\n return [...cellMap];\n}\n\n/** Gets cell index of an item's corner or -1 when index is -1. */\nfunction getCellIndexOfCorner(index, sizes, cellMap, cols, corner) {\n if (index === -1) return -1;\n const firstCellIndex = cellMap.indexOf(index);\n switch (corner) {\n case 'tl':\n return firstCellIndex;\n case 'tr':\n return firstCellIndex + sizes[index].width - 1;\n case 'bl':\n return firstCellIndex + (sizes[index].height - 1) * cols;\n case 'br':\n return cellMap.lastIndexOf(index);\n }\n}\n\n/** Gets all cell indices that correspond to the specified indices */\nfunction getCellIndices(indices, cellMap) {\n return cellMap.flatMap((index, cellIndex) => indices.includes(index) ? [cellIndex] : []);\n}\n\nlet rafId = 0;\nfunction enqueueFocus(el, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n preventScroll = false,\n cancelPrevious = true,\n sync = false\n } = options;\n cancelPrevious && cancelAnimationFrame(rafId);\n const exec = () => el == null ? void 0 : el.focus({\n preventScroll\n });\n if (sync) {\n exec();\n } else {\n rafId = requestAnimationFrame(exec);\n }\n}\n\nvar index = typeof document !== 'undefined' ? useLayoutEffect : useEffect;\n\nfunction sortByDocumentPosition(a, b) {\n const position = a.compareDocumentPosition(b);\n if (position & Node.DOCUMENT_POSITION_FOLLOWING || position & Node.DOCUMENT_POSITION_CONTAINED_BY) {\n return -1;\n }\n if (position & Node.DOCUMENT_POSITION_PRECEDING || position & Node.DOCUMENT_POSITION_CONTAINS) {\n return 1;\n }\n return 0;\n}\nfunction areMapsEqual(map1, map2) {\n if (map1.size !== map2.size) {\n return false;\n }\n for (const [key, value] of map1.entries()) {\n if (value !== map2.get(key)) {\n return false;\n }\n }\n return true;\n}\nconst FloatingListContext = /*#__PURE__*/React.createContext({\n register: () => {},\n unregister: () => {},\n map: /*#__PURE__*/new Map(),\n elementsRef: {\n current: []\n }\n});\n/**\n * Provides context for a list of items within the floating element.\n * @see https://floating-ui.com/docs/FloatingList\n */\nfunction FloatingList(props) {\n const {\n children,\n elementsRef,\n labelsRef\n } = props;\n const [map, setMap] = React.useState(() => new Map());\n const register = React.useCallback(node => {\n setMap(prevMap => new Map(prevMap).set(node, null));\n }, []);\n const unregister = React.useCallback(node => {\n setMap(prevMap => {\n const map = new Map(prevMap);\n map.delete(node);\n return map;\n });\n }, []);\n index(() => {\n const newMap = new Map(map);\n const nodes = Array.from(newMap.keys()).sort(sortByDocumentPosition);\n nodes.forEach((node, index) => {\n newMap.set(node, index);\n });\n if (!areMapsEqual(map, newMap)) {\n setMap(newMap);\n }\n }, [map]);\n return /*#__PURE__*/React.createElement(FloatingListContext.Provider, {\n value: React.useMemo(() => ({\n register,\n unregister,\n map,\n elementsRef,\n labelsRef\n }), [register, unregister, map, elementsRef, labelsRef])\n }, children);\n}\n/**\n * Used to register a list item and its index (DOM position) in the\n * `FloatingList`.\n * @see https://floating-ui.com/docs/FloatingList#uselistitem\n */\nfunction useListItem(props) {\n if (props === void 0) {\n props = {};\n }\n const {\n label\n } = props;\n const {\n register,\n unregister,\n map,\n elementsRef,\n labelsRef\n } = React.useContext(FloatingListContext);\n const [index$1, setIndex] = React.useState(null);\n const componentRef = React.useRef(null);\n const ref = React.useCallback(node => {\n componentRef.current = node;\n if (index$1 !== null) {\n elementsRef.current[index$1] = node;\n if (labelsRef) {\n var _node$textContent;\n const isLabelDefined = label !== undefined;\n labelsRef.current[index$1] = isLabelDefined ? label : (_node$textContent = node == null ? void 0 : node.textContent) != null ? _node$textContent : null;\n }\n }\n }, [index$1, elementsRef, labelsRef, label]);\n index(() => {\n const node = componentRef.current;\n if (node) {\n register(node);\n return () => {\n unregister(node);\n };\n }\n }, [register, unregister]);\n index(() => {\n const index = componentRef.current ? map.get(componentRef.current) : null;\n if (index != null) {\n setIndex(index);\n }\n }, [map]);\n return React.useMemo(() => ({\n ref,\n index: index$1 == null ? -1 : index$1\n }), [index$1, ref]);\n}\n\nfunction renderJsx(render, computedProps) {\n if (typeof render === 'function') {\n return render(computedProps);\n }\n if (render) {\n return /*#__PURE__*/React.cloneElement(render, computedProps);\n }\n return /*#__PURE__*/React.createElement(\"div\", computedProps);\n}\nconst CompositeContext = /*#__PURE__*/React.createContext({\n activeIndex: 0,\n onNavigate: () => {}\n});\nconst horizontalKeys = [ARROW_LEFT, ARROW_RIGHT];\nconst verticalKeys = [ARROW_UP, ARROW_DOWN];\nconst allKeys = [...horizontalKeys, ...verticalKeys];\n\n/**\n * Creates a single tab stop whose items are navigated by arrow keys, which\n * provides list navigation outside of floating element contexts.\n *\n * This is useful to enable navigation of a list of items that aren’t part of a\n * floating element. A menubar is an example of a composite, with each reference\n * element being an item.\n * @see https://floating-ui.com/docs/Composite\n */\nconst Composite = /*#__PURE__*/React.forwardRef(function Composite(props, forwardedRef) {\n const {\n render,\n orientation = 'both',\n loop = true,\n cols = 1,\n disabledIndices = [],\n activeIndex: externalActiveIndex,\n onNavigate: externalSetActiveIndex,\n itemSizes,\n dense = false,\n ...domProps\n } = props;\n const [internalActiveIndex, internalSetActiveIndex] = React.useState(0);\n const activeIndex = externalActiveIndex != null ? externalActiveIndex : internalActiveIndex;\n const onNavigate = useEffectEvent(externalSetActiveIndex != null ? externalSetActiveIndex : internalSetActiveIndex);\n const elementsRef = React.useRef([]);\n const renderElementProps = render && typeof render !== 'function' ? render.props : {};\n const contextValue = React.useMemo(() => ({\n activeIndex,\n onNavigate\n }), [activeIndex, onNavigate]);\n const isGrid = cols > 1;\n function handleKeyDown(event) {\n if (!allKeys.includes(event.key)) return;\n let nextIndex = activeIndex;\n if (isGrid) {\n const sizes = itemSizes || Array.from({\n length: elementsRef.current.length\n }, () => ({\n width: 1,\n height: 1\n }));\n // To calculate movements on the grid, we use hypothetical cell indices\n // as if every item was 1x1, then convert back to real indices.\n const cellMap = buildCellMap(sizes, cols, dense);\n const minGridIndex = cellMap.findIndex(index => index != null && !disabledIndices.includes(index));\n // last enabled index\n const maxGridIndex = cellMap.reduce((foundIndex, index, cellIndex) => index != null && !(disabledIndices != null && disabledIndices.includes(index)) ? cellIndex : foundIndex, -1);\n nextIndex = cellMap[getGridNavigatedIndex({\n current: cellMap.map(itemIndex => itemIndex ? elementsRef.current[itemIndex] : null)\n }, {\n event,\n orientation,\n loop,\n cols,\n // treat undefined (empty grid spaces) as disabled indices so we\n // don't end up in them\n disabledIndices: getCellIndices([...disabledIndices, undefined], cellMap),\n minIndex: minGridIndex,\n maxIndex: maxGridIndex,\n prevIndex: getCellIndexOfCorner(activeIndex, sizes, cellMap, cols,\n // use a corner matching the edge closest to the direction we're\n // moving in so we don't end up in the same item. Prefer\n // top/left over bottom/right.\n event.key === ARROW_DOWN ? 'bl' : event.key === ARROW_RIGHT ? 'tr' : 'tl')\n })]; // navigated cell will never be nullish\n }\n const minIndex = getMinIndex(elementsRef, disabledIndices);\n const maxIndex = getMaxIndex(elementsRef, disabledIndices);\n const toEndKeys = {\n horizontal: [ARROW_RIGHT],\n vertical: [ARROW_DOWN],\n both: [ARROW_RIGHT, ARROW_DOWN]\n }[orientation];\n const toStartKeys = {\n horizontal: [ARROW_LEFT],\n vertical: [ARROW_UP],\n both: [ARROW_LEFT, ARROW_UP]\n }[orientation];\n const preventedKeys = isGrid ? allKeys : {\n horizontal: horizontalKeys,\n vertical: verticalKeys,\n both: allKeys\n }[orientation];\n if (nextIndex === activeIndex && [...toEndKeys, ...toStartKeys].includes(event.key)) {\n if (loop && nextIndex === maxIndex && toEndKeys.includes(event.key)) {\n nextIndex = minIndex;\n } else if (loop && nextIndex === minIndex && toStartKeys.includes(event.key)) {\n nextIndex = maxIndex;\n } else {\n nextIndex = findNonDisabledIndex(elementsRef, {\n startingIndex: nextIndex,\n decrement: toStartKeys.includes(event.key),\n disabledIndices\n });\n }\n }\n if (nextIndex !== activeIndex && !isIndexOutOfBounds(elementsRef, nextIndex)) {\n event.stopPropagation();\n if (preventedKeys.includes(event.key)) {\n event.preventDefault();\n }\n onNavigate(nextIndex);\n\n // Wait for FocusManager `returnFocus` to execute.\n queueMicrotask(() => {\n enqueueFocus(elementsRef.current[nextIndex]);\n });\n }\n }\n const computedProps = {\n ...domProps,\n ...renderElementProps,\n ref: forwardedRef,\n 'aria-orientation': orientation === 'both' ? undefined : orientation,\n onKeyDown(e) {\n domProps.onKeyDown == null || domProps.onKeyDown(e);\n renderElementProps.onKeyDown == null || renderElementProps.onKeyDown(e);\n handleKeyDown(e);\n }\n };\n return /*#__PURE__*/React.createElement(CompositeContext.Provider, {\n value: contextValue\n }, /*#__PURE__*/React.createElement(FloatingList, {\n elementsRef: elementsRef\n }, renderJsx(render, computedProps)));\n});\n/**\n * @see https://floating-ui.com/docs/Composite\n */\nconst CompositeItem = /*#__PURE__*/React.forwardRef(function CompositeItem(props, forwardedRef) {\n const {\n render,\n ...domProps\n } = props;\n const renderElementProps = render && typeof render !== 'function' ? render.props : {};\n const {\n activeIndex,\n onNavigate\n } = React.useContext(CompositeContext);\n const {\n ref,\n index\n } = useListItem();\n const mergedRef = useMergeRefs([ref, forwardedRef, renderElementProps.ref]);\n const isActive = activeIndex === index;\n const computedProps = {\n ...domProps,\n ...renderElementProps,\n ref: mergedRef,\n tabIndex: isActive ? 0 : -1,\n 'data-active': isActive ? '' : undefined,\n onFocus(e) {\n domProps.onFocus == null || domProps.onFocus(e);\n renderElementProps.onFocus == null || renderElementProps.onFocus(e);\n onNavigate(index);\n }\n };\n return renderJsx(render, computedProps);\n});\n\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nlet serverHandoffComplete = false;\nlet count = 0;\nconst genId = () => // Ensure the id is unique with multiple independent versions of Floating UI\n// on <React 18\n\"floating-ui-\" + Math.random().toString(36).slice(2, 6) + count++;\nfunction useFloatingId() {\n const [id, setId] = React.useState(() => serverHandoffComplete ? genId() : undefined);\n index(() => {\n if (id == null) {\n setId(genId());\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n React.useEffect(() => {\n serverHandoffComplete = true;\n }, []);\n return id;\n}\nconst useReactId = SafeReact.useId;\n\n/**\n * Uses React 18's built-in `useId()` when available, or falls back to a\n * slightly less performant (requiring a double render) implementation for\n * earlier React versions.\n * @see https://floating-ui.com/docs/react-utils#useid\n */\nconst useId = useReactId || useFloatingId;\n\nlet devMessageSet;\nif (process.env.NODE_ENV !== \"production\") {\n devMessageSet = /*#__PURE__*/new Set();\n}\nfunction warn() {\n var _devMessageSet;\n for (var _len = arguments.length, messages = new Array(_len), _key = 0; _key < _len; _key++) {\n messages[_key] = arguments[_key];\n }\n const message = \"Floating UI: \" + messages.join(' ');\n if (!((_devMessageSet = devMessageSet) != null && _devMessageSet.has(message))) {\n var _devMessageSet2;\n (_devMessageSet2 = devMessageSet) == null || _devMessageSet2.add(message);\n console.warn(message);\n }\n}\nfunction error() {\n var _devMessageSet3;\n for (var _len2 = arguments.length, messages = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n messages[_key2] = arguments[_key2];\n }\n const message = \"Floating UI: \" + messages.join(' ');\n if (!((_devMessageSet3 = devMessageSet) != null && _devMessageSet3.has(message))) {\n var _devMessageSet4;\n (_devMessageSet4 = devMessageSet) == null || _devMessageSet4.add(message);\n console.error(message);\n }\n}\n\n/**\n * Renders a pointing arrow triangle.\n * @see https://floating-ui.com/docs/FloatingArrow\n */\nconst FloatingArrow = /*#__PURE__*/React.forwardRef(function FloatingArrow(props, ref) {\n const {\n context: {\n placement,\n elements: {\n floating\n },\n middlewareData: {\n arrow\n }\n },\n width = 14,\n height = 7,\n tipRadius = 0,\n strokeWidth = 0,\n staticOffset,\n stroke,\n d,\n style: {\n transform,\n ...restStyle\n } = {},\n ...rest\n } = props;\n if (process.env.NODE_ENV !== \"production\") {\n if (!ref) {\n warn('The `ref` prop is required for `FloatingArrow`.');\n }\n }\n const clipPathId = useId();\n if (!floating) {\n return null;\n }\n\n // Strokes must be double the border width, this ensures the stroke's width\n // works as you'd expect.\n const computedStrokeWidth = strokeWidth * 2;\n const halfStrokeWidth = computedStrokeWidth / 2;\n const svgX = width / 2 * (tipRadius / -8 + 1);\n const svgY = height / 2 * tipRadius / 4;\n const [side, alignment] = placement.split('-');\n const isRTL = platform.isRTL(floating);\n const isCustomShape = !!d;\n const isVerticalSide = side === 'top' || side === 'bottom';\n const yOffsetProp = staticOffset && alignment === 'end' ? 'bottom' : 'top';\n let xOffsetProp = staticOffset && alignment === 'end' ? 'right' : 'left';\n if (staticOffset && isRTL) {\n xOffsetProp = alignment === 'end' ? 'left' : 'right';\n }\n const arrowX = (arrow == null ? void 0 : arrow.x) != null ? staticOffset || arrow.x : '';\n const arrowY = (arrow == null ? void 0 : arrow.y) != null ? staticOffset || arrow.y : '';\n const dValue = d || 'M0,0' + (\" H\" + width) + (\" L\" + (width - svgX) + \",\" + (height - svgY)) + (\" Q\" + width / 2 + \",\" + height + \" \" + svgX + \",\" + (height - svgY)) + ' Z';\n const rotation = {\n top: isCustomShape ? 'rotate(180deg)' : '',\n left: isCustomShape ? 'rotate(90deg)' : 'rotate(-90deg)',\n bottom: isCustomShape ? '' : 'rotate(180deg)',\n right: isCustomShape ? 'rotate(-90deg)' : 'rotate(90deg)'\n }[side];\n return /*#__PURE__*/React.createElement(\"svg\", _extends({}, rest, {\n \"aria-hidden\": true,\n ref: ref,\n width: isCustomShape ? width : width + computedStrokeWidth,\n height: width,\n viewBox: \"0 0 \" + width + \" \" + (height > width ? height : width),\n style: {\n position: 'absolute',\n pointerEvents: 'none',\n [xOffsetProp]: arrowX,\n [yOffsetProp]: arrowY,\n [side]: isVerticalSide || isCustomShape ? '100%' : \"calc(100% - \" + computedStrokeWidth / 2 + \"px)\",\n transform: \"\" + rotation + (transform != null ? transform : ''),\n ...restStyle\n }\n }), computedStrokeWidth > 0 && /*#__PURE__*/React.createElement(\"path\", {\n clipPath: \"url(#\" + clipPathId + \")\",\n fill: \"none\",\n stroke: stroke\n // Account for the stroke on the fill path rendered below.\n ,\n strokeWidth: computedStrokeWidth + (d ? 0 : 1),\n d: dValue\n }), /*#__PURE__*/React.createElement(\"path\", {\n stroke: computedStrokeWidth && !d ? rest.fill : 'none',\n d: dValue\n }), /*#__PURE__*/React.createElement(\"clipPath\", {\n id: clipPathId\n }, /*#__PURE__*/React.createElement(\"rect\", {\n x: -halfStrokeWidth,\n y: halfStrokeWidth * (isCustomShape ? -1 : 1),\n width: width + computedStrokeWidth,\n height: width\n })));\n});\n\nfunction createPubSub() {\n const map = new Map();\n return {\n emit(event, data) {\n var _map$get;\n (_map$get = map.get(event)) == null || _map$get.forEach(handler => handler(data));\n },\n on(event, listener) {\n map.set(event, [...(map.get(event) || []), listener]);\n },\n off(event, listener) {\n var _map$get2;\n map.set(event, ((_map$get2 = map.get(event)) == null ? void 0 : _map$get2.filter(l => l !== listener)) || []);\n }\n };\n}\n\nconst FloatingNodeContext = /*#__PURE__*/React.createContext(null);\nconst FloatingTreeContext = /*#__PURE__*/React.createContext(null);\n\n/**\n * Returns the parent node id for nested floating elements, if available.\n * Returns `null` for top-level floating elements.\n */\nconst useFloatingParentNodeId = () => {\n var _React$useContext;\n return ((_React$useContext = React.useContext(FloatingNodeContext)) == null ? void 0 : _React$useContext.id) || null;\n};\n\n/**\n * Returns the nearest floating tree context, if available.\n */\nconst useFloatingTree = () => React.useContext(FloatingTreeContext);\n\n/**\n * Registers a node into the `FloatingTree`, returning its id.\n * @see https://floating-ui.com/docs/FloatingTree\n */\nfunction useFloatingNodeId(customParentId) {\n const id = useId();\n const tree = useFloatingTree();\n const reactParentId = useFloatingParentNodeId();\n const parentId = customParentId || reactParentId;\n index(() => {\n const node = {\n id,\n parentId\n };\n tree == null || tree.addNode(node);\n return () => {\n tree == null || tree.removeNode(node);\n };\n }, [tree, id, parentId]);\n return id;\n}\n\n/**\n * Provides parent node context for nested floating elements.\n * @see https://floating-ui.com/docs/FloatingTree\n */\nfunction FloatingNode(props) {\n const {\n children,\n id\n } = props;\n const parentId = useFloatingParentNodeId();\n return /*#__PURE__*/React.createElement(FloatingNodeContext.Provider, {\n value: React.useMemo(() => ({\n id,\n parentId\n }), [id, parentId])\n }, children);\n}\n\n/**\n * Provides context for nested floating elements when they are not children of\n * each other on the DOM.\n * This is not necessary in all cases, except when there must be explicit communication between parent and child floating elements. It is necessary for:\n * - The `bubbles` option in the `useDismiss()` Hook\n * - Nested virtual list navigation\n * - Nested floating elements that each open on hover\n * - Custom communication between parent and child floating elements\n * @see https://floating-ui.com/docs/FloatingTree\n */\nfunction FloatingTree(props) {\n const {\n children\n } = props;\n const nodesRef = React.useRef([]);\n const addNode = React.useCallback(node => {\n nodesRef.current = [...nodesRef.current, node];\n }, []);\n const removeNode = React.useCallback(node => {\n nodesRef.current = nodesRef.current.filter(n => n !== node);\n }, []);\n const events = React.useState(() => createPubSub())[0];\n return /*#__PURE__*/React.createElement(FloatingTreeContext.Provider, {\n value: React.useMemo(() => ({\n nodesRef,\n addNode,\n removeNode,\n events\n }), [addNode, removeNode, events])\n }, children);\n}\n\nfunction createAttribute(name) {\n return \"data-floating-ui-\" + name;\n}\n\nfunction useLatestRef(value) {\n const ref = useRef(value);\n index(() => {\n ref.current = value;\n });\n return ref;\n}\n\nconst safePolygonIdentifier = /*#__PURE__*/createAttribute('safe-polygon');\nfunction getDelay(value, prop, pointerType) {\n if (pointerType && !isMouseLikePointerType(pointerType)) {\n return 0;\n }\n if (typeof value === 'number') {\n return value;\n }\n return value == null ? void 0 : value[prop];\n}\n/**\n * Opens the floating element while hovering over the reference element, like\n * CSS `:hover`.\n * @see https://floating-ui.com/docs/useHover\n */\nfunction useHover(context, props) {\n if (props === void 0) {\n props = {};\n }\n const {\n open,\n onOpenChange,\n dataRef,\n events,\n elements: {\n domReference,\n floating\n },\n refs\n } = context;\n const {\n enabled = true,\n delay = 0,\n handleClose = null,\n mouseOnly = false,\n restMs = 0,\n move = true\n } = props;\n const tree = useFloatingTree();\n const parentId = useFloatingParentNodeId();\n const handleCloseRef = useLatestRef(handleClose);\n const delayRef = useLatestRef(delay);\n const pointerTypeRef = React.useRef();\n const timeoutRef = React.useRef();\n const handlerRef = React.useRef();\n const restTimeoutRef = React.useRef();\n const blockMouseMoveRef = React.useRef(true);\n const performedPointerEventsMutationRef = React.useRef(false);\n const unbindMouseMoveRef = React.useRef(() => {});\n const isHoverOpen = React.useCallback(() => {\n var _dataRef$current$open;\n const type = (_dataRef$current$open = dataRef.current.openEvent) == null ? void 0 : _dataRef$current$open.type;\n return (type == null ? void 0 : type.includes('mouse')) && type !== 'mousedown';\n }, [dataRef]);\n\n // When closing before opening, clear the delay timeouts to cancel it\n // from showing.\n React.useEffect(() => {\n if (!enabled) {\n return;\n }\n function onOpenChange(_ref) {\n let {\n open\n } = _ref;\n if (!open) {\n clearTimeout(timeoutRef.current);\n clearTimeout(restTimeoutRef.current);\n blockMouseMoveRef.current = true;\n }\n }\n events.on('openchange', onOpenChange);\n return () => {\n events.off('openchange', onOpenChange);\n };\n }, [enabled, events]);\n React.useEffect(() => {\n if (!enabled || !handleCloseRef.current || !open) {\n return;\n }\n function onLeave(event) {\n if (isHoverOpen()) {\n onOpenChange(false, event, 'hover');\n }\n }\n const html = getDocument(floating).documentElement;\n html.addEventListener('mouseleave', onLeave);\n return () => {\n html.removeEventListener('mouseleave', onLeave);\n };\n }, [floating, open, onOpenChange, enabled, handleCloseRef, isHoverOpen]);\n const closeWithDelay = React.useCallback(function (event, runElseBranch, reason) {\n if (runElseBranch === void 0) {\n runElseBranch = true;\n }\n if (reason === void 0) {\n reason = 'hover';\n }\n const closeDelay = getDelay(delayRef.current, 'close', pointerTypeRef.current);\n if (closeDelay && !handlerRef.current) {\n clearTimeout(timeoutRef.current);\n timeoutRef.current = setTimeout(() => onOpenChange(false, event, reason), closeDelay);\n } else if (runElseBranch) {\n clearTimeout(timeoutRef.current);\n onOpenChange(false, event, reason);\n }\n }, [delayRef, onOpenChange]);\n const cleanupMouseMoveHandler = React.useCallback(() => {\n unbindMouseMoveRef.current();\n handlerRef.current = undefined;\n }, []);\n const clearPointerEvents = React.useCallback(() => {\n if (performedPointerEventsMutationRef.current) {\n const body = getDocument(refs.floating.current).body;\n body.style.pointerEvents = '';\n body.removeAttribute(safePolygonIdentifier);\n performedPointerEventsMutationRef.current = false;\n }\n }, [refs]);\n\n // Registering the mouse events on the reference directly to bypass React's\n // delegation system. If the cursor was on a disabled element and then entered\n // the reference (no gap), `mouseenter` doesn't fire in the delegation system.\n React.useEffect(() => {\n if (!enabled) {\n return;\n }\n function isClickLikeOpenEvent() {\n return dataRef.current.openEvent ? ['click', 'mousedown'].includes(dataRef.current.openEvent.type) : false;\n }\n function onMouseEnter(event) {\n clearTimeout(timeoutRef.current);\n blockMouseMoveRef.current = false;\n if (mouseOnly && !isMouseLikePointerType(pointerTypeRef.current) || restMs > 0 && getDelay(delayRef.current, 'open') === 0) {\n return;\n }\n const openDelay = getDelay(delayRef.current, 'open', pointerTypeRef.current);\n if (openDelay) {\n timeoutRef.current = setTimeout(() => {\n onOpenChange(true, event, 'hover');\n }, openDelay);\n } else {\n onOpenChange(true, event, 'hover');\n }\n }\n function onMouseLeave(event) {\n if (isClickLikeOpenEvent()) {\n return;\n }\n unbindMouseMoveRef.current();\n const doc = getDocument(floating);\n clearTimeout(restTimeoutRef.current);\n if (handleCloseRef.current) {\n // Prevent clearing `onScrollMouseLeave` timeout.\n if (!open) {\n clearTimeout(timeoutRef.current);\n }\n handlerRef.current = handleCloseRef.current({\n ...context,\n tree,\n x: event.clientX,\n y: event.clientY,\n onClose() {\n clearPointerEvents();\n cleanupMouseMoveHandler();\n closeWithDelay(event, true, 'safe-polygon');\n }\n });\n const handler = handlerRef.current;\n doc.addEventListener('mousemove', handler);\n unbindMouseMoveRef.current = () => {\n doc.removeEventListener('mousemove', handler);\n };\n return;\n }\n\n // Allow interactivity without `safePolygon` on touch devices. With a\n // pointer, a short close delay is an alternative, so it should work\n // consistently.\n const shouldClose = pointerTypeRef.current === 'touch' ? !contains(floating, event.relatedTarget) : true;\n if (shouldClose) {\n closeWithDelay(event);\n }\n }\n\n // Ensure the floating element closes after scrolling even if the pointer\n // did not move.\n // https://github.com/floating-ui/floating-ui/discussions/1692\n function onScrollMouseLeave(event) {\n if (isClickLikeOpenEvent()) {\n return;\n }\n handleCloseRef.current == null || handleCloseRef.current({\n ...context,\n tree,\n x: event.clientX,\n y: event.clientY,\n onClose() {\n clearPointerEvents();\n cleanupMouseMoveHandler();\n closeWithDelay(event);\n }\n })(event);\n }\n if (isElement(domReference)) {\n const ref = domReference;\n open && ref.addEventListener('mouseleave', onScrollMouseLeave);\n floating == null || floating.addEventListener('mouseleave', onScrollMouseLeave);\n move && ref.addEventListener('mousemove', onMouseEnter, {\n once: true\n });\n ref.addEventListener('mouseenter', onMouseEnter);\n ref.addEventListener('mouseleave', onMouseLeave);\n return () => {\n open && ref.removeEventListener('mouseleave', onScrollMouseLeave);\n floating == null || floating.removeEventListener('mouseleave', onScrollMouseLeave);\n move && ref.removeEventListener('mousemove', onMouseEnter);\n ref.removeEventListener('mouseenter', onMouseEnter);\n ref.removeEventListener('mouseleave', onMouseLeave);\n };\n }\n }, [domReference, floating, enabled, context, mouseOnly, restMs, move, closeWithDelay, cleanupMouseMoveHandler, clearPointerEvents, onOpenChange, open, tree, delayRef, handleCloseRef, dataRef]);\n\n // Block pointer-events of every element other than the reference and floating\n // while the floating element is open and has a `handleClose` handler. Also\n // handles nested floating elements.\n // https://github.com/floating-ui/floating-ui/issues/1722\n index(() => {\n var _handleCloseRef$curre;\n if (!enabled) {\n return;\n }\n if (open && (_handleCloseRef$curre = handleCloseRef.current) != null && _handleCloseRef$curre.__options.blockPointerEvents && isHoverOpen()) {\n const body = getDocument(floating).body;\n body.setAttribute(safePolygonIdentifier, '');\n body.style.pointerEvents = 'none';\n performedPointerEventsMutationRef.current = true;\n if (isElement(domReference) && floating) {\n var _tree$nodesRef$curren;\n const ref = domReference;\n const parentFloating = tree == null || (_tree$nodesRef$curren = tree.nodesRef.current.find(node => node.id === parentId)) == null || (_tree$nodesRef$curren = _tree$nodesRef$curren.context) == null ? void 0 : _tree$nodesRef$curren.elements.floating;\n if (parentFloating) {\n parentFloating.style.pointerEvents = '';\n }\n ref.style.pointerEvents = 'auto';\n floating.style.pointerEvents = 'auto';\n return () => {\n ref.style.pointerEvents = '';\n floating.style.pointerEvents = '';\n };\n }\n }\n }, [enabled, open, parentId, floating, domReference, tree, handleCloseRef, isHoverOpen]);\n index(() => {\n if (!open) {\n pointerTypeRef.current = undefined;\n cleanupMouseMoveHandler();\n clearPointerEvents();\n }\n }, [open, cleanupMouseMoveHandler, clearPointerEvents]);\n React.useEffect(() => {\n return () => {\n cleanupMouseMoveHandler();\n clearTimeout(timeoutRef.current);\n clearTimeout(restTimeoutRef.current);\n clearPointerEvents();\n };\n }, [enabled, domReference, cleanupMouseMoveHandler, clearPointerEvents]);\n return React.useMemo(() => {\n if (!enabled) {\n return {};\n }\n function setPointerRef(event) {\n pointerTypeRef.current = event.pointerType;\n }\n return {\n reference: {\n onPointerDown: setPointerRef,\n onPointerEnter: setPointerRef,\n onMouseMove(event) {\n function handleMouseMove() {\n if (!blockMouseMoveRef.current) {\n onOpenChange(true, event.nativeEvent, 'hover');\n }\n }\n if (mouseOnly && !isMouseLikePointerType(pointerTypeRef.current)) {\n return;\n }\n if (open || restMs === 0) {\n return;\n }\n clearTimeout(restTimeoutRef.current);\n if (pointerTypeRef.current === 'touch') {\n handleMouseMove();\n } else {\n restTimeoutRef.current = setTimeout(handleMouseMove, restMs);\n }\n }\n },\n floating: {\n onMouseEnter() {\n clearTimeout(timeoutRef.current);\n },\n onMouseLeave(event) {\n closeWithDelay(event.nativeEvent, false);\n }\n }\n };\n }, [enabled, mouseOnly, open, restMs, onOpenChange, closeWithDelay]);\n}\n\nconst NOOP = () => {};\nconst FloatingDelayGroupContext = /*#__PURE__*/React.createContext({\n delay: 0,\n initialDelay: 0,\n timeoutMs: 0,\n currentId: null,\n setCurrentId: NOOP,\n setState: NOOP,\n isInstantPhase: false\n});\n\n/**\n * @deprecated\n * Use the return value of `useDelayGroup()` instead.\n */\nconst useDelayGroupContext = () => React.useContext(FloatingDelayGroupContext);\n/**\n * Provides context for a group of floating elements that should share a\n * `delay`.\n * @see https://floating-ui.com/docs/FloatingDelayGroup\n */\nconst FloatingDelayGroup = props => {\n const {\n children,\n delay,\n timeoutMs = 0\n } = props;\n const [state, setState] = React.useReducer((prev, next) => ({\n ...prev,\n ...next\n }), {\n delay,\n timeoutMs,\n initialDelay: delay,\n currentId: null,\n isInstantPhase: false\n });\n const initialCurrentIdRef = React.useRef(null);\n const setCurrentId = React.useCallback(currentId => {\n setState({\n currentId\n });\n }, []);\n index(() => {\n if (state.currentId) {\n if (initialCurrentIdRef.current === null) {\n initialCurrentIdRef.current = state.currentId;\n } else {\n setState({\n isInstantPhase: true\n });\n }\n } else {\n setState({\n isInstantPhase: false\n });\n initialCurrentIdRef.current = null;\n }\n }, [state.currentId]);\n return /*#__PURE__*/React.createElement(FloatingDelayGroupContext.Provider, {\n value: React.useMemo(() => ({\n ...state,\n setState,\n setCurrentId\n }), [state, setCurrentId])\n }, children);\n};\n/**\n * Enables grouping when called inside a component that's a child of a\n * `FloatingDelayGroup`.\n * @see https://floating-ui.com/docs/FloatingDelayGroup\n */\nfunction useDelayGroup(context, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n open,\n onOpenChange,\n floatingId\n } = context;\n const {\n id: optionId\n } = options;\n const id = optionId != null ? optionId : floatingId;\n const groupContext = useDelayGroupContext();\n const {\n currentId,\n setCurrentId,\n initialDelay,\n setState,\n timeoutMs\n } = groupContext;\n index(() => {\n if (!currentId) return;\n setState({\n delay: {\n open: 1,\n close: getDelay(initialDelay, 'close')\n }\n });\n if (currentId !== id) {\n onOpenChange(false);\n }\n }, [id, onOpenChange, setState, currentId, initialDelay]);\n index(() => {\n function unset() {\n onOpenChange(false);\n setState({\n delay: initialDelay,\n currentId: null\n });\n }\n if (!currentId) return;\n if (!open && currentId === id) {\n if (timeoutMs) {\n const timeout = window.setTimeout(unset, timeoutMs);\n return () => {\n clearTimeout(timeout);\n };\n }\n unset();\n }\n }, [open, setState, currentId, id, onOpenChange, initialDelay, timeoutMs]);\n index(() => {\n if (setCurrentId === NOOP || !open) return;\n setCurrentId(id);\n }, [open, setCurrentId, id]);\n return groupContext;\n}\n\nfunction getAncestors(nodes, id) {\n var _nodes$find;\n let allAncestors = [];\n let currentParentId = (_nodes$find = nodes.find(node => node.id === id)) == null ? void 0 : _nodes$find.parentId;\n while (currentParentId) {\n const currentNode = nodes.find(node => node.id === currentParentId);\n currentParentId = currentNode == null ? void 0 : currentNode.parentId;\n if (currentNode) {\n allAncestors = allAncestors.concat(currentNode);\n }\n }\n return allAncestors;\n}\n\nfunction getChildren(nodes, id) {\n let allChildren = nodes.filter(node => {\n var _node$context;\n return node.parentId === id && ((_node$context = node.context) == null ? void 0 : _node$context.open);\n });\n let currentChildren = allChildren;\n while (currentChildren.length) {\n currentChildren = nodes.filter(node => {\n var _currentChildren;\n return (_currentChildren = currentChildren) == null ? void 0 : _currentChildren.some(n => {\n var _node$context2;\n return node.parentId === n.id && ((_node$context2 = node.context) == null ? void 0 : _node$context2.open);\n });\n });\n allChildren = allChildren.concat(currentChildren);\n }\n return allChildren;\n}\nfunction getDeepestNode(nodes, id) {\n let deepestNodeId;\n let maxDepth = -1;\n function findDeepest(nodeId, depth) {\n if (depth > maxDepth) {\n deepestNodeId = nodeId;\n maxDepth = depth;\n }\n const children = getChildren(nodes, nodeId);\n children.forEach(child => {\n findDeepest(child.id, depth + 1);\n });\n }\n findDeepest(id, 0);\n return nodes.find(node => node.id === deepestNodeId);\n}\n\n// Modified to add conditional `aria-hidden` support:\n// https://github.com/theKashey/aria-hidden/blob/9220c8f4a4fd35f63bee5510a9f41a37264382d4/src/index.ts\nlet counterMap = /*#__PURE__*/new WeakMap();\nlet uncontrolledElementsSet = /*#__PURE__*/new WeakSet();\nlet markerMap = {};\nlet lockCount = 0;\nconst supportsInert = () => typeof HTMLElement !== 'undefined' && 'inert' in HTMLElement.prototype;\nconst unwrapHost = node => node && (node.host || unwrapHost(node.parentNode));\nconst correctElements = (parent, targets) => targets.map(target => {\n if (parent.contains(target)) {\n return target;\n }\n const correctedTarget = unwrapHost(target);\n if (parent.contains(correctedTarget)) {\n return correctedTarget;\n }\n return null;\n}).filter(x => x != null);\nfunction applyAttributeToOthers(uncorrectedAvoidElements, body, ariaHidden, inert) {\n const markerName = 'data-floating-ui-inert';\n const controlAttribute = inert ? 'inert' : ariaHidden ? 'aria-hidden' : null;\n const avoidElements = correctElements(body, uncorrectedAvoidElements);\n const elementsToKeep = new Set();\n const elementsToStop = new Set(avoidElements);\n const hiddenElements = [];\n if (!markerMap[markerName]) {\n markerMap[markerName] = new WeakMap();\n }\n const markerCounter = markerMap[markerName];\n avoidElements.forEach(keep);\n deep(body);\n elementsToKeep.clear();\n function keep(el) {\n if (!el || elementsToKeep.has(el)) {\n return;\n }\n elementsToKeep.add(el);\n el.parentNode && keep(el.parentNode);\n }\n function deep(parent) {\n if (!parent || elementsToStop.has(parent)) {\n return;\n }\n Array.prototype.forEach.call(parent.children, node => {\n if (elementsToKeep.has(node)) {\n deep(node);\n } else {\n const attr = controlAttribute ? node.getAttribute(controlAttribute) : null;\n const alreadyHidden = attr !== null && attr !== 'false';\n const counterValue = (counterMap.get(node) || 0) + 1;\n const markerValue = (markerCounter.get(node) || 0) + 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n hiddenElements.push(node);\n if (counterValue === 1 && alreadyHidden) {\n uncontrolledElementsSet.add(node);\n }\n if (markerValue === 1) {\n node.setAttribute(markerName, '');\n }\n if (!alreadyHidden && controlAttribute) {\n node.setAttribute(controlAttribute, 'true');\n }\n }\n });\n }\n lockCount++;\n return () => {\n hiddenElements.forEach(element => {\n const counterValue = (counterMap.get(element) || 0) - 1;\n const markerValue = (markerCounter.get(element) || 0) - 1;\n counterMap.set(element, counterValue);\n markerCounter.set(element, markerValue);\n if (!counterValue) {\n if (!uncontrolledElementsSet.has(element) && controlAttribute) {\n element.removeAttribute(controlAttribute);\n }\n uncontrolledElementsSet.delete(element);\n }\n if (!markerValue) {\n element.removeAttribute(markerName);\n }\n });\n lockCount--;\n if (!lockCount) {\n counterMap = new WeakMap();\n counterMap = new WeakMap();\n uncontrolledElementsSet = new WeakSet();\n markerMap = {};\n }\n };\n}\nfunction markOthers(avoidElements, ariaHidden, inert) {\n if (ariaHidden === void 0) {\n ariaHidden = false;\n }\n if (inert === void 0) {\n inert = false;\n }\n const body = getDocument(avoidElements[0]).body;\n return applyAttributeToOthers(avoidElements.concat(Array.from(body.querySelectorAll('[aria-live]'))), body, ariaHidden, inert);\n}\n\nconst getTabbableOptions = () => ({\n getShadowRoot: true,\n displayCheck:\n // JSDOM does not support the `tabbable` library. To solve this we can\n // check if `ResizeObserver` is a real function (not polyfilled), which\n // determines if the current environment is JSDOM-like.\n typeof ResizeObserver === 'function' && ResizeObserver.toString().includes('[native code]') ? 'full' : 'none'\n});\nfunction getTabbableIn(container, direction) {\n const allTabbable = tabbable(container, getTabbableOptions());\n if (direction === 'prev') {\n allTabbable.reverse();\n }\n const activeIndex = allTabbable.indexOf(activeElement(getDocument(container)));\n const nextTabbableElements = allTabbable.slice(activeIndex + 1);\n return nextTabbableElements[0];\n}\nfunction getNextTabbable() {\n return getTabbableIn(document.body, 'next');\n}\nfunction getPreviousTabbable() {\n return getTabbableIn(document.body, 'prev');\n}\nfunction isOutsideEvent(event, container) {\n const containerElement = container || event.currentTarget;\n const relatedTarget = event.relatedTarget;\n return !relatedTarget || !contains(containerElement, relatedTarget);\n}\nfunction disableFocusInside(container) {\n const tabbableElements = tabbable(container, getTabbableOptions());\n tabbableElements.forEach(element => {\n element.dataset.tabindex = element.getAttribute('tabindex') || '';\n element.setAttribute('tabindex', '-1');\n });\n}\nfunction enableFocusInside(container) {\n const elements = container.querySelectorAll('[data-tabindex]');\n elements.forEach(element => {\n const tabindex = element.dataset.tabindex;\n delete element.dataset.tabindex;\n if (tabindex) {\n element.setAttribute('tabindex', tabindex);\n } else {\n element.removeAttribute('tabindex');\n }\n });\n}\n\n// See Diego Haz's Sandbox for making this logic work well on Safari/iOS:\n// https://codesandbox.io/s/tabbable-portal-f4tng?file=/src/FocusTrap.tsx\n\nconst HIDDEN_STYLES = {\n border: 0,\n clip: 'rect(0 0 0 0)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: 0,\n position: 'fixed',\n whiteSpace: 'nowrap',\n width: '1px',\n top: 0,\n left: 0\n};\nlet timeoutId;\nfunction setActiveElementOnTab(event) {\n if (event.key === 'Tab') {\n event.target;\n clearTimeout(timeoutId);\n }\n}\nconst FocusGuard = /*#__PURE__*/React.forwardRef(function FocusGuard(props, ref) {\n const [role, setRole] = React.useState();\n index(() => {\n if (isSafari()) {\n // Unlike other screen readers such as NVDA and JAWS, the virtual cursor\n // on VoiceOver does trigger the onFocus event, so we can use the focus\n // trap element. On Safari, only buttons trigger the onFocus event.\n // NB: \"group\" role in the Sandbox no longer appears to work, must be a\n // button role.\n setRole('button');\n }\n document.addEventListener('keydown', setActiveElementOnTab);\n return () => {\n document.removeEventListener('keydown', setActiveElementOnTab);\n };\n }, []);\n const restProps = {\n ref,\n tabIndex: 0,\n // Role is only for VoiceOver\n role,\n 'aria-hidden': role ? undefined : true,\n [createAttribute('focus-guard')]: '',\n style: HIDDEN_STYLES\n };\n return /*#__PURE__*/React.createElement(\"span\", _extends({}, props, restProps));\n});\n\nconst PortalContext = /*#__PURE__*/React.createContext(null);\nconst attr = /*#__PURE__*/createAttribute('portal');\n\n/**\n * @see https://floating-ui.com/docs/FloatingPortal#usefloatingportalnode\n */\nfunction useFloatingPortalNode(props) {\n if (props === void 0) {\n props = {};\n }\n const {\n id,\n root\n } = props;\n const uniqueId = useId();\n const portalContext = usePortalContext();\n const [portalNode, setPortalNode] = React.useState(null);\n const portalNodeRef = React.useRef(null);\n index(() => {\n return () => {\n portalNode == null || portalNode.remove();\n // Allow the subsequent layout effects to create a new node on updates.\n // The portal node will still be cleaned up on unmount.\n // https://github.com/floating-ui/floating-ui/issues/2454\n queueMicrotask(() => {\n portalNodeRef.current = null;\n });\n };\n }, [portalNode]);\n index(() => {\n if (portalNodeRef.current) return;\n const existingIdRoot = id ? document.getElementById(id) : null;\n if (!existingIdRoot) return;\n const subRoot = document.createElement('div');\n subRoot.id = uniqueId;\n subRoot.setAttribute(attr, '');\n existingIdRoot.appendChild(subRoot);\n portalNodeRef.current = subRoot;\n setPortalNode(subRoot);\n }, [id, uniqueId]);\n index(() => {\n if (portalNodeRef.current) return;\n let container = root || (portalContext == null ? void 0 : portalContext.portalNode);\n if (container && !isElement(container)) container = container.current;\n container = container || document.body;\n let idWrapper = null;\n if (id) {\n idWrapper = document.createElement('div');\n idWrapper.id = id;\n container.appendChild(idWrapper);\n }\n const subRoot = document.createElement('div');\n subRoot.id = uniqueId;\n subRoot.setAttribute(attr, '');\n container = idWrapper || container;\n container.appendChild(subRoot);\n portalNodeRef.current = subRoot;\n setPortalNode(subRoot);\n }, [id, root, uniqueId, portalContext]);\n return portalNode;\n}\n/**\n * Portals the floating element into a given container element — by default,\n * outside of the app root and into the body.\n * This is necessary to ensure the floating element can appear outside any\n * potential parent containers that cause clipping (such as `overflow: hidden`),\n * while retaining its location in the React tree.\n * @see https://floating-ui.com/docs/FloatingPortal\n */\nfunction FloatingPortal(props) {\n const {\n children,\n id,\n root = null,\n preserveTabOrder = true\n } = props;\n const portalNode = useFloatingPortalNode({\n id,\n root\n });\n const [focusManagerState, setFocusManagerState] = React.useState(null);\n const beforeOutsideRef = React.useRef(null);\n const afterOutsideRef = React.useRef(null);\n const beforeInsideRef = React.useRef(null);\n const afterInsideRef = React.useRef(null);\n const shouldRenderGuards =\n // The FocusManager and therefore floating element are currently open/\n // rendered.\n !!focusManagerState &&\n // Guards are only for non-modal focus management.\n !focusManagerState.modal &&\n // Don't render if unmount is transitioning.\n focusManagerState.open && preserveTabOrder && !!(root || portalNode);\n\n // https://codesandbox.io/s/tabbable-portal-f4tng?file=/src/TabbablePortal.tsx\n React.useEffect(() => {\n if (!portalNode || !preserveTabOrder || focusManagerState != null && focusManagerState.modal) {\n return;\n }\n\n // Make sure elements inside the portal element are tabbable only when the\n // portal has already been focused, either by tabbing into a focus trap\n // element outside or using the mouse.\n function onFocus(event) {\n if (portalNode && isOutsideEvent(event)) {\n const focusing = event.type === 'focusin';\n const manageFocus = focusing ? enableFocusInside : disableFocusInside;\n manageFocus(portalNode);\n }\n }\n // Listen to the event on the capture phase so they run before the focus\n // trap elements onFocus prop is called.\n portalNode.addEventListener('focusin', onFocus, true);\n portalNode.addEventListener('focusout', onFocus, true);\n return () => {\n portalNode.removeEventListener('focusin', onFocus, true);\n portalNode.removeEventListener('focusout', onFocus, true);\n };\n }, [portalNode, preserveTabOrder, focusManagerState == null ? void 0 : focusManagerState.modal]);\n return /*#__PURE__*/React.createElement(PortalContext.Provider, {\n value: React.useMemo(() => ({\n preserveTabOrder,\n beforeOutsideRef,\n afterOutsideRef,\n beforeInsideRef,\n afterInsideRef,\n portalNode,\n setFocusManagerState\n }), [preserveTabOrder, portalNode])\n }, shouldRenderGuards && portalNode && /*#__PURE__*/React.createElement(FocusGuard, {\n \"data-type\": \"outside\",\n ref: beforeOutsideRef,\n onFocus: event => {\n if (isOutsideEvent(event, portalNode)) {\n var _beforeInsideRef$curr;\n (_beforeInsideRef$curr = beforeInsideRef.current) == null || _beforeInsideRef$curr.focus();\n } else {\n const prevTabbable = getPreviousTabbable() || (focusManagerState == null ? void 0 : focusManagerState.refs.domReference.current);\n prevTabbable == null || prevTabbable.focus();\n }\n }\n }), shouldRenderGuards && portalNode && /*#__PURE__*/React.createElement(\"span\", {\n \"aria-owns\": portalNode.id,\n style: HIDDEN_STYLES\n }), portalNode && /*#__PURE__*/createPortal(children, portalNode), shouldRenderGuards && portalNode && /*#__PURE__*/React.createElement(FocusGuard, {\n \"data-type\": \"outside\",\n ref: afterOutsideRef,\n onFocus: event => {\n if (isOutsideEvent(event, portalNode)) {\n var _afterInsideRef$curre;\n (_afterInsideRef$curre = afterInsideRef.current) == null || _afterInsideRef$curre.focus();\n } else {\n const nextTabbable = getNextTabbable() || (focusManagerState == null ? void 0 : focusManagerState.refs.domReference.current);\n nextTabbable == null || nextTabbable.focus();\n (focusManagerState == null ? void 0 : focusManagerState.closeOnFocusOut) && (focusManagerState == null ? void 0 : focusManagerState.onOpenChange(false, event.nativeEvent));\n }\n }\n }));\n}\nconst usePortalContext = () => React.useContext(PortalContext);\n\nconst LIST_LIMIT = 20;\nlet previouslyFocusedElements = [];\nfunction addPreviouslyFocusedElement(element) {\n previouslyFocusedElements = previouslyFocusedElements.filter(el => el.isConnected);\n let tabbableEl = element;\n if (!tabbableEl || getNodeName(tabbableEl) === 'body') return;\n if (!isTabbable(tabbableEl, getTabbableOptions())) {\n const tabbableChild = tabbable(tabbableEl, getTabbableOptions())[0];\n if (!tabbableChild) return;\n tabbableEl = tabbableChild;\n }\n previouslyFocusedElements.push(tabbableEl);\n if (previouslyFocusedElements.length > LIST_LIMIT) {\n previouslyFocusedElements = previouslyFocusedElements.slice(-LIST_LIMIT);\n }\n}\nfunction getPreviouslyFocusedElement() {\n return previouslyFocusedElements.slice().reverse().find(el => el.isConnected);\n}\nconst VisuallyHiddenDismiss = /*#__PURE__*/React.forwardRef(function VisuallyHiddenDismiss(props, ref) {\n return /*#__PURE__*/React.createElement(\"button\", _extends({}, props, {\n type: \"button\",\n ref: ref,\n tabIndex: -1,\n style: HIDDEN_STYLES\n }));\n});\n/**\n * Provides focus management for the floating element.\n * @see https://floating-ui.com/docs/FloatingFocusManager\n */\nfunction FloatingFocusManager(props) {\n const {\n context,\n children,\n disabled = false,\n order = ['content'],\n guards: _guards = true,\n initialFocus = 0,\n returnFocus = true,\n modal = true,\n visuallyHiddenDismiss = false,\n closeOnFocusOut = true\n } = props;\n const {\n open,\n refs,\n nodeId,\n onOpenChange,\n events,\n dataRef,\n elements: {\n domReference,\n floating\n }\n } = context;\n const ignoreInitialFocus = typeof initialFocus === 'number' && initialFocus < 0;\n // If the reference is a combobox and is typeable (e.g. input/textarea),\n // there are different focus semantics. The guards should not be rendered, but\n // aria-hidden should be applied to all nodes still. Further, the visually\n // hidden dismiss button should only appear at the end of the list, not the\n // start.\n const isUntrappedTypeableCombobox = isTypeableCombobox(domReference) && ignoreInitialFocus;\n\n // Force the guards to be rendered if the `inert` attribute is not supported.\n const guards = supportsInert() ? _guards : true;\n const orderRef = useLatestRef(order);\n const initialFocusRef = useLatestRef(initialFocus);\n const returnFocusRef = useLatestRef(returnFocus);\n const tree = useFloatingTree();\n const portalContext = usePortalContext();\n const startDismissButtonRef = React.useRef(null);\n const endDismissButtonRef = React.useRef(null);\n const preventReturnFocusRef = React.useRef(false);\n const isPointerDownRef = React.useRef(false);\n const isInsidePortal = portalContext != null;\n const getTabbableContent = React.useCallback(function (container) {\n if (container === void 0) {\n container = floating;\n }\n return container ? tabbable(container, getTabbableOptions()) : [];\n }, [floating]);\n const getTabbableElements = React.useCallback(container => {\n const content = getTabbableContent(container);\n return orderRef.current.map(type => {\n if (domReference && type === 'reference') {\n return domReference;\n }\n if (floating && type === 'floating') {\n return floating;\n }\n return content;\n }).filter(Boolean).flat();\n }, [domReference, floating, orderRef, getTabbableContent]);\n React.useEffect(() => {\n if (disabled || !modal) return;\n function onKeyDown(event) {\n if (event.key === 'Tab') {\n // The focus guards have nothing to focus, so we need to stop the event.\n if (contains(floating, activeElement(getDocument(floating))) && getTabbableContent().length === 0 && !isUntrappedTypeableCombobox) {\n stopEvent(event);\n }\n const els = getTabbableElements();\n const target = getTarget(event);\n if (orderRef.current[0] === 'reference' && target === domReference) {\n stopEvent(event);\n if (event.shiftKey) {\n enqueueFocus(els[els.length - 1]);\n } else {\n enqueueFocus(els[1]);\n }\n }\n if (orderRef.current[1] === 'floating' && target === floating && event.shiftKey) {\n stopEvent(event);\n enqueueFocus(els[0]);\n }\n }\n }\n const doc = getDocument(floating);\n doc.addEventListener('keydown', onKeyDown);\n return () => {\n doc.removeEventListener('keydown', onKeyDown);\n };\n }, [disabled, domReference, floating, modal, orderRef, isUntrappedTypeableCombobox, getTabbableContent, getTabbableElements]);\n React.useEffect(() => {\n if (disabled || !closeOnFocusOut) return;\n\n // In Safari, buttons lose focus when pressing them.\n function handlePointerDown() {\n isPointerDownRef.current = true;\n setTimeout(() => {\n isPointerDownRef.current = false;\n });\n }\n function handleFocusOutside(event) {\n const relatedTarget = event.relatedTarget;\n queueMicrotask(() => {\n const movedToUnrelatedNode = !(contains(domReference, relatedTarget) || contains(floating, relatedTarget) || contains(relatedTarget, floating) || contains(portalContext == null ? void 0 : portalContext.portalNode, relatedTarget) || relatedTarget != null && relatedTarget.hasAttribute(createAttribute('focus-guard')) || tree && (getChildren(tree.nodesRef.current, nodeId).find(node => {\n var _node$context, _node$context2;\n return contains((_node$context = node.context) == null ? void 0 : _node$context.elements.floating, relatedTarget) || contains((_node$context2 = node.context) == null ? void 0 : _node$context2.elements.domReference, relatedTarget);\n }) || getAncestors(tree.nodesRef.current, nodeId).find(node => {\n var _node$context3, _node$context4;\n return ((_node$context3 = node.context) == null ? void 0 : _node$context3.elements.floating) === relatedTarget || ((_node$context4 = node.context) == null ? void 0 : _node$context4.elements.domReference) === relatedTarget;\n })));\n\n // Focus did not move inside the floating tree, and there are no tabbable\n // portal guards to handle closing.\n if (relatedTarget && movedToUnrelatedNode && !isPointerDownRef.current &&\n // Fix React 18 Strict Mode returnFocus due to double rendering.\n relatedTarget !== getPreviouslyFocusedElement()) {\n preventReturnFocusRef.current = true;\n onOpenChange(false, event);\n }\n });\n }\n if (floating && isHTMLElement(domReference)) {\n domReference.addEventListener('focusout', handleFocusOutside);\n domReference.addEventListener('pointerdown', handlePointerDown);\n !modal && floating.addEventListener('focusout', handleFocusOutside);\n return () => {\n domReference.removeEventListener('focusout', handleFocusOutside);\n domReference.removeEventListener('pointerdown', handlePointerDown);\n !modal && floating.removeEventListener('focusout', handleFocusOutside);\n };\n }\n }, [disabled, domReference, floating, modal, nodeId, tree, portalContext, onOpenChange, closeOnFocusOut]);\n React.useEffect(() => {\n var _portalContext$portal;\n if (disabled) return;\n\n // Don't hide portals nested within the parent portal.\n const portalNodes = Array.from((portalContext == null || (_portalContext$portal = portalContext.portalNode) == null ? void 0 : _portalContext$portal.querySelectorAll(\"[\" + createAttribute('portal') + \"]\")) || []);\n if (floating) {\n const insideElements = [floating, ...portalNodes, startDismissButtonRef.current, endDismissButtonRef.current, orderRef.current.includes('reference') || isUntrappedTypeableCombobox ? domReference : null].filter(x => x != null);\n const cleanup = modal || isUntrappedTypeableCombobox ? markOthers(insideElements, guards, !guards) : markOthers(insideElements);\n return () => {\n cleanup();\n };\n }\n }, [disabled, domReference, floating, modal, orderRef, portalContext, isUntrappedTypeableCombobox, guards]);\n index(() => {\n if (disabled || !floating) return;\n const doc = getDocument(floating);\n const previouslyFocusedElement = activeElement(doc);\n\n // Wait for any layout effect state setters to execute to set `tabIndex`.\n queueMicrotask(() => {\n const focusableElements = getTabbableElements(floating);\n const initialFocusValue = initialFocusRef.current;\n const elToFocus = (typeof initialFocusValue === 'number' ? focusableElements[initialFocusValue] : initialFocusValue.current) || floating;\n const focusAlreadyInsideFloatingEl = contains(floating, previouslyFocusedElement);\n if (!ignoreInitialFocus && !focusAlreadyInsideFloatingEl && open) {\n enqueueFocus(elToFocus, {\n preventScroll: elToFocus === floating\n });\n }\n });\n }, [disabled, open, floating, ignoreInitialFocus, getTabbableElements, initialFocusRef]);\n index(() => {\n if (disabled || !floating) return;\n let preventReturnFocusScroll = false;\n const doc = getDocument(floating);\n const previouslyFocusedElement = activeElement(doc);\n const contextData = dataRef.current;\n addPreviouslyFocusedElement(previouslyFocusedElement);\n\n // Dismissing via outside press should always ignore `returnFocus` to\n // prevent unwanted scrolling.\n function onOpenChange(_ref) {\n let {\n reason,\n event,\n nested\n } = _ref;\n if (reason === 'escape-key' && refs.domReference.current) {\n addPreviouslyFocusedElement(refs.domReference.current);\n }\n if (reason === 'hover' && event.type === 'mouseleave') {\n preventReturnFocusRef.current = true;\n }\n if (reason !== 'outside-press') return;\n if (nested) {\n preventReturnFocusRef.current = false;\n preventReturnFocusScroll = true;\n } else {\n preventReturnFocusRef.current = !(isVirtualClick(event) || isVirtualPointerEvent(event));\n }\n }\n events.on('openchange', onOpenChange);\n return () => {\n events.off('openchange', onOpenChange);\n const activeEl = activeElement(doc);\n const isFocusInsideFloatingTree = contains(floating, activeEl) || tree && getChildren(tree.nodesRef.current, nodeId).some(node => {\n var _node$context5;\n return contains((_node$context5 = node.context) == null ? void 0 : _node$context5.elements.floating, activeEl);\n });\n const shouldFocusReference = isFocusInsideFloatingTree || contextData.openEvent && ['click', 'mousedown'].includes(contextData.openEvent.type);\n if (shouldFocusReference && refs.domReference.current) {\n addPreviouslyFocusedElement(refs.domReference.current);\n }\n const returnElement = getPreviouslyFocusedElement();\n if (\n // eslint-disable-next-line react-hooks/exhaustive-deps\n returnFocusRef.current && !preventReturnFocusRef.current && isHTMLElement(returnElement) && (\n // If the focus moved somewhere else after mount, avoid returning focus\n // since it likely entered a different element which should be\n // respected: https://github.com/floating-ui/floating-ui/issues/2607\n returnElement !== activeEl && activeEl !== doc.body ? isFocusInsideFloatingTree : true)) {\n enqueueFocus(returnElement, {\n // When dismissing nested floating elements, by the time the rAF has\n // executed, the menus will all have been unmounted. When they try\n // to get focused, the calls get ignored — leaving the root\n // reference focused as desired.\n cancelPrevious: false,\n preventScroll: preventReturnFocusScroll\n });\n }\n };\n }, [disabled, floating, returnFocusRef, dataRef, refs, events, tree, nodeId]);\n\n // Synchronize the `context` & `modal` value to the FloatingPortal context.\n // It will decide whether or not it needs to render its own guards.\n index(() => {\n if (disabled || !portalContext) return;\n portalContext.setFocusManagerState({\n modal,\n closeOnFocusOut,\n open,\n onOpenChange,\n refs\n });\n return () => {\n portalContext.setFocusManagerState(null);\n };\n }, [disabled, portalContext, modal, open, onOpenChange, refs, closeOnFocusOut]);\n index(() => {\n if (disabled || !floating || typeof MutationObserver !== 'function' || ignoreInitialFocus) {\n return;\n }\n const handleMutation = () => {\n const tabIndex = floating.getAttribute('tabindex');\n if (orderRef.current.includes('floating') || activeElement(getDocument(floating)) !== refs.domReference.current && getTabbableContent().length === 0) {\n if (tabIndex !== '0') {\n floating.setAttribute('tabindex', '0');\n }\n } else if (tabIndex !== '-1') {\n floating.setAttribute('tabindex', '-1');\n }\n };\n handleMutation();\n const observer = new MutationObserver(handleMutation);\n observer.observe(floating, {\n childList: true,\n subtree: true,\n attributes: true\n });\n return () => {\n observer.disconnect();\n };\n }, [disabled, floating, refs, orderRef, getTabbableContent, ignoreInitialFocus]);\n function renderDismissButton(location) {\n if (disabled || !visuallyHiddenDismiss || !modal) {\n return null;\n }\n return /*#__PURE__*/React.createElement(VisuallyHiddenDismiss, {\n ref: location === 'start' ? startDismissButtonRef : endDismissButtonRef,\n onClick: event => onOpenChange(false, event.nativeEvent)\n }, typeof visuallyHiddenDismiss === 'string' ? visuallyHiddenDismiss : 'Dismiss');\n }\n const shouldRenderGuards = !disabled && guards && (isInsidePortal || modal);\n return /*#__PURE__*/React.createElement(React.Fragment, null, shouldRenderGuards && /*#__PURE__*/React.createElement(FocusGuard, {\n \"data-type\": \"inside\",\n ref: portalContext == null ? void 0 : portalContext.beforeInsideRef,\n onFocus: event => {\n if (modal) {\n const els = getTabbableElements();\n enqueueFocus(order[0] === 'reference' ? els[0] : els[els.length - 1]);\n } else if (portalContext != null && portalContext.preserveTabOrder && portalContext.portalNode) {\n preventReturnFocusRef.current = false;\n if (isOutsideEvent(event, portalContext.portalNode)) {\n const nextTabbable = getNextTabbable() || domReference;\n nextTabbable == null || nextTabbable.focus();\n } else {\n var _portalContext$before;\n (_portalContext$before = portalContext.beforeOutsideRef.current) == null || _portalContext$before.focus();\n }\n }\n }\n }), !isUntrappedTypeableCombobox && renderDismissButton('start'), children, renderDismissButton('end'), shouldRenderGuards && /*#__PURE__*/React.createElement(FocusGuard, {\n \"data-type\": \"inside\",\n ref: portalContext == null ? void 0 : portalContext.afterInsideRef,\n onFocus: event => {\n if (modal) {\n enqueueFocus(getTabbableElements()[0]);\n } else if (portalContext != null && portalContext.preserveTabOrder && portalContext.portalNode) {\n if (closeOnFocusOut) {\n preventReturnFocusRef.current = true;\n }\n if (isOutsideEvent(event, portalContext.portalNode)) {\n const prevTabbable = getPreviousTabbable() || domReference;\n prevTabbable == null || prevTabbable.focus();\n } else {\n var _portalContext$afterO;\n (_portalContext$afterO = portalContext.afterOutsideRef.current) == null || _portalContext$afterO.focus();\n }\n }\n }\n }));\n}\n\nconst activeLocks = /*#__PURE__*/new Set();\n/**\n * Provides base styling for a fixed overlay element to dim content or block\n * pointer events behind a floating element.\n * It's a regular `<div>`, so it can be styled via any CSS solution you prefer.\n * @see https://floating-ui.com/docs/FloatingOverlay\n */\nconst FloatingOverlay = /*#__PURE__*/React.forwardRef(function FloatingOverlay(props, ref) {\n const {\n lockScroll = false,\n ...rest\n } = props;\n const lockId = useId();\n index(() => {\n if (!lockScroll) return;\n activeLocks.add(lockId);\n const isIOS = /iP(hone|ad|od)|iOS/.test(getPlatform());\n const bodyStyle = document.body.style;\n // RTL <body> scrollbar\n const scrollbarX = Math.round(document.documentElement.getBoundingClientRect().left) + document.documentElement.scrollLeft;\n const paddingProp = scrollbarX ? 'paddingLeft' : 'paddingRight';\n const scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;\n const scrollX = bodyStyle.left ? parseFloat(bodyStyle.left) : window.pageXOffset;\n const scrollY = bodyStyle.top ? parseFloat(bodyStyle.top) : window.pageYOffset;\n bodyStyle.overflow = 'hidden';\n if (scrollbarWidth) {\n bodyStyle[paddingProp] = scrollbarWidth + \"px\";\n }\n\n // Only iOS doesn't respect `overflow: hidden` on document.body, and this\n // technique has fewer side effects.\n if (isIOS) {\n var _window$visualViewpor, _window$visualViewpor2;\n // iOS 12 does not support `visualViewport`.\n const offsetLeft = ((_window$visualViewpor = window.visualViewport) == null ? void 0 : _window$visualViewpor.offsetLeft) || 0;\n const offsetTop = ((_window$visualViewpor2 = window.visualViewport) == null ? void 0 : _window$visualViewpor2.offsetTop) || 0;\n Object.assign(bodyStyle, {\n position: 'fixed',\n top: -(scrollY - Math.floor(offsetTop)) + \"px\",\n left: -(scrollX - Math.floor(offsetLeft)) + \"px\",\n right: '0'\n });\n }\n return () => {\n activeLocks.delete(lockId);\n if (activeLocks.size === 0) {\n Object.assign(bodyStyle, {\n overflow: '',\n [paddingProp]: ''\n });\n if (isIOS) {\n Object.assign(bodyStyle, {\n position: '',\n top: '',\n left: '',\n right: ''\n });\n window.scrollTo(scrollX, scrollY);\n }\n }\n };\n }, [lockId, lockScroll]);\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n ref: ref\n }, rest, {\n style: {\n position: 'fixed',\n overflow: 'auto',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...rest.style\n }\n }));\n});\n\nfunction isButtonTarget(event) {\n return isHTMLElement(event.target) && event.target.tagName === 'BUTTON';\n}\nfunction isSpaceIgnored(element) {\n return isTypeableElement(element);\n}\n/**\n * Opens or closes the floating element when clicking the reference element.\n * @see https://floating-ui.com/docs/useClick\n */\nfunction useClick(context, props) {\n if (props === void 0) {\n props = {};\n }\n const {\n open,\n onOpenChange,\n dataRef,\n elements: {\n domReference\n }\n } = context;\n const {\n enabled = true,\n event: eventOption = 'click',\n toggle = true,\n ignoreMouse = false,\n keyboardHandlers = true\n } = props;\n const pointerTypeRef = React.useRef();\n const didKeyDownRef = React.useRef(false);\n return React.useMemo(() => {\n if (!enabled) return {};\n return {\n reference: {\n onPointerDown(event) {\n pointerTypeRef.current = event.pointerType;\n },\n onMouseDown(event) {\n // Ignore all buttons except for the \"main\" button.\n // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button\n if (event.button !== 0) {\n return;\n }\n if (isMouseLikePointerType(pointerTypeRef.current, true) && ignoreMouse) {\n return;\n }\n if (eventOption === 'click') {\n return;\n }\n if (open && toggle && (dataRef.current.openEvent ? dataRef.current.openEvent.type === 'mousedown' : true)) {\n onOpenChange(false, event.nativeEvent, 'click');\n } else {\n // Prevent stealing focus from the floating element\n event.preventDefault();\n onOpenChange(true, event.nativeEvent, 'click');\n }\n },\n onClick(event) {\n if (eventOption === 'mousedown' && pointerTypeRef.current) {\n pointerTypeRef.current = undefined;\n return;\n }\n if (isMouseLikePointerType(pointerTypeRef.current, true) && ignoreMouse) {\n return;\n }\n if (open && toggle && (dataRef.current.openEvent ? dataRef.current.openEvent.type === 'click' : true)) {\n onOpenChange(false, event.nativeEvent, 'click');\n } else {\n onOpenChange(true, event.nativeEvent, 'click');\n }\n },\n onKeyDown(event) {\n pointerTypeRef.current = undefined;\n if (event.defaultPrevented || !keyboardHandlers || isButtonTarget(event)) {\n return;\n }\n if (event.key === ' ' && !isSpaceIgnored(domReference)) {\n // Prevent scrolling\n event.preventDefault();\n didKeyDownRef.current = true;\n }\n if (event.key === 'Enter') {\n if (open && toggle) {\n onOpenChange(false, event.nativeEvent, 'click');\n } else {\n onOpenChange(true, event.nativeEvent, 'click');\n }\n }\n },\n onKeyUp(event) {\n if (event.defaultPrevented || !keyboardHandlers || isButtonTarget(event) || isSpaceIgnored(domReference)) {\n return;\n }\n if (event.key === ' ' && didKeyDownRef.current) {\n didKeyDownRef.current = false;\n if (open && toggle) {\n onOpenChange(false, event.nativeEvent, 'click');\n } else {\n onOpenChange(true, event.nativeEvent, 'click');\n }\n }\n }\n }\n };\n }, [enabled, dataRef, eventOption, ignoreMouse, keyboardHandlers, domReference, toggle, open, onOpenChange]);\n}\n\nfunction createVirtualElement(domRef, data) {\n let offsetX = null;\n let offsetY = null;\n let isAutoUpdateEvent = false;\n return {\n contextElement: domRef.current || undefined,\n getBoundingClientRect() {\n var _domRef$current, _data$dataRef$current;\n const domRect = ((_domRef$current = domRef.current) == null ? void 0 : _domRef$current.getBoundingClientRect()) || {\n width: 0,\n height: 0,\n x: 0,\n y: 0\n };\n const isXAxis = data.axis === 'x' || data.axis === 'both';\n const isYAxis = data.axis === 'y' || data.axis === 'both';\n const canTrackCursorOnAutoUpdate = ['mouseenter', 'mousemove'].includes(((_data$dataRef$current = data.dataRef.current.openEvent) == null ? void 0 : _data$dataRef$current.type) || '') && data.pointerType !== 'touch';\n let width = domRect.width;\n let height = domRect.height;\n let x = domRect.x;\n let y = domRect.y;\n if (offsetX == null && data.x && isXAxis) {\n offsetX = domRect.x - data.x;\n }\n if (offsetY == null && data.y && isYAxis) {\n offsetY = domRect.y - data.y;\n }\n x -= offsetX || 0;\n y -= offsetY || 0;\n width = 0;\n height = 0;\n if (!isAutoUpdateEvent || canTrackCursorOnAutoUpdate) {\n width = data.axis === 'y' ? domRect.width : 0;\n height = data.axis === 'x' ? domRect.height : 0;\n x = isXAxis && data.x != null ? data.x : x;\n y = isYAxis && data.y != null ? data.y : y;\n } else if (isAutoUpdateEvent && !canTrackCursorOnAutoUpdate) {\n height = data.axis === 'x' ? domRect.height : height;\n width = data.axis === 'y' ? domRect.width : width;\n }\n isAutoUpdateEvent = true;\n return {\n width,\n height,\n x,\n y,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x\n };\n }\n };\n}\nfunction isMouseBasedEvent(event) {\n return event != null && event.clientX != null;\n}\n/**\n * Positions the floating element relative to a client point (in the viewport),\n * such as the mouse position. By default, it follows the mouse cursor.\n * @see https://floating-ui.com/docs/useClientPoint\n */\nfunction useClientPoint(context, props) {\n if (props === void 0) {\n props = {};\n }\n const {\n open,\n refs,\n dataRef,\n elements: {\n floating\n }\n } = context;\n const {\n enabled = true,\n axis = 'both',\n x = null,\n y = null\n } = props;\n const initialRef = React.useRef(false);\n const cleanupListenerRef = React.useRef(null);\n const [pointerType, setPointerType] = React.useState();\n const [reactive, setReactive] = React.useState([]);\n const setReference = useEffectEvent((x, y) => {\n if (initialRef.current) return;\n\n // Prevent setting if the open event was not a mouse-like one\n // (e.g. focus to open, then hover over the reference element).\n // Only apply if the event exists.\n if (dataRef.current.openEvent && !isMouseBasedEvent(dataRef.current.openEvent)) {\n return;\n }\n refs.setPositionReference(createVirtualElement(refs.domReference, {\n x,\n y,\n axis,\n dataRef,\n pointerType\n }));\n });\n const handleReferenceEnterOrMove = useEffectEvent(event => {\n if (x != null || y != null) return;\n if (!open) {\n setReference(event.clientX, event.clientY);\n } else if (!cleanupListenerRef.current) {\n // If there's no cleanup, there's no listener, but we want to ensure\n // we add the listener if the cursor landed on the floating element and\n // then back on the reference (i.e. it's interactive).\n setReactive([]);\n }\n });\n\n // If the pointer is a mouse-like pointer, we want to continue following the\n // mouse even if the floating element is transitioning out. On touch\n // devices, this is undesirable because the floating element will move to\n // the dismissal touch point.\n const openCheck = isMouseLikePointerType(pointerType) ? floating : open;\n const addListener = React.useCallback(() => {\n // Explicitly specified `x`/`y` coordinates shouldn't add a listener.\n if (!openCheck || !enabled || x != null || y != null) return;\n const win = getWindow(refs.floating.current);\n function handleMouseMove(event) {\n const target = getTarget(event);\n if (!contains(refs.floating.current, target)) {\n setReference(event.clientX, event.clientY);\n } else {\n win.removeEventListener('mousemove', handleMouseMove);\n cleanupListenerRef.current = null;\n }\n }\n if (!dataRef.current.openEvent || isMouseBasedEvent(dataRef.current.openEvent)) {\n win.addEventListener('mousemove', handleMouseMove);\n const cleanup = () => {\n win.removeEventListener('mousemove', handleMouseMove);\n cleanupListenerRef.current = null;\n };\n cleanupListenerRef.current = cleanup;\n return cleanup;\n }\n refs.setPositionReference(refs.domReference.current);\n }, [dataRef, enabled, openCheck, refs, setReference, x, y]);\n React.useEffect(() => {\n return addListener();\n }, [addListener, reactive]);\n React.useEffect(() => {\n if (enabled && !floating) {\n initialRef.current = false;\n }\n }, [enabled, floating]);\n React.useEffect(() => {\n if (!enabled && open) {\n initialRef.current = true;\n }\n }, [enabled, open]);\n index(() => {\n if (enabled && (x != null || y != null)) {\n initialRef.current = false;\n setReference(x, y);\n }\n }, [enabled, x, y, setReference]);\n return React.useMemo(() => {\n if (!enabled) return {};\n function setPointerTypeRef(_ref) {\n let {\n pointerType\n } = _ref;\n setPointerType(pointerType);\n }\n return {\n reference: {\n onPointerDown: setPointerTypeRef,\n onPointerEnter: setPointerTypeRef,\n onMouseMove: handleReferenceEnterOrMove,\n onMouseEnter: handleReferenceEnterOrMove\n }\n };\n }, [enabled, handleReferenceEnterOrMove]);\n}\n\nconst bubbleHandlerKeys = {\n pointerdown: 'onPointerDown',\n mousedown: 'onMouseDown',\n click: 'onClick'\n};\nconst captureHandlerKeys = {\n pointerdown: 'onPointerDownCapture',\n mousedown: 'onMouseDownCapture',\n click: 'onClickCapture'\n};\nconst normalizeProp = normalizable => {\n var _normalizable$escapeK, _normalizable$outside;\n return {\n escapeKey: typeof normalizable === 'boolean' ? normalizable : (_normalizable$escapeK = normalizable == null ? void 0 : normalizable.escapeKey) != null ? _normalizable$escapeK : false,\n outsidePress: typeof normalizable === 'boolean' ? normalizable : (_normalizable$outside = normalizable == null ? void 0 : normalizable.outsidePress) != null ? _normalizable$outside : true\n };\n};\n/**\n * Closes the floating element when a dismissal is requested — by default, when\n * the user presses the `escape` key or outside of the floating element.\n * @see https://floating-ui.com/docs/useDismiss\n */\nfunction useDismiss(context, props) {\n if (props === void 0) {\n props = {};\n }\n const {\n open,\n onOpenChange,\n nodeId,\n elements: {\n reference,\n domReference,\n floating\n },\n dataRef\n } = context;\n const {\n enabled = true,\n escapeKey = true,\n outsidePress: unstable_outsidePress = true,\n outsidePressEvent = 'pointerdown',\n referencePress = false,\n referencePressEvent = 'pointerdown',\n ancestorScroll = false,\n bubbles,\n capture\n } = props;\n const tree = useFloatingTree();\n const outsidePressFn = useEffectEvent(typeof unstable_outsidePress === 'function' ? unstable_outsidePress : () => false);\n const outsidePress = typeof unstable_outsidePress === 'function' ? outsidePressFn : unstable_outsidePress;\n const insideReactTreeRef = React.useRef(false);\n const endedOrStartedInsideRef = React.useRef(false);\n const {\n escapeKey: escapeKeyBubbles,\n outsidePress: outsidePressBubbles\n } = normalizeProp(bubbles);\n const {\n escapeKey: escapeKeyCapture,\n outsidePress: outsidePressCapture\n } = normalizeProp(capture);\n const closeOnEscapeKeyDown = useEffectEvent(event => {\n if (!open || !enabled || !escapeKey || event.key !== 'Escape') {\n return;\n }\n const children = tree ? getChildren(tree.nodesRef.current, nodeId) : [];\n if (!escapeKeyBubbles) {\n event.stopPropagation();\n if (children.length > 0) {\n let shouldDismiss = true;\n children.forEach(child => {\n var _child$context;\n if ((_child$context = child.context) != null && _child$context.open && !child.context.dataRef.current.__escapeKeyBubbles) {\n shouldDismiss = false;\n return;\n }\n });\n if (!shouldDismiss) {\n return;\n }\n }\n }\n onOpenChange(false, isReactEvent(event) ? event.nativeEvent : event, 'escape-key');\n });\n const closeOnEscapeKeyDownCapture = useEffectEvent(event => {\n var _getTarget2;\n const callback = () => {\n var _getTarget;\n closeOnEscapeKeyDown(event);\n (_getTarget = getTarget(event)) == null || _getTarget.removeEventListener('keydown', callback);\n };\n (_getTarget2 = getTarget(event)) == null || _getTarget2.addEventListener('keydown', callback);\n });\n const closeOnPressOutside = useEffectEvent(event => {\n // Given developers can stop the propagation of the synthetic event,\n // we can only be confident with a positive value.\n const insideReactTree = insideReactTreeRef.current;\n insideReactTreeRef.current = false;\n\n // When click outside is lazy (`click` event), handle dragging.\n // Don't close if:\n // - The click started inside the floating element.\n // - The click ended inside the floating element.\n const endedOrStartedInside = endedOrStartedInsideRef.current;\n endedOrStartedInsideRef.current = false;\n if (outsidePressEvent === 'click' && endedOrStartedInside) {\n return;\n }\n if (insideReactTree) {\n return;\n }\n if (typeof outsidePress === 'function' && !outsidePress(event)) {\n return;\n }\n const target = getTarget(event);\n const inertSelector = \"[\" + createAttribute('inert') + \"]\";\n const markers = getDocument(floating).querySelectorAll(inertSelector);\n let targetRootAncestor = isElement(target) ? target : null;\n while (targetRootAncestor && !isLastTraversableNode(targetRootAncestor)) {\n const nextParent = getParentNode(targetRootAncestor);\n if (isLastTraversableNode(nextParent) || !isElement(nextParent)) {\n break;\n }\n targetRootAncestor = nextParent;\n }\n\n // Check if the click occurred on a third-party element injected after the\n // floating element rendered.\n if (markers.length && isElement(target) && !isRootElement(target) &&\n // Clicked on a direct ancestor (e.g. FloatingOverlay).\n !contains(target, floating) &&\n // If the target root element contains none of the markers, then the\n // element was injected after the floating element rendered.\n Array.from(markers).every(marker => !contains(targetRootAncestor, marker))) {\n return;\n }\n\n // Check if the click occurred on the scrollbar\n if (isHTMLElement(target) && floating) {\n // In Firefox, `target.scrollWidth > target.clientWidth` for inline\n // elements.\n const canScrollX = target.clientWidth > 0 && target.scrollWidth > target.clientWidth;\n const canScrollY = target.clientHeight > 0 && target.scrollHeight > target.clientHeight;\n let xCond = canScrollY && event.offsetX > target.clientWidth;\n\n // In some browsers it is possible to change the <body> (or window)\n // scrollbar to the left side, but is very rare and is difficult to\n // check for. Plus, for modal dialogs with backdrops, it is more\n // important that the backdrop is checked but not so much the window.\n if (canScrollY) {\n const isRTL = getComputedStyle(target).direction === 'rtl';\n if (isRTL) {\n xCond = event.offsetX <= target.offsetWidth - target.clientWidth;\n }\n }\n if (xCond || canScrollX && event.offsetY > target.clientHeight) {\n return;\n }\n }\n const targetIsInsideChildren = tree && getChildren(tree.nodesRef.current, nodeId).some(node => {\n var _node$context;\n return isEventTargetWithin(event, (_node$context = node.context) == null ? void 0 : _node$context.elements.floating);\n });\n if (isEventTargetWithin(event, floating) || isEventTargetWithin(event, domReference) || targetIsInsideChildren) {\n return;\n }\n const children = tree ? getChildren(tree.nodesRef.current, nodeId) : [];\n if (children.length > 0) {\n let shouldDismiss = true;\n children.forEach(child => {\n var _child$context2;\n if ((_child$context2 = child.context) != null && _child$context2.open && !child.context.dataRef.current.__outsidePressBubbles) {\n shouldDismiss = false;\n return;\n }\n });\n if (!shouldDismiss) {\n return;\n }\n }\n onOpenChange(false, event, 'outside-press');\n });\n const closeOnPressOutsideCapture = useEffectEvent(event => {\n var _getTarget4;\n const callback = () => {\n var _getTarget3;\n closeOnPressOutside(event);\n (_getTarget3 = getTarget(event)) == null || _getTarget3.removeEventListener(outsidePressEvent, callback);\n };\n (_getTarget4 = getTarget(event)) == null || _getTarget4.addEventListener(outsidePressEvent, callback);\n });\n React.useEffect(() => {\n if (!open || !enabled) {\n return;\n }\n dataRef.current.__escapeKeyBubbles = escapeKeyBubbles;\n dataRef.current.__outsidePressBubbles = outsidePressBubbles;\n function onScroll(event) {\n onOpenChange(false, event, 'ancestor-scroll');\n }\n const doc = getDocument(floating);\n escapeKey && doc.addEventListener('keydown', escapeKeyCapture ? closeOnEscapeKeyDownCapture : closeOnEscapeKeyDown, escapeKeyCapture);\n outsidePress && doc.addEventListener(outsidePressEvent, outsidePressCapture ? closeOnPressOutsideCapture : closeOnPressOutside, outsidePressCapture);\n let ancestors = [];\n if (ancestorScroll) {\n if (isElement(domReference)) {\n ancestors = getOverflowAncestors(domReference);\n }\n if (isElement(floating)) {\n ancestors = ancestors.concat(getOverflowAncestors(floating));\n }\n if (!isElement(reference) && reference && reference.contextElement) {\n ancestors = ancestors.concat(getOverflowAncestors(reference.contextElement));\n }\n }\n\n // Ignore the visual viewport for scrolling dismissal (allow pinch-zoom)\n ancestors = ancestors.filter(ancestor => {\n var _doc$defaultView;\n return ancestor !== ((_doc$defaultView = doc.defaultView) == null ? void 0 : _doc$defaultView.visualViewport);\n });\n ancestors.forEach(ancestor => {\n ancestor.addEventListener('scroll', onScroll, {\n passive: true\n });\n });\n return () => {\n escapeKey && doc.removeEventListener('keydown', escapeKeyCapture ? closeOnEscapeKeyDownCapture : closeOnEscapeKeyDown, escapeKeyCapture);\n outsidePress && doc.removeEventListener(outsidePressEvent, outsidePressCapture ? closeOnPressOutsideCapture : closeOnPressOutside, outsidePressCapture);\n ancestors.forEach(ancestor => {\n ancestor.removeEventListener('scroll', onScroll);\n });\n };\n }, [dataRef, floating, domReference, reference, escapeKey, outsidePress, outsidePressEvent, open, onOpenChange, ancestorScroll, enabled, escapeKeyBubbles, outsidePressBubbles, closeOnEscapeKeyDown, escapeKeyCapture, closeOnEscapeKeyDownCapture, closeOnPressOutside, outsidePressCapture, closeOnPressOutsideCapture]);\n React.useEffect(() => {\n insideReactTreeRef.current = false;\n }, [outsidePress, outsidePressEvent]);\n return React.useMemo(() => {\n if (!enabled) {\n return {};\n }\n return {\n reference: {\n onKeyDown: closeOnEscapeKeyDown,\n [bubbleHandlerKeys[referencePressEvent]]: event => {\n if (referencePress) {\n onOpenChange(false, event.nativeEvent, 'reference-press');\n }\n }\n },\n floating: {\n onKeyDown: closeOnEscapeKeyDown,\n onMouseDown() {\n endedOrStartedInsideRef.current = true;\n },\n onMouseUp() {\n endedOrStartedInsideRef.current = true;\n },\n [captureHandlerKeys[outsidePressEvent]]: () => {\n insideReactTreeRef.current = true;\n }\n }\n };\n }, [enabled, referencePress, outsidePressEvent, referencePressEvent, onOpenChange, closeOnEscapeKeyDown]);\n}\n\n/**\n * Provides data to position a floating element and context to add interactions.\n * @see https://floating-ui.com/docs/useFloating\n */\nfunction useFloating(options) {\n var _options$elements;\n if (options === void 0) {\n options = {};\n }\n const {\n open = false,\n onOpenChange: unstable_onOpenChange,\n nodeId\n } = options;\n const [_domReference, setDomReference] = React.useState(null);\n const [positionReference, _setPositionReference] = React.useState(null);\n const optionDomReference = (_options$elements = options.elements) == null ? void 0 : _options$elements.reference;\n const domReference = optionDomReference || _domReference;\n if (process.env.NODE_ENV !== \"production\") {\n if (optionDomReference && !isElement(optionDomReference)) {\n error('Cannot pass a virtual element to the `elements.reference` option,', 'as it must be a real DOM element. Use `refs.setPositionReference()`', 'instead.');\n }\n }\n index(() => {\n if (domReference) {\n domReferenceRef.current = domReference;\n }\n }, [domReference]);\n const position = useFloating$1({\n ...options,\n elements: {\n ...options.elements,\n ...(positionReference && {\n reference: positionReference\n })\n }\n });\n const tree = useFloatingTree();\n const nested = useFloatingParentNodeId() != null;\n const onOpenChange = useEffectEvent((open, event, reason) => {\n dataRef.current.openEvent = open ? event : undefined;\n events.emit('openchange', {\n open,\n event,\n reason,\n nested\n });\n unstable_onOpenChange == null || unstable_onOpenChange(open, event, reason);\n });\n const domReferenceRef = React.useRef(null);\n const dataRef = React.useRef({});\n const events = React.useState(() => createPubSub())[0];\n const floatingId = useId();\n const setPositionReference = React.useCallback(node => {\n const computedPositionReference = isElement(node) ? {\n getBoundingClientRect: () => node.getBoundingClientRect(),\n contextElement: node\n } : node;\n // Store the positionReference in state if the DOM reference is specified externally via the\n // `elements.reference` option. This ensures that it won't be overridden on future renders.\n _setPositionReference(computedPositionReference);\n position.refs.setReference(computedPositionReference);\n }, [position.refs]);\n const setReference = React.useCallback(node => {\n if (isElement(node) || node === null) {\n domReferenceRef.current = node;\n setDomReference(node);\n }\n\n // Backwards-compatibility for passing a virtual element to `reference`\n // after it has set the DOM reference.\n if (isElement(position.refs.reference.current) || position.refs.reference.current === null ||\n // Don't allow setting virtual elements using the old technique back to\n // `null` to support `positionReference` + an unstable `reference`\n // callback ref.\n node !== null && !isElement(node)) {\n position.refs.setReference(node);\n }\n }, [position.refs]);\n const refs = React.useMemo(() => ({\n ...position.refs,\n setReference,\n setPositionReference,\n domReference: domReferenceRef\n }), [position.refs, setReference, setPositionReference]);\n const elements = React.useMemo(() => ({\n ...position.elements,\n domReference: domReference\n }), [position.elements, domReference]);\n const context = React.useMemo(() => ({\n ...position,\n refs,\n elements,\n dataRef,\n nodeId,\n floatingId,\n events,\n open,\n onOpenChange\n }), [position, nodeId, floatingId, events, open, onOpenChange, refs, elements]);\n index(() => {\n const node = tree == null ? void 0 : tree.nodesRef.current.find(node => node.id === nodeId);\n if (node) {\n node.context = context;\n }\n });\n return React.useMemo(() => ({\n ...position,\n context,\n refs,\n elements\n }), [position, refs, elements, context]);\n}\n\n/**\n * Opens the floating element while the reference element has focus, like CSS\n * `:focus`.\n * @see https://floating-ui.com/docs/useFocus\n */\nfunction useFocus(context, props) {\n if (props === void 0) {\n props = {};\n }\n const {\n open,\n onOpenChange,\n events,\n refs,\n elements: {\n domReference\n }\n } = context;\n const {\n enabled = true,\n visibleOnly = true\n } = props;\n const blockFocusRef = React.useRef(false);\n const timeoutRef = React.useRef();\n const keyboardModalityRef = React.useRef(true);\n React.useEffect(() => {\n if (!enabled) {\n return;\n }\n const win = getWindow(domReference);\n\n // If the reference was focused and the user left the tab/window, and the\n // floating element was not open, the focus should be blocked when they\n // return to the tab/window.\n function onBlur() {\n if (!open && isHTMLElement(domReference) && domReference === activeElement(getDocument(domReference))) {\n blockFocusRef.current = true;\n }\n }\n function onKeyDown() {\n keyboardModalityRef.current = true;\n }\n win.addEventListener('blur', onBlur);\n win.addEventListener('keydown', onKeyDown, true);\n return () => {\n win.removeEventListener('blur', onBlur);\n win.removeEventListener('keydown', onKeyDown, true);\n };\n }, [domReference, open, enabled]);\n React.useEffect(() => {\n if (!enabled) {\n return;\n }\n function onOpenChange(_ref) {\n let {\n reason\n } = _ref;\n if (reason === 'reference-press' || reason === 'escape-key') {\n blockFocusRef.current = true;\n }\n }\n events.on('openchange', onOpenChange);\n return () => {\n events.off('openchange', onOpenChange);\n };\n }, [events, enabled]);\n React.useEffect(() => {\n return () => {\n clearTimeout(timeoutRef.current);\n };\n }, []);\n return React.useMemo(() => {\n if (!enabled) {\n return {};\n }\n return {\n reference: {\n onPointerDown(event) {\n if (isVirtualPointerEvent(event.nativeEvent)) return;\n keyboardModalityRef.current = false;\n },\n onMouseLeave() {\n blockFocusRef.current = false;\n },\n onFocus(event) {\n if (blockFocusRef.current) return;\n const target = getTarget(event.nativeEvent);\n if (visibleOnly && isElement(target)) {\n try {\n // Mac Safari unreliably matches `:focus-visible` on the reference\n // if focus was outside the page initially - use the fallback\n // instead.\n if (isSafari() && isMac()) throw Error();\n if (!target.matches(':focus-visible')) return;\n } catch (e) {\n // Old browsers will throw an error when using `:focus-visible`.\n if (!keyboardModalityRef.current && !isTypeableElement(target)) {\n return;\n }\n }\n }\n onOpenChange(true, event.nativeEvent, 'focus');\n },\n onBlur(event) {\n blockFocusRef.current = false;\n const relatedTarget = event.relatedTarget;\n\n // Hit the non-modal focus management portal guard. Focus will be\n // moved into the floating element immediately after.\n const movedToFocusGuard = isElement(relatedTarget) && relatedTarget.hasAttribute(createAttribute('focus-guard')) && relatedTarget.getAttribute('data-type') === 'outside';\n\n // Wait for the window blur listener to fire.\n timeoutRef.current = window.setTimeout(() => {\n const activeEl = activeElement(domReference ? domReference.ownerDocument : document);\n\n // Focus left the page, keep it open.\n if (!relatedTarget && activeEl === domReference) return;\n\n // When focusing the reference element (e.g. regular click), then\n // clicking into the floating element, prevent it from hiding.\n // Note: it must be focusable, e.g. `tabindex=\"-1\"`.\n // We can not rely on relatedTarget to point to the correct element\n // as it will only point to the shadow host of the newly focused element\n // and not the element that actually has received focus if it is located\n // inside a shadow root.\n if (contains(refs.floating.current, activeEl) || contains(domReference, activeEl) || movedToFocusGuard) {\n return;\n }\n onOpenChange(false, event.nativeEvent, 'focus');\n });\n }\n }\n };\n }, [enabled, visibleOnly, domReference, refs, onOpenChange]);\n}\n\nconst ACTIVE_KEY = 'active';\nconst SELECTED_KEY = 'selected';\nfunction mergeProps(userProps, propsList, elementKey) {\n const map = new Map();\n const isItem = elementKey === 'item';\n let domUserProps = userProps;\n if (isItem && userProps) {\n const {\n [ACTIVE_KEY]: _,\n [SELECTED_KEY]: __,\n ...validProps\n } = userProps;\n domUserProps = validProps;\n }\n return {\n ...(elementKey === 'floating' && {\n tabIndex: -1\n }),\n ...domUserProps,\n ...propsList.map(value => {\n const propsOrGetProps = value ? value[elementKey] : null;\n if (typeof propsOrGetProps === 'function') {\n return userProps ? propsOrGetProps(userProps) : null;\n }\n return propsOrGetProps;\n }).concat(userProps).reduce((acc, props) => {\n if (!props) {\n return acc;\n }\n Object.entries(props).forEach(_ref => {\n let [key, value] = _ref;\n if (isItem && [ACTIVE_KEY, SELECTED_KEY].includes(key)) {\n return;\n }\n if (key.indexOf('on') === 0) {\n if (!map.has(key)) {\n map.set(key, []);\n }\n if (typeof value === 'function') {\n var _map$get;\n (_map$get = map.get(key)) == null || _map$get.push(value);\n acc[key] = function () {\n var _map$get2;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return (_map$get2 = map.get(key)) == null ? void 0 : _map$get2.map(fn => fn(...args)).find(val => val !== undefined);\n };\n }\n } else {\n acc[key] = value;\n }\n });\n return acc;\n }, {})\n };\n}\n\n/**\n * Merges an array of interaction hooks' props into prop getters, allowing\n * event handler functions to be composed together without overwriting one\n * another.\n * @see https://floating-ui.com/docs/useInteractions\n */\nfunction useInteractions(propsList) {\n if (propsList === void 0) {\n propsList = [];\n }\n // The dependencies are a dynamic array, so we can't use the linter's\n // suggestion to add it to the deps array.\n const deps = propsList;\n const getReferenceProps = React.useCallback(userProps => mergeProps(userProps, propsList, 'reference'),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n deps);\n const getFloatingProps = React.useCallback(userProps => mergeProps(userProps, propsList, 'floating'),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n deps);\n const getItemProps = React.useCallback(userProps => mergeProps(userProps, propsList, 'item'),\n // Granularly check for `item` changes, because the `getItemProps` getter\n // should be as referentially stable as possible since it may be passed as\n // a prop to many components. All `item` key values must therefore be\n // memoized.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n propsList.map(key => key == null ? void 0 : key.item));\n return React.useMemo(() => ({\n getReferenceProps,\n getFloatingProps,\n getItemProps\n }), [getReferenceProps, getFloatingProps, getItemProps]);\n}\n\nlet isPreventScrollSupported = false;\nfunction doSwitch(orientation, vertical, horizontal) {\n switch (orientation) {\n case 'vertical':\n return vertical;\n case 'horizontal':\n return horizontal;\n default:\n return vertical || horizontal;\n }\n}\nfunction isMainOrientationKey(key, orientation) {\n const vertical = key === ARROW_UP || key === ARROW_DOWN;\n const horizontal = key === ARROW_LEFT || key === ARROW_RIGHT;\n return doSwitch(orientation, vertical, horizontal);\n}\nfunction isMainOrientationToEndKey(key, orientation, rtl) {\n const vertical = key === ARROW_DOWN;\n const horizontal = rtl ? key === ARROW_LEFT : key === ARROW_RIGHT;\n return doSwitch(orientation, vertical, horizontal) || key === 'Enter' || key === ' ' || key === '';\n}\nfunction isCrossOrientationOpenKey(key, orientation, rtl) {\n const vertical = rtl ? key === ARROW_LEFT : key === ARROW_RIGHT;\n const horizontal = key === ARROW_DOWN;\n return doSwitch(orientation, vertical, horizontal);\n}\nfunction isCrossOrientationCloseKey(key, orientation, rtl) {\n const vertical = rtl ? key === ARROW_RIGHT : key === ARROW_LEFT;\n const horizontal = key === ARROW_UP;\n return doSwitch(orientation, vertical, horizontal);\n}\n/**\n * Adds arrow key-based navigation of a list of items, either using real DOM\n * focus or virtual focus.\n * @see https://floating-ui.com/docs/useListNavigation\n */\nfunction useListNavigation(context, props) {\n const {\n open,\n onOpenChange,\n refs,\n elements: {\n domReference,\n floating\n }\n } = context;\n const {\n listRef,\n activeIndex,\n onNavigate: unstable_onNavigate = () => {},\n enabled = true,\n selectedIndex = null,\n allowEscape = false,\n loop = false,\n nested = false,\n rtl = false,\n virtual = false,\n focusItemOnOpen = 'auto',\n focusItemOnHover = true,\n openOnArrowKeyDown = true,\n disabledIndices = undefined,\n orientation = 'vertical',\n cols = 1,\n scrollItemIntoView = true,\n virtualItemRef,\n itemSizes,\n dense = false\n } = props;\n if (process.env.NODE_ENV !== \"production\") {\n if (allowEscape) {\n if (!loop) {\n warn('`useListNavigation` looping must be enabled to allow escaping.');\n }\n if (!virtual) {\n warn('`useListNavigation` must be virtual to allow escaping.');\n }\n }\n if (orientation === 'vertical' && cols > 1) {\n warn('In grid list navigation mode (`cols` > 1), the `orientation` should', 'be either \"horizontal\" or \"both\".');\n }\n }\n const parentId = useFloatingParentNodeId();\n const tree = useFloatingTree();\n const onNavigate = useEffectEvent(unstable_onNavigate);\n const focusItemOnOpenRef = React.useRef(focusItemOnOpen);\n const indexRef = React.useRef(selectedIndex != null ? selectedIndex : -1);\n const keyRef = React.useRef(null);\n const isPointerModalityRef = React.useRef(true);\n const previousOnNavigateRef = React.useRef(onNavigate);\n const previousMountedRef = React.useRef(!!floating);\n const forceSyncFocus = React.useRef(false);\n const forceScrollIntoViewRef = React.useRef(false);\n const disabledIndicesRef = useLatestRef(disabledIndices);\n const latestOpenRef = useLatestRef(open);\n const scrollItemIntoViewRef = useLatestRef(scrollItemIntoView);\n const [activeId, setActiveId] = React.useState();\n const [virtualId, setVirtualId] = React.useState();\n const focusItem = useEffectEvent(function (listRef, indexRef, forceScrollIntoView) {\n if (forceScrollIntoView === void 0) {\n forceScrollIntoView = false;\n }\n const item = listRef.current[indexRef.current];\n if (!item) return;\n if (virtual) {\n setActiveId(item.id);\n tree == null || tree.events.emit('virtualfocus', item);\n if (virtualItemRef) {\n virtualItemRef.current = item;\n }\n } else {\n enqueueFocus(item, {\n preventScroll: true,\n // Mac Safari does not move the virtual cursor unless the focus call\n // is sync. However, for the very first focus call, we need to wait\n // for the position to be ready in order to prevent unwanted\n // scrolling. This means the virtual cursor will not move to the first\n // item when first opening the floating element, but will on\n // subsequent calls. `preventScroll` is supported in modern Safari,\n // so we can use that instead.\n // iOS Safari must be async or the first item will not be focused.\n sync: isMac() && isSafari() ? isPreventScrollSupported || forceSyncFocus.current : false\n });\n }\n requestAnimationFrame(() => {\n const scrollIntoViewOptions = scrollItemIntoViewRef.current;\n const shouldScrollIntoView = scrollIntoViewOptions && item && (forceScrollIntoView || !isPointerModalityRef.current);\n if (shouldScrollIntoView) {\n // JSDOM doesn't support `.scrollIntoView()` but it's widely supported\n // by all browsers.\n item.scrollIntoView == null || item.scrollIntoView(typeof scrollIntoViewOptions === 'boolean' ? {\n block: 'nearest',\n inline: 'nearest'\n } : scrollIntoViewOptions);\n }\n });\n });\n index(() => {\n document.createElement('div').focus({\n get preventScroll() {\n isPreventScrollSupported = true;\n return false;\n }\n });\n }, []);\n\n // Sync `selectedIndex` to be the `activeIndex` upon opening the floating\n // element. Also, reset `activeIndex` upon closing the floating element.\n index(() => {\n if (!enabled) {\n return;\n }\n if (open && floating) {\n if (focusItemOnOpenRef.current && selectedIndex != null) {\n // Regardless of the pointer modality, we want to ensure the selected\n // item comes into view when the floating element is opened.\n forceScrollIntoViewRef.current = true;\n indexRef.current = selectedIndex;\n onNavigate(selectedIndex);\n }\n } else if (previousMountedRef.current) {\n // Since the user can specify `onNavigate` conditionally\n // (onNavigate: open ? setActiveIndex : setSelectedIndex),\n // we store and call the previous function.\n indexRef.current = -1;\n previousOnNavigateRef.current(null);\n }\n }, [enabled, open, floating, selectedIndex, onNavigate]);\n\n // Sync `activeIndex` to be the focused item while the floating element is\n // open.\n index(() => {\n if (!enabled) {\n return;\n }\n if (open && floating) {\n if (activeIndex == null) {\n forceSyncFocus.current = false;\n if (selectedIndex != null) {\n return;\n }\n\n // Reset while the floating element was open (e.g. the list changed).\n if (previousMountedRef.current) {\n indexRef.current = -1;\n focusItem(listRef, indexRef);\n }\n\n // Initial sync.\n if (!previousMountedRef.current && focusItemOnOpenRef.current && (keyRef.current != null || focusItemOnOpenRef.current === true && keyRef.current == null)) {\n let runs = 0;\n const waitForListPopulated = () => {\n if (listRef.current[0] == null) {\n // Avoid letting the browser paint if possible on the first try,\n // otherwise use rAF. Don't try more than twice, since something\n // is wrong otherwise.\n if (runs < 2) {\n const scheduler = runs ? requestAnimationFrame : queueMicrotask;\n scheduler(waitForListPopulated);\n }\n runs++;\n } else {\n indexRef.current = keyRef.current == null || isMainOrientationToEndKey(keyRef.current, orientation, rtl) || nested ? getMinIndex(listRef, disabledIndicesRef.current) : getMaxIndex(listRef, disabledIndicesRef.current);\n keyRef.current = null;\n onNavigate(indexRef.current);\n }\n };\n waitForListPopulated();\n }\n } else if (!isIndexOutOfBounds(listRef, activeIndex)) {\n indexRef.current = activeIndex;\n focusItem(listRef, indexRef, forceScrollIntoViewRef.current);\n forceScrollIntoViewRef.current = false;\n }\n }\n }, [enabled, open, floating, activeIndex, selectedIndex, nested, listRef, orientation, rtl, onNavigate, focusItem, disabledIndicesRef]);\n\n // Ensure the parent floating element has focus when a nested child closes\n // to allow arrow key navigation to work after the pointer leaves the child.\n index(() => {\n var _nodes$find;\n if (!enabled || floating || !tree || virtual || !previousMountedRef.current) {\n return;\n }\n const nodes = tree.nodesRef.current;\n const parent = (_nodes$find = nodes.find(node => node.id === parentId)) == null || (_nodes$find = _nodes$find.context) == null ? void 0 : _nodes$find.elements.floating;\n const activeEl = activeElement(getDocument(floating));\n const treeContainsActiveEl = nodes.some(node => node.context && contains(node.context.elements.floating, activeEl));\n if (parent && !treeContainsActiveEl && isPointerModalityRef.current) {\n parent.focus({\n preventScroll: true\n });\n }\n }, [enabled, floating, tree, parentId, virtual]);\n index(() => {\n if (!enabled || !tree || !virtual || parentId) return;\n function handleVirtualFocus(item) {\n setVirtualId(item.id);\n if (virtualItemRef) {\n virtualItemRef.current = item;\n }\n }\n tree.events.on('virtualfocus', handleVirtualFocus);\n return () => {\n tree.events.off('virtualfocus', handleVirtualFocus);\n };\n }, [enabled, tree, virtual, parentId, virtualItemRef]);\n index(() => {\n previousOnNavigateRef.current = onNavigate;\n previousMountedRef.current = !!floating;\n });\n index(() => {\n if (!open) {\n keyRef.current = null;\n }\n }, [open]);\n const hasActiveIndex = activeIndex != null;\n const item = React.useMemo(() => {\n function syncCurrentTarget(currentTarget) {\n if (!open) return;\n const index = listRef.current.indexOf(currentTarget);\n if (index !== -1) {\n onNavigate(index);\n }\n }\n const props = {\n onFocus(_ref) {\n let {\n currentTarget\n } = _ref;\n syncCurrentTarget(currentTarget);\n },\n onClick: _ref2 => {\n let {\n currentTarget\n } = _ref2;\n return currentTarget.focus({\n preventScroll: true\n });\n },\n // Safari\n ...(focusItemOnHover && {\n onMouseMove(_ref3) {\n let {\n currentTarget\n } = _ref3;\n syncCurrentTarget(currentTarget);\n },\n onPointerLeave(_ref4) {\n let {\n pointerType\n } = _ref4;\n if (!isPointerModalityRef.current || pointerType === 'touch') {\n return;\n }\n indexRef.current = -1;\n focusItem(listRef, indexRef);\n onNavigate(null);\n if (!virtual) {\n enqueueFocus(refs.floating.current, {\n preventScroll: true\n });\n }\n }\n })\n };\n return props;\n }, [open, refs, focusItem, focusItemOnHover, listRef, onNavigate, virtual]);\n return React.useMemo(() => {\n if (!enabled) {\n return {};\n }\n const disabledIndices = disabledIndicesRef.current;\n function onKeyDown(event) {\n isPointerModalityRef.current = false;\n forceSyncFocus.current = true;\n\n // If the floating element is animating out, ignore navigation. Otherwise,\n // the `activeIndex` gets set to 0 despite not being open so the next time\n // the user ArrowDowns, the first item won't be focused.\n if (!latestOpenRef.current && event.currentTarget === refs.floating.current) {\n return;\n }\n if (nested && isCrossOrientationCloseKey(event.key, orientation, rtl)) {\n stopEvent(event);\n onOpenChange(false, event.nativeEvent, 'list-navigation');\n if (isHTMLElement(domReference) && !virtual) {\n domReference.focus();\n }\n return;\n }\n const currentIndex = indexRef.current;\n const minIndex = getMinIndex(listRef, disabledIndices);\n const maxIndex = getMaxIndex(listRef, disabledIndices);\n if (event.key === 'Home') {\n stopEvent(event);\n indexRef.current = minIndex;\n onNavigate(indexRef.current);\n }\n if (event.key === 'End') {\n stopEvent(event);\n indexRef.current = maxIndex;\n onNavigate(indexRef.current);\n }\n\n // Grid navigation.\n if (cols > 1) {\n const sizes = itemSizes || Array.from({\n length: listRef.current.length\n }, () => ({\n width: 1,\n height: 1\n }));\n // To calculate movements on the grid, we use hypothetical cell indices\n // as if every item was 1x1, then convert back to real indices.\n const cellMap = buildCellMap(sizes, cols, dense);\n const minGridIndex = cellMap.findIndex(index => index != null && !(disabledIndices != null && disabledIndices.includes(index)));\n // last enabled index\n const maxGridIndex = cellMap.reduce((foundIndex, index, cellIndex) => index != null && !(disabledIndices != null && disabledIndices.includes(index)) ? cellIndex : foundIndex, -1);\n indexRef.current = cellMap[getGridNavigatedIndex({\n current: cellMap.map(itemIndex => itemIndex != null ? listRef.current[itemIndex] : null)\n }, {\n event,\n orientation,\n loop,\n cols,\n // treat undefined (empty grid spaces) as disabled indices so we\n // don't end up in them\n disabledIndices: getCellIndices([...(disabledIndices || []), undefined], cellMap),\n minIndex: minGridIndex,\n maxIndex: maxGridIndex,\n prevIndex: getCellIndexOfCorner(indexRef.current, sizes, cellMap, cols,\n // use a corner matching the edge closest to the direction\n // we're moving in so we don't end up in the same item. Prefer\n // top/left over bottom/right.\n event.key === ARROW_DOWN ? 'bl' : event.key === ARROW_RIGHT ? 'tr' : 'tl'),\n stopEvent: true\n })]; // navigated cell will never be nullish\n\n onNavigate(indexRef.current);\n if (orientation === 'both') {\n return;\n }\n }\n if (isMainOrientationKey(event.key, orientation)) {\n stopEvent(event);\n\n // Reset the index if no item is focused.\n if (open && !virtual && activeElement(event.currentTarget.ownerDocument) === event.currentTarget) {\n indexRef.current = isMainOrientationToEndKey(event.key, orientation, rtl) ? minIndex : maxIndex;\n onNavigate(indexRef.current);\n return;\n }\n if (isMainOrientationToEndKey(event.key, orientation, rtl)) {\n if (loop) {\n indexRef.current = currentIndex >= maxIndex ? allowEscape && currentIndex !== listRef.current.length ? -1 : minIndex : findNonDisabledIndex(listRef, {\n startingIndex: currentIndex,\n disabledIndices\n });\n } else {\n indexRef.current = Math.min(maxIndex, findNonDisabledIndex(listRef, {\n startingIndex: currentIndex,\n disabledIndices\n }));\n }\n } else {\n if (loop) {\n indexRef.current = currentIndex <= minIndex ? allowEscape && currentIndex !== -1 ? listRef.current.length : maxIndex : findNonDisabledIndex(listRef, {\n startingIndex: currentIndex,\n decrement: true,\n disabledIndices\n });\n } else {\n indexRef.current = Math.max(minIndex, findNonDisabledIndex(listRef, {\n startingIndex: currentIndex,\n decrement: true,\n disabledIndices\n }));\n }\n }\n if (isIndexOutOfBounds(listRef, indexRef.current)) {\n onNavigate(null);\n } else {\n onNavigate(indexRef.current);\n }\n }\n }\n function checkVirtualMouse(event) {\n if (focusItemOnOpen === 'auto' && isVirtualClick(event.nativeEvent)) {\n focusItemOnOpenRef.current = true;\n }\n }\n function checkVirtualPointer(event) {\n // `pointerdown` fires first, reset the state then perform the checks.\n focusItemOnOpenRef.current = focusItemOnOpen;\n if (focusItemOnOpen === 'auto' && isVirtualPointerEvent(event.nativeEvent)) {\n focusItemOnOpenRef.current = true;\n }\n }\n const ariaActiveDescendantProp = virtual && open && hasActiveIndex && {\n 'aria-activedescendant': virtualId || activeId\n };\n const activeItem = listRef.current.find(item => (item == null ? void 0 : item.id) === activeId);\n return {\n reference: {\n ...ariaActiveDescendantProp,\n onKeyDown(event) {\n isPointerModalityRef.current = false;\n const isArrowKey = event.key.indexOf('Arrow') === 0;\n const isCrossOpenKey = isCrossOrientationOpenKey(event.key, orientation, rtl);\n const isCrossCloseKey = isCrossOrientationCloseKey(event.key, orientation, rtl);\n const isMainKey = isMainOrientationKey(event.key, orientation);\n const isNavigationKey = (nested ? isCrossOpenKey : isMainKey) || event.key === 'Enter' || event.key.trim() === '';\n if (virtual && open) {\n const rootNode = tree == null ? void 0 : tree.nodesRef.current.find(node => node.parentId == null);\n const deepestNode = tree && rootNode ? getDeepestNode(tree.nodesRef.current, rootNode.id) : null;\n if (isArrowKey && deepestNode && virtualItemRef) {\n const eventObject = new KeyboardEvent('keydown', {\n key: event.key,\n bubbles: true\n });\n if (isCrossOpenKey || isCrossCloseKey) {\n var _deepestNode$context, _deepestNode$context2;\n const isCurrentTarget = ((_deepestNode$context = deepestNode.context) == null ? void 0 : _deepestNode$context.elements.domReference) === event.currentTarget;\n const dispatchItem = isCrossCloseKey && !isCurrentTarget ? (_deepestNode$context2 = deepestNode.context) == null ? void 0 : _deepestNode$context2.elements.domReference : isCrossOpenKey ? activeItem : null;\n if (dispatchItem) {\n stopEvent(event);\n dispatchItem.dispatchEvent(eventObject);\n setVirtualId(undefined);\n }\n }\n if (isMainKey && deepestNode.context) {\n if (deepestNode.context.open && deepestNode.parentId && event.currentTarget !== deepestNode.context.elements.domReference) {\n var _deepestNode$context$;\n stopEvent(event);\n (_deepestNode$context$ = deepestNode.context.elements.domReference) == null || _deepestNode$context$.dispatchEvent(eventObject);\n return;\n }\n }\n }\n return onKeyDown(event);\n }\n\n // If a floating element should not open on arrow key down, avoid\n // setting `activeIndex` while it's closed.\n if (!open && !openOnArrowKeyDown && isArrowKey) {\n return;\n }\n if (isNavigationKey) {\n keyRef.current = nested && isMainKey ? null : event.key;\n }\n if (nested) {\n if (isCrossOpenKey) {\n stopEvent(event);\n if (open) {\n indexRef.current = getMinIndex(listRef, disabledIndices);\n onNavigate(indexRef.current);\n } else {\n onOpenChange(true, event.nativeEvent, 'list-navigation');\n }\n }\n return;\n }\n if (isMainKey) {\n if (selectedIndex != null) {\n indexRef.current = selectedIndex;\n }\n stopEvent(event);\n if (!open && openOnArrowKeyDown) {\n onOpenChange(true, event.nativeEvent, 'list-navigation');\n } else {\n onKeyDown(event);\n }\n if (open) {\n onNavigate(indexRef.current);\n }\n }\n },\n onFocus() {\n if (open) {\n onNavigate(null);\n }\n },\n onPointerDown: checkVirtualPointer,\n onMouseDown: checkVirtualMouse,\n onClick: checkVirtualMouse\n },\n floating: {\n 'aria-orientation': orientation === 'both' ? undefined : orientation,\n ...(!isTypeableCombobox(domReference) && ariaActiveDescendantProp),\n onKeyDown,\n onPointerMove() {\n isPointerModalityRef.current = true;\n }\n },\n item\n };\n }, [domReference, refs, activeId, virtualId, disabledIndicesRef, latestOpenRef, listRef, enabled, orientation, rtl, virtual, open, hasActiveIndex, nested, selectedIndex, openOnArrowKeyDown, allowEscape, cols, loop, focusItemOnOpen, onNavigate, onOpenChange, item, tree, virtualItemRef, itemSizes, dense]);\n}\n\nconst componentRoleToAriaRoleMap = /*#__PURE__*/new Map([['select', 'listbox'], ['combobox', 'listbox'], ['label', false]]);\n\n/**\n * Adds base screen reader props to the reference and floating elements for a\n * given floating element `role`.\n * @see https://floating-ui.com/docs/useRole\n */\nfunction useRole(context, props) {\n var _componentRoleToAriaR;\n if (props === void 0) {\n props = {};\n }\n const {\n open,\n floatingId\n } = context;\n const {\n enabled = true,\n role = 'dialog'\n } = props;\n const ariaRole = (_componentRoleToAriaR = componentRoleToAriaRoleMap.get(role)) != null ? _componentRoleToAriaR : role;\n const referenceId = useId();\n const parentId = useFloatingParentNodeId();\n const isNested = parentId != null;\n return React.useMemo(() => {\n if (!enabled) return {};\n const floatingProps = {\n id: floatingId,\n ...(ariaRole && {\n role: ariaRole\n })\n };\n if (ariaRole === 'tooltip' || role === 'label') {\n return {\n reference: {\n [\"aria-\" + (role === 'label' ? 'labelledby' : 'describedby')]: open ? floatingId : undefined\n },\n floating: floatingProps\n };\n }\n return {\n reference: {\n 'aria-expanded': open ? 'true' : 'false',\n 'aria-haspopup': ariaRole === 'alertdialog' ? 'dialog' : ariaRole,\n 'aria-controls': open ? floatingId : undefined,\n ...(ariaRole === 'listbox' && {\n role: 'combobox'\n }),\n ...(ariaRole === 'menu' && {\n id: referenceId\n }),\n ...(ariaRole === 'menu' && isNested && {\n role: 'menuitem'\n }),\n ...(role === 'select' && {\n 'aria-autocomplete': 'none'\n }),\n ...(role === 'combobox' && {\n 'aria-autocomplete': 'list'\n })\n },\n floating: {\n ...floatingProps,\n ...(ariaRole === 'menu' && {\n 'aria-labelledby': referenceId\n })\n },\n item(_ref) {\n let {\n active,\n selected\n } = _ref;\n const commonProps = {\n role: 'option',\n ...(active && {\n id: floatingId + \"-option\"\n })\n };\n\n // For `menu`, we are unable to tell if the item is a `menuitemradio`\n // or `menuitemcheckbox`. For backwards-compatibility reasons, also\n // avoid defaulting to `menuitem` as it may overwrite custom role props.\n switch (role) {\n case 'select':\n return {\n ...commonProps,\n 'aria-selected': active && selected\n };\n case 'combobox':\n {\n return {\n ...commonProps,\n ...(active && {\n 'aria-selected': true\n })\n };\n }\n }\n return {};\n }\n };\n }, [enabled, role, ariaRole, open, floatingId, referenceId, isNested]);\n}\n\n// Converts a JS style key like `backgroundColor` to a CSS transition-property\n// like `background-color`.\nconst camelCaseToKebabCase = str => str.replace(/[A-Z]+(?![a-z])|[A-Z]/g, ($, ofs) => (ofs ? '-' : '') + $.toLowerCase());\nfunction execWithArgsOrReturn(valueOrFn, args) {\n return typeof valueOrFn === 'function' ? valueOrFn(args) : valueOrFn;\n}\nfunction useDelayUnmount(open, durationMs) {\n const [isMounted, setIsMounted] = React.useState(open);\n if (open && !isMounted) {\n setIsMounted(true);\n }\n React.useEffect(() => {\n if (!open) {\n const timeout = setTimeout(() => setIsMounted(false), durationMs);\n return () => clearTimeout(timeout);\n }\n }, [open, durationMs]);\n return isMounted;\n}\n/**\n * Provides a status string to apply CSS transitions to a floating element,\n * correctly handling placement-aware transitions.\n * @see https://floating-ui.com/docs/useTransition#usetransitionstatus\n */\nfunction useTransitionStatus(context, props) {\n if (props === void 0) {\n props = {};\n }\n const {\n open,\n elements: {\n floating\n }\n } = context;\n const {\n duration = 250\n } = props;\n const isNumberDuration = typeof duration === 'number';\n const closeDuration = (isNumberDuration ? duration : duration.close) || 0;\n const [initiated, setInitiated] = React.useState(false);\n const [status, setStatus] = React.useState('unmounted');\n const isMounted = useDelayUnmount(open, closeDuration);\n\n // `initiated` check prevents this `setState` call from breaking\n // <FloatingPortal />. This call is necessary to ensure subsequent opens\n // after the initial one allows the correct side animation to play when the\n // placement has changed.\n index(() => {\n if (initiated && !isMounted) {\n setStatus('unmounted');\n }\n }, [initiated, isMounted]);\n index(() => {\n if (!floating) return;\n if (open) {\n setStatus('initial');\n const frame = requestAnimationFrame(() => {\n setStatus('open');\n });\n return () => {\n cancelAnimationFrame(frame);\n };\n }\n setInitiated(true);\n setStatus('close');\n }, [open, floating]);\n return {\n isMounted,\n status\n };\n}\n/**\n * Provides styles to apply CSS transitions to a floating element, correctly\n * handling placement-aware transitions. Wrapper around `useTransitionStatus`.\n * @see https://floating-ui.com/docs/useTransition#usetransitionstyles\n */\nfunction useTransitionStyles(context, props) {\n if (props === void 0) {\n props = {};\n }\n const {\n initial: unstable_initial = {\n opacity: 0\n },\n open: unstable_open,\n close: unstable_close,\n common: unstable_common,\n duration = 250\n } = props;\n const placement = context.placement;\n const side = placement.split('-')[0];\n const fnArgs = React.useMemo(() => ({\n side,\n placement\n }), [side, placement]);\n const isNumberDuration = typeof duration === 'number';\n const openDuration = (isNumberDuration ? duration : duration.open) || 0;\n const closeDuration = (isNumberDuration ? duration : duration.close) || 0;\n const [styles, setStyles] = React.useState(() => ({\n ...execWithArgsOrReturn(unstable_common, fnArgs),\n ...execWithArgsOrReturn(unstable_initial, fnArgs)\n }));\n const {\n isMounted,\n status\n } = useTransitionStatus(context, {\n duration\n });\n const initialRef = useLatestRef(unstable_initial);\n const openRef = useLatestRef(unstable_open);\n const closeRef = useLatestRef(unstable_close);\n const commonRef = useLatestRef(unstable_common);\n index(() => {\n const initialStyles = execWithArgsOrReturn(initialRef.current, fnArgs);\n const closeStyles = execWithArgsOrReturn(closeRef.current, fnArgs);\n const commonStyles = execWithArgsOrReturn(commonRef.current, fnArgs);\n const openStyles = execWithArgsOrReturn(openRef.current, fnArgs) || Object.keys(initialStyles).reduce((acc, key) => {\n acc[key] = '';\n return acc;\n }, {});\n if (status === 'initial') {\n setStyles(styles => ({\n transitionProperty: styles.transitionProperty,\n ...commonStyles,\n ...initialStyles\n }));\n }\n if (status === 'open') {\n setStyles({\n transitionProperty: Object.keys(openStyles).map(camelCaseToKebabCase).join(','),\n transitionDuration: openDuration + \"ms\",\n ...commonStyles,\n ...openStyles\n });\n }\n if (status === 'close') {\n const styles = closeStyles || initialStyles;\n setStyles({\n transitionProperty: Object.keys(styles).map(camelCaseToKebabCase).join(','),\n transitionDuration: closeDuration + \"ms\",\n ...commonStyles,\n ...styles\n });\n }\n }, [closeDuration, closeRef, initialRef, openRef, commonRef, openDuration, status, fnArgs]);\n return {\n isMounted,\n styles\n };\n}\n\n/**\n * Provides a matching callback that can be used to focus an item as the user\n * types, often used in tandem with `useListNavigation()`.\n * @see https://floating-ui.com/docs/useTypeahead\n */\nfunction useTypeahead(context, props) {\n var _ref;\n const {\n open,\n dataRef\n } = context;\n const {\n listRef,\n activeIndex,\n onMatch: unstable_onMatch,\n onTypingChange: unstable_onTypingChange,\n enabled = true,\n findMatch = null,\n resetMs = 750,\n ignoreKeys = [],\n selectedIndex = null\n } = props;\n const timeoutIdRef = React.useRef();\n const stringRef = React.useRef('');\n const prevIndexRef = React.useRef((_ref = selectedIndex != null ? selectedIndex : activeIndex) != null ? _ref : -1);\n const matchIndexRef = React.useRef(null);\n const onMatch = useEffectEvent(unstable_onMatch);\n const onTypingChange = useEffectEvent(unstable_onTypingChange);\n const findMatchRef = useLatestRef(findMatch);\n const ignoreKeysRef = useLatestRef(ignoreKeys);\n index(() => {\n if (open) {\n clearTimeout(timeoutIdRef.current);\n matchIndexRef.current = null;\n stringRef.current = '';\n }\n }, [open]);\n index(() => {\n // Sync arrow key navigation but not typeahead navigation.\n if (open && stringRef.current === '') {\n var _ref2;\n prevIndexRef.current = (_ref2 = selectedIndex != null ? selectedIndex : activeIndex) != null ? _ref2 : -1;\n }\n }, [open, selectedIndex, activeIndex]);\n return React.useMemo(() => {\n if (!enabled) {\n return {};\n }\n function setTypingChange(value) {\n if (value) {\n if (!dataRef.current.typing) {\n dataRef.current.typing = value;\n onTypingChange(value);\n }\n } else {\n if (dataRef.current.typing) {\n dataRef.current.typing = value;\n onTypingChange(value);\n }\n }\n }\n function getMatchingIndex(list, orderedList, string) {\n const str = findMatchRef.current ? findMatchRef.current(orderedList, string) : orderedList.find(text => (text == null ? void 0 : text.toLocaleLowerCase().indexOf(string.toLocaleLowerCase())) === 0);\n return str ? list.indexOf(str) : -1;\n }\n function onKeyDown(event) {\n const listContent = listRef.current;\n if (stringRef.current.length > 0 && stringRef.current[0] !== ' ') {\n if (getMatchingIndex(listContent, listContent, stringRef.current) === -1) {\n setTypingChange(false);\n } else if (event.key === ' ') {\n stopEvent(event);\n }\n }\n if (listContent == null || ignoreKeysRef.current.includes(event.key) ||\n // Character key.\n event.key.length !== 1 ||\n // Modifier key.\n event.ctrlKey || event.metaKey || event.altKey) {\n return;\n }\n if (open && event.key !== ' ') {\n stopEvent(event);\n setTypingChange(true);\n }\n\n // Bail out if the list contains a word like \"llama\" or \"aaron\". TODO:\n // allow it in this case, too.\n const allowRapidSuccessionOfFirstLetter = listContent.every(text => {\n var _text$, _text$2;\n return text ? ((_text$ = text[0]) == null ? void 0 : _text$.toLocaleLowerCase()) !== ((_text$2 = text[1]) == null ? void 0 : _text$2.toLocaleLowerCase()) : true;\n });\n\n // Allows the user to cycle through items that start with the same letter\n // in rapid succession.\n if (allowRapidSuccessionOfFirstLetter && stringRef.current === event.key) {\n stringRef.current = '';\n prevIndexRef.current = matchIndexRef.current;\n }\n stringRef.current += event.key;\n clearTimeout(timeoutIdRef.current);\n timeoutIdRef.current = setTimeout(() => {\n stringRef.current = '';\n prevIndexRef.current = matchIndexRef.current;\n setTypingChange(false);\n }, resetMs);\n const prevIndex = prevIndexRef.current;\n const index = getMatchingIndex(listContent, [...listContent.slice((prevIndex || 0) + 1), ...listContent.slice(0, (prevIndex || 0) + 1)], stringRef.current);\n if (index !== -1) {\n onMatch(index);\n matchIndexRef.current = index;\n } else if (event.key !== ' ') {\n stringRef.current = '';\n setTypingChange(false);\n }\n }\n return {\n reference: {\n onKeyDown\n },\n floating: {\n onKeyDown,\n onKeyUp(event) {\n if (event.key === ' ') {\n setTypingChange(false);\n }\n }\n }\n };\n }, [enabled, open, dataRef, listRef, resetMs, ignoreKeysRef, findMatchRef, onMatch, onTypingChange]);\n}\n\nfunction getArgsWithCustomFloatingHeight(state, height) {\n return {\n ...state,\n rects: {\n ...state.rects,\n floating: {\n ...state.rects.floating,\n height\n }\n }\n };\n}\n/**\n * Positions the floating element such that an inner element inside\n * of it is anchored to the reference element.\n * @see https://floating-ui.com/docs/inner\n */\nconst inner = props => ({\n name: 'inner',\n options: props,\n async fn(state) {\n const {\n listRef,\n overflowRef,\n onFallbackChange,\n offset: innerOffset = 0,\n index = 0,\n minItemsVisible = 4,\n referenceOverflowThreshold = 0,\n scrollRef,\n ...detectOverflowOptions\n } = props;\n const {\n rects,\n elements: {\n floating\n }\n } = state;\n const item = listRef.current[index];\n if (process.env.NODE_ENV !== \"production\") {\n if (!state.placement.startsWith('bottom')) {\n warn('`placement` side must be \"bottom\" when using the `inner`', 'middleware.');\n }\n }\n if (!item) {\n return {};\n }\n const nextArgs = {\n ...state,\n ...(await offset(-item.offsetTop - floating.clientTop - rects.reference.height / 2 - item.offsetHeight / 2 - innerOffset).fn(state))\n };\n const el = (scrollRef == null ? void 0 : scrollRef.current) || floating;\n const overflow = await detectOverflow(getArgsWithCustomFloatingHeight(nextArgs, el.scrollHeight), detectOverflowOptions);\n const refOverflow = await detectOverflow(nextArgs, {\n ...detectOverflowOptions,\n elementContext: 'reference'\n });\n const diffY = Math.max(0, overflow.top);\n const nextY = nextArgs.y + diffY;\n const maxHeight = Math.max(0, el.scrollHeight - diffY - Math.max(0, overflow.bottom));\n el.style.maxHeight = maxHeight + \"px\";\n el.scrollTop = diffY;\n\n // There is not enough space, fallback to standard anchored positioning\n if (onFallbackChange) {\n if (el.offsetHeight < item.offsetHeight * Math.min(minItemsVisible, listRef.current.length - 1) - 1 || refOverflow.top >= -referenceOverflowThreshold || refOverflow.bottom >= -referenceOverflowThreshold) {\n flushSync(() => onFallbackChange(true));\n } else {\n flushSync(() => onFallbackChange(false));\n }\n }\n if (overflowRef) {\n overflowRef.current = await detectOverflow(getArgsWithCustomFloatingHeight({\n ...nextArgs,\n y: nextY\n }, el.offsetHeight), detectOverflowOptions);\n }\n return {\n y: nextY\n };\n }\n});\n/**\n * Changes the `inner` middleware's `offset` upon a `wheel` event to\n * expand the floating element's height, revealing more list items.\n * @see https://floating-ui.com/docs/inner\n */\nfunction useInnerOffset(context, props) {\n const {\n open,\n elements\n } = context;\n const {\n enabled = true,\n overflowRef,\n scrollRef,\n onChange: unstable_onChange\n } = props;\n const onChange = useEffectEvent(unstable_onChange);\n const controlledScrollingRef = React.useRef(false);\n const prevScrollTopRef = React.useRef(null);\n const initialOverflowRef = React.useRef(null);\n React.useEffect(() => {\n if (!enabled) {\n return;\n }\n function onWheel(e) {\n if (e.ctrlKey || !el || overflowRef.current == null) {\n return;\n }\n const dY = e.deltaY;\n const isAtTop = overflowRef.current.top >= -0.5;\n const isAtBottom = overflowRef.current.bottom >= -0.5;\n const remainingScroll = el.scrollHeight - el.clientHeight;\n const sign = dY < 0 ? -1 : 1;\n const method = dY < 0 ? 'max' : 'min';\n if (el.scrollHeight <= el.clientHeight) {\n return;\n }\n if (!isAtTop && dY > 0 || !isAtBottom && dY < 0) {\n e.preventDefault();\n flushSync(() => {\n onChange(d => d + Math[method](dY, remainingScroll * sign));\n });\n } else if (/firefox/i.test(getUserAgent())) {\n // Needed to propagate scrolling during momentum scrolling phase once\n // it gets limited by the boundary. UX improvement, not critical.\n el.scrollTop += dY;\n }\n }\n const el = (scrollRef == null ? void 0 : scrollRef.current) || elements.floating;\n if (open && el) {\n el.addEventListener('wheel', onWheel);\n\n // Wait for the position to be ready.\n requestAnimationFrame(() => {\n prevScrollTopRef.current = el.scrollTop;\n if (overflowRef.current != null) {\n initialOverflowRef.current = {\n ...overflowRef.current\n };\n }\n });\n return () => {\n prevScrollTopRef.current = null;\n initialOverflowRef.current = null;\n el.removeEventListener('wheel', onWheel);\n };\n }\n }, [enabled, open, elements.floating, overflowRef, scrollRef, onChange]);\n return React.useMemo(() => {\n if (!enabled) {\n return {};\n }\n return {\n floating: {\n onKeyDown() {\n controlledScrollingRef.current = true;\n },\n onWheel() {\n controlledScrollingRef.current = false;\n },\n onPointerMove() {\n controlledScrollingRef.current = false;\n },\n onScroll() {\n const el = (scrollRef == null ? void 0 : scrollRef.current) || elements.floating;\n if (!overflowRef.current || !el || !controlledScrollingRef.current) {\n return;\n }\n if (prevScrollTopRef.current !== null) {\n const scrollDiff = el.scrollTop - prevScrollTopRef.current;\n if (overflowRef.current.bottom < -0.5 && scrollDiff < -1 || overflowRef.current.top < -0.5 && scrollDiff > 1) {\n flushSync(() => onChange(d => d + scrollDiff));\n }\n }\n\n // [Firefox] Wait for the height change to have been applied.\n requestAnimationFrame(() => {\n prevScrollTopRef.current = el.scrollTop;\n });\n }\n }\n };\n }, [enabled, overflowRef, elements.floating, scrollRef, onChange]);\n}\n\nfunction isPointInPolygon(point, polygon) {\n const [x, y] = point;\n let isInside = false;\n const length = polygon.length;\n for (let i = 0, j = length - 1; i < length; j = i++) {\n const [xi, yi] = polygon[i] || [0, 0];\n const [xj, yj] = polygon[j] || [0, 0];\n const intersect = yi >= y !== yj >= y && x <= (xj - xi) * (y - yi) / (yj - yi) + xi;\n if (intersect) {\n isInside = !isInside;\n }\n }\n return isInside;\n}\nfunction isInside(point, rect) {\n return point[0] >= rect.x && point[0] <= rect.x + rect.width && point[1] >= rect.y && point[1] <= rect.y + rect.height;\n}\n/**\n * Generates a safe polygon area that the user can traverse without closing the\n * floating element once leaving the reference element.\n * @see https://floating-ui.com/docs/useHover#safepolygon\n */\nfunction safePolygon(options) {\n if (options === void 0) {\n options = {};\n }\n const {\n buffer = 0.5,\n blockPointerEvents = false,\n requireIntent = true\n } = options;\n let timeoutId;\n let hasLanded = false;\n let lastX = null;\n let lastY = null;\n let lastCursorTime = performance.now();\n function getCursorSpeed(x, y) {\n const currentTime = performance.now();\n const elapsedTime = currentTime - lastCursorTime;\n if (lastX === null || lastY === null || elapsedTime === 0) {\n lastX = x;\n lastY = y;\n lastCursorTime = currentTime;\n return null;\n }\n const deltaX = x - lastX;\n const deltaY = y - lastY;\n const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n const speed = distance / elapsedTime; // px / ms\n\n lastX = x;\n lastY = y;\n lastCursorTime = currentTime;\n return speed;\n }\n const fn = _ref => {\n let {\n x,\n y,\n placement,\n elements,\n onClose,\n nodeId,\n tree\n } = _ref;\n return function onMouseMove(event) {\n function close() {\n clearTimeout(timeoutId);\n onClose();\n }\n clearTimeout(timeoutId);\n if (!elements.domReference || !elements.floating || placement == null || x == null || y == null) {\n return;\n }\n const {\n clientX,\n clientY\n } = event;\n const clientPoint = [clientX, clientY];\n const target = getTarget(event);\n const isLeave = event.type === 'mouseleave';\n const isOverFloatingEl = contains(elements.floating, target);\n const isOverReferenceEl = contains(elements.domReference, target);\n const refRect = elements.domReference.getBoundingClientRect();\n const rect = elements.floating.getBoundingClientRect();\n const side = placement.split('-')[0];\n const cursorLeaveFromRight = x > rect.right - rect.width / 2;\n const cursorLeaveFromBottom = y > rect.bottom - rect.height / 2;\n const isOverReferenceRect = isInside(clientPoint, refRect);\n const isFloatingWider = rect.width > refRect.width;\n const isFloatingTaller = rect.height > refRect.height;\n const left = (isFloatingWider ? refRect : rect).left;\n const right = (isFloatingWider ? refRect : rect).right;\n const top = (isFloatingTaller ? refRect : rect).top;\n const bottom = (isFloatingTaller ? refRect : rect).bottom;\n if (isOverFloatingEl) {\n hasLanded = true;\n if (!isLeave) {\n return;\n }\n }\n if (isOverReferenceEl) {\n hasLanded = false;\n }\n if (isOverReferenceEl && !isLeave) {\n hasLanded = true;\n return;\n }\n\n // Prevent overlapping floating element from being stuck in an open-close\n // loop: https://github.com/floating-ui/floating-ui/issues/1910\n if (isLeave && isElement(event.relatedTarget) && contains(elements.floating, event.relatedTarget)) {\n return;\n }\n\n // If any nested child is open, abort.\n if (tree && getChildren(tree.nodesRef.current, nodeId).some(_ref2 => {\n let {\n context\n } = _ref2;\n return context == null ? void 0 : context.open;\n })) {\n return;\n }\n\n // If the pointer is leaving from the opposite side, the \"buffer\" logic\n // creates a point where the floating element remains open, but should be\n // ignored.\n // A constant of 1 handles floating point rounding errors.\n if (side === 'top' && y >= refRect.bottom - 1 || side === 'bottom' && y <= refRect.top + 1 || side === 'left' && x >= refRect.right - 1 || side === 'right' && x <= refRect.left + 1) {\n return close();\n }\n\n // Ignore when the cursor is within the rectangular trough between the\n // two elements. Since the triangle is created from the cursor point,\n // which can start beyond the ref element's edge, traversing back and\n // forth from the ref to the floating element can cause it to close. This\n // ensures it always remains open in that case.\n let rectPoly = [];\n switch (side) {\n case 'top':\n rectPoly = [[left, refRect.top + 1], [left, rect.bottom - 1], [right, rect.bottom - 1], [right, refRect.top + 1]];\n break;\n case 'bottom':\n rectPoly = [[left, rect.top + 1], [left, refRect.bottom - 1], [right, refRect.bottom - 1], [right, rect.top + 1]];\n break;\n case 'left':\n rectPoly = [[rect.right - 1, bottom], [rect.right - 1, top], [refRect.left + 1, top], [refRect.left + 1, bottom]];\n break;\n case 'right':\n rectPoly = [[refRect.right - 1, bottom], [refRect.right - 1, top], [rect.left + 1, top], [rect.left + 1, bottom]];\n break;\n }\n function getPolygon(_ref3) {\n let [x, y] = _ref3;\n switch (side) {\n case 'top':\n {\n const cursorPointOne = [isFloatingWider ? x + buffer / 2 : cursorLeaveFromRight ? x + buffer * 4 : x - buffer * 4, y + buffer + 1];\n const cursorPointTwo = [isFloatingWider ? x - buffer / 2 : cursorLeaveFromRight ? x + buffer * 4 : x - buffer * 4, y + buffer + 1];\n const commonPoints = [[rect.left, cursorLeaveFromRight ? rect.bottom - buffer : isFloatingWider ? rect.bottom - buffer : rect.top], [rect.right, cursorLeaveFromRight ? isFloatingWider ? rect.bottom - buffer : rect.top : rect.bottom - buffer]];\n return [cursorPointOne, cursorPointTwo, ...commonPoints];\n }\n case 'bottom':\n {\n const cursorPointOne = [isFloatingWider ? x + buffer / 2 : cursorLeaveFromRight ? x + buffer * 4 : x - buffer * 4, y - buffer];\n const cursorPointTwo = [isFloatingWider ? x - buffer / 2 : cursorLeaveFromRight ? x + buffer * 4 : x - buffer * 4, y - buffer];\n const commonPoints = [[rect.left, cursorLeaveFromRight ? rect.top + buffer : isFloatingWider ? rect.top + buffer : rect.bottom], [rect.right, cursorLeaveFromRight ? isFloatingWider ? rect.top + buffer : rect.bottom : rect.top + buffer]];\n return [cursorPointOne, cursorPointTwo, ...commonPoints];\n }\n case 'left':\n {\n const cursorPointOne = [x + buffer + 1, isFloatingTaller ? y + buffer / 2 : cursorLeaveFromBottom ? y + buffer * 4 : y - buffer * 4];\n const cursorPointTwo = [x + buffer + 1, isFloatingTaller ? y - buffer / 2 : cursorLeaveFromBottom ? y + buffer * 4 : y - buffer * 4];\n const commonPoints = [[cursorLeaveFromBottom ? rect.right - buffer : isFloatingTaller ? rect.right - buffer : rect.left, rect.top], [cursorLeaveFromBottom ? isFloatingTaller ? rect.right - buffer : rect.left : rect.right - buffer, rect.bottom]];\n return [...commonPoints, cursorPointOne, cursorPointTwo];\n }\n case 'right':\n {\n const cursorPointOne = [x - buffer, isFloatingTaller ? y + buffer / 2 : cursorLeaveFromBottom ? y + buffer * 4 : y - buffer * 4];\n const cursorPointTwo = [x - buffer, isFloatingTaller ? y - buffer / 2 : cursorLeaveFromBottom ? y + buffer * 4 : y - buffer * 4];\n const commonPoints = [[cursorLeaveFromBottom ? rect.left + buffer : isFloatingTaller ? rect.left + buffer : rect.right, rect.top], [cursorLeaveFromBottom ? isFloatingTaller ? rect.left + buffer : rect.right : rect.left + buffer, rect.bottom]];\n return [cursorPointOne, cursorPointTwo, ...commonPoints];\n }\n }\n }\n if (isPointInPolygon([clientX, clientY], rectPoly)) {\n return;\n }\n if (hasLanded && !isOverReferenceRect) {\n return close();\n }\n if (!isLeave && requireIntent) {\n const cursorSpeed = getCursorSpeed(event.clientX, event.clientY);\n const cursorSpeedThreshold = 0.1;\n if (cursorSpeed !== null && cursorSpeed < cursorSpeedThreshold) {\n return close();\n }\n }\n if (!isPointInPolygon([clientX, clientY], getPolygon([x, y]))) {\n close();\n } else if (!hasLanded && requireIntent) {\n timeoutId = window.setTimeout(close, 40);\n }\n };\n };\n fn.__options = {\n blockPointerEvents\n };\n return fn;\n}\n\nexport { Composite, CompositeItem, FloatingArrow, FloatingDelayGroup, FloatingFocusManager, FloatingList, FloatingNode, FloatingOverlay, FloatingPortal, FloatingTree, inner, safePolygon, useClick, useClientPoint, useDelayGroup, useDelayGroupContext, useDismiss, useFloating, useFloatingNodeId, useFloatingParentNodeId, useFloatingPortalNode, useFloatingTree, useFocus, useHover, useId, useInnerOffset, useInteractions, useListItem, useListNavigation, useMergeRefs, useRole, useTransitionStatus, useTransitionStyles, useTypeahead };\n","export enum ArrowPaths {\r\n Default = undefined,\r\n UnfilledCaret = \"M 18,12 L 9,0 L0,12\",\r\n}\r\n","import \"./Tooltip.css\";\r\nimport {\r\n arrow,\r\n autoPlacement,\r\n autoUpdate,\r\n FloatingArrow,\r\n FloatingPortal,\r\n offset,\r\n OffsetOptions,\r\n Placement,\r\n shift,\r\n ShiftOptions,\r\n useFloating,\r\n} from \"@floating-ui/react\";\r\nimport { MutableRefObject, ReactNode, useEffect, useRef } from \"react\";\r\nimport { ArrowPaths } from \"./ToolTipArrowPaths\";\r\nimport { cx } from \"#utilities/cx\";\r\n\r\ntype Props = {\r\n children?: ReactNode;\r\n title?: string;\r\n className?: string;\r\n id?: string;\r\n referenceElement: MutableRefObject<HTMLElement>;\r\n offsetBy?: OffsetOptions;\r\n shiftBy?: ShiftOptions;\r\n allowedPlacements?: Array<Placement>;\r\n overridePlacement?: Placement;\r\n arrowPath?: ArrowPaths;\r\n backgroundOnClicked?: () => void;\r\n};\r\n\r\nconst Tooltip = ({\r\n title = \"\",\r\n className = \"\",\r\n id = undefined,\r\n children,\r\n offsetBy = 12,\r\n shiftBy = undefined,\r\n allowedPlacements = undefined,\r\n overridePlacement,\r\n referenceElement,\r\n arrowPath = ArrowPaths.Default,\r\n}: Props) => {\r\n const arrowRef = useRef(null);\r\n\r\n const middleware = [\r\n offsetBy ? offset(offsetBy) : null,\r\n shift(shiftBy),\r\n arrow({ element: arrowRef }),\r\n ];\r\n\r\n if (!overridePlacement) {\r\n middleware.push(autoPlacement({ allowedPlacements, alignment: \"start\" }));\r\n }\r\n\r\n const { refs, floatingStyles, context } = useFloating({\r\n whileElementsMounted: autoUpdate,\r\n placement: overridePlacement,\r\n middleware,\r\n });\r\n\r\n useEffect(() => {\r\n if (referenceElement.current) {\r\n refs.setReference(referenceElement.current);\r\n }\r\n }, [refs, referenceElement]);\r\n\r\n return children && refs.reference.current ? (\r\n <FloatingPortal>\r\n <div\r\n className={cx(\"tooltip\", className)}\r\n id={id}\r\n ref={refs.setFloating}\r\n style={floatingStyles}\r\n role=\"tooltip\"\r\n >\r\n <FloatingArrow\r\n className=\"tooltip-arrow\"\r\n height={12}\r\n width={18}\r\n staticOffset={[\"left\", \"right\"].some((x) => context.placement.startsWith(x)) ? 6 : 0}\r\n fill=\"var(--tooltip-header-bg-color)\"\r\n ref={arrowRef}\r\n context={context}\r\n d={arrowPath as string}\r\n />\r\n {title && <div className=\"tooltip-header\">{title}</div>}\r\n <div className=\"tooltip-body\">{children}</div>\r\n </div>\r\n </FloatingPortal>\r\n ) : null;\r\n};\r\n\r\nexport default Tooltip;\r\n","import { DebouncedState, useDebouncedCallback } from \"use-debounce\";\r\n\r\n/** Just calls useDebouncedCallback unless we are in the test environment */\r\nexport const useDebounceExceptTests: typeof useDebouncedCallback = (func, wait = 0, options) => {\r\n if (process.env.NODE_ENV === \"test\") {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const debouncedState = ((...args: any[]) => func(...args)) as DebouncedState<typeof func>;\r\n debouncedState.cancel = () => {};\r\n debouncedState.flush = () => {};\r\n debouncedState.isPending = () => false;\r\n return debouncedState;\r\n }\r\n\r\n // eslint-disable-next-line react-hooks/rules-of-hooks\r\n return useDebouncedCallback(func, wait, options);\r\n};\r\n","import { useEffect, useRef, useState } from \"react\";\r\nimport { useDebounceExceptTests } from \"#utilities/debounce\";\r\n\r\nconst debounceTimeout = 100;\r\n\r\nexport const useTooltip = () => {\r\n const [showToolTip, setShowToolTip] = useState(false);\r\n const buttonRef = useRef<HTMLButtonElement>(null);\r\n const centreOnRef = useRef<HTMLDivElement>(null);\r\n\r\n // the focus and the click happen within just a few milliseconds of each other\r\n // only toggle the visibility once\r\n const handleFocusAndClick = useDebounceExceptTests(async () => {\r\n setShowToolTip(!showToolTip);\r\n }, debounceTimeout);\r\n\r\n useEffect(() => {\r\n if (!buttonRef.current) return;\r\n\r\n const onClick = (e: MouseEvent) => {\r\n const el = e.target as Element;\r\n\r\n if (el !== buttonRef.current && !buttonRef.current.contains(el)) {\r\n setShowToolTip(false);\r\n }\r\n };\r\n\r\n document.addEventListener(\"click\", onClick);\r\n return () => document.removeEventListener(\"click\", onClick);\r\n }, [showToolTip]);\r\n\r\n return {\r\n showToolTip,\r\n buttonRef,\r\n centreOnRef,\r\n handleFocusAndClick,\r\n setShowToolTip,\r\n };\r\n};\r\n","import { useRef } from \"react\";\r\nimport { Button } from \"#components/Button/Button\";\r\nimport { ButtonVariants } from \"#components/Button/buttonTypes\";\r\nimport Icon from \"#components/Icons/Icon\";\r\nimport Tooltip from \"#components/Tooltip/Tooltip\";\r\nimport { ArrowPaths } from \"#components/Tooltip/ToolTipArrowPaths\";\r\nimport { useTooltip } from \"#hooks/useTooltip\";\r\nimport { cx } from \"#utilities/cx\";\r\n\r\ninterface OverDueOrPaidProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\r\n isOverDue: boolean;\r\n isPaid: boolean;\r\n navigateTo: string;\r\n}\r\n\r\nexport const OverDueOrPaid = ({\r\n isOverDue = false,\r\n isPaid = false,\r\n navigateTo = \"\",\r\n className,\r\n children,\r\n ...rest\r\n}: OverDueOrPaidProps) => {\r\n const paidOverDueOrNothing = (paid: string, overDue: string) =>\r\n isPaid ? paid : isOverDue ? overDue : \"\";\r\n\r\n const itemId = useRef<string>(crypto.randomUUID());\r\n const { showToolTip, handleFocusAndClick, buttonRef, centreOnRef, setShowToolTip } = useTooltip();\r\n\r\n return (\r\n <>\r\n <Button\r\n {...rest}\r\n className={cx(\"paid-or-over-due\", paidOverDueOrNothing(\"paid\", \"overdue\"), className)}\r\n variant={ButtonVariants.minimal}\r\n onClick={() => {\r\n if (isPaid) {\r\n window.open(navigateTo, \"_blank\");\r\n } else if (isOverDue) {\r\n handleFocusAndClick();\r\n }\r\n }}\r\n onFocus={() => {\r\n if (isOverDue && !isPaid) handleFocusAndClick();\r\n }}\r\n onBlur={() => {\r\n setShowToolTip(false);\r\n }}\r\n aria-expanded={isOverDue || isPaid ? (showToolTip ? \"true\" : \"false\") : undefined}\r\n aria-controls={isOverDue || isPaid ? itemId.current : undefined}\r\n ref={buttonRef}\r\n >\r\n {(isOverDue || isPaid) && (\r\n <div ref={centreOnRef}>\r\n <Icon>{paidOverDueOrNothing(\"check_circle_outline\", \"error_outline\")}</Icon>\r\n </div>\r\n )}\r\n <div className=\"base-item\">{children}</div>\r\n </Button>\r\n {showToolTip && (\r\n <Tooltip\r\n id={itemId.current}\r\n allowedPlacements={[\"bottom\"]}\r\n offsetBy={0}\r\n shiftBy={{ padding: 8 }}\r\n arrowPath={ArrowPaths.UnfilledCaret}\r\n className={paidOverDueOrNothing(\"paid\", \"overdue\")}\r\n children={paidOverDueOrNothing(\"Paid\", \"Overdue\")}\r\n referenceElement={centreOnRef}\r\n />\r\n )}\r\n </>\r\n );\r\n};\r\n","import \"./Select.css\";\r\nimport React, { ReactNode } from \"react\";\r\nimport { FieldError, FieldErrors, get } from \"react-hook-form\";\r\nimport { InputWrapper } from \"#components/Shared/InputWrapper\";\r\nimport { errorFormatter } from \"#components/Shared/InputWrapperUtil\";\r\n\r\ninterface SelectProps extends React.SelectHTMLAttributes<HTMLSelectElement> {\r\n label?: string;\r\n errors?: FieldErrors;\r\n icon?: ReactNode;\r\n options?: { Text: string; Value: string }[];\r\n}\r\n\r\nconst Select = React.forwardRef<HTMLSelectElement, SelectProps>(\r\n (\r\n {\r\n label = \"\",\r\n required = false,\r\n name,\r\n errors,\r\n onChange,\r\n options = [],\r\n disabled = false,\r\n className,\r\n style,\r\n ...props\r\n }: SelectProps,\r\n ref\r\n ) => {\r\n const error = get(errors, name) as FieldError;\r\n\r\n return (\r\n <InputWrapper\r\n fieldType=\"select-field\"\r\n label={label}\r\n name={name}\r\n className={className}\r\n style={style}\r\n error={error}\r\n >\r\n <select\r\n id={name}\r\n ref={ref}\r\n name={name}\r\n onChange={onChange}\r\n aria-describedby={errorFormatter(name, error)}\r\n disabled={disabled}\r\n required={required}\r\n {...props}\r\n >\r\n {options &&\r\n options.map((item) => (\r\n <option key={item.Value} value={item.Value}>\r\n {item.Text}\r\n </option>\r\n ))}\r\n </select>\r\n </InputWrapper>\r\n );\r\n }\r\n);\r\n\r\nexport default Select;\r\n","const formatNumber = (\r\n value: number,\r\n style: \"decimal\" | \"currency\" | \"percent\" | \"unit\" = \"currency\",\r\n minimumFractionDigits: number = undefined\r\n) => {\r\n const options = {\r\n style: style,\r\n currency: \"USD\",\r\n minimumFractionDigits: minimumFractionDigits,\r\n };\r\n return new Intl.NumberFormat(\"en-US\", options).format(value);\r\n};\r\n\r\nexport const formatCurrency = (value: number) => formatNumber(value, \"currency\");\r\n","/**\n * @license React\n * react-dom-test-utils.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var k=require(\"react\"),l=require(\"react-dom\");function m(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.flags&4098)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function n(a){if(m(a)!==a)throw Error(\"Unable to find node on an unmounted component.\");}\nfunction p(a){var b=a.alternate;if(!b){b=m(a);if(null===b)throw Error(\"Unable to find node on an unmounted component.\");return b!==a?null:a}for(var c=a,d=b;;){var f=c.return;if(null===f)break;var g=f.alternate;if(null===g){d=f.return;if(null!==d){c=d;continue}break}if(f.child===g.child){for(g=f.child;g;){if(g===c)return n(f),a;if(g===d)return n(f),b;g=g.sibling}throw Error(\"Unable to find node on an unmounted component.\");}if(c.return!==d.return)c=f,d=g;else{for(var e=!1,h=f.child;h;){if(h===c){e=\n!0;c=f;d=g;break}if(h===d){e=!0;d=f;c=g;break}h=h.sibling}if(!e){for(h=g.child;h;){if(h===c){e=!0;c=g;d=f;break}if(h===d){e=!0;d=g;c=f;break}h=h.sibling}if(!e)throw Error(\"Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.\");}}if(c.alternate!==d)throw Error(\"Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.\");}if(3!==c.tag)throw Error(\"Unable to find node on an unmounted component.\");\nreturn c.stateNode.current===c?a:b}var q=Object.assign;function r(a){var b=a.keyCode;\"charCode\"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;10===a&&(a=13);return 32<=a||13===a?a:0}function t(){return!0}function u(){return!1}\nfunction v(a){function b(c,b,f,g,e){this._reactName=c;this._targetInst=f;this.type=b;this.nativeEvent=g;this.target=e;this.currentTarget=null;for(var d in a)a.hasOwnProperty(d)&&(c=a[d],this[d]=c?c(g):g[d]);this.isDefaultPrevented=(null!=g.defaultPrevented?g.defaultPrevented:!1===g.returnValue)?t:u;this.isPropagationStopped=u;return this}q(b.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():\"unknown\"!==typeof a.returnValue&&\n(a.returnValue=!1),this.isDefaultPrevented=t)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():\"unknown\"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=t)},persist:function(){},isPersistent:t});return b}var w={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},x=v(w),y=q({},w,{view:0,detail:0});v(y);\nvar z,A,B,D=q({},y,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:C,button:0,buttons:0,relatedTarget:function(a){return void 0===a.relatedTarget?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){if(\"movementX\"in a)return a.movementX;a!==B&&(B&&\"mousemove\"===a.type?(z=a.screenX-B.screenX,A=a.screenY-B.screenY):A=z=0,B=a);return z},movementY:function(a){return\"movementY\"in a?a.movementY:A}});\nv(D);var E=q({},D,{dataTransfer:0});v(E);var F=q({},y,{relatedTarget:0});v(F);var aa=q({},w,{animationName:0,elapsedTime:0,pseudoElement:0});v(aa);var ba=q({},w,{clipboardData:function(a){return\"clipboardData\"in a?a.clipboardData:window.clipboardData}});v(ba);var ca=q({},w,{data:0});v(ca);\nvar da={Esc:\"Escape\",Spacebar:\" \",Left:\"ArrowLeft\",Up:\"ArrowUp\",Right:\"ArrowRight\",Down:\"ArrowDown\",Del:\"Delete\",Win:\"OS\",Menu:\"ContextMenu\",Apps:\"ContextMenu\",Scroll:\"ScrollLock\",MozPrintableKey:\"Unidentified\"},ea={8:\"Backspace\",9:\"Tab\",12:\"Clear\",13:\"Enter\",16:\"Shift\",17:\"Control\",18:\"Alt\",19:\"Pause\",20:\"CapsLock\",27:\"Escape\",32:\" \",33:\"PageUp\",34:\"PageDown\",35:\"End\",36:\"Home\",37:\"ArrowLeft\",38:\"ArrowUp\",39:\"ArrowRight\",40:\"ArrowDown\",45:\"Insert\",46:\"Delete\",112:\"F1\",113:\"F2\",114:\"F3\",115:\"F4\",\n116:\"F5\",117:\"F6\",118:\"F7\",119:\"F8\",120:\"F9\",121:\"F10\",122:\"F11\",123:\"F12\",144:\"NumLock\",145:\"ScrollLock\",224:\"Meta\"},fa={Alt:\"altKey\",Control:\"ctrlKey\",Meta:\"metaKey\",Shift:\"shiftKey\"};function ha(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=fa[a])?!!b[a]:!1}function C(){return ha}\nvar ia=q({},y,{key:function(a){if(a.key){var b=da[a.key]||a.key;if(\"Unidentified\"!==b)return b}return\"keypress\"===a.type?(a=r(a),13===a?\"Enter\":String.fromCharCode(a)):\"keydown\"===a.type||\"keyup\"===a.type?ea[a.keyCode]||\"Unidentified\":\"\"},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:C,charCode:function(a){return\"keypress\"===a.type?r(a):0},keyCode:function(a){return\"keydown\"===a.type||\"keyup\"===a.type?a.keyCode:0},which:function(a){return\"keypress\"===\na.type?r(a):\"keydown\"===a.type||\"keyup\"===a.type?a.keyCode:0}});v(ia);var ja=q({},D,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0});v(ja);var ka=q({},y,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:C});v(ka);var la=q({},w,{propertyName:0,elapsedTime:0,pseudoElement:0});v(la);\nvar ma=q({},D,{deltaX:function(a){return\"deltaX\"in a?a.deltaX:\"wheelDeltaX\"in a?-a.wheelDeltaX:0},deltaY:function(a){return\"deltaY\"in a?a.deltaY:\"wheelDeltaY\"in a?-a.wheelDeltaY:\"wheelDelta\"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0});v(ma);function na(a,b,c,d,f,g,e,h,N){var G=Array.prototype.slice.call(arguments,3);try{b.apply(c,G)}catch(oa){this.onError(oa)}}var H=!1,I=null,J=!1,K=null,pa={onError:function(a){H=!0;I=a}};function qa(a,b,c,d,f,g,e,h,N){H=!1;I=null;na.apply(pa,arguments)}\nfunction ra(a,b,c,d,f,g,e,h,N){qa.apply(this,arguments);if(H){if(H){var G=I;H=!1;I=null}else throw Error(\"clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.\");J||(J=!0,K=G)}}var L=Array.isArray,M=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events,sa=M[0],ta=M[1],ua=M[2],va=M[3],wa=M[4],xa=k.unstable_act;function ya(){}\nfunction za(a,b){if(!a)return[];a=p(a);if(!a)return[];for(var c=a,d=[];;){if(5===c.tag||6===c.tag||1===c.tag||0===c.tag){var f=c.stateNode;b(f)&&d.push(f)}if(c.child)c.child.return=c,c=c.child;else{if(c===a)return d;for(;!c.sibling;){if(!c.return||c.return===a)return d;c=c.return}c.sibling.return=c.return;c=c.sibling}}}\nfunction O(a,b){if(a&&!a._reactInternals){var c=String(a);a=L(a)?\"an array\":a&&1===a.nodeType&&a.tagName?\"a DOM node\":\"[object Object]\"===c?\"object with keys {\"+Object.keys(a).join(\", \")+\"}\":c;throw Error(b+\"(...): the first argument must be a React class instance. Instead received: \"+(a+\".\"));}}function P(a){return!(!a||1!==a.nodeType||!a.tagName)}function Q(a){return P(a)?!1:null!=a&&\"function\"===typeof a.render&&\"function\"===typeof a.setState}\nfunction R(a,b){return Q(a)?a._reactInternals.type===b:!1}function S(a,b){O(a,\"findAllInRenderedTree\");return a?za(a._reactInternals,b):[]}\nfunction T(a,b){O(a,\"scryRenderedDOMComponentsWithClass\");return S(a,function(a){if(P(a)){var c=a.className;\"string\"!==typeof c&&(c=a.getAttribute(\"class\")||\"\");var f=c.split(/\\s+/);if(!L(b)){if(void 0===b)throw Error(\"TestUtils.scryRenderedDOMComponentsWithClass expects a className as a second argument.\");b=b.split(/\\s+/)}return b.every(function(a){return-1!==f.indexOf(a)})}return!1})}\nfunction U(a,b){O(a,\"scryRenderedDOMComponentsWithTag\");return S(a,function(a){return P(a)&&a.tagName.toUpperCase()===b.toUpperCase()})}function V(a,b){O(a,\"scryRenderedComponentsWithType\");return S(a,function(a){return R(a,b)})}function W(a,b,c){var d=a.type||\"unknown-event\";a.currentTarget=ta(c);ra(d,b,void 0,a);a.currentTarget=null}\nfunction X(a,b,c){for(var d=[];a;){d.push(a);do a=a.return;while(a&&5!==a.tag);a=a?a:null}for(a=d.length;0<a--;)b(d[a],\"captured\",c);for(a=0;a<d.length;a++)b(d[a],\"bubbled\",c)}\nfunction Y(a,b){var c=a.stateNode;if(!c)return null;var d=ua(c);if(!d)return null;c=d[b];a:switch(b){case \"onClick\":case \"onClickCapture\":case \"onDoubleClick\":case \"onDoubleClickCapture\":case \"onMouseDown\":case \"onMouseDownCapture\":case \"onMouseMove\":case \"onMouseMoveCapture\":case \"onMouseUp\":case \"onMouseUpCapture\":case \"onMouseEnter\":(d=!d.disabled)||(a=a.type,d=!(\"button\"===a||\"input\"===a||\"select\"===a||\"textarea\"===a));a=!d;break a;default:a=!1}if(a)return null;if(c&&\"function\"!==typeof c)throw Error(\"Expected `\"+\nb+\"` listener to be a function, instead got a value of `\"+typeof c+\"` type.\");return c}function Aa(a,b,c){a&&c&&c._reactName&&(b=Y(a,c._reactName))&&(null==c._dispatchListeners&&(c._dispatchListeners=[]),null==c._dispatchInstances&&(c._dispatchInstances=[]),c._dispatchListeners.push(b),c._dispatchInstances.push(a))}\nfunction Ba(a,b,c){var d=c._reactName;\"captured\"===b&&(d+=\"Capture\");if(b=Y(a,d))null==c._dispatchListeners&&(c._dispatchListeners=[]),null==c._dispatchInstances&&(c._dispatchInstances=[]),c._dispatchListeners.push(b),c._dispatchInstances.push(a)}var Z={},Ca=new Set([\"mouseEnter\",\"mouseLeave\",\"pointerEnter\",\"pointerLeave\"]);\nfunction Da(a){return function(b,c){if(k.isValidElement(b))throw Error(\"TestUtils.Simulate expected a DOM node as the first argument but received a React element. Pass the DOM node you wish to simulate the event on instead. Note that TestUtils.Simulate will not work if you are using shallow rendering.\");if(Q(b))throw Error(\"TestUtils.Simulate expected a DOM node as the first argument but received a component instance. Pass the DOM node you wish to simulate the event on instead.\");var d=\"on\"+a[0].toUpperCase()+\na.slice(1),f=new ya;f.target=b;f.type=a.toLowerCase();var g=sa(b),e=new x(d,f.type,g,f,b);e.persist();q(e,c);Ca.has(a)?e&&e._reactName&&Aa(e._targetInst,null,e):e&&e._reactName&&X(e._targetInst,Ba,e);l.unstable_batchedUpdates(function(){va(b);if(e){var a=e._dispatchListeners,c=e._dispatchInstances;if(L(a))for(var d=0;d<a.length&&!e.isPropagationStopped();d++)W(e,a[d],c[d]);else a&&W(e,a,c);e._dispatchListeners=null;e._dispatchInstances=null;e.isPersistent()||e.constructor.release(e)}if(J)throw a=\nK,J=!1,K=null,a;});wa()}}\n\"blur cancel click close contextMenu copy cut auxClick doubleClick dragEnd dragStart drop focus input invalid keyDown keyPress keyUp mouseDown mouseUp paste pause play pointerCancel pointerDown pointerUp rateChange reset resize seeked submit touchCancel touchEnd touchStart volumeChange drag dragEnter dragExit dragLeave dragOver mouseMove mouseOut mouseOver pointerMove pointerOut pointerOver scroll toggle touchMove wheel abort animationEnd animationIteration animationStart canPlay canPlayThrough durationChange emptied encrypted ended error gotPointerCapture load loadedData loadedMetadata loadStart lostPointerCapture playing progress seeking stalled suspend timeUpdate transitionEnd waiting mouseEnter mouseLeave pointerEnter pointerLeave change select beforeInput compositionEnd compositionStart compositionUpdate\".split(\" \").forEach(function(a){Z[a]=Da(a)});\nexports.Simulate=Z;exports.act=xa;exports.findAllInRenderedTree=S;exports.findRenderedComponentWithType=function(a,b){O(a,\"findRenderedComponentWithType\");a=V(a,b);if(1!==a.length)throw Error(\"Did not find exactly one match (found: \"+a.length+\") for componentType:\"+b);return a[0]};exports.findRenderedDOMComponentWithClass=function(a,b){O(a,\"findRenderedDOMComponentWithClass\");a=T(a,b);if(1!==a.length)throw Error(\"Did not find exactly one match (found: \"+a.length+\") for class:\"+b);return a[0]};\nexports.findRenderedDOMComponentWithTag=function(a,b){O(a,\"findRenderedDOMComponentWithTag\");a=U(a,b);if(1!==a.length)throw Error(\"Did not find exactly one match (found: \"+a.length+\") for tag:\"+b);return a[0]};exports.isCompositeComponent=Q;exports.isCompositeComponentWithType=R;exports.isDOMComponent=P;exports.isDOMComponentElement=function(a){return!!(a&&k.isValidElement(a)&&a.tagName)};exports.isElement=function(a){return k.isValidElement(a)};\nexports.isElementOfType=function(a,b){return k.isValidElement(a)&&a.type===b};exports.mockComponent=function(a,b){b=b||a.mockTagName||\"div\";a.prototype.render.mockImplementation(function(){return k.createElement(b,null,this.props.children)});return this};exports.nativeTouchData=function(a,b){return{touches:[{pageX:a,pageY:b}]}};exports.renderIntoDocument=function(a){var b=document.createElement(\"div\");return l.render(a,b)};exports.scryRenderedComponentsWithType=V;\nexports.scryRenderedDOMComponentsWithClass=T;exports.scryRenderedDOMComponentsWithTag=U;exports.traverseTwoPhase=X;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-dom-test-utils.production.min.js');\n} else {\n module.exports = require('./cjs/react-dom-test-utils.development.js');\n}\n","'use strict';\n\nconst ANSI_BACKGROUND_OFFSET = 10;\n\nconst wrapAnsi256 = (offset = 0) => code => `\\u001B[${38 + offset};5;${code}m`;\n\nconst wrapAnsi16m = (offset = 0) => (red, green, blue) => `\\u001B[${38 + offset};2;${red};${green};${blue}m`;\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\tconst styles = {\n\t\tmodifier: {\n\t\t\treset: [0, 0],\n\t\t\t// 21 isn't widely supported and 22 does the same thing\n\t\t\tbold: [1, 22],\n\t\t\tdim: [2, 22],\n\t\t\titalic: [3, 23],\n\t\t\tunderline: [4, 24],\n\t\t\toverline: [53, 55],\n\t\t\tinverse: [7, 27],\n\t\t\thidden: [8, 28],\n\t\t\tstrikethrough: [9, 29]\n\t\t},\n\t\tcolor: {\n\t\t\tblack: [30, 39],\n\t\t\tred: [31, 39],\n\t\t\tgreen: [32, 39],\n\t\t\tyellow: [33, 39],\n\t\t\tblue: [34, 39],\n\t\t\tmagenta: [35, 39],\n\t\t\tcyan: [36, 39],\n\t\t\twhite: [37, 39],\n\n\t\t\t// Bright color\n\t\t\tblackBright: [90, 39],\n\t\t\tredBright: [91, 39],\n\t\t\tgreenBright: [92, 39],\n\t\t\tyellowBright: [93, 39],\n\t\t\tblueBright: [94, 39],\n\t\t\tmagentaBright: [95, 39],\n\t\t\tcyanBright: [96, 39],\n\t\t\twhiteBright: [97, 39]\n\t\t},\n\t\tbgColor: {\n\t\t\tbgBlack: [40, 49],\n\t\t\tbgRed: [41, 49],\n\t\t\tbgGreen: [42, 49],\n\t\t\tbgYellow: [43, 49],\n\t\t\tbgBlue: [44, 49],\n\t\t\tbgMagenta: [45, 49],\n\t\t\tbgCyan: [46, 49],\n\t\t\tbgWhite: [47, 49],\n\n\t\t\t// Bright color\n\t\t\tbgBlackBright: [100, 49],\n\t\t\tbgRedBright: [101, 49],\n\t\t\tbgGreenBright: [102, 49],\n\t\t\tbgYellowBright: [103, 49],\n\t\t\tbgBlueBright: [104, 49],\n\t\t\tbgMagentaBright: [105, 49],\n\t\t\tbgCyanBright: [106, 49],\n\t\t\tbgWhiteBright: [107, 49]\n\t\t}\n\t};\n\n\t// Alias bright black as gray (and grey)\n\tstyles.color.gray = styles.color.blackBright;\n\tstyles.bgColor.bgGray = styles.bgColor.bgBlackBright;\n\tstyles.color.grey = styles.color.blackBright;\n\tstyles.bgColor.bgGrey = styles.bgColor.bgBlackBright;\n\n\tfor (const [groupName, group] of Object.entries(styles)) {\n\t\tfor (const [styleName, style] of Object.entries(group)) {\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u001B[${style[0]}m`,\n\t\t\t\tclose: `\\u001B[${style[1]}m`\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\tcodes.set(style[0], style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false\n\t\t});\n\t}\n\n\tObject.defineProperty(styles, 'codes', {\n\t\tvalue: codes,\n\t\tenumerable: false\n\t});\n\n\tstyles.color.close = '\\u001B[39m';\n\tstyles.bgColor.close = '\\u001B[49m';\n\n\tstyles.color.ansi256 = wrapAnsi256();\n\tstyles.color.ansi16m = wrapAnsi16m();\n\tstyles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);\n\n\t// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js\n\tObject.defineProperties(styles, {\n\t\trgbToAnsi256: {\n\t\t\tvalue: (red, green, blue) => {\n\t\t\t\t// We use the extended greyscale palette here, with the exception of\n\t\t\t\t// black and white. normal palette only has 4 greyscale shades.\n\t\t\t\tif (red === green && green === blue) {\n\t\t\t\t\tif (red < 8) {\n\t\t\t\t\t\treturn 16;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (red > 248) {\n\t\t\t\t\t\treturn 231;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Math.round(((red - 8) / 247) * 24) + 232;\n\t\t\t\t}\n\n\t\t\t\treturn 16 +\n\t\t\t\t\t(36 * Math.round(red / 255 * 5)) +\n\t\t\t\t\t(6 * Math.round(green / 255 * 5)) +\n\t\t\t\t\tMath.round(blue / 255 * 5);\n\t\t\t},\n\t\t\tenumerable: false\n\t\t},\n\t\thexToRgb: {\n\t\t\tvalue: hex => {\n\t\t\t\tconst matches = /(?<colorString>[a-f\\d]{6}|[a-f\\d]{3})/i.exec(hex.toString(16));\n\t\t\t\tif (!matches) {\n\t\t\t\t\treturn [0, 0, 0];\n\t\t\t\t}\n\n\t\t\t\tlet {colorString} = matches.groups;\n\n\t\t\t\tif (colorString.length === 3) {\n\t\t\t\t\tcolorString = colorString.split('').map(character => character + character).join('');\n\t\t\t\t}\n\n\t\t\t\tconst integer = Number.parseInt(colorString, 16);\n\n\t\t\t\treturn [\n\t\t\t\t\t(integer >> 16) & 0xFF,\n\t\t\t\t\t(integer >> 8) & 0xFF,\n\t\t\t\t\tinteger & 0xFF\n\t\t\t\t];\n\t\t\t},\n\t\t\tenumerable: false\n\t\t},\n\t\thexToAnsi256: {\n\t\t\tvalue: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),\n\t\t\tenumerable: false\n\t\t}\n\t});\n\n\treturn styles;\n}\n\n// Make the export immutable\nObject.defineProperty(module, 'exports', {\n\tenumerable: true,\n\tget: assembleStyles\n});\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.printIteratorEntries = printIteratorEntries;\nexports.printIteratorValues = printIteratorValues;\nexports.printListItems = printListItems;\nexports.printObjectProperties = printObjectProperties;\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst getKeysOfEnumerableProperties = (object, compareKeys) => {\n const keys = Object.keys(object).sort(compareKeys);\n\n if (Object.getOwnPropertySymbols) {\n Object.getOwnPropertySymbols(object).forEach(symbol => {\n if (Object.getOwnPropertyDescriptor(object, symbol).enumerable) {\n keys.push(symbol);\n }\n });\n }\n\n return keys;\n};\n/**\n * Return entries (for example, of a map)\n * with spacing, indentation, and comma\n * without surrounding punctuation (for example, braces)\n */\n\nfunction printIteratorEntries(\n iterator,\n config,\n indentation,\n depth,\n refs,\n printer, // Too bad, so sad that separator for ECMAScript Map has been ' => '\n // What a distracting diff if you change a data structure to/from\n // ECMAScript Object or Immutable.Map/OrderedMap which use the default.\n separator = ': '\n) {\n let result = '';\n let current = iterator.next();\n\n if (!current.done) {\n result += config.spacingOuter;\n const indentationNext = indentation + config.indent;\n\n while (!current.done) {\n const name = printer(\n current.value[0],\n config,\n indentationNext,\n depth,\n refs\n );\n const value = printer(\n current.value[1],\n config,\n indentationNext,\n depth,\n refs\n );\n result += indentationNext + name + separator + value;\n current = iterator.next();\n\n if (!current.done) {\n result += ',' + config.spacingInner;\n } else if (!config.min) {\n result += ',';\n }\n }\n\n result += config.spacingOuter + indentation;\n }\n\n return result;\n}\n/**\n * Return values (for example, of a set)\n * with spacing, indentation, and comma\n * without surrounding punctuation (braces or brackets)\n */\n\nfunction printIteratorValues(\n iterator,\n config,\n indentation,\n depth,\n refs,\n printer\n) {\n let result = '';\n let current = iterator.next();\n\n if (!current.done) {\n result += config.spacingOuter;\n const indentationNext = indentation + config.indent;\n\n while (!current.done) {\n result +=\n indentationNext +\n printer(current.value, config, indentationNext, depth, refs);\n current = iterator.next();\n\n if (!current.done) {\n result += ',' + config.spacingInner;\n } else if (!config.min) {\n result += ',';\n }\n }\n\n result += config.spacingOuter + indentation;\n }\n\n return result;\n}\n/**\n * Return items (for example, of an array)\n * with spacing, indentation, and comma\n * without surrounding punctuation (for example, brackets)\n **/\n\nfunction printListItems(list, config, indentation, depth, refs, printer) {\n let result = '';\n\n if (list.length) {\n result += config.spacingOuter;\n const indentationNext = indentation + config.indent;\n\n for (let i = 0; i < list.length; i++) {\n result += indentationNext;\n\n if (i in list) {\n result += printer(list[i], config, indentationNext, depth, refs);\n }\n\n if (i < list.length - 1) {\n result += ',' + config.spacingInner;\n } else if (!config.min) {\n result += ',';\n }\n }\n\n result += config.spacingOuter + indentation;\n }\n\n return result;\n}\n/**\n * Return properties of an object\n * with spacing, indentation, and comma\n * without surrounding punctuation (for example, braces)\n */\n\nfunction printObjectProperties(val, config, indentation, depth, refs, printer) {\n let result = '';\n const keys = getKeysOfEnumerableProperties(val, config.compareKeys);\n\n if (keys.length) {\n result += config.spacingOuter;\n const indentationNext = indentation + config.indent;\n\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n const name = printer(key, config, indentationNext, depth, refs);\n const value = printer(val[key], config, indentationNext, depth, refs);\n result += indentationNext + name + ': ' + value;\n\n if (i < keys.length - 1) {\n result += ',' + config.spacingInner;\n } else if (!config.min) {\n result += ',';\n }\n }\n\n result += config.spacingOuter + indentation;\n }\n\n return result;\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.test = exports.serialize = exports.default = void 0;\n\nvar _collections = require('../collections');\n\nvar global = (function () {\n if (typeof globalThis !== 'undefined') {\n return globalThis;\n } else if (typeof global !== 'undefined') {\n return global;\n } else if (typeof self !== 'undefined') {\n return self;\n } else if (typeof window !== 'undefined') {\n return window;\n } else {\n return Function('return this')();\n }\n})();\n\nvar Symbol = global['jest-symbol-do-not-touch'] || global.Symbol;\nconst asymmetricMatcher =\n typeof Symbol === 'function' && Symbol.for\n ? Symbol.for('jest.asymmetricMatcher')\n : 0x1357a5;\nconst SPACE = ' ';\n\nconst serialize = (val, config, indentation, depth, refs, printer) => {\n const stringedValue = val.toString();\n\n if (\n stringedValue === 'ArrayContaining' ||\n stringedValue === 'ArrayNotContaining'\n ) {\n if (++depth > config.maxDepth) {\n return '[' + stringedValue + ']';\n }\n\n return (\n stringedValue +\n SPACE +\n '[' +\n (0, _collections.printListItems)(\n val.sample,\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n ']'\n );\n }\n\n if (\n stringedValue === 'ObjectContaining' ||\n stringedValue === 'ObjectNotContaining'\n ) {\n if (++depth > config.maxDepth) {\n return '[' + stringedValue + ']';\n }\n\n return (\n stringedValue +\n SPACE +\n '{' +\n (0, _collections.printObjectProperties)(\n val.sample,\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n '}'\n );\n }\n\n if (\n stringedValue === 'StringMatching' ||\n stringedValue === 'StringNotMatching'\n ) {\n return (\n stringedValue +\n SPACE +\n printer(val.sample, config, indentation, depth, refs)\n );\n }\n\n if (\n stringedValue === 'StringContaining' ||\n stringedValue === 'StringNotContaining'\n ) {\n return (\n stringedValue +\n SPACE +\n printer(val.sample, config, indentation, depth, refs)\n );\n }\n\n return val.toAsymmetricMatcher();\n};\n\nexports.serialize = serialize;\n\nconst test = val => val && val.$$typeof === asymmetricMatcher;\n\nexports.test = test;\nconst plugin = {\n serialize,\n test\n};\nvar _default = plugin;\nexports.default = _default;\n","'use strict';\n\nmodule.exports = ({onlyFirst = false} = {}) => {\n\tconst pattern = [\n\t\t'[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]+)*|[a-zA-Z\\\\d]+(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]*)*)?\\\\u0007)',\n\t\t'(?:(?:\\\\d{1,4}(?:;\\\\d{0,4})*)?[\\\\dA-PR-TZcf-ntqry=><~]))'\n\t].join('|');\n\n\treturn new RegExp(pattern, onlyFirst ? undefined : 'g');\n};\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.test = exports.serialize = exports.default = void 0;\n\nvar _ansiRegex = _interopRequireDefault(require('ansi-regex'));\n\nvar _ansiStyles = _interopRequireDefault(require('ansi-styles'));\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {default: obj};\n}\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nconst toHumanReadableAnsi = text =>\n text.replace((0, _ansiRegex.default)(), match => {\n switch (match) {\n case _ansiStyles.default.red.close:\n case _ansiStyles.default.green.close:\n case _ansiStyles.default.cyan.close:\n case _ansiStyles.default.gray.close:\n case _ansiStyles.default.white.close:\n case _ansiStyles.default.yellow.close:\n case _ansiStyles.default.bgRed.close:\n case _ansiStyles.default.bgGreen.close:\n case _ansiStyles.default.bgYellow.close:\n case _ansiStyles.default.inverse.close:\n case _ansiStyles.default.dim.close:\n case _ansiStyles.default.bold.close:\n case _ansiStyles.default.reset.open:\n case _ansiStyles.default.reset.close:\n return '</>';\n\n case _ansiStyles.default.red.open:\n return '<red>';\n\n case _ansiStyles.default.green.open:\n return '<green>';\n\n case _ansiStyles.default.cyan.open:\n return '<cyan>';\n\n case _ansiStyles.default.gray.open:\n return '<gray>';\n\n case _ansiStyles.default.white.open:\n return '<white>';\n\n case _ansiStyles.default.yellow.open:\n return '<yellow>';\n\n case _ansiStyles.default.bgRed.open:\n return '<bgRed>';\n\n case _ansiStyles.default.bgGreen.open:\n return '<bgGreen>';\n\n case _ansiStyles.default.bgYellow.open:\n return '<bgYellow>';\n\n case _ansiStyles.default.inverse.open:\n return '<inverse>';\n\n case _ansiStyles.default.dim.open:\n return '<dim>';\n\n case _ansiStyles.default.bold.open:\n return '<bold>';\n\n default:\n return '';\n }\n });\n\nconst test = val =>\n typeof val === 'string' && !!val.match((0, _ansiRegex.default)());\n\nexports.test = test;\n\nconst serialize = (val, config, indentation, depth, refs, printer) =>\n printer(toHumanReadableAnsi(val), config, indentation, depth, refs);\n\nexports.serialize = serialize;\nconst plugin = {\n serialize,\n test\n};\nvar _default = plugin;\nexports.default = _default;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.test = exports.serialize = exports.default = void 0;\n\nvar _collections = require('../collections');\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/* eslint-disable local/ban-types-eventually */\nconst SPACE = ' ';\nconst OBJECT_NAMES = ['DOMStringMap', 'NamedNodeMap'];\nconst ARRAY_REGEXP = /^(HTML\\w*Collection|NodeList)$/;\n\nconst testName = name =>\n OBJECT_NAMES.indexOf(name) !== -1 || ARRAY_REGEXP.test(name);\n\nconst test = val =>\n val &&\n val.constructor &&\n !!val.constructor.name &&\n testName(val.constructor.name);\n\nexports.test = test;\n\nconst isNamedNodeMap = collection =>\n collection.constructor.name === 'NamedNodeMap';\n\nconst serialize = (collection, config, indentation, depth, refs, printer) => {\n const name = collection.constructor.name;\n\n if (++depth > config.maxDepth) {\n return '[' + name + ']';\n }\n\n return (\n (config.min ? '' : name + SPACE) +\n (OBJECT_NAMES.indexOf(name) !== -1\n ? '{' +\n (0, _collections.printObjectProperties)(\n isNamedNodeMap(collection)\n ? Array.from(collection).reduce((props, attribute) => {\n props[attribute.name] = attribute.value;\n return props;\n }, {})\n : {...collection},\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n '}'\n : '[' +\n (0, _collections.printListItems)(\n Array.from(collection),\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n ']')\n );\n};\n\nexports.serialize = serialize;\nconst plugin = {\n serialize,\n test\n};\nvar _default = plugin;\nexports.default = _default;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.default = escapeHTML;\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nfunction escapeHTML(str) {\n return str.replace(/</g, '<').replace(/>/g, '>');\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.printText =\n exports.printProps =\n exports.printElementAsLeaf =\n exports.printElement =\n exports.printComment =\n exports.printChildren =\n void 0;\n\nvar _escapeHTML = _interopRequireDefault(require('./escapeHTML'));\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {default: obj};\n}\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n// Return empty string if keys is empty.\nconst printProps = (keys, props, config, indentation, depth, refs, printer) => {\n const indentationNext = indentation + config.indent;\n const colors = config.colors;\n return keys\n .map(key => {\n const value = props[key];\n let printed = printer(value, config, indentationNext, depth, refs);\n\n if (typeof value !== 'string') {\n if (printed.indexOf('\\n') !== -1) {\n printed =\n config.spacingOuter +\n indentationNext +\n printed +\n config.spacingOuter +\n indentation;\n }\n\n printed = '{' + printed + '}';\n }\n\n return (\n config.spacingInner +\n indentation +\n colors.prop.open +\n key +\n colors.prop.close +\n '=' +\n colors.value.open +\n printed +\n colors.value.close\n );\n })\n .join('');\n}; // Return empty string if children is empty.\n\nexports.printProps = printProps;\n\nconst printChildren = (children, config, indentation, depth, refs, printer) =>\n children\n .map(\n child =>\n config.spacingOuter +\n indentation +\n (typeof child === 'string'\n ? printText(child, config)\n : printer(child, config, indentation, depth, refs))\n )\n .join('');\n\nexports.printChildren = printChildren;\n\nconst printText = (text, config) => {\n const contentColor = config.colors.content;\n return (\n contentColor.open + (0, _escapeHTML.default)(text) + contentColor.close\n );\n};\n\nexports.printText = printText;\n\nconst printComment = (comment, config) => {\n const commentColor = config.colors.comment;\n return (\n commentColor.open +\n '<!--' +\n (0, _escapeHTML.default)(comment) +\n '-->' +\n commentColor.close\n );\n}; // Separate the functions to format props, children, and element,\n// so a plugin could override a particular function, if needed.\n// Too bad, so sad: the traditional (but unnecessary) space\n// in a self-closing tagColor requires a second test of printedProps.\n\nexports.printComment = printComment;\n\nconst printElement = (\n type,\n printedProps,\n printedChildren,\n config,\n indentation\n) => {\n const tagColor = config.colors.tag;\n return (\n tagColor.open +\n '<' +\n type +\n (printedProps &&\n tagColor.close +\n printedProps +\n config.spacingOuter +\n indentation +\n tagColor.open) +\n (printedChildren\n ? '>' +\n tagColor.close +\n printedChildren +\n config.spacingOuter +\n indentation +\n tagColor.open +\n '</' +\n type\n : (printedProps && !config.min ? '' : ' ') + '/') +\n '>' +\n tagColor.close\n );\n};\n\nexports.printElement = printElement;\n\nconst printElementAsLeaf = (type, config) => {\n const tagColor = config.colors.tag;\n return (\n tagColor.open +\n '<' +\n type +\n tagColor.close +\n ' …' +\n tagColor.open +\n ' />' +\n tagColor.close\n );\n};\n\nexports.printElementAsLeaf = printElementAsLeaf;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.test = exports.serialize = exports.default = void 0;\n\nvar _markup = require('./lib/markup');\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nconst ELEMENT_NODE = 1;\nconst TEXT_NODE = 3;\nconst COMMENT_NODE = 8;\nconst FRAGMENT_NODE = 11;\nconst ELEMENT_REGEXP = /^((HTML|SVG)\\w*)?Element$/;\n\nconst testHasAttribute = val => {\n try {\n return typeof val.hasAttribute === 'function' && val.hasAttribute('is');\n } catch {\n return false;\n }\n};\n\nconst testNode = val => {\n const constructorName = val.constructor.name;\n const {nodeType, tagName} = val;\n const isCustomElement =\n (typeof tagName === 'string' && tagName.includes('-')) ||\n testHasAttribute(val);\n return (\n (nodeType === ELEMENT_NODE &&\n (ELEMENT_REGEXP.test(constructorName) || isCustomElement)) ||\n (nodeType === TEXT_NODE && constructorName === 'Text') ||\n (nodeType === COMMENT_NODE && constructorName === 'Comment') ||\n (nodeType === FRAGMENT_NODE && constructorName === 'DocumentFragment')\n );\n};\n\nconst test = val => {\n var _val$constructor;\n\n return (\n (val === null || val === void 0\n ? void 0\n : (_val$constructor = val.constructor) === null ||\n _val$constructor === void 0\n ? void 0\n : _val$constructor.name) && testNode(val)\n );\n};\n\nexports.test = test;\n\nfunction nodeIsText(node) {\n return node.nodeType === TEXT_NODE;\n}\n\nfunction nodeIsComment(node) {\n return node.nodeType === COMMENT_NODE;\n}\n\nfunction nodeIsFragment(node) {\n return node.nodeType === FRAGMENT_NODE;\n}\n\nconst serialize = (node, config, indentation, depth, refs, printer) => {\n if (nodeIsText(node)) {\n return (0, _markup.printText)(node.data, config);\n }\n\n if (nodeIsComment(node)) {\n return (0, _markup.printComment)(node.data, config);\n }\n\n const type = nodeIsFragment(node)\n ? 'DocumentFragment'\n : node.tagName.toLowerCase();\n\n if (++depth > config.maxDepth) {\n return (0, _markup.printElementAsLeaf)(type, config);\n }\n\n return (0, _markup.printElement)(\n type,\n (0, _markup.printProps)(\n nodeIsFragment(node)\n ? []\n : Array.from(node.attributes)\n .map(attr => attr.name)\n .sort(),\n nodeIsFragment(node)\n ? {}\n : Array.from(node.attributes).reduce((props, attribute) => {\n props[attribute.name] = attribute.value;\n return props;\n }, {}),\n config,\n indentation + config.indent,\n depth,\n refs,\n printer\n ),\n (0, _markup.printChildren)(\n Array.prototype.slice.call(node.childNodes || node.children),\n config,\n indentation + config.indent,\n depth,\n refs,\n printer\n ),\n config,\n indentation\n );\n};\n\nexports.serialize = serialize;\nconst plugin = {\n serialize,\n test\n};\nvar _default = plugin;\nexports.default = _default;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.test = exports.serialize = exports.default = void 0;\n\nvar _collections = require('../collections');\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n// SENTINEL constants are from https://github.com/facebook/immutable-js\nconst IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';\nconst IS_LIST_SENTINEL = '@@__IMMUTABLE_LIST__@@';\nconst IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';\nconst IS_MAP_SENTINEL = '@@__IMMUTABLE_MAP__@@';\nconst IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';\nconst IS_RECORD_SENTINEL = '@@__IMMUTABLE_RECORD__@@'; // immutable v4\n\nconst IS_SEQ_SENTINEL = '@@__IMMUTABLE_SEQ__@@';\nconst IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@';\nconst IS_STACK_SENTINEL = '@@__IMMUTABLE_STACK__@@';\n\nconst getImmutableName = name => 'Immutable.' + name;\n\nconst printAsLeaf = name => '[' + name + ']';\n\nconst SPACE = ' ';\nconst LAZY = '…'; // Seq is lazy if it calls a method like filter\n\nconst printImmutableEntries = (\n val,\n config,\n indentation,\n depth,\n refs,\n printer,\n type\n) =>\n ++depth > config.maxDepth\n ? printAsLeaf(getImmutableName(type))\n : getImmutableName(type) +\n SPACE +\n '{' +\n (0, _collections.printIteratorEntries)(\n val.entries(),\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n '}'; // Record has an entries method because it is a collection in immutable v3.\n// Return an iterator for Immutable Record from version v3 or v4.\n\nfunction getRecordEntries(val) {\n let i = 0;\n return {\n next() {\n if (i < val._keys.length) {\n const key = val._keys[i++];\n return {\n done: false,\n value: [key, val.get(key)]\n };\n }\n\n return {\n done: true,\n value: undefined\n };\n }\n };\n}\n\nconst printImmutableRecord = (\n val,\n config,\n indentation,\n depth,\n refs,\n printer\n) => {\n // _name property is defined only for an Immutable Record instance\n // which was constructed with a second optional descriptive name arg\n const name = getImmutableName(val._name || 'Record');\n return ++depth > config.maxDepth\n ? printAsLeaf(name)\n : name +\n SPACE +\n '{' +\n (0, _collections.printIteratorEntries)(\n getRecordEntries(val),\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n '}';\n};\n\nconst printImmutableSeq = (val, config, indentation, depth, refs, printer) => {\n const name = getImmutableName('Seq');\n\n if (++depth > config.maxDepth) {\n return printAsLeaf(name);\n }\n\n if (val[IS_KEYED_SENTINEL]) {\n return (\n name +\n SPACE +\n '{' + // from Immutable collection of entries or from ECMAScript object\n (val._iter || val._object\n ? (0, _collections.printIteratorEntries)(\n val.entries(),\n config,\n indentation,\n depth,\n refs,\n printer\n )\n : LAZY) +\n '}'\n );\n }\n\n return (\n name +\n SPACE +\n '[' +\n (val._iter || // from Immutable collection of values\n val._array || // from ECMAScript array\n val._collection || // from ECMAScript collection in immutable v4\n val._iterable // from ECMAScript collection in immutable v3\n ? (0, _collections.printIteratorValues)(\n val.values(),\n config,\n indentation,\n depth,\n refs,\n printer\n )\n : LAZY) +\n ']'\n );\n};\n\nconst printImmutableValues = (\n val,\n config,\n indentation,\n depth,\n refs,\n printer,\n type\n) =>\n ++depth > config.maxDepth\n ? printAsLeaf(getImmutableName(type))\n : getImmutableName(type) +\n SPACE +\n '[' +\n (0, _collections.printIteratorValues)(\n val.values(),\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n ']';\n\nconst serialize = (val, config, indentation, depth, refs, printer) => {\n if (val[IS_MAP_SENTINEL]) {\n return printImmutableEntries(\n val,\n config,\n indentation,\n depth,\n refs,\n printer,\n val[IS_ORDERED_SENTINEL] ? 'OrderedMap' : 'Map'\n );\n }\n\n if (val[IS_LIST_SENTINEL]) {\n return printImmutableValues(\n val,\n config,\n indentation,\n depth,\n refs,\n printer,\n 'List'\n );\n }\n\n if (val[IS_SET_SENTINEL]) {\n return printImmutableValues(\n val,\n config,\n indentation,\n depth,\n refs,\n printer,\n val[IS_ORDERED_SENTINEL] ? 'OrderedSet' : 'Set'\n );\n }\n\n if (val[IS_STACK_SENTINEL]) {\n return printImmutableValues(\n val,\n config,\n indentation,\n depth,\n refs,\n printer,\n 'Stack'\n );\n }\n\n if (val[IS_SEQ_SENTINEL]) {\n return printImmutableSeq(val, config, indentation, depth, refs, printer);\n } // For compatibility with immutable v3 and v4, let record be the default.\n\n return printImmutableRecord(val, config, indentation, depth, refs, printer);\n}; // Explicitly comparing sentinel properties to true avoids false positive\n// when mock identity-obj-proxy returns the key as the value for any key.\n\nexports.serialize = serialize;\n\nconst test = val =>\n val &&\n (val[IS_ITERABLE_SENTINEL] === true || val[IS_RECORD_SENTINEL] === true);\n\nexports.test = test;\nconst plugin = {\n serialize,\n test\n};\nvar _default = plugin;\nexports.default = _default;\n","/** @license React v17.0.2\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var b=60103,c=60106,d=60107,e=60108,f=60114,g=60109,h=60110,k=60112,l=60113,m=60120,n=60115,p=60116,q=60121,r=60122,u=60117,v=60129,w=60131;\nif(\"function\"===typeof Symbol&&Symbol.for){var x=Symbol.for;b=x(\"react.element\");c=x(\"react.portal\");d=x(\"react.fragment\");e=x(\"react.strict_mode\");f=x(\"react.profiler\");g=x(\"react.provider\");h=x(\"react.context\");k=x(\"react.forward_ref\");l=x(\"react.suspense\");m=x(\"react.suspense_list\");n=x(\"react.memo\");p=x(\"react.lazy\");q=x(\"react.block\");r=x(\"react.server.block\");u=x(\"react.fundamental\");v=x(\"react.debug_trace_mode\");w=x(\"react.legacy_hidden\")}\nfunction y(a){if(\"object\"===typeof a&&null!==a){var t=a.$$typeof;switch(t){case b:switch(a=a.type,a){case d:case f:case e:case l:case m:return a;default:switch(a=a&&a.$$typeof,a){case h:case k:case p:case n:case g:return a;default:return t}}case c:return t}}}var z=g,A=b,B=k,C=d,D=p,E=n,F=c,G=f,H=e,I=l;exports.ContextConsumer=h;exports.ContextProvider=z;exports.Element=A;exports.ForwardRef=B;exports.Fragment=C;exports.Lazy=D;exports.Memo=E;exports.Portal=F;exports.Profiler=G;exports.StrictMode=H;\nexports.Suspense=I;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return y(a)===h};exports.isContextProvider=function(a){return y(a)===g};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return y(a)===k};exports.isFragment=function(a){return y(a)===d};exports.isLazy=function(a){return y(a)===p};exports.isMemo=function(a){return y(a)===n};\nexports.isPortal=function(a){return y(a)===c};exports.isProfiler=function(a){return y(a)===f};exports.isStrictMode=function(a){return y(a)===e};exports.isSuspense=function(a){return y(a)===l};exports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===d||a===f||a===v||a===e||a===l||a===m||a===w||\"object\"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===n||a.$$typeof===g||a.$$typeof===h||a.$$typeof===k||a.$$typeof===u||a.$$typeof===q||a[0]===r)?!0:!1};\nexports.typeOf=y;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.test = exports.serialize = exports.default = void 0;\n\nvar ReactIs = _interopRequireWildcard(require('react-is'));\n\nvar _markup = require('./lib/markup');\n\nfunction _getRequireWildcardCache(nodeInterop) {\n if (typeof WeakMap !== 'function') return null;\n var cacheBabelInterop = new WeakMap();\n var cacheNodeInterop = new WeakMap();\n return (_getRequireWildcardCache = function (nodeInterop) {\n return nodeInterop ? cacheNodeInterop : cacheBabelInterop;\n })(nodeInterop);\n}\n\nfunction _interopRequireWildcard(obj, nodeInterop) {\n if (!nodeInterop && obj && obj.__esModule) {\n return obj;\n }\n if (obj === null || (typeof obj !== 'object' && typeof obj !== 'function')) {\n return {default: obj};\n }\n var cache = _getRequireWildcardCache(nodeInterop);\n if (cache && cache.has(obj)) {\n return cache.get(obj);\n }\n var newObj = {};\n var hasPropertyDescriptor =\n Object.defineProperty && Object.getOwnPropertyDescriptor;\n for (var key in obj) {\n if (key !== 'default' && Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor\n ? Object.getOwnPropertyDescriptor(obj, key)\n : null;\n if (desc && (desc.get || desc.set)) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n newObj.default = obj;\n if (cache) {\n cache.set(obj, newObj);\n }\n return newObj;\n}\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n// Given element.props.children, or subtree during recursive traversal,\n// return flattened array of children.\nconst getChildren = (arg, children = []) => {\n if (Array.isArray(arg)) {\n arg.forEach(item => {\n getChildren(item, children);\n });\n } else if (arg != null && arg !== false) {\n children.push(arg);\n }\n\n return children;\n};\n\nconst getType = element => {\n const type = element.type;\n\n if (typeof type === 'string') {\n return type;\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || 'Unknown';\n }\n\n if (ReactIs.isFragment(element)) {\n return 'React.Fragment';\n }\n\n if (ReactIs.isSuspense(element)) {\n return 'React.Suspense';\n }\n\n if (typeof type === 'object' && type !== null) {\n if (ReactIs.isContextProvider(element)) {\n return 'Context.Provider';\n }\n\n if (ReactIs.isContextConsumer(element)) {\n return 'Context.Consumer';\n }\n\n if (ReactIs.isForwardRef(element)) {\n if (type.displayName) {\n return type.displayName;\n }\n\n const functionName = type.render.displayName || type.render.name || '';\n return functionName !== ''\n ? 'ForwardRef(' + functionName + ')'\n : 'ForwardRef';\n }\n\n if (ReactIs.isMemo(element)) {\n const functionName =\n type.displayName || type.type.displayName || type.type.name || '';\n return functionName !== '' ? 'Memo(' + functionName + ')' : 'Memo';\n }\n }\n\n return 'UNDEFINED';\n};\n\nconst getPropKeys = element => {\n const {props} = element;\n return Object.keys(props)\n .filter(key => key !== 'children' && props[key] !== undefined)\n .sort();\n};\n\nconst serialize = (element, config, indentation, depth, refs, printer) =>\n ++depth > config.maxDepth\n ? (0, _markup.printElementAsLeaf)(getType(element), config)\n : (0, _markup.printElement)(\n getType(element),\n (0, _markup.printProps)(\n getPropKeys(element),\n element.props,\n config,\n indentation + config.indent,\n depth,\n refs,\n printer\n ),\n (0, _markup.printChildren)(\n getChildren(element.props.children),\n config,\n indentation + config.indent,\n depth,\n refs,\n printer\n ),\n config,\n indentation\n );\n\nexports.serialize = serialize;\n\nconst test = val => val != null && ReactIs.isElement(val);\n\nexports.test = test;\nconst plugin = {\n serialize,\n test\n};\nvar _default = plugin;\nexports.default = _default;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.test = exports.serialize = exports.default = void 0;\n\nvar _markup = require('./lib/markup');\n\nvar global = (function () {\n if (typeof globalThis !== 'undefined') {\n return globalThis;\n } else if (typeof global !== 'undefined') {\n return global;\n } else if (typeof self !== 'undefined') {\n return self;\n } else if (typeof window !== 'undefined') {\n return window;\n } else {\n return Function('return this')();\n }\n})();\n\nvar Symbol = global['jest-symbol-do-not-touch'] || global.Symbol;\nconst testSymbol =\n typeof Symbol === 'function' && Symbol.for\n ? Symbol.for('react.test.json')\n : 0xea71357;\n\nconst getPropKeys = object => {\n const {props} = object;\n return props\n ? Object.keys(props)\n .filter(key => props[key] !== undefined)\n .sort()\n : [];\n};\n\nconst serialize = (object, config, indentation, depth, refs, printer) =>\n ++depth > config.maxDepth\n ? (0, _markup.printElementAsLeaf)(object.type, config)\n : (0, _markup.printElement)(\n object.type,\n object.props\n ? (0, _markup.printProps)(\n getPropKeys(object),\n object.props,\n config,\n indentation + config.indent,\n depth,\n refs,\n printer\n )\n : '',\n object.children\n ? (0, _markup.printChildren)(\n object.children,\n config,\n indentation + config.indent,\n depth,\n refs,\n printer\n )\n : '',\n config,\n indentation\n );\n\nexports.serialize = serialize;\n\nconst test = val => val && val.$$typeof === testSymbol;\n\nexports.test = test;\nconst plugin = {\n serialize,\n test\n};\nvar _default = plugin;\nexports.default = _default;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.default = exports.DEFAULT_OPTIONS = void 0;\nexports.format = format;\nexports.plugins = void 0;\n\nvar _ansiStyles = _interopRequireDefault(require('ansi-styles'));\n\nvar _collections = require('./collections');\n\nvar _AsymmetricMatcher = _interopRequireDefault(\n require('./plugins/AsymmetricMatcher')\n);\n\nvar _ConvertAnsi = _interopRequireDefault(require('./plugins/ConvertAnsi'));\n\nvar _DOMCollection = _interopRequireDefault(require('./plugins/DOMCollection'));\n\nvar _DOMElement = _interopRequireDefault(require('./plugins/DOMElement'));\n\nvar _Immutable = _interopRequireDefault(require('./plugins/Immutable'));\n\nvar _ReactElement = _interopRequireDefault(require('./plugins/ReactElement'));\n\nvar _ReactTestComponent = _interopRequireDefault(\n require('./plugins/ReactTestComponent')\n);\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {default: obj};\n}\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/* eslint-disable local/ban-types-eventually */\nconst toString = Object.prototype.toString;\nconst toISOString = Date.prototype.toISOString;\nconst errorToString = Error.prototype.toString;\nconst regExpToString = RegExp.prototype.toString;\n/**\n * Explicitly comparing typeof constructor to function avoids undefined as name\n * when mock identity-obj-proxy returns the key as the value for any key.\n */\n\nconst getConstructorName = val =>\n (typeof val.constructor === 'function' && val.constructor.name) || 'Object';\n/* global window */\n\n/** Is val is equal to global window object? Works even if it does not exist :) */\n\nconst isWindow = val => typeof window !== 'undefined' && val === window;\n\nconst SYMBOL_REGEXP = /^Symbol\\((.*)\\)(.*)$/;\nconst NEWLINE_REGEXP = /\\n/gi;\n\nclass PrettyFormatPluginError extends Error {\n constructor(message, stack) {\n super(message);\n this.stack = stack;\n this.name = this.constructor.name;\n }\n}\n\nfunction isToStringedArrayType(toStringed) {\n return (\n toStringed === '[object Array]' ||\n toStringed === '[object ArrayBuffer]' ||\n toStringed === '[object DataView]' ||\n toStringed === '[object Float32Array]' ||\n toStringed === '[object Float64Array]' ||\n toStringed === '[object Int8Array]' ||\n toStringed === '[object Int16Array]' ||\n toStringed === '[object Int32Array]' ||\n toStringed === '[object Uint8Array]' ||\n toStringed === '[object Uint8ClampedArray]' ||\n toStringed === '[object Uint16Array]' ||\n toStringed === '[object Uint32Array]'\n );\n}\n\nfunction printNumber(val) {\n return Object.is(val, -0) ? '-0' : String(val);\n}\n\nfunction printBigInt(val) {\n return String(`${val}n`);\n}\n\nfunction printFunction(val, printFunctionName) {\n if (!printFunctionName) {\n return '[Function]';\n }\n\n return '[Function ' + (val.name || 'anonymous') + ']';\n}\n\nfunction printSymbol(val) {\n return String(val).replace(SYMBOL_REGEXP, 'Symbol($1)');\n}\n\nfunction printError(val) {\n return '[' + errorToString.call(val) + ']';\n}\n/**\n * The first port of call for printing an object, handles most of the\n * data-types in JS.\n */\n\nfunction printBasicValue(val, printFunctionName, escapeRegex, escapeString) {\n if (val === true || val === false) {\n return '' + val;\n }\n\n if (val === undefined) {\n return 'undefined';\n }\n\n if (val === null) {\n return 'null';\n }\n\n const typeOf = typeof val;\n\n if (typeOf === 'number') {\n return printNumber(val);\n }\n\n if (typeOf === 'bigint') {\n return printBigInt(val);\n }\n\n if (typeOf === 'string') {\n if (escapeString) {\n return '\"' + val.replace(/\"|\\\\/g, '\\\\$&') + '\"';\n }\n\n return '\"' + val + '\"';\n }\n\n if (typeOf === 'function') {\n return printFunction(val, printFunctionName);\n }\n\n if (typeOf === 'symbol') {\n return printSymbol(val);\n }\n\n const toStringed = toString.call(val);\n\n if (toStringed === '[object WeakMap]') {\n return 'WeakMap {}';\n }\n\n if (toStringed === '[object WeakSet]') {\n return 'WeakSet {}';\n }\n\n if (\n toStringed === '[object Function]' ||\n toStringed === '[object GeneratorFunction]'\n ) {\n return printFunction(val, printFunctionName);\n }\n\n if (toStringed === '[object Symbol]') {\n return printSymbol(val);\n }\n\n if (toStringed === '[object Date]') {\n return isNaN(+val) ? 'Date { NaN }' : toISOString.call(val);\n }\n\n if (toStringed === '[object Error]') {\n return printError(val);\n }\n\n if (toStringed === '[object RegExp]') {\n if (escapeRegex) {\n // https://github.com/benjamingr/RegExp.escape/blob/main/polyfill.js\n return regExpToString.call(val).replace(/[\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n }\n\n return regExpToString.call(val);\n }\n\n if (val instanceof Error) {\n return printError(val);\n }\n\n return null;\n}\n/**\n * Handles more complex objects ( such as objects with circular references.\n * maps and sets etc )\n */\n\nfunction printComplexValue(\n val,\n config,\n indentation,\n depth,\n refs,\n hasCalledToJSON\n) {\n if (refs.indexOf(val) !== -1) {\n return '[Circular]';\n }\n\n refs = refs.slice();\n refs.push(val);\n const hitMaxDepth = ++depth > config.maxDepth;\n const min = config.min;\n\n if (\n config.callToJSON &&\n !hitMaxDepth &&\n val.toJSON &&\n typeof val.toJSON === 'function' &&\n !hasCalledToJSON\n ) {\n return printer(val.toJSON(), config, indentation, depth, refs, true);\n }\n\n const toStringed = toString.call(val);\n\n if (toStringed === '[object Arguments]') {\n return hitMaxDepth\n ? '[Arguments]'\n : (min ? '' : 'Arguments ') +\n '[' +\n (0, _collections.printListItems)(\n val,\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n ']';\n }\n\n if (isToStringedArrayType(toStringed)) {\n return hitMaxDepth\n ? '[' + val.constructor.name + ']'\n : (min\n ? ''\n : !config.printBasicPrototype && val.constructor.name === 'Array'\n ? ''\n : val.constructor.name + ' ') +\n '[' +\n (0, _collections.printListItems)(\n val,\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n ']';\n }\n\n if (toStringed === '[object Map]') {\n return hitMaxDepth\n ? '[Map]'\n : 'Map {' +\n (0, _collections.printIteratorEntries)(\n val.entries(),\n config,\n indentation,\n depth,\n refs,\n printer,\n ' => '\n ) +\n '}';\n }\n\n if (toStringed === '[object Set]') {\n return hitMaxDepth\n ? '[Set]'\n : 'Set {' +\n (0, _collections.printIteratorValues)(\n val.values(),\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n '}';\n } // Avoid failure to serialize global window object in jsdom test environment.\n // For example, not even relevant if window is prop of React element.\n\n return hitMaxDepth || isWindow(val)\n ? '[' + getConstructorName(val) + ']'\n : (min\n ? ''\n : !config.printBasicPrototype && getConstructorName(val) === 'Object'\n ? ''\n : getConstructorName(val) + ' ') +\n '{' +\n (0, _collections.printObjectProperties)(\n val,\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n '}';\n}\n\nfunction isNewPlugin(plugin) {\n return plugin.serialize != null;\n}\n\nfunction printPlugin(plugin, val, config, indentation, depth, refs) {\n let printed;\n\n try {\n printed = isNewPlugin(plugin)\n ? plugin.serialize(val, config, indentation, depth, refs, printer)\n : plugin.print(\n val,\n valChild => printer(valChild, config, indentation, depth, refs),\n str => {\n const indentationNext = indentation + config.indent;\n return (\n indentationNext +\n str.replace(NEWLINE_REGEXP, '\\n' + indentationNext)\n );\n },\n {\n edgeSpacing: config.spacingOuter,\n min: config.min,\n spacing: config.spacingInner\n },\n config.colors\n );\n } catch (error) {\n throw new PrettyFormatPluginError(error.message, error.stack);\n }\n\n if (typeof printed !== 'string') {\n throw new Error(\n `pretty-format: Plugin must return type \"string\" but instead returned \"${typeof printed}\".`\n );\n }\n\n return printed;\n}\n\nfunction findPlugin(plugins, val) {\n for (let p = 0; p < plugins.length; p++) {\n try {\n if (plugins[p].test(val)) {\n return plugins[p];\n }\n } catch (error) {\n throw new PrettyFormatPluginError(error.message, error.stack);\n }\n }\n\n return null;\n}\n\nfunction printer(val, config, indentation, depth, refs, hasCalledToJSON) {\n const plugin = findPlugin(config.plugins, val);\n\n if (plugin !== null) {\n return printPlugin(plugin, val, config, indentation, depth, refs);\n }\n\n const basicResult = printBasicValue(\n val,\n config.printFunctionName,\n config.escapeRegex,\n config.escapeString\n );\n\n if (basicResult !== null) {\n return basicResult;\n }\n\n return printComplexValue(\n val,\n config,\n indentation,\n depth,\n refs,\n hasCalledToJSON\n );\n}\n\nconst DEFAULT_THEME = {\n comment: 'gray',\n content: 'reset',\n prop: 'yellow',\n tag: 'cyan',\n value: 'green'\n};\nconst DEFAULT_THEME_KEYS = Object.keys(DEFAULT_THEME);\nconst DEFAULT_OPTIONS = {\n callToJSON: true,\n compareKeys: undefined,\n escapeRegex: false,\n escapeString: true,\n highlight: false,\n indent: 2,\n maxDepth: Infinity,\n min: false,\n plugins: [],\n printBasicPrototype: true,\n printFunctionName: true,\n theme: DEFAULT_THEME\n};\nexports.DEFAULT_OPTIONS = DEFAULT_OPTIONS;\n\nfunction validateOptions(options) {\n Object.keys(options).forEach(key => {\n if (!DEFAULT_OPTIONS.hasOwnProperty(key)) {\n throw new Error(`pretty-format: Unknown option \"${key}\".`);\n }\n });\n\n if (options.min && options.indent !== undefined && options.indent !== 0) {\n throw new Error(\n 'pretty-format: Options \"min\" and \"indent\" cannot be used together.'\n );\n }\n\n if (options.theme !== undefined) {\n if (options.theme === null) {\n throw new Error('pretty-format: Option \"theme\" must not be null.');\n }\n\n if (typeof options.theme !== 'object') {\n throw new Error(\n `pretty-format: Option \"theme\" must be of type \"object\" but instead received \"${typeof options.theme}\".`\n );\n }\n }\n}\n\nconst getColorsHighlight = options =>\n DEFAULT_THEME_KEYS.reduce((colors, key) => {\n const value =\n options.theme && options.theme[key] !== undefined\n ? options.theme[key]\n : DEFAULT_THEME[key];\n const color = value && _ansiStyles.default[value];\n\n if (\n color &&\n typeof color.close === 'string' &&\n typeof color.open === 'string'\n ) {\n colors[key] = color;\n } else {\n throw new Error(\n `pretty-format: Option \"theme\" has a key \"${key}\" whose value \"${value}\" is undefined in ansi-styles.`\n );\n }\n\n return colors;\n }, Object.create(null));\n\nconst getColorsEmpty = () =>\n DEFAULT_THEME_KEYS.reduce((colors, key) => {\n colors[key] = {\n close: '',\n open: ''\n };\n return colors;\n }, Object.create(null));\n\nconst getPrintFunctionName = options =>\n options && options.printFunctionName !== undefined\n ? options.printFunctionName\n : DEFAULT_OPTIONS.printFunctionName;\n\nconst getEscapeRegex = options =>\n options && options.escapeRegex !== undefined\n ? options.escapeRegex\n : DEFAULT_OPTIONS.escapeRegex;\n\nconst getEscapeString = options =>\n options && options.escapeString !== undefined\n ? options.escapeString\n : DEFAULT_OPTIONS.escapeString;\n\nconst getConfig = options => {\n var _options$printBasicPr;\n\n return {\n callToJSON:\n options && options.callToJSON !== undefined\n ? options.callToJSON\n : DEFAULT_OPTIONS.callToJSON,\n colors:\n options && options.highlight\n ? getColorsHighlight(options)\n : getColorsEmpty(),\n compareKeys:\n options && typeof options.compareKeys === 'function'\n ? options.compareKeys\n : DEFAULT_OPTIONS.compareKeys,\n escapeRegex: getEscapeRegex(options),\n escapeString: getEscapeString(options),\n indent:\n options && options.min\n ? ''\n : createIndent(\n options && options.indent !== undefined\n ? options.indent\n : DEFAULT_OPTIONS.indent\n ),\n maxDepth:\n options && options.maxDepth !== undefined\n ? options.maxDepth\n : DEFAULT_OPTIONS.maxDepth,\n min:\n options && options.min !== undefined ? options.min : DEFAULT_OPTIONS.min,\n plugins:\n options && options.plugins !== undefined\n ? options.plugins\n : DEFAULT_OPTIONS.plugins,\n printBasicPrototype:\n (_options$printBasicPr =\n options === null || options === void 0\n ? void 0\n : options.printBasicPrototype) !== null &&\n _options$printBasicPr !== void 0\n ? _options$printBasicPr\n : true,\n printFunctionName: getPrintFunctionName(options),\n spacingInner: options && options.min ? ' ' : '\\n',\n spacingOuter: options && options.min ? '' : '\\n'\n };\n};\n\nfunction createIndent(indent) {\n return new Array(indent + 1).join(' ');\n}\n/**\n * Returns a presentation string of your `val` object\n * @param val any potential JavaScript object\n * @param options Custom settings\n */\n\nfunction format(val, options) {\n if (options) {\n validateOptions(options);\n\n if (options.plugins) {\n const plugin = findPlugin(options.plugins, val);\n\n if (plugin !== null) {\n return printPlugin(plugin, val, getConfig(options), '', 0, []);\n }\n }\n }\n\n const basicResult = printBasicValue(\n val,\n getPrintFunctionName(options),\n getEscapeRegex(options),\n getEscapeString(options)\n );\n\n if (basicResult !== null) {\n return basicResult;\n }\n\n return printComplexValue(val, getConfig(options), '', 0, []);\n}\n\nconst plugins = {\n AsymmetricMatcher: _AsymmetricMatcher.default,\n ConvertAnsi: _ConvertAnsi.default,\n DOMCollection: _DOMCollection.default,\n DOMElement: _DOMElement.default,\n Immutable: _Immutable.default,\n ReactElement: _ReactElement.default,\n ReactTestComponent: _ReactTestComponent.default\n};\nexports.plugins = plugins;\nvar _default = format;\nexports.default = _default;\n","/**\n * @source {https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from#Polyfill}\n * but without thisArg (too hard to type, no need to `this`)\n */\nvar toStr = Object.prototype.toString;\nfunction isCallable(fn) {\n return typeof fn === \"function\" || toStr.call(fn) === \"[object Function]\";\n}\nfunction toInteger(value) {\n var number = Number(value);\n if (isNaN(number)) {\n return 0;\n }\n if (number === 0 || !isFinite(number)) {\n return number;\n }\n return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number));\n}\nvar maxSafeInteger = Math.pow(2, 53) - 1;\nfunction toLength(value) {\n var len = toInteger(value);\n return Math.min(Math.max(len, 0), maxSafeInteger);\n}\n/**\n * Creates an array from an iterable object.\n * @param iterable An iterable object to convert to an array.\n */\n\n/**\n * Creates an array from an iterable object.\n * @param iterable An iterable object to convert to an array.\n * @param mapfn A mapping function to call on every element of the array.\n * @param thisArg Value of 'this' used to invoke the mapfn.\n */\nexport default function arrayFrom(arrayLike, mapFn) {\n // 1. Let C be the this value.\n // edit(@eps1lon): we're not calling it as Array.from\n var C = Array;\n\n // 2. Let items be ToObject(arrayLike).\n var items = Object(arrayLike);\n\n // 3. ReturnIfAbrupt(items).\n if (arrayLike == null) {\n throw new TypeError(\"Array.from requires an array-like object - not null or undefined\");\n }\n\n // 4. If mapfn is undefined, then let mapping be false.\n // const mapFn = arguments.length > 1 ? arguments[1] : void undefined;\n\n if (typeof mapFn !== \"undefined\") {\n // 5. else\n // 5. a If IsCallable(mapfn) is false, throw a TypeError exception.\n if (!isCallable(mapFn)) {\n throw new TypeError(\"Array.from: when provided, the second argument must be a function\");\n }\n }\n\n // 10. Let lenValue be Get(items, \"length\").\n // 11. Let len be ToLength(lenValue).\n var len = toLength(items.length);\n\n // 13. If IsConstructor(C) is true, then\n // 13. a. Let A be the result of calling the [[Construct]] internal method\n // of C with an argument list containing the single item len.\n // 14. a. Else, Let A be ArrayCreate(len).\n var A = isCallable(C) ? Object(new C(len)) : new Array(len);\n\n // 16. Let k be 0.\n var k = 0;\n // 17. Repeat, while k < len… (also steps a - h)\n var kValue;\n while (k < len) {\n kValue = items[k];\n if (mapFn) {\n A[k] = mapFn(kValue, k);\n } else {\n A[k] = kValue;\n }\n k += 1;\n }\n // 18. Let putStatus be Put(A, \"length\", len, true).\n A.length = len;\n // 20. Return A.\n return A;\n}\n//# sourceMappingURL=array.from.mjs.map","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\n// for environments without Set we fallback to arrays with unique members\nvar SetLike = /*#__PURE__*/function () {\n function SetLike() {\n var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n _classCallCheck(this, SetLike);\n _defineProperty(this, \"items\", void 0);\n this.items = items;\n }\n _createClass(SetLike, [{\n key: \"add\",\n value: function add(value) {\n if (this.has(value) === false) {\n this.items.push(value);\n }\n return this;\n }\n }, {\n key: \"clear\",\n value: function clear() {\n this.items = [];\n }\n }, {\n key: \"delete\",\n value: function _delete(value) {\n var previousLength = this.items.length;\n this.items = this.items.filter(function (item) {\n return item !== value;\n });\n return previousLength !== this.items.length;\n }\n }, {\n key: \"forEach\",\n value: function forEach(callbackfn) {\n var _this = this;\n this.items.forEach(function (item) {\n callbackfn(item, item, _this);\n });\n }\n }, {\n key: \"has\",\n value: function has(value) {\n return this.items.indexOf(value) !== -1;\n }\n }, {\n key: \"size\",\n get: function get() {\n return this.items.length;\n }\n }]);\n return SetLike;\n}();\nexport default typeof Set === \"undefined\" ? Set : SetLike;\n//# sourceMappingURL=SetLike.mjs.map","// https://w3c.github.io/html-aria/#document-conformance-requirements-for-use-of-aria-attributes-in-html\n\n/**\n * Safe Element.localName for all supported environments\n * @param element\n */\nexport function getLocalName(element) {\n var _element$localName;\n return (// eslint-disable-next-line no-restricted-properties -- actual guard for environments without localName\n (_element$localName = element.localName) !== null && _element$localName !== void 0 ? _element$localName :\n // eslint-disable-next-line no-restricted-properties -- required for the fallback\n element.tagName.toLowerCase()\n );\n}\nvar localNameToRoleMappings = {\n article: \"article\",\n aside: \"complementary\",\n button: \"button\",\n datalist: \"listbox\",\n dd: \"definition\",\n details: \"group\",\n dialog: \"dialog\",\n dt: \"term\",\n fieldset: \"group\",\n figure: \"figure\",\n // WARNING: Only with an accessible name\n form: \"form\",\n footer: \"contentinfo\",\n h1: \"heading\",\n h2: \"heading\",\n h3: \"heading\",\n h4: \"heading\",\n h5: \"heading\",\n h6: \"heading\",\n header: \"banner\",\n hr: \"separator\",\n html: \"document\",\n legend: \"legend\",\n li: \"listitem\",\n math: \"math\",\n main: \"main\",\n menu: \"list\",\n nav: \"navigation\",\n ol: \"list\",\n optgroup: \"group\",\n // WARNING: Only in certain context\n option: \"option\",\n output: \"status\",\n progress: \"progressbar\",\n // WARNING: Only with an accessible name\n section: \"region\",\n summary: \"button\",\n table: \"table\",\n tbody: \"rowgroup\",\n textarea: \"textbox\",\n tfoot: \"rowgroup\",\n // WARNING: Only in certain context\n td: \"cell\",\n th: \"columnheader\",\n thead: \"rowgroup\",\n tr: \"row\",\n ul: \"list\"\n};\nvar prohibitedAttributes = {\n caption: new Set([\"aria-label\", \"aria-labelledby\"]),\n code: new Set([\"aria-label\", \"aria-labelledby\"]),\n deletion: new Set([\"aria-label\", \"aria-labelledby\"]),\n emphasis: new Set([\"aria-label\", \"aria-labelledby\"]),\n generic: new Set([\"aria-label\", \"aria-labelledby\", \"aria-roledescription\"]),\n insertion: new Set([\"aria-label\", \"aria-labelledby\"]),\n paragraph: new Set([\"aria-label\", \"aria-labelledby\"]),\n presentation: new Set([\"aria-label\", \"aria-labelledby\"]),\n strong: new Set([\"aria-label\", \"aria-labelledby\"]),\n subscript: new Set([\"aria-label\", \"aria-labelledby\"]),\n superscript: new Set([\"aria-label\", \"aria-labelledby\"])\n};\n\n/**\n *\n * @param element\n * @param role The role used for this element. This is specified to control whether you want to use the implicit or explicit role.\n */\nfunction hasGlobalAriaAttributes(element, role) {\n // https://rawgit.com/w3c/aria/stable/#global_states\n // commented attributes are deprecated\n return [\"aria-atomic\", \"aria-busy\", \"aria-controls\", \"aria-current\", \"aria-describedby\", \"aria-details\",\n // \"disabled\",\n \"aria-dropeffect\",\n // \"errormessage\",\n \"aria-flowto\", \"aria-grabbed\",\n // \"haspopup\",\n \"aria-hidden\",\n // \"invalid\",\n \"aria-keyshortcuts\", \"aria-label\", \"aria-labelledby\", \"aria-live\", \"aria-owns\", \"aria-relevant\", \"aria-roledescription\"].some(function (attributeName) {\n var _prohibitedAttributes;\n return element.hasAttribute(attributeName) && !((_prohibitedAttributes = prohibitedAttributes[role]) !== null && _prohibitedAttributes !== void 0 && _prohibitedAttributes.has(attributeName));\n });\n}\nfunction ignorePresentationalRole(element, implicitRole) {\n // https://rawgit.com/w3c/aria/stable/#conflict_resolution_presentation_none\n return hasGlobalAriaAttributes(element, implicitRole);\n}\nexport default function getRole(element) {\n var explicitRole = getExplicitRole(element);\n if (explicitRole === null || explicitRole === \"presentation\") {\n var implicitRole = getImplicitRole(element);\n if (explicitRole !== \"presentation\" || ignorePresentationalRole(element, implicitRole || \"\")) {\n return implicitRole;\n }\n }\n return explicitRole;\n}\nfunction getImplicitRole(element) {\n var mappedByTag = localNameToRoleMappings[getLocalName(element)];\n if (mappedByTag !== undefined) {\n return mappedByTag;\n }\n switch (getLocalName(element)) {\n case \"a\":\n case \"area\":\n case \"link\":\n if (element.hasAttribute(\"href\")) {\n return \"link\";\n }\n break;\n case \"img\":\n if (element.getAttribute(\"alt\") === \"\" && !ignorePresentationalRole(element, \"img\")) {\n return \"presentation\";\n }\n return \"img\";\n case \"input\":\n {\n var _ref = element,\n type = _ref.type;\n switch (type) {\n case \"button\":\n case \"image\":\n case \"reset\":\n case \"submit\":\n return \"button\";\n case \"checkbox\":\n case \"radio\":\n return type;\n case \"range\":\n return \"slider\";\n case \"email\":\n case \"tel\":\n case \"text\":\n case \"url\":\n if (element.hasAttribute(\"list\")) {\n return \"combobox\";\n }\n return \"textbox\";\n case \"search\":\n if (element.hasAttribute(\"list\")) {\n return \"combobox\";\n }\n return \"searchbox\";\n case \"number\":\n return \"spinbutton\";\n default:\n return null;\n }\n }\n case \"select\":\n if (element.hasAttribute(\"multiple\") || element.size > 1) {\n return \"listbox\";\n }\n return \"combobox\";\n }\n return null;\n}\nfunction getExplicitRole(element) {\n var role = element.getAttribute(\"role\");\n if (role !== null) {\n var explicitRole = role.trim().split(\" \")[0];\n // String.prototype.split(sep, limit) will always return an array with at least one member\n // as long as limit is either undefined or > 0\n if (explicitRole.length > 0) {\n return explicitRole;\n }\n }\n return null;\n}\n//# sourceMappingURL=getRole.mjs.map","export { getLocalName } from \"./getRole.mjs\";\nimport getRole, { getLocalName } from \"./getRole.mjs\";\nexport function isElement(node) {\n return node !== null && node.nodeType === node.ELEMENT_NODE;\n}\nexport function isHTMLTableCaptionElement(node) {\n return isElement(node) && getLocalName(node) === \"caption\";\n}\nexport function isHTMLInputElement(node) {\n return isElement(node) && getLocalName(node) === \"input\";\n}\nexport function isHTMLOptGroupElement(node) {\n return isElement(node) && getLocalName(node) === \"optgroup\";\n}\nexport function isHTMLSelectElement(node) {\n return isElement(node) && getLocalName(node) === \"select\";\n}\nexport function isHTMLTableElement(node) {\n return isElement(node) && getLocalName(node) === \"table\";\n}\nexport function isHTMLTextAreaElement(node) {\n return isElement(node) && getLocalName(node) === \"textarea\";\n}\nexport function safeWindow(node) {\n var _ref = node.ownerDocument === null ? node : node.ownerDocument,\n defaultView = _ref.defaultView;\n if (defaultView === null) {\n throw new TypeError(\"no window available\");\n }\n return defaultView;\n}\nexport function isHTMLFieldSetElement(node) {\n return isElement(node) && getLocalName(node) === \"fieldset\";\n}\nexport function isHTMLLegendElement(node) {\n return isElement(node) && getLocalName(node) === \"legend\";\n}\nexport function isHTMLSlotElement(node) {\n return isElement(node) && getLocalName(node) === \"slot\";\n}\nexport function isSVGElement(node) {\n return isElement(node) && node.ownerSVGElement !== undefined;\n}\nexport function isSVGSVGElement(node) {\n return isElement(node) && getLocalName(node) === \"svg\";\n}\nexport function isSVGTitleElement(node) {\n return isSVGElement(node) && getLocalName(node) === \"title\";\n}\n\n/**\n *\n * @param {Node} node -\n * @param {string} attributeName -\n * @returns {Element[]} -\n */\nexport function queryIdRefs(node, attributeName) {\n if (isElement(node) && node.hasAttribute(attributeName)) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- safe due to hasAttribute check\n var ids = node.getAttribute(attributeName).split(\" \");\n\n // Browsers that don't support shadow DOM won't have getRootNode\n var root = node.getRootNode ? node.getRootNode() : node.ownerDocument;\n return ids.map(function (id) {\n return root.getElementById(id);\n }).filter(function (element) {\n return element !== null;\n }\n // TODO: why does this not narrow?\n );\n }\n\n return [];\n}\nexport function hasAnyConcreteRoles(node, roles) {\n if (isElement(node)) {\n return roles.indexOf(getRole(node)) !== -1;\n }\n return false;\n}\n//# sourceMappingURL=util.mjs.map","/**\n * implements https://w3c.github.io/accname/\n */\nimport ArrayFrom from \"./polyfills/array.from.mjs\";\nimport SetLike from \"./polyfills/SetLike.mjs\";\nimport { hasAnyConcreteRoles, isElement, isHTMLTableCaptionElement, isHTMLInputElement, isHTMLSelectElement, isHTMLTextAreaElement, safeWindow, isHTMLFieldSetElement, isHTMLLegendElement, isHTMLOptGroupElement, isHTMLTableElement, isHTMLSlotElement, isSVGSVGElement, isSVGTitleElement, queryIdRefs, getLocalName } from \"./util.mjs\";\n\n/**\n * A string of characters where all carriage returns, newlines, tabs, and form-feeds are replaced with a single space, and multiple spaces are reduced to a single space. The string contains only character data; it does not contain any markup.\n */\n\n/**\n *\n * @param {string} string -\n * @returns {FlatString} -\n */\nfunction asFlatString(s) {\n return s.trim().replace(/\\s\\s+/g, \" \");\n}\n\n/**\n *\n * @param node -\n * @param options - These are not optional to prevent accidentally calling it without options in `computeAccessibleName`\n * @returns {boolean} -\n */\nfunction isHidden(node, getComputedStyleImplementation) {\n if (!isElement(node)) {\n return false;\n }\n if (node.hasAttribute(\"hidden\") || node.getAttribute(\"aria-hidden\") === \"true\") {\n return true;\n }\n var style = getComputedStyleImplementation(node);\n return style.getPropertyValue(\"display\") === \"none\" || style.getPropertyValue(\"visibility\") === \"hidden\";\n}\n\n/**\n * @param {Node} node -\n * @returns {boolean} - As defined in step 2E of https://w3c.github.io/accname/#mapping_additional_nd_te\n */\nfunction isControl(node) {\n return hasAnyConcreteRoles(node, [\"button\", \"combobox\", \"listbox\", \"textbox\"]) || hasAbstractRole(node, \"range\");\n}\nfunction hasAbstractRole(node, role) {\n if (!isElement(node)) {\n return false;\n }\n switch (role) {\n case \"range\":\n return hasAnyConcreteRoles(node, [\"meter\", \"progressbar\", \"scrollbar\", \"slider\", \"spinbutton\"]);\n default:\n throw new TypeError(\"No knowledge about abstract role '\".concat(role, \"'. This is likely a bug :(\"));\n }\n}\n\n/**\n * element.querySelectorAll but also considers owned tree\n * @param element\n * @param selectors\n */\nfunction querySelectorAllSubtree(element, selectors) {\n var elements = ArrayFrom(element.querySelectorAll(selectors));\n queryIdRefs(element, \"aria-owns\").forEach(function (root) {\n // babel transpiles this assuming an iterator\n elements.push.apply(elements, ArrayFrom(root.querySelectorAll(selectors)));\n });\n return elements;\n}\nfunction querySelectedOptions(listbox) {\n if (isHTMLSelectElement(listbox)) {\n // IE11 polyfill\n return listbox.selectedOptions || querySelectorAllSubtree(listbox, \"[selected]\");\n }\n return querySelectorAllSubtree(listbox, '[aria-selected=\"true\"]');\n}\nfunction isMarkedPresentational(node) {\n return hasAnyConcreteRoles(node, [\"none\", \"presentation\"]);\n}\n\n/**\n * Elements specifically listed in html-aam\n *\n * We don't need this for `label` or `legend` elements.\n * Their implicit roles already allow \"naming from content\".\n *\n * sources:\n *\n * - https://w3c.github.io/html-aam/#table-element\n */\nfunction isNativeHostLanguageTextAlternativeElement(node) {\n return isHTMLTableCaptionElement(node);\n}\n\n/**\n * https://w3c.github.io/aria/#namefromcontent\n */\nfunction allowsNameFromContent(node) {\n return hasAnyConcreteRoles(node, [\"button\", \"cell\", \"checkbox\", \"columnheader\", \"gridcell\", \"heading\", \"label\", \"legend\", \"link\", \"menuitem\", \"menuitemcheckbox\", \"menuitemradio\", \"option\", \"radio\", \"row\", \"rowheader\", \"switch\", \"tab\", \"tooltip\", \"treeitem\"]);\n}\n\n/**\n * TODO https://github.com/eps1lon/dom-accessibility-api/issues/100\n */\nfunction isDescendantOfNativeHostLanguageTextAlternativeElement(\n// eslint-disable-next-line @typescript-eslint/no-unused-vars -- not implemented yet\nnode) {\n return false;\n}\nfunction getValueOfTextbox(element) {\n if (isHTMLInputElement(element) || isHTMLTextAreaElement(element)) {\n return element.value;\n }\n // https://github.com/eps1lon/dom-accessibility-api/issues/4\n return element.textContent || \"\";\n}\nfunction getTextualContent(declaration) {\n var content = declaration.getPropertyValue(\"content\");\n if (/^[\"'].*[\"']$/.test(content)) {\n return content.slice(1, -1);\n }\n return \"\";\n}\n\n/**\n * https://html.spec.whatwg.org/multipage/forms.html#category-label\n * TODO: form-associated custom elements\n * @param element\n */\nfunction isLabelableElement(element) {\n var localName = getLocalName(element);\n return localName === \"button\" || localName === \"input\" && element.getAttribute(\"type\") !== \"hidden\" || localName === \"meter\" || localName === \"output\" || localName === \"progress\" || localName === \"select\" || localName === \"textarea\";\n}\n\n/**\n * > [...], then the first such descendant in tree order is the label element's labeled control.\n * -- https://html.spec.whatwg.org/multipage/forms.html#labeled-control\n * @param element\n */\nfunction findLabelableElement(element) {\n if (isLabelableElement(element)) {\n return element;\n }\n var labelableElement = null;\n element.childNodes.forEach(function (childNode) {\n if (labelableElement === null && isElement(childNode)) {\n var descendantLabelableElement = findLabelableElement(childNode);\n if (descendantLabelableElement !== null) {\n labelableElement = descendantLabelableElement;\n }\n }\n });\n return labelableElement;\n}\n\n/**\n * Polyfill of HTMLLabelElement.control\n * https://html.spec.whatwg.org/multipage/forms.html#labeled-control\n * @param label\n */\nfunction getControlOfLabel(label) {\n if (label.control !== undefined) {\n return label.control;\n }\n var htmlFor = label.getAttribute(\"for\");\n if (htmlFor !== null) {\n return label.ownerDocument.getElementById(htmlFor);\n }\n return findLabelableElement(label);\n}\n\n/**\n * Polyfill of HTMLInputElement.labels\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/labels\n * @param element\n */\nfunction getLabels(element) {\n var labelsProperty = element.labels;\n if (labelsProperty === null) {\n return labelsProperty;\n }\n if (labelsProperty !== undefined) {\n return ArrayFrom(labelsProperty);\n }\n\n // polyfill\n if (!isLabelableElement(element)) {\n return null;\n }\n var document = element.ownerDocument;\n return ArrayFrom(document.querySelectorAll(\"label\")).filter(function (label) {\n return getControlOfLabel(label) === element;\n });\n}\n\n/**\n * Gets the contents of a slot used for computing the accname\n * @param slot\n */\nfunction getSlotContents(slot) {\n // Computing the accessible name for elements containing slots is not\n // currently defined in the spec. This implementation reflects the\n // behavior of NVDA 2020.2/Firefox 81 and iOS VoiceOver/Safari 13.6.\n var assignedNodes = slot.assignedNodes();\n if (assignedNodes.length === 0) {\n // if no nodes are assigned to the slot, it displays the default content\n return ArrayFrom(slot.childNodes);\n }\n return assignedNodes;\n}\n\n/**\n * implements https://w3c.github.io/accname/#mapping_additional_nd_te\n * @param root\n * @param options\n * @returns\n */\nexport function computeTextAlternative(root) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var consultedNodes = new SetLike();\n var window = safeWindow(root);\n var _options$compute = options.compute,\n compute = _options$compute === void 0 ? \"name\" : _options$compute,\n _options$computedStyl = options.computedStyleSupportsPseudoElements,\n computedStyleSupportsPseudoElements = _options$computedStyl === void 0 ? options.getComputedStyle !== undefined : _options$computedStyl,\n _options$getComputedS = options.getComputedStyle,\n getComputedStyle = _options$getComputedS === void 0 ? window.getComputedStyle.bind(window) : _options$getComputedS,\n _options$hidden = options.hidden,\n hidden = _options$hidden === void 0 ? false : _options$hidden;\n\n // 2F.i\n function computeMiscTextAlternative(node, context) {\n var accumulatedText = \"\";\n if (isElement(node) && computedStyleSupportsPseudoElements) {\n var pseudoBefore = getComputedStyle(node, \"::before\");\n var beforeContent = getTextualContent(pseudoBefore);\n accumulatedText = \"\".concat(beforeContent, \" \").concat(accumulatedText);\n }\n\n // FIXME: Including aria-owns is not defined in the spec\n // But it is required in the web-platform-test\n var childNodes = isHTMLSlotElement(node) ? getSlotContents(node) : ArrayFrom(node.childNodes).concat(queryIdRefs(node, \"aria-owns\"));\n childNodes.forEach(function (child) {\n var result = computeTextAlternative(child, {\n isEmbeddedInLabel: context.isEmbeddedInLabel,\n isReferenced: false,\n recursion: true\n });\n // TODO: Unclear why display affects delimiter\n // see https://github.com/w3c/accname/issues/3\n var display = isElement(child) ? getComputedStyle(child).getPropertyValue(\"display\") : \"inline\";\n var separator = display !== \"inline\" ? \" \" : \"\";\n // trailing separator for wpt tests\n accumulatedText += \"\".concat(separator).concat(result).concat(separator);\n });\n if (isElement(node) && computedStyleSupportsPseudoElements) {\n var pseudoAfter = getComputedStyle(node, \"::after\");\n var afterContent = getTextualContent(pseudoAfter);\n accumulatedText = \"\".concat(accumulatedText, \" \").concat(afterContent);\n }\n return accumulatedText.trim();\n }\n\n /**\n *\n * @param element\n * @param attributeName\n * @returns A string non-empty string or `null`\n */\n function useAttribute(element, attributeName) {\n var attribute = element.getAttributeNode(attributeName);\n if (attribute !== null && !consultedNodes.has(attribute) && attribute.value.trim() !== \"\") {\n consultedNodes.add(attribute);\n return attribute.value;\n }\n return null;\n }\n function computeTooltipAttributeValue(node) {\n if (!isElement(node)) {\n return null;\n }\n return useAttribute(node, \"title\");\n }\n function computeElementTextAlternative(node) {\n if (!isElement(node)) {\n return null;\n }\n\n // https://w3c.github.io/html-aam/#fieldset-and-legend-elements\n if (isHTMLFieldSetElement(node)) {\n consultedNodes.add(node);\n var children = ArrayFrom(node.childNodes);\n for (var i = 0; i < children.length; i += 1) {\n var child = children[i];\n if (isHTMLLegendElement(child)) {\n return computeTextAlternative(child, {\n isEmbeddedInLabel: false,\n isReferenced: false,\n recursion: false\n });\n }\n }\n } else if (isHTMLTableElement(node)) {\n // https://w3c.github.io/html-aam/#table-element\n consultedNodes.add(node);\n var _children = ArrayFrom(node.childNodes);\n for (var _i = 0; _i < _children.length; _i += 1) {\n var _child = _children[_i];\n if (isHTMLTableCaptionElement(_child)) {\n return computeTextAlternative(_child, {\n isEmbeddedInLabel: false,\n isReferenced: false,\n recursion: false\n });\n }\n }\n } else if (isSVGSVGElement(node)) {\n // https://www.w3.org/TR/svg-aam-1.0/\n consultedNodes.add(node);\n var _children2 = ArrayFrom(node.childNodes);\n for (var _i2 = 0; _i2 < _children2.length; _i2 += 1) {\n var _child2 = _children2[_i2];\n if (isSVGTitleElement(_child2)) {\n return _child2.textContent;\n }\n }\n return null;\n } else if (getLocalName(node) === \"img\" || getLocalName(node) === \"area\") {\n // https://w3c.github.io/html-aam/#area-element\n // https://w3c.github.io/html-aam/#img-element\n var nameFromAlt = useAttribute(node, \"alt\");\n if (nameFromAlt !== null) {\n return nameFromAlt;\n }\n } else if (isHTMLOptGroupElement(node)) {\n var nameFromLabel = useAttribute(node, \"label\");\n if (nameFromLabel !== null) {\n return nameFromLabel;\n }\n }\n if (isHTMLInputElement(node) && (node.type === \"button\" || node.type === \"submit\" || node.type === \"reset\")) {\n // https://w3c.github.io/html-aam/#input-type-text-input-type-password-input-type-search-input-type-tel-input-type-email-input-type-url-and-textarea-element-accessible-description-computation\n var nameFromValue = useAttribute(node, \"value\");\n if (nameFromValue !== null) {\n return nameFromValue;\n }\n\n // TODO: l10n\n if (node.type === \"submit\") {\n return \"Submit\";\n }\n // TODO: l10n\n if (node.type === \"reset\") {\n return \"Reset\";\n }\n }\n var labels = getLabels(node);\n if (labels !== null && labels.length !== 0) {\n consultedNodes.add(node);\n return ArrayFrom(labels).map(function (element) {\n return computeTextAlternative(element, {\n isEmbeddedInLabel: true,\n isReferenced: false,\n recursion: true\n });\n }).filter(function (label) {\n return label.length > 0;\n }).join(\" \");\n }\n\n // https://w3c.github.io/html-aam/#input-type-image-accessible-name-computation\n // TODO: wpt test consider label elements but html-aam does not mention them\n // We follow existing implementations over spec\n if (isHTMLInputElement(node) && node.type === \"image\") {\n var _nameFromAlt = useAttribute(node, \"alt\");\n if (_nameFromAlt !== null) {\n return _nameFromAlt;\n }\n var nameFromTitle = useAttribute(node, \"title\");\n if (nameFromTitle !== null) {\n return nameFromTitle;\n }\n\n // TODO: l10n\n return \"Submit Query\";\n }\n if (hasAnyConcreteRoles(node, [\"button\"])) {\n // https://www.w3.org/TR/html-aam-1.0/#button-element\n var nameFromSubTree = computeMiscTextAlternative(node, {\n isEmbeddedInLabel: false,\n isReferenced: false\n });\n if (nameFromSubTree !== \"\") {\n return nameFromSubTree;\n }\n }\n return null;\n }\n function computeTextAlternative(current, context) {\n if (consultedNodes.has(current)) {\n return \"\";\n }\n\n // 2A\n if (!hidden && isHidden(current, getComputedStyle) && !context.isReferenced) {\n consultedNodes.add(current);\n return \"\";\n }\n\n // 2B\n var labelAttributeNode = isElement(current) ? current.getAttributeNode(\"aria-labelledby\") : null;\n // TODO: Do we generally need to block query IdRefs of attributes we have already consulted?\n var labelElements = labelAttributeNode !== null && !consultedNodes.has(labelAttributeNode) ? queryIdRefs(current, \"aria-labelledby\") : [];\n if (compute === \"name\" && !context.isReferenced && labelElements.length > 0) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- Can't be null here otherwise labelElements would be empty\n consultedNodes.add(labelAttributeNode);\n return labelElements.map(function (element) {\n // TODO: Chrome will consider repeated values i.e. use a node multiple times while we'll bail out in computeTextAlternative.\n return computeTextAlternative(element, {\n isEmbeddedInLabel: context.isEmbeddedInLabel,\n isReferenced: true,\n // this isn't recursion as specified, otherwise we would skip\n // `aria-label` in\n // <input id=\"myself\" aria-label=\"foo\" aria-labelledby=\"myself\"\n recursion: false\n });\n }).join(\" \");\n }\n\n // 2C\n // Changed from the spec in anticipation of https://github.com/w3c/accname/issues/64\n // spec says we should only consider skipping if we have a non-empty label\n var skipToStep2E = context.recursion && isControl(current) && compute === \"name\";\n if (!skipToStep2E) {\n var ariaLabel = (isElement(current) && current.getAttribute(\"aria-label\") || \"\").trim();\n if (ariaLabel !== \"\" && compute === \"name\") {\n consultedNodes.add(current);\n return ariaLabel;\n }\n\n // 2D\n if (!isMarkedPresentational(current)) {\n var elementTextAlternative = computeElementTextAlternative(current);\n if (elementTextAlternative !== null) {\n consultedNodes.add(current);\n return elementTextAlternative;\n }\n }\n }\n\n // special casing, cheating to make tests pass\n // https://github.com/w3c/accname/issues/67\n if (hasAnyConcreteRoles(current, [\"menu\"])) {\n consultedNodes.add(current);\n return \"\";\n }\n\n // 2E\n if (skipToStep2E || context.isEmbeddedInLabel || context.isReferenced) {\n if (hasAnyConcreteRoles(current, [\"combobox\", \"listbox\"])) {\n consultedNodes.add(current);\n var selectedOptions = querySelectedOptions(current);\n if (selectedOptions.length === 0) {\n // defined per test `name_heading_combobox`\n return isHTMLInputElement(current) ? current.value : \"\";\n }\n return ArrayFrom(selectedOptions).map(function (selectedOption) {\n return computeTextAlternative(selectedOption, {\n isEmbeddedInLabel: context.isEmbeddedInLabel,\n isReferenced: false,\n recursion: true\n });\n }).join(\" \");\n }\n if (hasAbstractRole(current, \"range\")) {\n consultedNodes.add(current);\n if (current.hasAttribute(\"aria-valuetext\")) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- safe due to hasAttribute guard\n return current.getAttribute(\"aria-valuetext\");\n }\n if (current.hasAttribute(\"aria-valuenow\")) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- safe due to hasAttribute guard\n return current.getAttribute(\"aria-valuenow\");\n }\n // Otherwise, use the value as specified by a host language attribute.\n return current.getAttribute(\"value\") || \"\";\n }\n if (hasAnyConcreteRoles(current, [\"textbox\"])) {\n consultedNodes.add(current);\n return getValueOfTextbox(current);\n }\n }\n\n // 2F: https://w3c.github.io/accname/#step2F\n if (allowsNameFromContent(current) || isElement(current) && context.isReferenced || isNativeHostLanguageTextAlternativeElement(current) || isDescendantOfNativeHostLanguageTextAlternativeElement(current)) {\n var accumulatedText2F = computeMiscTextAlternative(current, {\n isEmbeddedInLabel: context.isEmbeddedInLabel,\n isReferenced: false\n });\n if (accumulatedText2F !== \"\") {\n consultedNodes.add(current);\n return accumulatedText2F;\n }\n }\n if (current.nodeType === current.TEXT_NODE) {\n consultedNodes.add(current);\n return current.textContent || \"\";\n }\n if (context.recursion) {\n consultedNodes.add(current);\n return computeMiscTextAlternative(current, {\n isEmbeddedInLabel: context.isEmbeddedInLabel,\n isReferenced: false\n });\n }\n var tooltipAttributeValue = computeTooltipAttributeValue(current);\n if (tooltipAttributeValue !== null) {\n consultedNodes.add(current);\n return tooltipAttributeValue;\n }\n\n // TODO should this be reachable?\n consultedNodes.add(current);\n return \"\";\n }\n return asFlatString(computeTextAlternative(root, {\n isEmbeddedInLabel: false,\n // by spec computeAccessibleDescription starts with the referenced elements as roots\n isReferenced: compute === \"description\",\n recursion: false\n }));\n}\n//# sourceMappingURL=accessible-name-and-description.mjs.map","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { computeTextAlternative } from \"./accessible-name-and-description.mjs\";\nimport { queryIdRefs } from \"./util.mjs\";\n\n/**\n * @param root\n * @param options\n * @returns\n */\nexport function computeAccessibleDescription(root) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var description = queryIdRefs(root, \"aria-describedby\").map(function (element) {\n return computeTextAlternative(element, _objectSpread(_objectSpread({}, options), {}, {\n compute: \"description\"\n }));\n }).join(\" \");\n\n // TODO: Technically we need to make sure that node wasn't used for the accessible name\n // This causes `description_1.0_combobox-focusable-manual` to fail\n //\n // https://www.w3.org/TR/html-aam-1.0/#accessible-name-and-description-computation\n // says for so many elements to use the `title` that we assume all elements are considered\n if (description === \"\") {\n var title = root.getAttribute(\"title\");\n description = title === null ? \"\" : title;\n }\n return description;\n}\n//# sourceMappingURL=accessible-description.mjs.map","import { computeTextAlternative } from \"./accessible-name-and-description.mjs\";\nimport { hasAnyConcreteRoles } from \"./util.mjs\";\n\n/**\n * https://w3c.github.io/aria/#namefromprohibited\n */\nfunction prohibitsNaming(node) {\n return hasAnyConcreteRoles(node, [\"caption\", \"code\", \"deletion\", \"emphasis\", \"generic\", \"insertion\", \"paragraph\", \"presentation\", \"strong\", \"subscript\", \"superscript\"]);\n}\n\n/**\n * implements https://w3c.github.io/accname/#mapping_additional_nd_name\n * @param root\n * @param options\n * @returns\n */\nexport function computeAccessibleName(root) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n if (prohibitsNaming(root)) {\n return \"\";\n }\n return computeTextAlternative(root, options);\n}\n//# sourceMappingURL=accessible-name.mjs.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\n// eslint-disable-next-line no-unused-vars\nfunction iteratorProxy() {\n var values = this;\n var index = 0;\n var iter = {\n '@@iterator': function iterator() {\n return iter;\n },\n next: function next() {\n if (index < values.length) {\n var value = values[index];\n index = index + 1;\n return {\n done: false,\n value: value\n };\n } else {\n return {\n done: true\n };\n }\n }\n };\n return iter;\n}\nvar _default = iteratorProxy;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = iterationDecorator;\nvar _iteratorProxy = _interopRequireDefault(require(\"./iteratorProxy\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction iterationDecorator(collection, entries) {\n if (typeof Symbol === 'function' && _typeof(Symbol.iterator) === 'symbol') {\n Object.defineProperty(collection, Symbol.iterator, {\n value: _iteratorProxy.default.bind(entries)\n });\n }\n return collection;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _iterationDecorator = _interopRequireDefault(require(\"./util/iterationDecorator\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nvar properties = [['aria-activedescendant', {\n 'type': 'id'\n}], ['aria-atomic', {\n 'type': 'boolean'\n}], ['aria-autocomplete', {\n 'type': 'token',\n 'values': ['inline', 'list', 'both', 'none']\n}], ['aria-braillelabel', {\n 'type': 'string'\n}], ['aria-brailleroledescription', {\n 'type': 'string'\n}], ['aria-busy', {\n 'type': 'boolean'\n}], ['aria-checked', {\n 'type': 'tristate'\n}], ['aria-colcount', {\n type: 'integer'\n}], ['aria-colindex', {\n type: 'integer'\n}], ['aria-colspan', {\n type: 'integer'\n}], ['aria-controls', {\n 'type': 'idlist'\n}], ['aria-current', {\n type: 'token',\n values: ['page', 'step', 'location', 'date', 'time', true, false]\n}], ['aria-describedby', {\n 'type': 'idlist'\n}], ['aria-description', {\n 'type': 'string'\n}], ['aria-details', {\n 'type': 'id'\n}], ['aria-disabled', {\n 'type': 'boolean'\n}], ['aria-dropeffect', {\n 'type': 'tokenlist',\n 'values': ['copy', 'execute', 'link', 'move', 'none', 'popup']\n}], ['aria-errormessage', {\n 'type': 'id'\n}], ['aria-expanded', {\n 'type': 'boolean',\n 'allowundefined': true\n}], ['aria-flowto', {\n 'type': 'idlist'\n}], ['aria-grabbed', {\n 'type': 'boolean',\n 'allowundefined': true\n}], ['aria-haspopup', {\n 'type': 'token',\n 'values': [false, true, 'menu', 'listbox', 'tree', 'grid', 'dialog']\n}], ['aria-hidden', {\n 'type': 'boolean',\n 'allowundefined': true\n}], ['aria-invalid', {\n 'type': 'token',\n 'values': ['grammar', false, 'spelling', true]\n}], ['aria-keyshortcuts', {\n type: 'string'\n}], ['aria-label', {\n 'type': 'string'\n}], ['aria-labelledby', {\n 'type': 'idlist'\n}], ['aria-level', {\n 'type': 'integer'\n}], ['aria-live', {\n 'type': 'token',\n 'values': ['assertive', 'off', 'polite']\n}], ['aria-modal', {\n type: 'boolean'\n}], ['aria-multiline', {\n 'type': 'boolean'\n}], ['aria-multiselectable', {\n 'type': 'boolean'\n}], ['aria-orientation', {\n 'type': 'token',\n 'values': ['vertical', 'undefined', 'horizontal']\n}], ['aria-owns', {\n 'type': 'idlist'\n}], ['aria-placeholder', {\n type: 'string'\n}], ['aria-posinset', {\n 'type': 'integer'\n}], ['aria-pressed', {\n 'type': 'tristate'\n}], ['aria-readonly', {\n 'type': 'boolean'\n}], ['aria-relevant', {\n 'type': 'tokenlist',\n 'values': ['additions', 'all', 'removals', 'text']\n}], ['aria-required', {\n 'type': 'boolean'\n}], ['aria-roledescription', {\n type: 'string'\n}], ['aria-rowcount', {\n type: 'integer'\n}], ['aria-rowindex', {\n type: 'integer'\n}], ['aria-rowspan', {\n type: 'integer'\n}], ['aria-selected', {\n 'type': 'boolean',\n 'allowundefined': true\n}], ['aria-setsize', {\n 'type': 'integer'\n}], ['aria-sort', {\n 'type': 'token',\n 'values': ['ascending', 'descending', 'none', 'other']\n}], ['aria-valuemax', {\n 'type': 'number'\n}], ['aria-valuemin', {\n 'type': 'number'\n}], ['aria-valuenow', {\n 'type': 'number'\n}], ['aria-valuetext', {\n 'type': 'string'\n}]];\nvar ariaPropsMap = {\n entries: function entries() {\n return properties;\n },\n forEach: function forEach(fn) {\n var thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var _iterator = _createForOfIteratorHelper(properties),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var _step$value = _slicedToArray(_step.value, 2),\n key = _step$value[0],\n values = _step$value[1];\n fn.call(thisArg, values, key, properties);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n },\n get: function get(key) {\n var item = properties.find(function (tuple) {\n return tuple[0] === key ? true : false;\n });\n return item && item[1];\n },\n has: function has(key) {\n return !!ariaPropsMap.get(key);\n },\n keys: function keys() {\n return properties.map(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 1),\n key = _ref2[0];\n return key;\n });\n },\n values: function values() {\n return properties.map(function (_ref3) {\n var _ref4 = _slicedToArray(_ref3, 2),\n values = _ref4[1];\n return values;\n });\n }\n};\nvar _default = (0, _iterationDecorator.default)(ariaPropsMap, ariaPropsMap.entries());\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _iterationDecorator = _interopRequireDefault(require(\"./util/iterationDecorator\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nvar dom = [['a', {\n reserved: false\n}], ['abbr', {\n reserved: false\n}], ['acronym', {\n reserved: false\n}], ['address', {\n reserved: false\n}], ['applet', {\n reserved: false\n}], ['area', {\n reserved: false\n}], ['article', {\n reserved: false\n}], ['aside', {\n reserved: false\n}], ['audio', {\n reserved: false\n}], ['b', {\n reserved: false\n}], ['base', {\n reserved: true\n}], ['bdi', {\n reserved: false\n}], ['bdo', {\n reserved: false\n}], ['big', {\n reserved: false\n}], ['blink', {\n reserved: false\n}], ['blockquote', {\n reserved: false\n}], ['body', {\n reserved: false\n}], ['br', {\n reserved: false\n}], ['button', {\n reserved: false\n}], ['canvas', {\n reserved: false\n}], ['caption', {\n reserved: false\n}], ['center', {\n reserved: false\n}], ['cite', {\n reserved: false\n}], ['code', {\n reserved: false\n}], ['col', {\n reserved: true\n}], ['colgroup', {\n reserved: true\n}], ['content', {\n reserved: false\n}], ['data', {\n reserved: false\n}], ['datalist', {\n reserved: false\n}], ['dd', {\n reserved: false\n}], ['del', {\n reserved: false\n}], ['details', {\n reserved: false\n}], ['dfn', {\n reserved: false\n}], ['dialog', {\n reserved: false\n}], ['dir', {\n reserved: false\n}], ['div', {\n reserved: false\n}], ['dl', {\n reserved: false\n}], ['dt', {\n reserved: false\n}], ['em', {\n reserved: false\n}], ['embed', {\n reserved: false\n}], ['fieldset', {\n reserved: false\n}], ['figcaption', {\n reserved: false\n}], ['figure', {\n reserved: false\n}], ['font', {\n reserved: false\n}], ['footer', {\n reserved: false\n}], ['form', {\n reserved: false\n}], ['frame', {\n reserved: false\n}], ['frameset', {\n reserved: false\n}], ['h1', {\n reserved: false\n}], ['h2', {\n reserved: false\n}], ['h3', {\n reserved: false\n}], ['h4', {\n reserved: false\n}], ['h5', {\n reserved: false\n}], ['h6', {\n reserved: false\n}], ['head', {\n reserved: true\n}], ['header', {\n reserved: false\n}], ['hgroup', {\n reserved: false\n}], ['hr', {\n reserved: false\n}], ['html', {\n reserved: true\n}], ['i', {\n reserved: false\n}], ['iframe', {\n reserved: false\n}], ['img', {\n reserved: false\n}], ['input', {\n reserved: false\n}], ['ins', {\n reserved: false\n}], ['kbd', {\n reserved: false\n}], ['keygen', {\n reserved: false\n}], ['label', {\n reserved: false\n}], ['legend', {\n reserved: false\n}], ['li', {\n reserved: false\n}], ['link', {\n reserved: true\n}], ['main', {\n reserved: false\n}], ['map', {\n reserved: false\n}], ['mark', {\n reserved: false\n}], ['marquee', {\n reserved: false\n}], ['menu', {\n reserved: false\n}], ['menuitem', {\n reserved: false\n}], ['meta', {\n reserved: true\n}], ['meter', {\n reserved: false\n}], ['nav', {\n reserved: false\n}], ['noembed', {\n reserved: true\n}], ['noscript', {\n reserved: true\n}], ['object', {\n reserved: false\n}], ['ol', {\n reserved: false\n}], ['optgroup', {\n reserved: false\n}], ['option', {\n reserved: false\n}], ['output', {\n reserved: false\n}], ['p', {\n reserved: false\n}], ['param', {\n reserved: true\n}], ['picture', {\n reserved: true\n}], ['pre', {\n reserved: false\n}], ['progress', {\n reserved: false\n}], ['q', {\n reserved: false\n}], ['rp', {\n reserved: false\n}], ['rt', {\n reserved: false\n}], ['rtc', {\n reserved: false\n}], ['ruby', {\n reserved: false\n}], ['s', {\n reserved: false\n}], ['samp', {\n reserved: false\n}], ['script', {\n reserved: true\n}], ['section', {\n reserved: false\n}], ['select', {\n reserved: false\n}], ['small', {\n reserved: false\n}], ['source', {\n reserved: true\n}], ['spacer', {\n reserved: false\n}], ['span', {\n reserved: false\n}], ['strike', {\n reserved: false\n}], ['strong', {\n reserved: false\n}], ['style', {\n reserved: true\n}], ['sub', {\n reserved: false\n}], ['summary', {\n reserved: false\n}], ['sup', {\n reserved: false\n}], ['table', {\n reserved: false\n}], ['tbody', {\n reserved: false\n}], ['td', {\n reserved: false\n}], ['textarea', {\n reserved: false\n}], ['tfoot', {\n reserved: false\n}], ['th', {\n reserved: false\n}], ['thead', {\n reserved: false\n}], ['time', {\n reserved: false\n}], ['title', {\n reserved: true\n}], ['tr', {\n reserved: false\n}], ['track', {\n reserved: true\n}], ['tt', {\n reserved: false\n}], ['u', {\n reserved: false\n}], ['ul', {\n reserved: false\n}], ['var', {\n reserved: false\n}], ['video', {\n reserved: false\n}], ['wbr', {\n reserved: false\n}], ['xmp', {\n reserved: false\n}]];\nvar domMap = {\n entries: function entries() {\n return dom;\n },\n forEach: function forEach(fn) {\n var thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var _iterator = _createForOfIteratorHelper(dom),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var _step$value = _slicedToArray(_step.value, 2),\n key = _step$value[0],\n values = _step$value[1];\n fn.call(thisArg, values, key, dom);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n },\n get: function get(key) {\n var item = dom.find(function (tuple) {\n return tuple[0] === key ? true : false;\n });\n return item && item[1];\n },\n has: function has(key) {\n return !!domMap.get(key);\n },\n keys: function keys() {\n return dom.map(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 1),\n key = _ref2[0];\n return key;\n });\n },\n values: function values() {\n return dom.map(function (_ref3) {\n var _ref4 = _slicedToArray(_ref3, 2),\n values = _ref4[1];\n return values;\n });\n }\n};\nvar _default = (0, _iterationDecorator.default)(domMap, domMap.entries());\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar commandRole = {\n abstract: true,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'widget']]\n};\nvar _default = commandRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar compositeRole = {\n abstract: true,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-activedescendant': null,\n 'aria-disabled': null\n },\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'widget']]\n};\nvar _default = compositeRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar inputRole = {\n abstract: true,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null\n },\n relatedConcepts: [{\n concept: {\n name: 'input'\n },\n module: 'XForms'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'widget']]\n};\nvar _default = inputRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar landmarkRole = {\n abstract: true,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = landmarkRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar rangeRole = {\n abstract: true,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-valuemax': null,\n 'aria-valuemin': null,\n 'aria-valuenow': null\n },\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure']]\n};\nvar _default = rangeRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar roletypeRole = {\n abstract: true,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: [],\n prohibitedProps: [],\n props: {\n 'aria-atomic': null,\n 'aria-busy': null,\n 'aria-controls': null,\n 'aria-current': null,\n 'aria-describedby': null,\n 'aria-details': null,\n 'aria-dropeffect': null,\n 'aria-flowto': null,\n 'aria-grabbed': null,\n 'aria-hidden': null,\n 'aria-keyshortcuts': null,\n 'aria-label': null,\n 'aria-labelledby': null,\n 'aria-live': null,\n 'aria-owns': null,\n 'aria-relevant': null,\n 'aria-roledescription': null\n },\n relatedConcepts: [{\n concept: {\n name: 'role'\n },\n module: 'XHTML'\n }, {\n concept: {\n name: 'type'\n },\n module: 'Dublin Core'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: []\n};\nvar _default = roletypeRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar sectionRole = {\n abstract: true,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: [],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'frontmatter'\n },\n module: 'DTB'\n }, {\n concept: {\n name: 'level'\n },\n module: 'DTB'\n }, {\n concept: {\n name: 'level'\n },\n module: 'SMIL'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure']]\n};\nvar _default = sectionRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar sectionheadRole = {\n abstract: true,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure']]\n};\nvar _default = sectionheadRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar selectRole = {\n abstract: true,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-orientation': null\n },\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'widget', 'composite'], ['roletype', 'structure', 'section', 'group']]\n};\nvar _default = selectRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar structureRole = {\n abstract: true,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: [],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype']]\n};\nvar _default = structureRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar widgetRole = {\n abstract: true,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: [],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype']]\n};\nvar _default = widgetRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar windowRole = {\n abstract: true,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-modal': null\n },\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype']]\n};\nvar _default = windowRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _commandRole = _interopRequireDefault(require(\"./abstract/commandRole\"));\nvar _compositeRole = _interopRequireDefault(require(\"./abstract/compositeRole\"));\nvar _inputRole = _interopRequireDefault(require(\"./abstract/inputRole\"));\nvar _landmarkRole = _interopRequireDefault(require(\"./abstract/landmarkRole\"));\nvar _rangeRole = _interopRequireDefault(require(\"./abstract/rangeRole\"));\nvar _roletypeRole = _interopRequireDefault(require(\"./abstract/roletypeRole\"));\nvar _sectionRole = _interopRequireDefault(require(\"./abstract/sectionRole\"));\nvar _sectionheadRole = _interopRequireDefault(require(\"./abstract/sectionheadRole\"));\nvar _selectRole = _interopRequireDefault(require(\"./abstract/selectRole\"));\nvar _structureRole = _interopRequireDefault(require(\"./abstract/structureRole\"));\nvar _widgetRole = _interopRequireDefault(require(\"./abstract/widgetRole\"));\nvar _windowRole = _interopRequireDefault(require(\"./abstract/windowRole\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar ariaAbstractRoles = [['command', _commandRole.default], ['composite', _compositeRole.default], ['input', _inputRole.default], ['landmark', _landmarkRole.default], ['range', _rangeRole.default], ['roletype', _roletypeRole.default], ['section', _sectionRole.default], ['sectionhead', _sectionheadRole.default], ['select', _selectRole.default], ['structure', _structureRole.default], ['widget', _widgetRole.default], ['window', _windowRole.default]];\nvar _default = ariaAbstractRoles;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar alertRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-atomic': 'true',\n 'aria-live': 'assertive'\n },\n relatedConcepts: [{\n concept: {\n name: 'alert'\n },\n module: 'XForms'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = alertRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar alertdialogRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'alert'\n },\n module: 'XForms'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'alert'], ['roletype', 'window', 'dialog']]\n};\nvar _default = alertdialogRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar applicationRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-activedescendant': null,\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'Device Independence Delivery Unit'\n }\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure']]\n};\nvar _default = applicationRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar articleRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-posinset': null,\n 'aria-setsize': null\n },\n relatedConcepts: [{\n concept: {\n name: 'article'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'document']]\n};\nvar _default = articleRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar bannerRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n constraints: ['scoped to the body element'],\n name: 'header'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = bannerRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar blockquoteRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'blockquote'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = blockquoteRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar buttonRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: true,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-pressed': null\n },\n relatedConcepts: [{\n concept: {\n attributes: [{\n name: 'type',\n value: 'button'\n }],\n name: 'input'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n name: 'type',\n value: 'image'\n }],\n name: 'input'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n name: 'type',\n value: 'reset'\n }],\n name: 'input'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n name: 'type',\n value: 'submit'\n }],\n name: 'input'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'button'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'trigger'\n },\n module: 'XForms'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'widget', 'command']]\n};\nvar _default = buttonRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar captionRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['prohibited'],\n prohibitedProps: ['aria-label', 'aria-labelledby'],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'caption'\n },\n module: 'HTML'\n }],\n requireContextRole: ['figure', 'grid', 'table'],\n requiredContextRole: ['figure', 'grid', 'table'],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = captionRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar cellRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {\n 'aria-colindex': null,\n 'aria-colspan': null,\n 'aria-rowindex': null,\n 'aria-rowspan': null\n },\n relatedConcepts: [{\n concept: {\n constraints: ['ancestor table element has table role'],\n name: 'td'\n },\n module: 'HTML'\n }],\n requireContextRole: ['row'],\n requiredContextRole: ['row'],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = cellRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar checkboxRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: true,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {\n 'aria-checked': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-invalid': null,\n 'aria-readonly': null,\n 'aria-required': null\n },\n relatedConcepts: [{\n concept: {\n attributes: [{\n name: 'type',\n value: 'checkbox'\n }],\n name: 'input'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'option'\n },\n module: 'ARIA'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {\n 'aria-checked': null\n },\n superClass: [['roletype', 'widget', 'input']]\n};\nvar _default = checkboxRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar codeRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['prohibited'],\n prohibitedProps: ['aria-label', 'aria-labelledby'],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'code'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = codeRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar columnheaderRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {\n 'aria-sort': null\n },\n relatedConcepts: [{\n concept: {\n name: 'th'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n name: 'scope',\n value: 'col'\n }],\n name: 'th'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n name: 'scope',\n value: 'colgroup'\n }],\n name: 'th'\n },\n module: 'HTML'\n }],\n requireContextRole: ['row'],\n requiredContextRole: ['row'],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'cell'], ['roletype', 'structure', 'section', 'cell', 'gridcell'], ['roletype', 'widget', 'gridcell'], ['roletype', 'structure', 'sectionhead']]\n};\nvar _default = columnheaderRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar comboboxRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-activedescendant': null,\n 'aria-autocomplete': null,\n 'aria-errormessage': null,\n 'aria-invalid': null,\n 'aria-readonly': null,\n 'aria-required': null,\n 'aria-expanded': 'false',\n 'aria-haspopup': 'listbox'\n },\n relatedConcepts: [{\n concept: {\n attributes: [{\n constraints: ['set'],\n name: 'list'\n }, {\n name: 'type',\n value: 'email'\n }],\n name: 'input'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n constraints: ['set'],\n name: 'list'\n }, {\n name: 'type',\n value: 'search'\n }],\n name: 'input'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n constraints: ['set'],\n name: 'list'\n }, {\n name: 'type',\n value: 'tel'\n }],\n name: 'input'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n constraints: ['set'],\n name: 'list'\n }, {\n name: 'type',\n value: 'text'\n }],\n name: 'input'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n constraints: ['set'],\n name: 'list'\n }, {\n name: 'type',\n value: 'url'\n }],\n name: 'input'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n constraints: ['set'],\n name: 'list'\n }, {\n name: 'type',\n value: 'url'\n }],\n name: 'input'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n constraints: ['undefined'],\n name: 'multiple'\n }, {\n constraints: ['undefined'],\n name: 'size'\n }],\n constraints: ['the multiple attribute is not set and the size attribute does not have a value greater than 1'],\n name: 'select'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'select'\n },\n module: 'XForms'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {\n 'aria-controls': null,\n 'aria-expanded': 'false'\n },\n superClass: [['roletype', 'widget', 'input']]\n};\nvar _default = comboboxRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar complementaryRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'aside'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n constraints: ['set'],\n name: 'aria-label'\n }],\n constraints: ['scoped to a sectioning content element', 'scoped to a sectioning root element other than body'],\n name: 'aside'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n constraints: ['set'],\n name: 'aria-labelledby'\n }],\n constraints: ['scoped to a sectioning content element', 'scoped to a sectioning root element other than body'],\n name: 'aside'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = complementaryRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar contentinfoRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n constraints: ['scoped to the body element'],\n name: 'footer'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = contentinfoRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar definitionRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'dd'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = definitionRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar deletionRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['prohibited'],\n prohibitedProps: ['aria-label', 'aria-labelledby'],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'del'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = deletionRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar dialogRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'dialog'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'window']]\n};\nvar _default = dialogRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar directoryRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n module: 'DAISY Guide'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'list']]\n};\nvar _default = directoryRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar documentRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'Device Independence Delivery Unit'\n }\n }, {\n concept: {\n name: 'html'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure']]\n};\nvar _default = documentRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar emphasisRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['prohibited'],\n prohibitedProps: ['aria-label', 'aria-labelledby'],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'em'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = emphasisRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar feedRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [['article']],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'list']]\n};\nvar _default = feedRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar figureRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'figure'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = figureRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar formRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n attributes: [{\n constraints: ['set'],\n name: 'aria-label'\n }],\n name: 'form'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n constraints: ['set'],\n name: 'aria-labelledby'\n }],\n name: 'form'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n constraints: ['set'],\n name: 'name'\n }],\n name: 'form'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = formRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar genericRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['prohibited'],\n prohibitedProps: ['aria-label', 'aria-labelledby'],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'a'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'area'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'aside'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'b'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'bdo'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'body'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'data'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'div'\n },\n module: 'HTML'\n }, {\n concept: {\n constraints: ['scoped to the main element', 'scoped to a sectioning content element', 'scoped to a sectioning root element other than body'],\n name: 'footer'\n },\n module: 'HTML'\n }, {\n concept: {\n constraints: ['scoped to the main element', 'scoped to a sectioning content element', 'scoped to a sectioning root element other than body'],\n name: 'header'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'hgroup'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'i'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'pre'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'q'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'samp'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'section'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'small'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'span'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'u'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure']]\n};\nvar _default = genericRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar gridRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-multiselectable': null,\n 'aria-readonly': null\n },\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [['row'], ['row', 'rowgroup']],\n requiredProps: {},\n superClass: [['roletype', 'widget', 'composite'], ['roletype', 'structure', 'section', 'table']]\n};\nvar _default = gridRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar gridcellRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null,\n 'aria-readonly': null,\n 'aria-required': null,\n 'aria-selected': null\n },\n relatedConcepts: [{\n concept: {\n constraints: ['ancestor table element has grid role', 'ancestor table element has treegrid role'],\n name: 'td'\n },\n module: 'HTML'\n }],\n requireContextRole: ['row'],\n requiredContextRole: ['row'],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'cell'], ['roletype', 'widget']]\n};\nvar _default = gridcellRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar groupRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-activedescendant': null,\n 'aria-disabled': null\n },\n relatedConcepts: [{\n concept: {\n name: 'details'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'fieldset'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'optgroup'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'address'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = groupRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar headingRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {\n 'aria-level': '2'\n },\n relatedConcepts: [{\n concept: {\n name: 'h1'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'h2'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'h3'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'h4'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'h5'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'h6'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {\n 'aria-level': '2'\n },\n superClass: [['roletype', 'structure', 'sectionhead']]\n};\nvar _default = headingRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar imgRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: true,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n attributes: [{\n constraints: ['set'],\n name: 'alt'\n }],\n name: 'img'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n constraints: ['undefined'],\n name: 'alt'\n }],\n name: 'img'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'imggroup'\n },\n module: 'DTB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = imgRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar insertionRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['prohibited'],\n prohibitedProps: ['aria-label', 'aria-labelledby'],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'ins'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = insertionRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar linkRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-expanded': null,\n 'aria-haspopup': null\n },\n relatedConcepts: [{\n concept: {\n attributes: [{\n constraints: ['set'],\n name: 'href'\n }],\n name: 'a'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n constraints: ['set'],\n name: 'href'\n }],\n name: 'area'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'widget', 'command']]\n};\nvar _default = linkRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar listRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'menu'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'ol'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'ul'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [['listitem']],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = listRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar listboxRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-invalid': null,\n 'aria-multiselectable': null,\n 'aria-readonly': null,\n 'aria-required': null,\n 'aria-orientation': 'vertical'\n },\n relatedConcepts: [{\n concept: {\n attributes: [{\n constraints: ['>1'],\n name: 'size'\n }],\n constraints: ['the size attribute value is greater than 1'],\n name: 'select'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n name: 'multiple'\n }],\n name: 'select'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'datalist'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'list'\n },\n module: 'ARIA'\n }, {\n concept: {\n name: 'select'\n },\n module: 'XForms'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [['option', 'group'], ['option']],\n requiredProps: {},\n superClass: [['roletype', 'widget', 'composite', 'select'], ['roletype', 'structure', 'section', 'group', 'select']]\n};\nvar _default = listboxRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar listitemRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-level': null,\n 'aria-posinset': null,\n 'aria-setsize': null\n },\n relatedConcepts: [{\n concept: {\n constraints: ['direct descendant of ol', 'direct descendant of ul', 'direct descendant of menu'],\n name: 'li'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'item'\n },\n module: 'XForms'\n }],\n requireContextRole: ['directory', 'list'],\n requiredContextRole: ['directory', 'list'],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = listitemRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar logRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-live': 'polite'\n },\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = logRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar mainRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'main'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = mainRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar markRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['prohibited'],\n prohibitedProps: [],\n props: {\n 'aria-braillelabel': null,\n 'aria-brailleroledescription': null,\n 'aria-description': null\n },\n relatedConcepts: [{\n concept: {\n name: 'mark'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = markRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar marqueeRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = marqueeRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar mathRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'math'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = mathRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar menuRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-orientation': 'vertical'\n },\n relatedConcepts: [{\n concept: {\n name: 'MENU'\n },\n module: 'JAPI'\n }, {\n concept: {\n name: 'list'\n },\n module: 'ARIA'\n }, {\n concept: {\n name: 'select'\n },\n module: 'XForms'\n }, {\n concept: {\n name: 'sidebar'\n },\n module: 'DTB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [['menuitem', 'group'], ['menuitemradio', 'group'], ['menuitemcheckbox', 'group'], ['menuitem'], ['menuitemcheckbox'], ['menuitemradio']],\n requiredProps: {},\n superClass: [['roletype', 'widget', 'composite', 'select'], ['roletype', 'structure', 'section', 'group', 'select']]\n};\nvar _default = menuRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar menubarRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-orientation': 'horizontal'\n },\n relatedConcepts: [{\n concept: {\n name: 'toolbar'\n },\n module: 'ARIA'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [['menuitem', 'group'], ['menuitemradio', 'group'], ['menuitemcheckbox', 'group'], ['menuitem'], ['menuitemcheckbox'], ['menuitemradio']],\n requiredProps: {},\n superClass: [['roletype', 'widget', 'composite', 'select', 'menu'], ['roletype', 'structure', 'section', 'group', 'select', 'menu']]\n};\nvar _default = menubarRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar menuitemRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-posinset': null,\n 'aria-setsize': null\n },\n relatedConcepts: [{\n concept: {\n name: 'MENU_ITEM'\n },\n module: 'JAPI'\n }, {\n concept: {\n name: 'listitem'\n },\n module: 'ARIA'\n }, {\n concept: {\n name: 'option'\n },\n module: 'ARIA'\n }],\n requireContextRole: ['group', 'menu', 'menubar'],\n requiredContextRole: ['group', 'menu', 'menubar'],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'widget', 'command']]\n};\nvar _default = menuitemRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar menuitemcheckboxRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: true,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'menuitem'\n },\n module: 'ARIA'\n }],\n requireContextRole: ['group', 'menu', 'menubar'],\n requiredContextRole: ['group', 'menu', 'menubar'],\n requiredOwnedElements: [],\n requiredProps: {\n 'aria-checked': null\n },\n superClass: [['roletype', 'widget', 'input', 'checkbox'], ['roletype', 'widget', 'command', 'menuitem']]\n};\nvar _default = menuitemcheckboxRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar menuitemradioRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: true,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'menuitem'\n },\n module: 'ARIA'\n }],\n requireContextRole: ['group', 'menu', 'menubar'],\n requiredContextRole: ['group', 'menu', 'menubar'],\n requiredOwnedElements: [],\n requiredProps: {\n 'aria-checked': null\n },\n superClass: [['roletype', 'widget', 'input', 'checkbox', 'menuitemcheckbox'], ['roletype', 'widget', 'command', 'menuitem', 'menuitemcheckbox'], ['roletype', 'widget', 'input', 'radio']]\n};\nvar _default = menuitemradioRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar meterRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: true,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-valuetext': null,\n 'aria-valuemax': '100',\n 'aria-valuemin': '0'\n },\n relatedConcepts: [{\n concept: {\n name: 'meter'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {\n 'aria-valuenow': null\n },\n superClass: [['roletype', 'structure', 'range']]\n};\nvar _default = meterRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar navigationRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'nav'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = navigationRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar noneRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: [],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: []\n};\nvar _default = noneRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar noteRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = noteRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar optionRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: true,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {\n 'aria-checked': null,\n 'aria-posinset': null,\n 'aria-setsize': null,\n 'aria-selected': 'false'\n },\n relatedConcepts: [{\n concept: {\n name: 'item'\n },\n module: 'XForms'\n }, {\n concept: {\n name: 'listitem'\n },\n module: 'ARIA'\n }, {\n concept: {\n name: 'option'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {\n 'aria-selected': 'false'\n },\n superClass: [['roletype', 'widget', 'input']]\n};\nvar _default = optionRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar paragraphRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['prohibited'],\n prohibitedProps: ['aria-label', 'aria-labelledby'],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'p'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = paragraphRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar presentationRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['prohibited'],\n prohibitedProps: ['aria-label', 'aria-labelledby'],\n props: {},\n relatedConcepts: [{\n concept: {\n attributes: [{\n name: 'alt',\n value: ''\n }],\n name: 'img'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure']]\n};\nvar _default = presentationRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar progressbarRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: true,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-valuetext': null\n },\n relatedConcepts: [{\n concept: {\n name: 'progress'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'status'\n },\n module: 'ARIA'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'range'], ['roletype', 'widget']]\n};\nvar _default = progressbarRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar radioRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: true,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {\n 'aria-checked': null,\n 'aria-posinset': null,\n 'aria-setsize': null\n },\n relatedConcepts: [{\n concept: {\n attributes: [{\n name: 'type',\n value: 'radio'\n }],\n name: 'input'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {\n 'aria-checked': null\n },\n superClass: [['roletype', 'widget', 'input']]\n};\nvar _default = radioRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar radiogroupRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-errormessage': null,\n 'aria-invalid': null,\n 'aria-readonly': null,\n 'aria-required': null\n },\n relatedConcepts: [{\n concept: {\n name: 'list'\n },\n module: 'ARIA'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [['radio']],\n requiredProps: {},\n superClass: [['roletype', 'widget', 'composite', 'select'], ['roletype', 'structure', 'section', 'group', 'select']]\n};\nvar _default = radiogroupRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar regionRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n attributes: [{\n constraints: ['set'],\n name: 'aria-label'\n }],\n name: 'section'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n constraints: ['set'],\n name: 'aria-labelledby'\n }],\n name: 'section'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'Device Independence Glossart perceivable unit'\n }\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = regionRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar rowRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {\n 'aria-colindex': null,\n 'aria-expanded': null,\n 'aria-level': null,\n 'aria-posinset': null,\n 'aria-rowindex': null,\n 'aria-selected': null,\n 'aria-setsize': null\n },\n relatedConcepts: [{\n concept: {\n name: 'tr'\n },\n module: 'HTML'\n }],\n requireContextRole: ['grid', 'rowgroup', 'table', 'treegrid'],\n requiredContextRole: ['grid', 'rowgroup', 'table', 'treegrid'],\n requiredOwnedElements: [['cell'], ['columnheader'], ['gridcell'], ['rowheader']],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'group'], ['roletype', 'widget']]\n};\nvar _default = rowRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar rowgroupRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'tbody'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'tfoot'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'thead'\n },\n module: 'HTML'\n }],\n requireContextRole: ['grid', 'table', 'treegrid'],\n requiredContextRole: ['grid', 'table', 'treegrid'],\n requiredOwnedElements: [['row']],\n requiredProps: {},\n superClass: [['roletype', 'structure']]\n};\nvar _default = rowgroupRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar rowheaderRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {\n 'aria-sort': null\n },\n relatedConcepts: [{\n concept: {\n attributes: [{\n name: 'scope',\n value: 'row'\n }],\n name: 'th'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n name: 'scope',\n value: 'rowgroup'\n }],\n name: 'th'\n },\n module: 'HTML'\n }],\n requireContextRole: ['row', 'rowgroup'],\n requiredContextRole: ['row', 'rowgroup'],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'cell'], ['roletype', 'structure', 'section', 'cell', 'gridcell'], ['roletype', 'widget', 'gridcell'], ['roletype', 'structure', 'sectionhead']]\n};\nvar _default = rowheaderRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar scrollbarRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: true,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-valuetext': null,\n 'aria-orientation': 'vertical',\n 'aria-valuemax': '100',\n 'aria-valuemin': '0'\n },\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {\n 'aria-controls': null,\n 'aria-valuenow': null\n },\n superClass: [['roletype', 'structure', 'range'], ['roletype', 'widget']]\n};\nvar _default = scrollbarRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar searchRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = searchRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar searchboxRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n attributes: [{\n constraints: ['undefined'],\n name: 'list'\n }, {\n name: 'type',\n value: 'search'\n }],\n constraints: ['the list attribute is not set'],\n name: 'input'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'widget', 'input', 'textbox']]\n};\nvar _default = searchboxRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar separatorRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: true,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-orientation': 'horizontal',\n 'aria-valuemax': '100',\n 'aria-valuemin': '0',\n 'aria-valuenow': null,\n 'aria-valuetext': null\n },\n relatedConcepts: [{\n concept: {\n name: 'hr'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure']]\n};\nvar _default = separatorRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar sliderRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: true,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-errormessage': null,\n 'aria-haspopup': null,\n 'aria-invalid': null,\n 'aria-readonly': null,\n 'aria-valuetext': null,\n 'aria-orientation': 'horizontal',\n 'aria-valuemax': '100',\n 'aria-valuemin': '0'\n },\n relatedConcepts: [{\n concept: {\n attributes: [{\n name: 'type',\n value: 'range'\n }],\n name: 'input'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {\n 'aria-valuenow': null\n },\n superClass: [['roletype', 'widget', 'input'], ['roletype', 'structure', 'range']]\n};\nvar _default = sliderRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar spinbuttonRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-errormessage': null,\n 'aria-invalid': null,\n 'aria-readonly': null,\n 'aria-required': null,\n 'aria-valuetext': null,\n 'aria-valuenow': '0'\n },\n relatedConcepts: [{\n concept: {\n attributes: [{\n name: 'type',\n value: 'number'\n }],\n name: 'input'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'widget', 'composite'], ['roletype', 'widget', 'input'], ['roletype', 'structure', 'range']]\n};\nvar _default = spinbuttonRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar statusRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-atomic': 'true',\n 'aria-live': 'polite'\n },\n relatedConcepts: [{\n concept: {\n name: 'output'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = statusRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar strongRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['prohibited'],\n prohibitedProps: ['aria-label', 'aria-labelledby'],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'strong'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = strongRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar subscriptRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['prohibited'],\n prohibitedProps: ['aria-label', 'aria-labelledby'],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'sub'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = subscriptRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar superscriptRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['prohibited'],\n prohibitedProps: ['aria-label', 'aria-labelledby'],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'sup'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = superscriptRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar switchRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: true,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'button'\n },\n module: 'ARIA'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {\n 'aria-checked': null\n },\n superClass: [['roletype', 'widget', 'input', 'checkbox']]\n};\nvar _default = switchRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar tabRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: true,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-posinset': null,\n 'aria-setsize': null,\n 'aria-selected': 'false'\n },\n relatedConcepts: [],\n requireContextRole: ['tablist'],\n requiredContextRole: ['tablist'],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'sectionhead'], ['roletype', 'widget']]\n};\nvar _default = tabRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar tableRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-colcount': null,\n 'aria-rowcount': null\n },\n relatedConcepts: [{\n concept: {\n name: 'table'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [['row'], ['row', 'rowgroup']],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = tableRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar tablistRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-level': null,\n 'aria-multiselectable': null,\n 'aria-orientation': 'horizontal'\n },\n relatedConcepts: [{\n module: 'DAISY',\n concept: {\n name: 'guide'\n }\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [['tab']],\n requiredProps: {},\n superClass: [['roletype', 'widget', 'composite']]\n};\nvar _default = tablistRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar tabpanelRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = tabpanelRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar termRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'dfn'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'dt'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = termRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar textboxRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-activedescendant': null,\n 'aria-autocomplete': null,\n 'aria-errormessage': null,\n 'aria-haspopup': null,\n 'aria-invalid': null,\n 'aria-multiline': null,\n 'aria-placeholder': null,\n 'aria-readonly': null,\n 'aria-required': null\n },\n relatedConcepts: [{\n concept: {\n attributes: [{\n constraints: ['undefined'],\n name: 'type'\n }, {\n constraints: ['undefined'],\n name: 'list'\n }],\n constraints: ['the list attribute is not set'],\n name: 'input'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n constraints: ['undefined'],\n name: 'list'\n }, {\n name: 'type',\n value: 'email'\n }],\n constraints: ['the list attribute is not set'],\n name: 'input'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n constraints: ['undefined'],\n name: 'list'\n }, {\n name: 'type',\n value: 'tel'\n }],\n constraints: ['the list attribute is not set'],\n name: 'input'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n constraints: ['undefined'],\n name: 'list'\n }, {\n name: 'type',\n value: 'text'\n }],\n constraints: ['the list attribute is not set'],\n name: 'input'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n constraints: ['undefined'],\n name: 'list'\n }, {\n name: 'type',\n value: 'url'\n }],\n constraints: ['the list attribute is not set'],\n name: 'input'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'input'\n },\n module: 'XForms'\n }, {\n concept: {\n name: 'textarea'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'widget', 'input']]\n};\nvar _default = textboxRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar timeRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'time'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = timeRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar timerRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'status']]\n};\nvar _default = timerRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar toolbarRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-orientation': 'horizontal'\n },\n relatedConcepts: [{\n concept: {\n name: 'menubar'\n },\n module: 'ARIA'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'group']]\n};\nvar _default = toolbarRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar tooltipRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = tooltipRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar treeRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-errormessage': null,\n 'aria-invalid': null,\n 'aria-multiselectable': null,\n 'aria-required': null,\n 'aria-orientation': 'vertical'\n },\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [['treeitem', 'group'], ['treeitem']],\n requiredProps: {},\n superClass: [['roletype', 'widget', 'composite', 'select'], ['roletype', 'structure', 'section', 'group', 'select']]\n};\nvar _default = treeRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar treegridRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [['row'], ['row', 'rowgroup']],\n requiredProps: {},\n superClass: [['roletype', 'widget', 'composite', 'grid'], ['roletype', 'structure', 'section', 'table', 'grid'], ['roletype', 'widget', 'composite', 'select', 'tree'], ['roletype', 'structure', 'section', 'group', 'select', 'tree']]\n};\nvar _default = treegridRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar treeitemRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {\n 'aria-expanded': null,\n 'aria-haspopup': null\n },\n relatedConcepts: [],\n requireContextRole: ['group', 'tree'],\n requiredContextRole: ['group', 'tree'],\n requiredOwnedElements: [],\n requiredProps: {\n 'aria-selected': null\n },\n superClass: [['roletype', 'structure', 'section', 'listitem'], ['roletype', 'widget', 'input', 'option']]\n};\nvar _default = treeitemRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _alertRole = _interopRequireDefault(require(\"./literal/alertRole\"));\nvar _alertdialogRole = _interopRequireDefault(require(\"./literal/alertdialogRole\"));\nvar _applicationRole = _interopRequireDefault(require(\"./literal/applicationRole\"));\nvar _articleRole = _interopRequireDefault(require(\"./literal/articleRole\"));\nvar _bannerRole = _interopRequireDefault(require(\"./literal/bannerRole\"));\nvar _blockquoteRole = _interopRequireDefault(require(\"./literal/blockquoteRole\"));\nvar _buttonRole = _interopRequireDefault(require(\"./literal/buttonRole\"));\nvar _captionRole = _interopRequireDefault(require(\"./literal/captionRole\"));\nvar _cellRole = _interopRequireDefault(require(\"./literal/cellRole\"));\nvar _checkboxRole = _interopRequireDefault(require(\"./literal/checkboxRole\"));\nvar _codeRole = _interopRequireDefault(require(\"./literal/codeRole\"));\nvar _columnheaderRole = _interopRequireDefault(require(\"./literal/columnheaderRole\"));\nvar _comboboxRole = _interopRequireDefault(require(\"./literal/comboboxRole\"));\nvar _complementaryRole = _interopRequireDefault(require(\"./literal/complementaryRole\"));\nvar _contentinfoRole = _interopRequireDefault(require(\"./literal/contentinfoRole\"));\nvar _definitionRole = _interopRequireDefault(require(\"./literal/definitionRole\"));\nvar _deletionRole = _interopRequireDefault(require(\"./literal/deletionRole\"));\nvar _dialogRole = _interopRequireDefault(require(\"./literal/dialogRole\"));\nvar _directoryRole = _interopRequireDefault(require(\"./literal/directoryRole\"));\nvar _documentRole = _interopRequireDefault(require(\"./literal/documentRole\"));\nvar _emphasisRole = _interopRequireDefault(require(\"./literal/emphasisRole\"));\nvar _feedRole = _interopRequireDefault(require(\"./literal/feedRole\"));\nvar _figureRole = _interopRequireDefault(require(\"./literal/figureRole\"));\nvar _formRole = _interopRequireDefault(require(\"./literal/formRole\"));\nvar _genericRole = _interopRequireDefault(require(\"./literal/genericRole\"));\nvar _gridRole = _interopRequireDefault(require(\"./literal/gridRole\"));\nvar _gridcellRole = _interopRequireDefault(require(\"./literal/gridcellRole\"));\nvar _groupRole = _interopRequireDefault(require(\"./literal/groupRole\"));\nvar _headingRole = _interopRequireDefault(require(\"./literal/headingRole\"));\nvar _imgRole = _interopRequireDefault(require(\"./literal/imgRole\"));\nvar _insertionRole = _interopRequireDefault(require(\"./literal/insertionRole\"));\nvar _linkRole = _interopRequireDefault(require(\"./literal/linkRole\"));\nvar _listRole = _interopRequireDefault(require(\"./literal/listRole\"));\nvar _listboxRole = _interopRequireDefault(require(\"./literal/listboxRole\"));\nvar _listitemRole = _interopRequireDefault(require(\"./literal/listitemRole\"));\nvar _logRole = _interopRequireDefault(require(\"./literal/logRole\"));\nvar _mainRole = _interopRequireDefault(require(\"./literal/mainRole\"));\nvar _markRole = _interopRequireDefault(require(\"./literal/markRole\"));\nvar _marqueeRole = _interopRequireDefault(require(\"./literal/marqueeRole\"));\nvar _mathRole = _interopRequireDefault(require(\"./literal/mathRole\"));\nvar _menuRole = _interopRequireDefault(require(\"./literal/menuRole\"));\nvar _menubarRole = _interopRequireDefault(require(\"./literal/menubarRole\"));\nvar _menuitemRole = _interopRequireDefault(require(\"./literal/menuitemRole\"));\nvar _menuitemcheckboxRole = _interopRequireDefault(require(\"./literal/menuitemcheckboxRole\"));\nvar _menuitemradioRole = _interopRequireDefault(require(\"./literal/menuitemradioRole\"));\nvar _meterRole = _interopRequireDefault(require(\"./literal/meterRole\"));\nvar _navigationRole = _interopRequireDefault(require(\"./literal/navigationRole\"));\nvar _noneRole = _interopRequireDefault(require(\"./literal/noneRole\"));\nvar _noteRole = _interopRequireDefault(require(\"./literal/noteRole\"));\nvar _optionRole = _interopRequireDefault(require(\"./literal/optionRole\"));\nvar _paragraphRole = _interopRequireDefault(require(\"./literal/paragraphRole\"));\nvar _presentationRole = _interopRequireDefault(require(\"./literal/presentationRole\"));\nvar _progressbarRole = _interopRequireDefault(require(\"./literal/progressbarRole\"));\nvar _radioRole = _interopRequireDefault(require(\"./literal/radioRole\"));\nvar _radiogroupRole = _interopRequireDefault(require(\"./literal/radiogroupRole\"));\nvar _regionRole = _interopRequireDefault(require(\"./literal/regionRole\"));\nvar _rowRole = _interopRequireDefault(require(\"./literal/rowRole\"));\nvar _rowgroupRole = _interopRequireDefault(require(\"./literal/rowgroupRole\"));\nvar _rowheaderRole = _interopRequireDefault(require(\"./literal/rowheaderRole\"));\nvar _scrollbarRole = _interopRequireDefault(require(\"./literal/scrollbarRole\"));\nvar _searchRole = _interopRequireDefault(require(\"./literal/searchRole\"));\nvar _searchboxRole = _interopRequireDefault(require(\"./literal/searchboxRole\"));\nvar _separatorRole = _interopRequireDefault(require(\"./literal/separatorRole\"));\nvar _sliderRole = _interopRequireDefault(require(\"./literal/sliderRole\"));\nvar _spinbuttonRole = _interopRequireDefault(require(\"./literal/spinbuttonRole\"));\nvar _statusRole = _interopRequireDefault(require(\"./literal/statusRole\"));\nvar _strongRole = _interopRequireDefault(require(\"./literal/strongRole\"));\nvar _subscriptRole = _interopRequireDefault(require(\"./literal/subscriptRole\"));\nvar _superscriptRole = _interopRequireDefault(require(\"./literal/superscriptRole\"));\nvar _switchRole = _interopRequireDefault(require(\"./literal/switchRole\"));\nvar _tabRole = _interopRequireDefault(require(\"./literal/tabRole\"));\nvar _tableRole = _interopRequireDefault(require(\"./literal/tableRole\"));\nvar _tablistRole = _interopRequireDefault(require(\"./literal/tablistRole\"));\nvar _tabpanelRole = _interopRequireDefault(require(\"./literal/tabpanelRole\"));\nvar _termRole = _interopRequireDefault(require(\"./literal/termRole\"));\nvar _textboxRole = _interopRequireDefault(require(\"./literal/textboxRole\"));\nvar _timeRole = _interopRequireDefault(require(\"./literal/timeRole\"));\nvar _timerRole = _interopRequireDefault(require(\"./literal/timerRole\"));\nvar _toolbarRole = _interopRequireDefault(require(\"./literal/toolbarRole\"));\nvar _tooltipRole = _interopRequireDefault(require(\"./literal/tooltipRole\"));\nvar _treeRole = _interopRequireDefault(require(\"./literal/treeRole\"));\nvar _treegridRole = _interopRequireDefault(require(\"./literal/treegridRole\"));\nvar _treeitemRole = _interopRequireDefault(require(\"./literal/treeitemRole\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar ariaLiteralRoles = [['alert', _alertRole.default], ['alertdialog', _alertdialogRole.default], ['application', _applicationRole.default], ['article', _articleRole.default], ['banner', _bannerRole.default], ['blockquote', _blockquoteRole.default], ['button', _buttonRole.default], ['caption', _captionRole.default], ['cell', _cellRole.default], ['checkbox', _checkboxRole.default], ['code', _codeRole.default], ['columnheader', _columnheaderRole.default], ['combobox', _comboboxRole.default], ['complementary', _complementaryRole.default], ['contentinfo', _contentinfoRole.default], ['definition', _definitionRole.default], ['deletion', _deletionRole.default], ['dialog', _dialogRole.default], ['directory', _directoryRole.default], ['document', _documentRole.default], ['emphasis', _emphasisRole.default], ['feed', _feedRole.default], ['figure', _figureRole.default], ['form', _formRole.default], ['generic', _genericRole.default], ['grid', _gridRole.default], ['gridcell', _gridcellRole.default], ['group', _groupRole.default], ['heading', _headingRole.default], ['img', _imgRole.default], ['insertion', _insertionRole.default], ['link', _linkRole.default], ['list', _listRole.default], ['listbox', _listboxRole.default], ['listitem', _listitemRole.default], ['log', _logRole.default], ['main', _mainRole.default], ['mark', _markRole.default], ['marquee', _marqueeRole.default], ['math', _mathRole.default], ['menu', _menuRole.default], ['menubar', _menubarRole.default], ['menuitem', _menuitemRole.default], ['menuitemcheckbox', _menuitemcheckboxRole.default], ['menuitemradio', _menuitemradioRole.default], ['meter', _meterRole.default], ['navigation', _navigationRole.default], ['none', _noneRole.default], ['note', _noteRole.default], ['option', _optionRole.default], ['paragraph', _paragraphRole.default], ['presentation', _presentationRole.default], ['progressbar', _progressbarRole.default], ['radio', _radioRole.default], ['radiogroup', _radiogroupRole.default], ['region', _regionRole.default], ['row', _rowRole.default], ['rowgroup', _rowgroupRole.default], ['rowheader', _rowheaderRole.default], ['scrollbar', _scrollbarRole.default], ['search', _searchRole.default], ['searchbox', _searchboxRole.default], ['separator', _separatorRole.default], ['slider', _sliderRole.default], ['spinbutton', _spinbuttonRole.default], ['status', _statusRole.default], ['strong', _strongRole.default], ['subscript', _subscriptRole.default], ['superscript', _superscriptRole.default], ['switch', _switchRole.default], ['tab', _tabRole.default], ['table', _tableRole.default], ['tablist', _tablistRole.default], ['tabpanel', _tabpanelRole.default], ['term', _termRole.default], ['textbox', _textboxRole.default], ['time', _timeRole.default], ['timer', _timerRole.default], ['toolbar', _toolbarRole.default], ['tooltip', _tooltipRole.default], ['tree', _treeRole.default], ['treegrid', _treegridRole.default], ['treeitem', _treeitemRole.default]];\nvar _default = ariaLiteralRoles;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docAbstractRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'abstract [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = docAbstractRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docAcknowledgmentsRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'acknowledgments [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = docAcknowledgmentsRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docAfterwordRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'afterword [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = docAfterwordRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docAppendixRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'appendix [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = docAppendixRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docBacklinkRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {\n 'aria-errormessage': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'referrer [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'widget', 'command', 'link']]\n};\nvar _default = docBacklinkRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docBiblioentryRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'EPUB biblioentry [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: ['doc-bibliography'],\n requiredContextRole: ['doc-bibliography'],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'listitem']]\n};\nvar _default = docBiblioentryRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docBibliographyRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'bibliography [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [['doc-biblioentry']],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = docBibliographyRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docBibliorefRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {\n 'aria-errormessage': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'biblioref [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'widget', 'command', 'link']]\n};\nvar _default = docBibliorefRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docChapterRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'chapter [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = docChapterRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docColophonRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'colophon [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = docColophonRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docConclusionRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'conclusion [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = docConclusionRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docCoverRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'cover [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'img']]\n};\nvar _default = docCoverRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docCreditRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'credit [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = docCreditRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docCreditsRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'credits [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = docCreditsRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docDedicationRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'dedication [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = docDedicationRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docEndnoteRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'rearnote [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: ['doc-endnotes'],\n requiredContextRole: ['doc-endnotes'],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'listitem']]\n};\nvar _default = docEndnoteRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docEndnotesRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'rearnotes [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [['doc-endnote']],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = docEndnotesRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docEpigraphRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'epigraph [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = docEpigraphRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docEpilogueRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'epilogue [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = docEpilogueRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docErrataRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'errata [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = docErrataRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docExampleRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = docExampleRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docFootnoteRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'footnote [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = docFootnoteRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docForewordRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'foreword [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = docForewordRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docGlossaryRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'glossary [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [['definition'], ['term']],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = docGlossaryRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docGlossrefRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {\n 'aria-errormessage': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'glossref [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'widget', 'command', 'link']]\n};\nvar _default = docGlossrefRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docIndexRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'index [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark', 'navigation']]\n};\nvar _default = docIndexRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docIntroductionRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'introduction [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = docIntroductionRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docNoterefRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {\n 'aria-errormessage': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'noteref [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'widget', 'command', 'link']]\n};\nvar _default = docNoterefRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docNoticeRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'notice [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'note']]\n};\nvar _default = docNoticeRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docPagebreakRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: true,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'pagebreak [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'separator']]\n};\nvar _default = docPagebreakRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docPagelistRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'page-list [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark', 'navigation']]\n};\nvar _default = docPagelistRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docPartRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'part [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = docPartRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docPrefaceRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'preface [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = docPrefaceRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docPrologueRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'prologue [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = docPrologueRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docPullquoteRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'pullquote [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['none']]\n};\nvar _default = docPullquoteRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docQnaRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'qna [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = docQnaRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docSubtitleRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'subtitle [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'sectionhead']]\n};\nvar _default = docSubtitleRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docTipRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'help [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'note']]\n};\nvar _default = docTipRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docTocRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'toc [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark', 'navigation']]\n};\nvar _default = docTocRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _docAbstractRole = _interopRequireDefault(require(\"./dpub/docAbstractRole\"));\nvar _docAcknowledgmentsRole = _interopRequireDefault(require(\"./dpub/docAcknowledgmentsRole\"));\nvar _docAfterwordRole = _interopRequireDefault(require(\"./dpub/docAfterwordRole\"));\nvar _docAppendixRole = _interopRequireDefault(require(\"./dpub/docAppendixRole\"));\nvar _docBacklinkRole = _interopRequireDefault(require(\"./dpub/docBacklinkRole\"));\nvar _docBiblioentryRole = _interopRequireDefault(require(\"./dpub/docBiblioentryRole\"));\nvar _docBibliographyRole = _interopRequireDefault(require(\"./dpub/docBibliographyRole\"));\nvar _docBibliorefRole = _interopRequireDefault(require(\"./dpub/docBibliorefRole\"));\nvar _docChapterRole = _interopRequireDefault(require(\"./dpub/docChapterRole\"));\nvar _docColophonRole = _interopRequireDefault(require(\"./dpub/docColophonRole\"));\nvar _docConclusionRole = _interopRequireDefault(require(\"./dpub/docConclusionRole\"));\nvar _docCoverRole = _interopRequireDefault(require(\"./dpub/docCoverRole\"));\nvar _docCreditRole = _interopRequireDefault(require(\"./dpub/docCreditRole\"));\nvar _docCreditsRole = _interopRequireDefault(require(\"./dpub/docCreditsRole\"));\nvar _docDedicationRole = _interopRequireDefault(require(\"./dpub/docDedicationRole\"));\nvar _docEndnoteRole = _interopRequireDefault(require(\"./dpub/docEndnoteRole\"));\nvar _docEndnotesRole = _interopRequireDefault(require(\"./dpub/docEndnotesRole\"));\nvar _docEpigraphRole = _interopRequireDefault(require(\"./dpub/docEpigraphRole\"));\nvar _docEpilogueRole = _interopRequireDefault(require(\"./dpub/docEpilogueRole\"));\nvar _docErrataRole = _interopRequireDefault(require(\"./dpub/docErrataRole\"));\nvar _docExampleRole = _interopRequireDefault(require(\"./dpub/docExampleRole\"));\nvar _docFootnoteRole = _interopRequireDefault(require(\"./dpub/docFootnoteRole\"));\nvar _docForewordRole = _interopRequireDefault(require(\"./dpub/docForewordRole\"));\nvar _docGlossaryRole = _interopRequireDefault(require(\"./dpub/docGlossaryRole\"));\nvar _docGlossrefRole = _interopRequireDefault(require(\"./dpub/docGlossrefRole\"));\nvar _docIndexRole = _interopRequireDefault(require(\"./dpub/docIndexRole\"));\nvar _docIntroductionRole = _interopRequireDefault(require(\"./dpub/docIntroductionRole\"));\nvar _docNoterefRole = _interopRequireDefault(require(\"./dpub/docNoterefRole\"));\nvar _docNoticeRole = _interopRequireDefault(require(\"./dpub/docNoticeRole\"));\nvar _docPagebreakRole = _interopRequireDefault(require(\"./dpub/docPagebreakRole\"));\nvar _docPagelistRole = _interopRequireDefault(require(\"./dpub/docPagelistRole\"));\nvar _docPartRole = _interopRequireDefault(require(\"./dpub/docPartRole\"));\nvar _docPrefaceRole = _interopRequireDefault(require(\"./dpub/docPrefaceRole\"));\nvar _docPrologueRole = _interopRequireDefault(require(\"./dpub/docPrologueRole\"));\nvar _docPullquoteRole = _interopRequireDefault(require(\"./dpub/docPullquoteRole\"));\nvar _docQnaRole = _interopRequireDefault(require(\"./dpub/docQnaRole\"));\nvar _docSubtitleRole = _interopRequireDefault(require(\"./dpub/docSubtitleRole\"));\nvar _docTipRole = _interopRequireDefault(require(\"./dpub/docTipRole\"));\nvar _docTocRole = _interopRequireDefault(require(\"./dpub/docTocRole\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar ariaDpubRoles = [['doc-abstract', _docAbstractRole.default], ['doc-acknowledgments', _docAcknowledgmentsRole.default], ['doc-afterword', _docAfterwordRole.default], ['doc-appendix', _docAppendixRole.default], ['doc-backlink', _docBacklinkRole.default], ['doc-biblioentry', _docBiblioentryRole.default], ['doc-bibliography', _docBibliographyRole.default], ['doc-biblioref', _docBibliorefRole.default], ['doc-chapter', _docChapterRole.default], ['doc-colophon', _docColophonRole.default], ['doc-conclusion', _docConclusionRole.default], ['doc-cover', _docCoverRole.default], ['doc-credit', _docCreditRole.default], ['doc-credits', _docCreditsRole.default], ['doc-dedication', _docDedicationRole.default], ['doc-endnote', _docEndnoteRole.default], ['doc-endnotes', _docEndnotesRole.default], ['doc-epigraph', _docEpigraphRole.default], ['doc-epilogue', _docEpilogueRole.default], ['doc-errata', _docErrataRole.default], ['doc-example', _docExampleRole.default], ['doc-footnote', _docFootnoteRole.default], ['doc-foreword', _docForewordRole.default], ['doc-glossary', _docGlossaryRole.default], ['doc-glossref', _docGlossrefRole.default], ['doc-index', _docIndexRole.default], ['doc-introduction', _docIntroductionRole.default], ['doc-noteref', _docNoterefRole.default], ['doc-notice', _docNoticeRole.default], ['doc-pagebreak', _docPagebreakRole.default], ['doc-pagelist', _docPagelistRole.default], ['doc-part', _docPartRole.default], ['doc-preface', _docPrefaceRole.default], ['doc-prologue', _docPrologueRole.default], ['doc-pullquote', _docPullquoteRole.default], ['doc-qna', _docQnaRole.default], ['doc-subtitle', _docSubtitleRole.default], ['doc-tip', _docTipRole.default], ['doc-toc', _docTocRole.default]];\nvar _default = ariaDpubRoles;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar graphicsDocumentRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n module: 'GRAPHICS',\n concept: {\n name: 'graphics-object'\n }\n }, {\n module: 'ARIA',\n concept: {\n name: 'img'\n }\n }, {\n module: 'ARIA',\n concept: {\n name: 'article'\n }\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'document']]\n};\nvar _default = graphicsDocumentRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar graphicsObjectRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n module: 'GRAPHICS',\n concept: {\n name: 'graphics-document'\n }\n }, {\n module: 'ARIA',\n concept: {\n name: 'group'\n }\n }, {\n module: 'ARIA',\n concept: {\n name: 'img'\n }\n }, {\n module: 'GRAPHICS',\n concept: {\n name: 'graphics-symbol'\n }\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'group']]\n};\nvar _default = graphicsObjectRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar graphicsSymbolRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: true,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'img']]\n};\nvar _default = graphicsSymbolRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _graphicsDocumentRole = _interopRequireDefault(require(\"./graphics/graphicsDocumentRole\"));\nvar _graphicsObjectRole = _interopRequireDefault(require(\"./graphics/graphicsObjectRole\"));\nvar _graphicsSymbolRole = _interopRequireDefault(require(\"./graphics/graphicsSymbolRole\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar ariaGraphicsRoles = [['graphics-document', _graphicsDocumentRole.default], ['graphics-object', _graphicsObjectRole.default], ['graphics-symbol', _graphicsSymbolRole.default]];\nvar _default = ariaGraphicsRoles;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _ariaAbstractRoles = _interopRequireDefault(require(\"./etc/roles/ariaAbstractRoles\"));\nvar _ariaLiteralRoles = _interopRequireDefault(require(\"./etc/roles/ariaLiteralRoles\"));\nvar _ariaDpubRoles = _interopRequireDefault(require(\"./etc/roles/ariaDpubRoles\"));\nvar _ariaGraphicsRoles = _interopRequireDefault(require(\"./etc/roles/ariaGraphicsRoles\"));\nvar _iterationDecorator = _interopRequireDefault(require(\"./util/iterationDecorator\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nvar roles = [].concat(_ariaAbstractRoles.default, _ariaLiteralRoles.default, _ariaDpubRoles.default, _ariaGraphicsRoles.default);\nroles.forEach(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n roleDefinition = _ref2[1];\n // Conglomerate the properties\n var _iterator = _createForOfIteratorHelper(roleDefinition.superClass),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var superClassIter = _step.value;\n var _iterator2 = _createForOfIteratorHelper(superClassIter),\n _step2;\n try {\n var _loop = function _loop() {\n var superClassName = _step2.value;\n var superClassRoleTuple = roles.find(function (_ref3) {\n var _ref4 = _slicedToArray(_ref3, 1),\n name = _ref4[0];\n return name === superClassName;\n });\n if (superClassRoleTuple) {\n var superClassDefinition = superClassRoleTuple[1];\n for (var _i2 = 0, _Object$keys = Object.keys(superClassDefinition.props); _i2 < _Object$keys.length; _i2++) {\n var prop = _Object$keys[_i2];\n if (\n // $FlowIssue Accessing the hasOwnProperty on the Object prototype is fine.\n !Object.prototype.hasOwnProperty.call(roleDefinition.props, prop)) {\n Object.assign(roleDefinition.props, _defineProperty({}, prop, superClassDefinition.props[prop]));\n }\n }\n }\n };\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n _loop();\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n});\nvar rolesMap = {\n entries: function entries() {\n return roles;\n },\n forEach: function forEach(fn) {\n var thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var _iterator3 = _createForOfIteratorHelper(roles),\n _step3;\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var _step3$value = _slicedToArray(_step3.value, 2),\n key = _step3$value[0],\n values = _step3$value[1];\n fn.call(thisArg, values, key, roles);\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n },\n get: function get(key) {\n var item = roles.find(function (tuple) {\n return tuple[0] === key ? true : false;\n });\n return item && item[1];\n },\n has: function has(key) {\n return !!rolesMap.get(key);\n },\n keys: function keys() {\n return roles.map(function (_ref5) {\n var _ref6 = _slicedToArray(_ref5, 1),\n key = _ref6[0];\n return key;\n });\n },\n values: function values() {\n return roles.map(function (_ref7) {\n var _ref8 = _slicedToArray(_ref7, 2),\n values = _ref8[1];\n return values;\n });\n }\n};\nvar _default = (0, _iterationDecorator.default)(rolesMap, rolesMap.entries());\nexports.default = _default;","var has = Object.prototype.hasOwnProperty;\n\nfunction dequal(foo, bar) {\n\tvar ctor, len;\n\tif (foo === bar) return true;\n\n\tif (foo && bar && (ctor=foo.constructor) === bar.constructor) {\n\t\tif (ctor === Date) return foo.getTime() === bar.getTime();\n\t\tif (ctor === RegExp) return foo.toString() === bar.toString();\n\n\t\tif (ctor === Array) {\n\t\t\tif ((len=foo.length) === bar.length) {\n\t\t\t\twhile (len-- && dequal(foo[len], bar[len]));\n\t\t\t}\n\t\t\treturn len === -1;\n\t\t}\n\n\t\tif (!ctor || typeof foo === 'object') {\n\t\t\tlen = 0;\n\t\t\tfor (ctor in foo) {\n\t\t\t\tif (has.call(foo, ctor) && ++len && !has.call(bar, ctor)) return false;\n\t\t\t\tif (!(ctor in bar) || !dequal(foo[ctor], bar[ctor])) return false;\n\t\t\t}\n\t\t\treturn Object.keys(bar).length === len;\n\t\t}\n\t}\n\n\treturn foo !== foo && bar !== bar;\n}\n\nexports.dequal = dequal;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _lite = require(\"dequal/lite\");\nvar _iterationDecorator = _interopRequireDefault(require(\"./util/iterationDecorator\"));\nvar _rolesMap = _interopRequireDefault(require(\"./rolesMap\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nvar elementRoles = [];\nvar keys = _rolesMap.default.keys();\nfor (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var role = _rolesMap.default.get(key);\n if (role) {\n var concepts = [].concat(role.baseConcepts, role.relatedConcepts);\n for (var k = 0; k < concepts.length; k++) {\n var relation = concepts[k];\n if (relation.module === 'HTML') {\n (function () {\n var concept = relation.concept;\n if (concept) {\n var elementRoleRelation = elementRoles.find(function (relation) {\n return (0, _lite.dequal)(relation, concept);\n });\n var roles;\n if (elementRoleRelation) {\n roles = elementRoleRelation[1];\n } else {\n roles = [];\n }\n var isUnique = true;\n for (var _i = 0; _i < roles.length; _i++) {\n if (roles[_i] === key) {\n isUnique = false;\n break;\n }\n }\n if (isUnique) {\n roles.push(key);\n }\n elementRoles.push([concept, roles]);\n }\n })();\n }\n }\n }\n}\nvar elementRoleMap = {\n entries: function entries() {\n return elementRoles;\n },\n forEach: function forEach(fn) {\n var thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var _iterator = _createForOfIteratorHelper(elementRoles),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var _step$value = _slicedToArray(_step.value, 2),\n _key = _step$value[0],\n values = _step$value[1];\n fn.call(thisArg, values, _key, elementRoles);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n },\n get: function get(key) {\n var item = elementRoles.find(function (tuple) {\n return key.name === tuple[0].name && (0, _lite.dequal)(key.attributes, tuple[0].attributes);\n });\n return item && item[1];\n },\n has: function has(key) {\n return !!elementRoleMap.get(key);\n },\n keys: function keys() {\n return elementRoles.map(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 1),\n key = _ref2[0];\n return key;\n });\n },\n values: function values() {\n return elementRoles.map(function (_ref3) {\n var _ref4 = _slicedToArray(_ref3, 2),\n values = _ref4[1];\n return values;\n });\n }\n};\nvar _default = (0, _iterationDecorator.default)(elementRoleMap, elementRoleMap.entries());\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _iterationDecorator = _interopRequireDefault(require(\"./util/iterationDecorator\"));\nvar _rolesMap = _interopRequireDefault(require(\"./rolesMap\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nvar roleElement = [];\nvar keys = _rolesMap.default.keys();\nfor (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var role = _rolesMap.default.get(key);\n var relationConcepts = [];\n if (role) {\n var concepts = [].concat(role.baseConcepts, role.relatedConcepts);\n for (var k = 0; k < concepts.length; k++) {\n var relation = concepts[k];\n if (relation.module === 'HTML') {\n var concept = relation.concept;\n if (concept != null) {\n relationConcepts.push(concept);\n }\n }\n }\n if (relationConcepts.length > 0) {\n roleElement.push([key, relationConcepts]);\n }\n }\n}\nvar roleElementMap = {\n entries: function entries() {\n return roleElement;\n },\n forEach: function forEach(fn) {\n var thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var _iterator = _createForOfIteratorHelper(roleElement),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var _step$value = _slicedToArray(_step.value, 2),\n _key = _step$value[0],\n values = _step$value[1];\n fn.call(thisArg, values, _key, roleElement);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n },\n get: function get(key) {\n var item = roleElement.find(function (tuple) {\n return tuple[0] === key ? true : false;\n });\n return item && item[1];\n },\n has: function has(key) {\n return !!roleElementMap.get(key);\n },\n keys: function keys() {\n return roleElement.map(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 1),\n key = _ref2[0];\n return key;\n });\n },\n values: function values() {\n return roleElement.map(function (_ref3) {\n var _ref4 = _slicedToArray(_ref3, 2),\n values = _ref4[1];\n return values;\n });\n }\n};\nvar _default = (0, _iterationDecorator.default)(roleElementMap, roleElementMap.entries());\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.roles = exports.roleElements = exports.elementRoles = exports.dom = exports.aria = void 0;\nvar _ariaPropsMap = _interopRequireDefault(require(\"./ariaPropsMap\"));\nvar _domMap = _interopRequireDefault(require(\"./domMap\"));\nvar _rolesMap = _interopRequireDefault(require(\"./rolesMap\"));\nvar _elementRoleMap = _interopRequireDefault(require(\"./elementRoleMap\"));\nvar _roleElementMap = _interopRequireDefault(require(\"./roleElementMap\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar aria = _ariaPropsMap.default;\nexports.aria = aria;\nvar dom = _domMap.default;\nexports.dom = dom;\nvar roles = _rolesMap.default;\nexports.roles = roles;\nvar elementRoles = _elementRoleMap.default;\nexports.elementRoles = elementRoles;\nvar roleElements = _roleElementMap.default;\nexports.roleElements = roleElements;","// Copyright (c) 2013 Pieroxy <pieroxy@pieroxy.net>\n// This work is free. You can redistribute it and/or modify it\n// under the terms of the WTFPL, Version 2\n// For more information see LICENSE.txt or http://www.wtfpl.net/\n//\n// For more information, the home page:\n// http://pieroxy.net/blog/pages/lz-string/testing.html\n//\n// LZ-based compression algorithm, version 1.4.5\nvar LZString = (function() {\n\n// private property\nvar f = String.fromCharCode;\nvar keyStrBase64 = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\nvar keyStrUriSafe = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$\";\nvar baseReverseDic = {};\n\nfunction getBaseValue(alphabet, character) {\n if (!baseReverseDic[alphabet]) {\n baseReverseDic[alphabet] = {};\n for (var i=0 ; i<alphabet.length ; i++) {\n baseReverseDic[alphabet][alphabet.charAt(i)] = i;\n }\n }\n return baseReverseDic[alphabet][character];\n}\n\nvar LZString = {\n compressToBase64 : function (input) {\n if (input == null) return \"\";\n var res = LZString._compress(input, 6, function(a){return keyStrBase64.charAt(a);});\n switch (res.length % 4) { // To produce valid Base64\n default: // When could this happen ?\n case 0 : return res;\n case 1 : return res+\"===\";\n case 2 : return res+\"==\";\n case 3 : return res+\"=\";\n }\n },\n\n decompressFromBase64 : function (input) {\n if (input == null) return \"\";\n if (input == \"\") return null;\n return LZString._decompress(input.length, 32, function(index) { return getBaseValue(keyStrBase64, input.charAt(index)); });\n },\n\n compressToUTF16 : function (input) {\n if (input == null) return \"\";\n return LZString._compress(input, 15, function(a){return f(a+32);}) + \" \";\n },\n\n decompressFromUTF16: function (compressed) {\n if (compressed == null) return \"\";\n if (compressed == \"\") return null;\n return LZString._decompress(compressed.length, 16384, function(index) { return compressed.charCodeAt(index) - 32; });\n },\n\n //compress into uint8array (UCS-2 big endian format)\n compressToUint8Array: function (uncompressed) {\n var compressed = LZString.compress(uncompressed);\n var buf=new Uint8Array(compressed.length*2); // 2 bytes per character\n\n for (var i=0, TotalLen=compressed.length; i<TotalLen; i++) {\n var current_value = compressed.charCodeAt(i);\n buf[i*2] = current_value >>> 8;\n buf[i*2+1] = current_value % 256;\n }\n return buf;\n },\n\n //decompress from uint8array (UCS-2 big endian format)\n decompressFromUint8Array:function (compressed) {\n if (compressed===null || compressed===undefined){\n return LZString.decompress(compressed);\n } else {\n var buf=new Array(compressed.length/2); // 2 bytes per character\n for (var i=0, TotalLen=buf.length; i<TotalLen; i++) {\n buf[i]=compressed[i*2]*256+compressed[i*2+1];\n }\n\n var result = [];\n buf.forEach(function (c) {\n result.push(f(c));\n });\n return LZString.decompress(result.join(''));\n\n }\n\n },\n\n\n //compress into a string that is already URI encoded\n compressToEncodedURIComponent: function (input) {\n if (input == null) return \"\";\n return LZString._compress(input, 6, function(a){return keyStrUriSafe.charAt(a);});\n },\n\n //decompress from an output of compressToEncodedURIComponent\n decompressFromEncodedURIComponent:function (input) {\n if (input == null) return \"\";\n if (input == \"\") return null;\n input = input.replace(/ /g, \"+\");\n return LZString._decompress(input.length, 32, function(index) { return getBaseValue(keyStrUriSafe, input.charAt(index)); });\n },\n\n compress: function (uncompressed) {\n return LZString._compress(uncompressed, 16, function(a){return f(a);});\n },\n _compress: function (uncompressed, bitsPerChar, getCharFromInt) {\n if (uncompressed == null) return \"\";\n var i, value,\n context_dictionary= {},\n context_dictionaryToCreate= {},\n context_c=\"\",\n context_wc=\"\",\n context_w=\"\",\n context_enlargeIn= 2, // Compensate for the first entry which should not count\n context_dictSize= 3,\n context_numBits= 2,\n context_data=[],\n context_data_val=0,\n context_data_position=0,\n ii;\n\n for (ii = 0; ii < uncompressed.length; ii += 1) {\n context_c = uncompressed.charAt(ii);\n if (!Object.prototype.hasOwnProperty.call(context_dictionary,context_c)) {\n context_dictionary[context_c] = context_dictSize++;\n context_dictionaryToCreate[context_c] = true;\n }\n\n context_wc = context_w + context_c;\n if (Object.prototype.hasOwnProperty.call(context_dictionary,context_wc)) {\n context_w = context_wc;\n } else {\n if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate,context_w)) {\n if (context_w.charCodeAt(0)<256) {\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n }\n value = context_w.charCodeAt(0);\n for (i=0 ; i<8 ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n } else {\n value = 1;\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | value;\n if (context_data_position ==bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = 0;\n }\n value = context_w.charCodeAt(0);\n for (i=0 ; i<16 ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n delete context_dictionaryToCreate[context_w];\n } else {\n value = context_dictionary[context_w];\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n\n\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n // Add wc to the dictionary.\n context_dictionary[context_wc] = context_dictSize++;\n context_w = String(context_c);\n }\n }\n\n // Output the code for w.\n if (context_w !== \"\") {\n if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate,context_w)) {\n if (context_w.charCodeAt(0)<256) {\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n }\n value = context_w.charCodeAt(0);\n for (i=0 ; i<8 ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n } else {\n value = 1;\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | value;\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = 0;\n }\n value = context_w.charCodeAt(0);\n for (i=0 ; i<16 ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n delete context_dictionaryToCreate[context_w];\n } else {\n value = context_dictionary[context_w];\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n\n\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n }\n\n // Mark the end of the stream\n value = 2;\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n\n // Flush the last char\n while (true) {\n context_data_val = (context_data_val << 1);\n if (context_data_position == bitsPerChar-1) {\n context_data.push(getCharFromInt(context_data_val));\n break;\n }\n else context_data_position++;\n }\n return context_data.join('');\n },\n\n decompress: function (compressed) {\n if (compressed == null) return \"\";\n if (compressed == \"\") return null;\n return LZString._decompress(compressed.length, 32768, function(index) { return compressed.charCodeAt(index); });\n },\n\n _decompress: function (length, resetValue, getNextValue) {\n var dictionary = [],\n next,\n enlargeIn = 4,\n dictSize = 4,\n numBits = 3,\n entry = \"\",\n result = [],\n i,\n w,\n bits, resb, maxpower, power,\n c,\n data = {val:getNextValue(0), position:resetValue, index:1};\n\n for (i = 0; i < 3; i += 1) {\n dictionary[i] = i;\n }\n\n bits = 0;\n maxpower = Math.pow(2,2);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n switch (next = bits) {\n case 0:\n bits = 0;\n maxpower = Math.pow(2,8);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n c = f(bits);\n break;\n case 1:\n bits = 0;\n maxpower = Math.pow(2,16);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n c = f(bits);\n break;\n case 2:\n return \"\";\n }\n dictionary[3] = c;\n w = c;\n result.push(c);\n while (true) {\n if (data.index > length) {\n return \"\";\n }\n\n bits = 0;\n maxpower = Math.pow(2,numBits);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n switch (c = bits) {\n case 0:\n bits = 0;\n maxpower = Math.pow(2,8);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n dictionary[dictSize++] = f(bits);\n c = dictSize-1;\n enlargeIn--;\n break;\n case 1:\n bits = 0;\n maxpower = Math.pow(2,16);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n dictionary[dictSize++] = f(bits);\n c = dictSize-1;\n enlargeIn--;\n break;\n case 2:\n return result.join('');\n }\n\n if (enlargeIn == 0) {\n enlargeIn = Math.pow(2, numBits);\n numBits++;\n }\n\n if (dictionary[c]) {\n entry = dictionary[c];\n } else {\n if (c === dictSize) {\n entry = w + w.charAt(0);\n } else {\n return null;\n }\n }\n result.push(entry);\n\n // Add w+entry[0] to the dictionary.\n dictionary[dictSize++] = w + entry.charAt(0);\n enlargeIn--;\n\n w = entry;\n\n if (enlargeIn == 0) {\n enlargeIn = Math.pow(2, numBits);\n numBits++;\n }\n\n }\n }\n};\n return LZString;\n})();\n\nif (typeof define === 'function' && define.amd) {\n define(function () { return LZString; });\n} else if( typeof module !== 'undefined' && module != null ) {\n module.exports = LZString\n} else if( typeof angular !== 'undefined' && angular != null ) {\n angular.module('LZString', [])\n .factory('LZString', function () {\n return LZString;\n });\n}\n","import * as prettyFormat from 'pretty-format';\nexport { prettyFormat };\nimport { computeAccessibleName, computeAccessibleDescription } from 'dom-accessibility-api';\nimport { elementRoles, roles, roleElements } from 'aria-query';\nimport lzString from 'lz-string';\n\n/**\n * Source: https://github.com/facebook/jest/blob/e7bb6a1e26ffab90611b2593912df15b69315611/packages/pretty-format/src/plugins/DOMElement.ts\n */\n/* eslint-disable -- trying to stay as close to the original as possible */\n/* istanbul ignore file */\n\nfunction escapeHTML(str) {\n return str.replace(/</g, '<').replace(/>/g, '>');\n}\n// Return empty string if keys is empty.\nconst printProps = (keys, props, config, indentation, depth, refs, printer) => {\n const indentationNext = indentation + config.indent;\n const colors = config.colors;\n return keys.map(key => {\n const value = props[key];\n let printed = printer(value, config, indentationNext, depth, refs);\n if (typeof value !== 'string') {\n if (printed.indexOf('\\n') !== -1) {\n printed = config.spacingOuter + indentationNext + printed + config.spacingOuter + indentation;\n }\n printed = '{' + printed + '}';\n }\n return config.spacingInner + indentation + colors.prop.open + key + colors.prop.close + '=' + colors.value.open + printed + colors.value.close;\n }).join('');\n};\n\n// https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType#node_type_constants\nconst NodeTypeTextNode = 3;\n\n// Return empty string if children is empty.\nconst printChildren = (children, config, indentation, depth, refs, printer) => children.map(child => {\n const printedChild = typeof child === 'string' ? printText(child, config) : printer(child, config, indentation, depth, refs);\n if (printedChild === '' && typeof child === 'object' && child !== null && child.nodeType !== NodeTypeTextNode) {\n // A plugin serialized this Node to '' meaning we should ignore it.\n return '';\n }\n return config.spacingOuter + indentation + printedChild;\n}).join('');\nconst printText = (text, config) => {\n const contentColor = config.colors.content;\n return contentColor.open + escapeHTML(text) + contentColor.close;\n};\nconst printComment = (comment, config) => {\n const commentColor = config.colors.comment;\n return commentColor.open + '<!--' + escapeHTML(comment) + '-->' + commentColor.close;\n};\n\n// Separate the functions to format props, children, and element,\n// so a plugin could override a particular function, if needed.\n// Too bad, so sad: the traditional (but unnecessary) space\n// in a self-closing tagColor requires a second test of printedProps.\nconst printElement = (type, printedProps, printedChildren, config, indentation) => {\n const tagColor = config.colors.tag;\n return tagColor.open + '<' + type + (printedProps && tagColor.close + printedProps + config.spacingOuter + indentation + tagColor.open) + (printedChildren ? '>' + tagColor.close + printedChildren + config.spacingOuter + indentation + tagColor.open + '</' + type : (printedProps && !config.min ? '' : ' ') + '/') + '>' + tagColor.close;\n};\nconst printElementAsLeaf = (type, config) => {\n const tagColor = config.colors.tag;\n return tagColor.open + '<' + type + tagColor.close + ' …' + tagColor.open + ' />' + tagColor.close;\n};\nconst ELEMENT_NODE$1 = 1;\nconst TEXT_NODE$1 = 3;\nconst COMMENT_NODE$1 = 8;\nconst FRAGMENT_NODE = 11;\nconst ELEMENT_REGEXP = /^((HTML|SVG)\\w*)?Element$/;\nconst testNode = val => {\n const constructorName = val.constructor.name;\n const {\n nodeType,\n tagName\n } = val;\n const isCustomElement = typeof tagName === 'string' && tagName.includes('-') || typeof val.hasAttribute === 'function' && val.hasAttribute('is');\n return nodeType === ELEMENT_NODE$1 && (ELEMENT_REGEXP.test(constructorName) || isCustomElement) || nodeType === TEXT_NODE$1 && constructorName === 'Text' || nodeType === COMMENT_NODE$1 && constructorName === 'Comment' || nodeType === FRAGMENT_NODE && constructorName === 'DocumentFragment';\n};\nfunction nodeIsText(node) {\n return node.nodeType === TEXT_NODE$1;\n}\nfunction nodeIsComment(node) {\n return node.nodeType === COMMENT_NODE$1;\n}\nfunction nodeIsFragment(node) {\n return node.nodeType === FRAGMENT_NODE;\n}\nfunction createDOMElementFilter(filterNode) {\n return {\n test: val => {\n var _val$constructor2;\n return (val == null ? void 0 : (_val$constructor2 = val.constructor) == null ? void 0 : _val$constructor2.name) && testNode(val);\n },\n serialize: (node, config, indentation, depth, refs, printer) => {\n if (nodeIsText(node)) {\n return printText(node.data, config);\n }\n if (nodeIsComment(node)) {\n return printComment(node.data, config);\n }\n const type = nodeIsFragment(node) ? \"DocumentFragment\" : node.tagName.toLowerCase();\n if (++depth > config.maxDepth) {\n return printElementAsLeaf(type, config);\n }\n return printElement(type, printProps(nodeIsFragment(node) ? [] : Array.from(node.attributes).map(attr => attr.name).sort(), nodeIsFragment(node) ? {} : Array.from(node.attributes).reduce((props, attribute) => {\n props[attribute.name] = attribute.value;\n return props;\n }, {}), config, indentation + config.indent, depth, refs, printer), printChildren(Array.prototype.slice.call(node.childNodes || node.children).filter(filterNode), config, indentation + config.indent, depth, refs, printer), config, indentation);\n }\n };\n}\n\n// We try to load node dependencies\nlet chalk = null;\nlet readFileSync = null;\nlet codeFrameColumns = null;\ntry {\n const nodeRequire = module && module.require;\n readFileSync = nodeRequire.call(module, 'fs').readFileSync;\n codeFrameColumns = nodeRequire.call(module, '@babel/code-frame').codeFrameColumns;\n chalk = nodeRequire.call(module, 'chalk');\n} catch {\n // We're in a browser environment\n}\n\n// frame has the form \"at myMethod (location/to/my/file.js:10:2)\"\nfunction getCodeFrame(frame) {\n const locationStart = frame.indexOf('(') + 1;\n const locationEnd = frame.indexOf(')');\n const frameLocation = frame.slice(locationStart, locationEnd);\n const frameLocationElements = frameLocation.split(':');\n const [filename, line, column] = [frameLocationElements[0], parseInt(frameLocationElements[1], 10), parseInt(frameLocationElements[2], 10)];\n let rawFileContents = '';\n try {\n rawFileContents = readFileSync(filename, 'utf-8');\n } catch {\n return '';\n }\n const codeFrame = codeFrameColumns(rawFileContents, {\n start: {\n line,\n column\n }\n }, {\n highlightCode: true,\n linesBelow: 0\n });\n return chalk.dim(frameLocation) + \"\\n\" + codeFrame + \"\\n\";\n}\nfunction getUserCodeFrame() {\n // If we couldn't load dependencies, we can't generate the user trace\n /* istanbul ignore next */\n if (!readFileSync || !codeFrameColumns) {\n return '';\n }\n const err = new Error();\n const firstClientCodeFrame = err.stack.split('\\n').slice(1) // Remove first line which has the form \"Error: TypeError\"\n .find(frame => !frame.includes('node_modules/')); // Ignore frames from 3rd party libraries\n\n return getCodeFrame(firstClientCodeFrame);\n}\n\n// Constant node.nodeType for text nodes, see:\n// https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType#Node_type_constants\nconst TEXT_NODE = 3;\nfunction jestFakeTimersAreEnabled() {\n /* istanbul ignore else */\n // eslint-disable-next-line\n if (typeof jest !== 'undefined' && jest !== null) {\n return (\n // legacy timers\n setTimeout._isMockFunction === true ||\n // modern timers\n // eslint-disable-next-line prefer-object-has-own -- not supported by our support matrix\n Object.prototype.hasOwnProperty.call(setTimeout, 'clock')\n );\n }\n // istanbul ignore next\n return false;\n}\nfunction getDocument() {\n /* istanbul ignore if */\n if (typeof window === 'undefined') {\n throw new Error('Could not find default container');\n }\n return window.document;\n}\nfunction getWindowFromNode(node) {\n if (node.defaultView) {\n // node is document\n return node.defaultView;\n } else if (node.ownerDocument && node.ownerDocument.defaultView) {\n // node is a DOM node\n return node.ownerDocument.defaultView;\n } else if (node.window) {\n // node is window\n return node.window;\n } else if (node.ownerDocument && node.ownerDocument.defaultView === null) {\n throw new Error(\"It looks like the window object is not available for the provided node.\");\n } else if (node.then instanceof Function) {\n throw new Error(\"It looks like you passed a Promise object instead of a DOM node. Did you do something like `fireEvent.click(screen.findBy...` when you meant to use a `getBy` query `fireEvent.click(screen.getBy...`, or await the findBy query `fireEvent.click(await screen.findBy...`?\");\n } else if (Array.isArray(node)) {\n throw new Error(\"It looks like you passed an Array instead of a DOM node. Did you do something like `fireEvent.click(screen.getAllBy...` when you meant to use a `getBy` query `fireEvent.click(screen.getBy...`?\");\n } else if (typeof node.debug === 'function' && typeof node.logTestingPlaygroundURL === 'function') {\n throw new Error(\"It looks like you passed a `screen` object. Did you do something like `fireEvent.click(screen, ...` when you meant to use a query, e.g. `fireEvent.click(screen.getBy..., `?\");\n } else {\n // The user passed something unusual to a calling function\n throw new Error(\"The given node is not an Element, the node type is: \" + typeof node + \".\");\n }\n}\nfunction checkContainerType(container) {\n if (!container || !(typeof container.querySelector === 'function') || !(typeof container.querySelectorAll === 'function')) {\n throw new TypeError(\"Expected container to be an Element, a Document or a DocumentFragment but got \" + getTypeName(container) + \".\");\n }\n function getTypeName(object) {\n if (typeof object === 'object') {\n return object === null ? 'null' : object.constructor.name;\n }\n return typeof object;\n }\n}\n\nconst shouldHighlight = () => {\n let colors;\n try {\n var _process, _process$env;\n colors = JSON.parse((_process = process) == null ? void 0 : (_process$env = _process.env) == null ? void 0 : _process$env.COLORS);\n } catch (e) {\n // If this throws, process?.env?.COLORS wasn't parsable. Since we only\n // care about `true` or `false`, we can safely ignore the error.\n }\n if (typeof colors === 'boolean') {\n // If `colors` is set explicitly (both `true` and `false`), use that value.\n return colors;\n } else {\n // If `colors` is not set, colorize if we're in node.\n return typeof process !== 'undefined' && process.versions !== undefined && process.versions.node !== undefined;\n }\n};\nconst {\n DOMCollection\n} = prettyFormat.plugins;\n\n// https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType#node_type_constants\nconst ELEMENT_NODE = 1;\nconst COMMENT_NODE = 8;\n\n// https://github.com/facebook/jest/blob/615084195ae1ae61ddd56162c62bbdda17587569/packages/pretty-format/src/plugins/DOMElement.ts#L50\nfunction filterCommentsAndDefaultIgnoreTagsTags(value) {\n return value.nodeType !== COMMENT_NODE && (value.nodeType !== ELEMENT_NODE || !value.matches(getConfig().defaultIgnore));\n}\nfunction prettyDOM(dom, maxLength, options) {\n if (options === void 0) {\n options = {};\n }\n if (!dom) {\n dom = getDocument().body;\n }\n if (typeof maxLength !== 'number') {\n maxLength = typeof process !== 'undefined' && process.env.DEBUG_PRINT_LIMIT || 7000;\n }\n if (maxLength === 0) {\n return '';\n }\n if (dom.documentElement) {\n dom = dom.documentElement;\n }\n let domTypeName = typeof dom;\n if (domTypeName === 'object') {\n domTypeName = dom.constructor.name;\n } else {\n // To don't fall with `in` operator\n dom = {};\n }\n if (!('outerHTML' in dom)) {\n throw new TypeError(\"Expected an element or document but got \" + domTypeName);\n }\n const {\n filterNode = filterCommentsAndDefaultIgnoreTagsTags,\n ...prettyFormatOptions\n } = options;\n const debugContent = prettyFormat.format(dom, {\n plugins: [createDOMElementFilter(filterNode), DOMCollection],\n printFunctionName: false,\n highlight: shouldHighlight(),\n ...prettyFormatOptions\n });\n return maxLength !== undefined && dom.outerHTML.length > maxLength ? debugContent.slice(0, maxLength) + \"...\" : debugContent;\n}\nconst logDOM = function () {\n const userCodeFrame = getUserCodeFrame();\n if (userCodeFrame) {\n console.log(prettyDOM(...arguments) + \"\\n\\n\" + userCodeFrame);\n } else {\n console.log(prettyDOM(...arguments));\n }\n};\n\n// It would be cleaner for this to live inside './queries', but\n// other parts of the code assume that all exports from\n// './queries' are query functions.\nlet config = {\n testIdAttribute: 'data-testid',\n asyncUtilTimeout: 1000,\n // asyncWrapper and advanceTimersWrapper is to support React's async `act` function.\n // forcing react-testing-library to wrap all async functions would've been\n // a total nightmare (consider wrapping every findBy* query and then also\n // updating `within` so those would be wrapped too. Total nightmare).\n // so we have this config option that's really only intended for\n // react-testing-library to use. For that reason, this feature will remain\n // undocumented.\n asyncWrapper: cb => cb(),\n unstable_advanceTimersWrapper: cb => cb(),\n eventWrapper: cb => cb(),\n // default value for the `hidden` option in `ByRole` queries\n defaultHidden: false,\n // default value for the `ignore` option in `ByText` queries\n defaultIgnore: 'script, style',\n // showOriginalStackTrace flag to show the full error stack traces for async errors\n showOriginalStackTrace: false,\n // throw errors w/ suggestions for better queries. Opt in so off by default.\n throwSuggestions: false,\n // called when getBy* queries fail. (message, container) => Error\n getElementError(message, container) {\n const prettifiedDOM = prettyDOM(container);\n const error = new Error([message, \"Ignored nodes: comments, \" + config.defaultIgnore + \"\\n\" + prettifiedDOM].filter(Boolean).join('\\n\\n'));\n error.name = 'TestingLibraryElementError';\n return error;\n },\n _disableExpensiveErrorDiagnostics: false,\n computedStyleSupportsPseudoElements: false\n};\nfunction runWithExpensiveErrorDiagnosticsDisabled(callback) {\n try {\n config._disableExpensiveErrorDiagnostics = true;\n return callback();\n } finally {\n config._disableExpensiveErrorDiagnostics = false;\n }\n}\nfunction configure(newConfig) {\n if (typeof newConfig === 'function') {\n // Pass the existing config out to the provided function\n // and accept a delta in return\n newConfig = newConfig(config);\n }\n\n // Merge the incoming config delta\n config = {\n ...config,\n ...newConfig\n };\n}\nfunction getConfig() {\n return config;\n}\n\nconst labelledNodeNames = ['button', 'meter', 'output', 'progress', 'select', 'textarea', 'input'];\nfunction getTextContent(node) {\n if (labelledNodeNames.includes(node.nodeName.toLowerCase())) {\n return '';\n }\n if (node.nodeType === TEXT_NODE) return node.textContent;\n return Array.from(node.childNodes).map(childNode => getTextContent(childNode)).join('');\n}\nfunction getLabelContent(element) {\n let textContent;\n if (element.tagName.toLowerCase() === 'label') {\n textContent = getTextContent(element);\n } else {\n textContent = element.value || element.textContent;\n }\n return textContent;\n}\n\n// Based on https://github.com/eps1lon/dom-accessibility-api/pull/352\nfunction getRealLabels(element) {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- types are not aware of older browsers that don't implement `labels`\n if (element.labels !== undefined) {\n var _labels;\n return (_labels = element.labels) != null ? _labels : [];\n }\n if (!isLabelable(element)) return [];\n const labels = element.ownerDocument.querySelectorAll('label');\n return Array.from(labels).filter(label => label.control === element);\n}\nfunction isLabelable(element) {\n return /BUTTON|METER|OUTPUT|PROGRESS|SELECT|TEXTAREA/.test(element.tagName) || element.tagName === 'INPUT' && element.getAttribute('type') !== 'hidden';\n}\nfunction getLabels(container, element, _temp) {\n let {\n selector = '*'\n } = _temp === void 0 ? {} : _temp;\n const ariaLabelledBy = element.getAttribute('aria-labelledby');\n const labelsId = ariaLabelledBy ? ariaLabelledBy.split(' ') : [];\n return labelsId.length ? labelsId.map(labelId => {\n const labellingElement = container.querySelector(\"[id=\\\"\" + labelId + \"\\\"]\");\n return labellingElement ? {\n content: getLabelContent(labellingElement),\n formControl: null\n } : {\n content: '',\n formControl: null\n };\n }) : Array.from(getRealLabels(element)).map(label => {\n const textToMatch = getLabelContent(label);\n const formControlSelector = 'button, input, meter, output, progress, select, textarea';\n const labelledFormControl = Array.from(label.querySelectorAll(formControlSelector)).filter(formControlElement => formControlElement.matches(selector))[0];\n return {\n content: textToMatch,\n formControl: labelledFormControl\n };\n });\n}\n\nfunction assertNotNullOrUndefined(matcher) {\n if (matcher === null || matcher === undefined) {\n throw new Error( // eslint-disable-next-line @typescript-eslint/restrict-template-expressions -- implicitly converting `T` to `string`\n \"It looks like \" + matcher + \" was passed instead of a matcher. Did you do something like getByText(\" + matcher + \")?\");\n }\n}\nfunction fuzzyMatches(textToMatch, node, matcher, normalizer) {\n if (typeof textToMatch !== 'string') {\n return false;\n }\n assertNotNullOrUndefined(matcher);\n const normalizedText = normalizer(textToMatch);\n if (typeof matcher === 'string' || typeof matcher === 'number') {\n return normalizedText.toLowerCase().includes(matcher.toString().toLowerCase());\n } else if (typeof matcher === 'function') {\n return matcher(normalizedText, node);\n } else {\n return matchRegExp(matcher, normalizedText);\n }\n}\nfunction matches(textToMatch, node, matcher, normalizer) {\n if (typeof textToMatch !== 'string') {\n return false;\n }\n assertNotNullOrUndefined(matcher);\n const normalizedText = normalizer(textToMatch);\n if (matcher instanceof Function) {\n return matcher(normalizedText, node);\n } else if (matcher instanceof RegExp) {\n return matchRegExp(matcher, normalizedText);\n } else {\n return normalizedText === String(matcher);\n }\n}\nfunction getDefaultNormalizer(_temp) {\n let {\n trim = true,\n collapseWhitespace = true\n } = _temp === void 0 ? {} : _temp;\n return text => {\n let normalizedText = text;\n normalizedText = trim ? normalizedText.trim() : normalizedText;\n normalizedText = collapseWhitespace ? normalizedText.replace(/\\s+/g, ' ') : normalizedText;\n return normalizedText;\n };\n}\n\n/**\n * Constructs a normalizer to pass to functions in matches.js\n * @param {boolean|undefined} trim The user-specified value for `trim`, without\n * any defaulting having been applied\n * @param {boolean|undefined} collapseWhitespace The user-specified value for\n * `collapseWhitespace`, without any defaulting having been applied\n * @param {Function|undefined} normalizer The user-specified normalizer\n * @returns {Function} A normalizer\n */\n\nfunction makeNormalizer(_ref) {\n let {\n trim,\n collapseWhitespace,\n normalizer\n } = _ref;\n if (!normalizer) {\n // No custom normalizer specified. Just use default.\n return getDefaultNormalizer({\n trim,\n collapseWhitespace\n });\n }\n if (typeof trim !== 'undefined' || typeof collapseWhitespace !== 'undefined') {\n // They've also specified a value for trim or collapseWhitespace\n throw new Error('trim and collapseWhitespace are not supported with a normalizer. ' + 'If you want to use the default trim and collapseWhitespace logic in your normalizer, ' + 'use \"getDefaultNormalizer({trim, collapseWhitespace})\" and compose that into your normalizer');\n }\n return normalizer;\n}\nfunction matchRegExp(matcher, text) {\n const match = matcher.test(text);\n if (matcher.global && matcher.lastIndex !== 0) {\n console.warn(\"To match all elements we had to reset the lastIndex of the RegExp because the global flag is enabled. We encourage to remove the global flag from the RegExp.\");\n matcher.lastIndex = 0;\n }\n return match;\n}\n\nfunction getNodeText(node) {\n if (node.matches('input[type=submit], input[type=button], input[type=reset]')) {\n return node.value;\n }\n return Array.from(node.childNodes).filter(child => child.nodeType === TEXT_NODE && Boolean(child.textContent)).map(c => c.textContent).join('');\n}\n\nconst elementRoleList = buildElementRoleList(elementRoles);\n\n/**\n * @param {Element} element -\n * @returns {boolean} - `true` if `element` and its subtree are inaccessible\n */\nfunction isSubtreeInaccessible(element) {\n if (element.hidden === true) {\n return true;\n }\n if (element.getAttribute('aria-hidden') === 'true') {\n return true;\n }\n const window = element.ownerDocument.defaultView;\n if (window.getComputedStyle(element).display === 'none') {\n return true;\n }\n return false;\n}\n\n/**\n * Partial implementation https://www.w3.org/TR/wai-aria-1.2/#tree_exclusion\n * which should only be used for elements with a non-presentational role i.e.\n * `role=\"none\"` and `role=\"presentation\"` will not be excluded.\n *\n * Implements aria-hidden semantics (i.e. parent overrides child)\n * Ignores \"Child Presentational: True\" characteristics\n *\n * @param {Element} element -\n * @param {object} [options] -\n * @param {function (element: Element): boolean} options.isSubtreeInaccessible -\n * can be used to return cached results from previous isSubtreeInaccessible calls\n * @returns {boolean} true if excluded, otherwise false\n */\nfunction isInaccessible(element, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n isSubtreeInaccessible: isSubtreeInaccessibleImpl = isSubtreeInaccessible\n } = options;\n const window = element.ownerDocument.defaultView;\n // since visibility is inherited we can exit early\n if (window.getComputedStyle(element).visibility === 'hidden') {\n return true;\n }\n let currentElement = element;\n while (currentElement) {\n if (isSubtreeInaccessibleImpl(currentElement)) {\n return true;\n }\n currentElement = currentElement.parentElement;\n }\n return false;\n}\nfunction getImplicitAriaRoles(currentNode) {\n // eslint bug here:\n // eslint-disable-next-line no-unused-vars\n for (const {\n match,\n roles\n } of elementRoleList) {\n if (match(currentNode)) {\n return [...roles];\n }\n }\n return [];\n}\nfunction buildElementRoleList(elementRolesMap) {\n function makeElementSelector(_ref) {\n let {\n name,\n attributes\n } = _ref;\n return \"\" + name + attributes.map(_ref2 => {\n let {\n name: attributeName,\n value,\n constraints = []\n } = _ref2;\n const shouldNotExist = constraints.indexOf('undefined') !== -1;\n if (shouldNotExist) {\n return \":not([\" + attributeName + \"])\";\n } else if (value) {\n return \"[\" + attributeName + \"=\\\"\" + value + \"\\\"]\";\n } else {\n return \"[\" + attributeName + \"]\";\n }\n }).join('');\n }\n function getSelectorSpecificity(_ref3) {\n let {\n attributes = []\n } = _ref3;\n return attributes.length;\n }\n function bySelectorSpecificity(_ref4, _ref5) {\n let {\n specificity: leftSpecificity\n } = _ref4;\n let {\n specificity: rightSpecificity\n } = _ref5;\n return rightSpecificity - leftSpecificity;\n }\n function match(element) {\n let {\n attributes = []\n } = element;\n\n // https://github.com/testing-library/dom-testing-library/issues/814\n const typeTextIndex = attributes.findIndex(attribute => attribute.value && attribute.name === 'type' && attribute.value === 'text');\n if (typeTextIndex >= 0) {\n // not using splice to not mutate the attributes array\n attributes = [...attributes.slice(0, typeTextIndex), ...attributes.slice(typeTextIndex + 1)];\n }\n const selector = makeElementSelector({\n ...element,\n attributes\n });\n return node => {\n if (typeTextIndex >= 0 && node.type !== 'text') {\n return false;\n }\n return node.matches(selector);\n };\n }\n let result = [];\n\n // eslint bug here:\n // eslint-disable-next-line no-unused-vars\n for (const [element, roles] of elementRolesMap.entries()) {\n result = [...result, {\n match: match(element),\n roles: Array.from(roles),\n specificity: getSelectorSpecificity(element)\n }];\n }\n return result.sort(bySelectorSpecificity);\n}\nfunction getRoles(container, _temp) {\n let {\n hidden = false\n } = _temp === void 0 ? {} : _temp;\n function flattenDOM(node) {\n return [node, ...Array.from(node.children).reduce((acc, child) => [...acc, ...flattenDOM(child)], [])];\n }\n return flattenDOM(container).filter(element => {\n return hidden === false ? isInaccessible(element) === false : true;\n }).reduce((acc, node) => {\n let roles = [];\n // TODO: This violates html-aria which does not allow any role on every element\n if (node.hasAttribute('role')) {\n roles = node.getAttribute('role').split(' ').slice(0, 1);\n } else {\n roles = getImplicitAriaRoles(node);\n }\n return roles.reduce((rolesAcc, role) => Array.isArray(rolesAcc[role]) ? {\n ...rolesAcc,\n [role]: [...rolesAcc[role], node]\n } : {\n ...rolesAcc,\n [role]: [node]\n }, acc);\n }, {});\n}\nfunction prettyRoles(dom, _ref6) {\n let {\n hidden,\n includeDescription\n } = _ref6;\n const roles = getRoles(dom, {\n hidden\n });\n // We prefer to skip generic role, we don't recommend it\n return Object.entries(roles).filter(_ref7 => {\n let [role] = _ref7;\n return role !== 'generic';\n }).map(_ref8 => {\n let [role, elements] = _ref8;\n const delimiterBar = '-'.repeat(50);\n const elementsString = elements.map(el => {\n const nameString = \"Name \\\"\" + computeAccessibleName(el, {\n computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements\n }) + \"\\\":\\n\";\n const domString = prettyDOM(el.cloneNode(false));\n if (includeDescription) {\n const descriptionString = \"Description \\\"\" + computeAccessibleDescription(el, {\n computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements\n }) + \"\\\":\\n\";\n return \"\" + nameString + descriptionString + domString;\n }\n return \"\" + nameString + domString;\n }).join('\\n\\n');\n return role + \":\\n\\n\" + elementsString + \"\\n\\n\" + delimiterBar;\n }).join('\\n');\n}\nconst logRoles = function (dom, _temp2) {\n let {\n hidden = false\n } = _temp2 === void 0 ? {} : _temp2;\n return console.log(prettyRoles(dom, {\n hidden\n }));\n};\n\n/**\n * @param {Element} element -\n * @returns {boolean | undefined} - false/true if (not)selected, undefined if not selectable\n */\nfunction computeAriaSelected(element) {\n // implicit value from html-aam mappings: https://www.w3.org/TR/html-aam-1.0/#html-attribute-state-and-property-mappings\n // https://www.w3.org/TR/html-aam-1.0/#details-id-97\n if (element.tagName === 'OPTION') {\n return element.selected;\n }\n\n // explicit value\n return checkBooleanAttribute(element, 'aria-selected');\n}\n\n/**\n * @param {Element} element -\n * @returns {boolean} -\n */\nfunction computeAriaBusy(element) {\n // https://www.w3.org/TR/wai-aria-1.1/#aria-busy\n return element.getAttribute('aria-busy') === 'true';\n}\n\n/**\n * @param {Element} element -\n * @returns {boolean | undefined} - false/true if (not)checked, undefined if not checked-able\n */\nfunction computeAriaChecked(element) {\n // implicit value from html-aam mappings: https://www.w3.org/TR/html-aam-1.0/#html-attribute-state-and-property-mappings\n // https://www.w3.org/TR/html-aam-1.0/#details-id-56\n // https://www.w3.org/TR/html-aam-1.0/#details-id-67\n if ('indeterminate' in element && element.indeterminate) {\n return undefined;\n }\n if ('checked' in element) {\n return element.checked;\n }\n\n // explicit value\n return checkBooleanAttribute(element, 'aria-checked');\n}\n\n/**\n * @param {Element} element -\n * @returns {boolean | undefined} - false/true if (not)pressed, undefined if not press-able\n */\nfunction computeAriaPressed(element) {\n // https://www.w3.org/TR/wai-aria-1.1/#aria-pressed\n return checkBooleanAttribute(element, 'aria-pressed');\n}\n\n/**\n * @param {Element} element -\n * @returns {boolean | string | null} -\n */\nfunction computeAriaCurrent(element) {\n var _ref9, _checkBooleanAttribut;\n // https://www.w3.org/TR/wai-aria-1.1/#aria-current\n return (_ref9 = (_checkBooleanAttribut = checkBooleanAttribute(element, 'aria-current')) != null ? _checkBooleanAttribut : element.getAttribute('aria-current')) != null ? _ref9 : false;\n}\n\n/**\n * @param {Element} element -\n * @returns {boolean | undefined} - false/true if (not)expanded, undefined if not expand-able\n */\nfunction computeAriaExpanded(element) {\n // https://www.w3.org/TR/wai-aria-1.1/#aria-expanded\n return checkBooleanAttribute(element, 'aria-expanded');\n}\nfunction checkBooleanAttribute(element, attribute) {\n const attributeValue = element.getAttribute(attribute);\n if (attributeValue === 'true') {\n return true;\n }\n if (attributeValue === 'false') {\n return false;\n }\n return undefined;\n}\n\n/**\n * @param {Element} element -\n * @returns {number | undefined} - number if implicit heading or aria-level present, otherwise undefined\n */\nfunction computeHeadingLevel(element) {\n // https://w3c.github.io/html-aam/#el-h1-h6\n // https://w3c.github.io/html-aam/#el-h1-h6\n const implicitHeadingLevels = {\n H1: 1,\n H2: 2,\n H3: 3,\n H4: 4,\n H5: 5,\n H6: 6\n };\n // explicit aria-level value\n // https://www.w3.org/TR/wai-aria-1.2/#aria-level\n const ariaLevelAttribute = element.getAttribute('aria-level') && Number(element.getAttribute('aria-level'));\n return ariaLevelAttribute || implicitHeadingLevels[element.tagName];\n}\n\n/**\n * @param {Element} element -\n * @returns {number | undefined} -\n */\nfunction computeAriaValueNow(element) {\n const valueNow = element.getAttribute('aria-valuenow');\n return valueNow === null ? undefined : +valueNow;\n}\n\n/**\n * @param {Element} element -\n * @returns {number | undefined} -\n */\nfunction computeAriaValueMax(element) {\n const valueMax = element.getAttribute('aria-valuemax');\n return valueMax === null ? undefined : +valueMax;\n}\n\n/**\n * @param {Element} element -\n * @returns {number | undefined} -\n */\nfunction computeAriaValueMin(element) {\n const valueMin = element.getAttribute('aria-valuemin');\n return valueMin === null ? undefined : +valueMin;\n}\n\n/**\n * @param {Element} element -\n * @returns {string | undefined} -\n */\nfunction computeAriaValueText(element) {\n const valueText = element.getAttribute('aria-valuetext');\n return valueText === null ? undefined : valueText;\n}\n\nconst normalize = getDefaultNormalizer();\nfunction escapeRegExp(string) {\n return string.replace(/[.*+\\-?^${}()|[\\]\\\\]/g, '\\\\$&'); // $& means the whole matched string\n}\n\nfunction getRegExpMatcher(string) {\n return new RegExp(escapeRegExp(string.toLowerCase()), 'i');\n}\nfunction makeSuggestion(queryName, element, content, _ref) {\n let {\n variant,\n name\n } = _ref;\n let warning = '';\n const queryOptions = {};\n const queryArgs = [['Role', 'TestId'].includes(queryName) ? content : getRegExpMatcher(content)];\n if (name) {\n queryOptions.name = getRegExpMatcher(name);\n }\n if (queryName === 'Role' && isInaccessible(element)) {\n queryOptions.hidden = true;\n warning = \"Element is inaccessible. This means that the element and all its children are invisible to screen readers.\\n If you are using the aria-hidden prop, make sure this is the right choice for your case.\\n \";\n }\n if (Object.keys(queryOptions).length > 0) {\n queryArgs.push(queryOptions);\n }\n const queryMethod = variant + \"By\" + queryName;\n return {\n queryName,\n queryMethod,\n queryArgs,\n variant,\n warning,\n toString() {\n if (warning) {\n console.warn(warning);\n }\n let [text, options] = queryArgs;\n text = typeof text === 'string' ? \"'\" + text + \"'\" : text;\n options = options ? \", { \" + Object.entries(options).map(_ref2 => {\n let [k, v] = _ref2;\n return k + \": \" + v;\n }).join(', ') + \" }\" : '';\n return queryMethod + \"(\" + text + options + \")\";\n }\n };\n}\nfunction canSuggest(currentMethod, requestedMethod, data) {\n return data && (!requestedMethod || requestedMethod.toLowerCase() === currentMethod.toLowerCase());\n}\nfunction getSuggestedQuery(element, variant, method) {\n var _element$getAttribute, _getImplicitAriaRoles;\n if (variant === void 0) {\n variant = 'get';\n }\n // don't create suggestions for script and style elements\n if (element.matches(getConfig().defaultIgnore)) {\n return undefined;\n }\n\n //We prefer to suggest something else if the role is generic\n const role = (_element$getAttribute = element.getAttribute('role')) != null ? _element$getAttribute : (_getImplicitAriaRoles = getImplicitAriaRoles(element)) == null ? void 0 : _getImplicitAriaRoles[0];\n if (role !== 'generic' && canSuggest('Role', method, role)) {\n return makeSuggestion('Role', element, role, {\n variant,\n name: computeAccessibleName(element, {\n computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements\n })\n });\n }\n const labelText = getLabels(document, element).map(label => label.content).join(' ');\n if (canSuggest('LabelText', method, labelText)) {\n return makeSuggestion('LabelText', element, labelText, {\n variant\n });\n }\n const placeholderText = element.getAttribute('placeholder');\n if (canSuggest('PlaceholderText', method, placeholderText)) {\n return makeSuggestion('PlaceholderText', element, placeholderText, {\n variant\n });\n }\n const textContent = normalize(getNodeText(element));\n if (canSuggest('Text', method, textContent)) {\n return makeSuggestion('Text', element, textContent, {\n variant\n });\n }\n if (canSuggest('DisplayValue', method, element.value)) {\n return makeSuggestion('DisplayValue', element, normalize(element.value), {\n variant\n });\n }\n const alt = element.getAttribute('alt');\n if (canSuggest('AltText', method, alt)) {\n return makeSuggestion('AltText', element, alt, {\n variant\n });\n }\n const title = element.getAttribute('title');\n if (canSuggest('Title', method, title)) {\n return makeSuggestion('Title', element, title, {\n variant\n });\n }\n const testId = element.getAttribute(getConfig().testIdAttribute);\n if (canSuggest('TestId', method, testId)) {\n return makeSuggestion('TestId', element, testId, {\n variant\n });\n }\n return undefined;\n}\n\n// This is so the stack trace the developer sees is one that's\n// closer to their code (because async stack traces are hard to follow).\nfunction copyStackTrace(target, source) {\n target.stack = source.stack.replace(source.message, target.message);\n}\nfunction waitFor(callback, _ref) {\n let {\n container = getDocument(),\n timeout = getConfig().asyncUtilTimeout,\n showOriginalStackTrace = getConfig().showOriginalStackTrace,\n stackTraceError,\n interval = 50,\n onTimeout = error => {\n error.message = getConfig().getElementError(error.message, container).message;\n return error;\n },\n mutationObserverOptions = {\n subtree: true,\n childList: true,\n attributes: true,\n characterData: true\n }\n } = _ref;\n if (typeof callback !== 'function') {\n throw new TypeError('Received `callback` arg must be a function');\n }\n return new Promise(async (resolve, reject) => {\n let lastError, intervalId, observer;\n let finished = false;\n let promiseStatus = 'idle';\n const overallTimeoutTimer = setTimeout(handleTimeout, timeout);\n const usingJestFakeTimers = jestFakeTimersAreEnabled();\n if (usingJestFakeTimers) {\n const {\n unstable_advanceTimersWrapper: advanceTimersWrapper\n } = getConfig();\n checkCallback();\n // this is a dangerous rule to disable because it could lead to an\n // infinite loop. However, eslint isn't smart enough to know that we're\n // setting finished inside `onDone` which will be called when we're done\n // waiting or when we've timed out.\n // eslint-disable-next-line no-unmodified-loop-condition\n while (!finished) {\n if (!jestFakeTimersAreEnabled()) {\n const error = new Error(\"Changed from using fake timers to real timers while using waitFor. This is not allowed and will result in very strange behavior. Please ensure you're awaiting all async things your test is doing before changing to real timers. For more info, please go to https://github.com/testing-library/dom-testing-library/issues/830\");\n if (!showOriginalStackTrace) copyStackTrace(error, stackTraceError);\n reject(error);\n return;\n }\n\n // In this rare case, we *need* to wait for in-flight promises\n // to resolve before continuing. We don't need to take advantage\n // of parallelization so we're fine.\n // https://stackoverflow.com/a/59243586/971592\n // eslint-disable-next-line no-await-in-loop\n await advanceTimersWrapper(async () => {\n // we *could* (maybe should?) use `advanceTimersToNextTimer` but it's\n // possible that could make this loop go on forever if someone is using\n // third party code that's setting up recursive timers so rapidly that\n // the user's timer's don't get a chance to resolve. So we'll advance\n // by an interval instead. (We have a test for this case).\n jest.advanceTimersByTime(interval);\n });\n\n // It's really important that checkCallback is run *before* we flush\n // in-flight promises. To be honest, I'm not sure why, and I can't quite\n // think of a way to reproduce the problem in a test, but I spent\n // an entire day banging my head against a wall on this.\n checkCallback();\n if (finished) {\n break;\n }\n }\n } else {\n try {\n checkContainerType(container);\n } catch (e) {\n reject(e);\n return;\n }\n intervalId = setInterval(checkRealTimersCallback, interval);\n const {\n MutationObserver\n } = getWindowFromNode(container);\n observer = new MutationObserver(checkRealTimersCallback);\n observer.observe(container, mutationObserverOptions);\n checkCallback();\n }\n function onDone(error, result) {\n finished = true;\n clearTimeout(overallTimeoutTimer);\n if (!usingJestFakeTimers) {\n clearInterval(intervalId);\n observer.disconnect();\n }\n if (error) {\n reject(error);\n } else {\n resolve(result);\n }\n }\n function checkRealTimersCallback() {\n if (jestFakeTimersAreEnabled()) {\n const error = new Error(\"Changed from using real timers to fake timers while using waitFor. This is not allowed and will result in very strange behavior. Please ensure you're awaiting all async things your test is doing before changing to fake timers. For more info, please go to https://github.com/testing-library/dom-testing-library/issues/830\");\n if (!showOriginalStackTrace) copyStackTrace(error, stackTraceError);\n return reject(error);\n } else {\n return checkCallback();\n }\n }\n function checkCallback() {\n if (promiseStatus === 'pending') return;\n try {\n const result = runWithExpensiveErrorDiagnosticsDisabled(callback);\n if (typeof (result == null ? void 0 : result.then) === 'function') {\n promiseStatus = 'pending';\n result.then(resolvedValue => {\n promiseStatus = 'resolved';\n onDone(null, resolvedValue);\n }, rejectedValue => {\n promiseStatus = 'rejected';\n lastError = rejectedValue;\n });\n } else {\n onDone(null, result);\n }\n // If `callback` throws, wait for the next mutation, interval, or timeout.\n } catch (error) {\n // Save the most recent callback error to reject the promise with it in the event of a timeout\n lastError = error;\n }\n }\n function handleTimeout() {\n let error;\n if (lastError) {\n error = lastError;\n if (!showOriginalStackTrace && error.name === 'TestingLibraryElementError') {\n copyStackTrace(error, stackTraceError);\n }\n } else {\n error = new Error('Timed out in waitFor.');\n if (!showOriginalStackTrace) {\n copyStackTrace(error, stackTraceError);\n }\n }\n onDone(onTimeout(error), null);\n }\n });\n}\nfunction waitForWrapper(callback, options) {\n // create the error here so its stack trace is as close to the\n // calling code as possible\n const stackTraceError = new Error('STACK_TRACE_MESSAGE');\n return getConfig().asyncWrapper(() => waitFor(callback, {\n stackTraceError,\n ...options\n }));\n}\n\n/*\neslint\n max-lines-per-function: [\"error\", {\"max\": 200}],\n*/\n\nfunction getElementError(message, container) {\n return getConfig().getElementError(message, container);\n}\nfunction getMultipleElementsFoundError(message, container) {\n return getElementError(message + \"\\n\\n(If this is intentional, then use the `*AllBy*` variant of the query (like `queryAllByText`, `getAllByText`, or `findAllByText`)).\", container);\n}\nfunction queryAllByAttribute(attribute, container, text, _temp) {\n let {\n exact = true,\n collapseWhitespace,\n trim,\n normalizer\n } = _temp === void 0 ? {} : _temp;\n const matcher = exact ? matches : fuzzyMatches;\n const matchNormalizer = makeNormalizer({\n collapseWhitespace,\n trim,\n normalizer\n });\n return Array.from(container.querySelectorAll(\"[\" + attribute + \"]\")).filter(node => matcher(node.getAttribute(attribute), node, text, matchNormalizer));\n}\nfunction queryByAttribute(attribute, container, text, options) {\n const els = queryAllByAttribute(attribute, container, text, options);\n if (els.length > 1) {\n throw getMultipleElementsFoundError(\"Found multiple elements by [\" + attribute + \"=\" + text + \"]\", container);\n }\n return els[0] || null;\n}\n\n// this accepts a query function and returns a function which throws an error\n// if more than one elements is returned, otherwise it returns the first\n// element or null\nfunction makeSingleQuery(allQuery, getMultipleError) {\n return function (container) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n const els = allQuery(container, ...args);\n if (els.length > 1) {\n const elementStrings = els.map(element => getElementError(null, element).message).join('\\n\\n');\n throw getMultipleElementsFoundError(getMultipleError(container, ...args) + \"\\n\\nHere are the matching elements:\\n\\n\" + elementStrings, container);\n }\n return els[0] || null;\n };\n}\nfunction getSuggestionError(suggestion, container) {\n return getConfig().getElementError(\"A better query is available, try this:\\n\" + suggestion.toString() + \"\\n\", container);\n}\n\n// this accepts a query function and returns a function which throws an error\n// if an empty list of elements is returned\nfunction makeGetAllQuery(allQuery, getMissingError) {\n return function (container) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n const els = allQuery(container, ...args);\n if (!els.length) {\n throw getConfig().getElementError(getMissingError(container, ...args), container);\n }\n return els;\n };\n}\n\n// this accepts a getter query function and returns a function which calls\n// waitFor and passing a function which invokes the getter.\nfunction makeFindQuery(getter) {\n return (container, text, options, waitForOptions) => {\n return waitForWrapper(() => {\n return getter(container, text, options);\n }, {\n container,\n ...waitForOptions\n });\n };\n}\nconst wrapSingleQueryWithSuggestion = (query, queryAllByName, variant) => function (container) {\n for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n args[_key3 - 1] = arguments[_key3];\n }\n const element = query(container, ...args);\n const [{\n suggest = getConfig().throwSuggestions\n } = {}] = args.slice(-1);\n if (element && suggest) {\n const suggestion = getSuggestedQuery(element, variant);\n if (suggestion && !queryAllByName.endsWith(suggestion.queryName)) {\n throw getSuggestionError(suggestion.toString(), container);\n }\n }\n return element;\n};\nconst wrapAllByQueryWithSuggestion = (query, queryAllByName, variant) => function (container) {\n for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {\n args[_key4 - 1] = arguments[_key4];\n }\n const els = query(container, ...args);\n const [{\n suggest = getConfig().throwSuggestions\n } = {}] = args.slice(-1);\n if (els.length && suggest) {\n // get a unique list of all suggestion messages. We are only going to make a suggestion if\n // all the suggestions are the same\n const uniqueSuggestionMessages = [...new Set(els.map(element => {\n var _getSuggestedQuery;\n return (_getSuggestedQuery = getSuggestedQuery(element, variant)) == null ? void 0 : _getSuggestedQuery.toString();\n }))];\n if (\n // only want to suggest if all the els have the same suggestion.\n uniqueSuggestionMessages.length === 1 && !queryAllByName.endsWith(\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- TODO: Can this be null at runtime?\n getSuggestedQuery(els[0], variant).queryName)) {\n throw getSuggestionError(uniqueSuggestionMessages[0], container);\n }\n }\n return els;\n};\n\n// TODO: This deviates from the published declarations\n// However, the implementation always required a dyadic (after `container`) not variadic `queryAllBy` considering the implementation of `makeFindQuery`\n// This is at least statically true and can be verified by accepting `QueryMethod<Arguments, HTMLElement[]>`\nfunction buildQueries(queryAllBy, getMultipleError, getMissingError) {\n const queryBy = wrapSingleQueryWithSuggestion(makeSingleQuery(queryAllBy, getMultipleError), queryAllBy.name, 'query');\n const getAllBy = makeGetAllQuery(queryAllBy, getMissingError);\n const getBy = makeSingleQuery(getAllBy, getMultipleError);\n const getByWithSuggestions = wrapSingleQueryWithSuggestion(getBy, queryAllBy.name, 'get');\n const getAllWithSuggestions = wrapAllByQueryWithSuggestion(getAllBy, queryAllBy.name.replace('query', 'get'), 'getAll');\n const findAllBy = makeFindQuery(wrapAllByQueryWithSuggestion(getAllBy, queryAllBy.name, 'findAll'));\n const findBy = makeFindQuery(wrapSingleQueryWithSuggestion(getBy, queryAllBy.name, 'find'));\n return [queryBy, getAllWithSuggestions, getByWithSuggestions, findAllBy, findBy];\n}\n\nvar queryHelpers = /*#__PURE__*/Object.freeze({\n __proto__: null,\n getElementError: getElementError,\n wrapAllByQueryWithSuggestion: wrapAllByQueryWithSuggestion,\n wrapSingleQueryWithSuggestion: wrapSingleQueryWithSuggestion,\n getMultipleElementsFoundError: getMultipleElementsFoundError,\n queryAllByAttribute: queryAllByAttribute,\n queryByAttribute: queryByAttribute,\n makeSingleQuery: makeSingleQuery,\n makeGetAllQuery: makeGetAllQuery,\n makeFindQuery: makeFindQuery,\n buildQueries: buildQueries\n});\n\nfunction queryAllLabels(container) {\n return Array.from(container.querySelectorAll('label,input')).map(node => {\n return {\n node,\n textToMatch: getLabelContent(node)\n };\n }).filter(_ref => {\n let {\n textToMatch\n } = _ref;\n return textToMatch !== null;\n });\n}\nconst queryAllLabelsByText = function (container, text, _temp) {\n let {\n exact = true,\n trim,\n collapseWhitespace,\n normalizer\n } = _temp === void 0 ? {} : _temp;\n const matcher = exact ? matches : fuzzyMatches;\n const matchNormalizer = makeNormalizer({\n collapseWhitespace,\n trim,\n normalizer\n });\n const textToMatchByLabels = queryAllLabels(container);\n return textToMatchByLabels.filter(_ref2 => {\n let {\n node,\n textToMatch\n } = _ref2;\n return matcher(textToMatch, node, text, matchNormalizer);\n }).map(_ref3 => {\n let {\n node\n } = _ref3;\n return node;\n });\n};\nconst queryAllByLabelText = function (container, text, _temp2) {\n let {\n selector = '*',\n exact = true,\n collapseWhitespace,\n trim,\n normalizer\n } = _temp2 === void 0 ? {} : _temp2;\n checkContainerType(container);\n const matcher = exact ? matches : fuzzyMatches;\n const matchNormalizer = makeNormalizer({\n collapseWhitespace,\n trim,\n normalizer\n });\n const matchingLabelledElements = Array.from(container.querySelectorAll('*')).filter(element => {\n return getRealLabels(element).length || element.hasAttribute('aria-labelledby');\n }).reduce((labelledElements, labelledElement) => {\n const labelList = getLabels(container, labelledElement, {\n selector\n });\n labelList.filter(label => Boolean(label.formControl)).forEach(label => {\n if (matcher(label.content, label.formControl, text, matchNormalizer) && label.formControl) {\n labelledElements.push(label.formControl);\n }\n });\n const labelsValue = labelList.filter(label => Boolean(label.content)).map(label => label.content);\n if (matcher(labelsValue.join(' '), labelledElement, text, matchNormalizer)) {\n labelledElements.push(labelledElement);\n }\n if (labelsValue.length > 1) {\n labelsValue.forEach((labelValue, index) => {\n if (matcher(labelValue, labelledElement, text, matchNormalizer)) {\n labelledElements.push(labelledElement);\n }\n const labelsFiltered = [...labelsValue];\n labelsFiltered.splice(index, 1);\n if (labelsFiltered.length > 1) {\n if (matcher(labelsFiltered.join(' '), labelledElement, text, matchNormalizer)) {\n labelledElements.push(labelledElement);\n }\n }\n });\n }\n return labelledElements;\n }, []).concat(queryAllByAttribute('aria-label', container, text, {\n exact,\n normalizer: matchNormalizer\n }));\n return Array.from(new Set(matchingLabelledElements)).filter(element => element.matches(selector));\n};\n\n// the getAll* query would normally look like this:\n// const getAllByLabelText = makeGetAllQuery(\n// queryAllByLabelText,\n// (c, text) => `Unable to find a label with the text of: ${text}`,\n// )\n// however, we can give a more helpful error message than the generic one,\n// so we're writing this one out by hand.\nconst getAllByLabelText = function (container, text) {\n for (var _len = arguments.length, rest = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n rest[_key - 2] = arguments[_key];\n }\n const els = queryAllByLabelText(container, text, ...rest);\n if (!els.length) {\n const labels = queryAllLabelsByText(container, text, ...rest);\n if (labels.length) {\n const tagNames = labels.map(label => getTagNameOfElementAssociatedWithLabelViaFor(container, label)).filter(tagName => !!tagName);\n if (tagNames.length) {\n throw getConfig().getElementError(tagNames.map(tagName => \"Found a label with the text of: \" + text + \", however the element associated with this label (<\" + tagName + \" />) is non-labellable [https://html.spec.whatwg.org/multipage/forms.html#category-label]. If you really need to label a <\" + tagName + \" />, you can use aria-label or aria-labelledby instead.\").join('\\n\\n'), container);\n } else {\n throw getConfig().getElementError(\"Found a label with the text of: \" + text + \", however no form control was found associated to that label. Make sure you're using the \\\"for\\\" attribute or \\\"aria-labelledby\\\" attribute correctly.\", container);\n }\n } else {\n throw getConfig().getElementError(\"Unable to find a label with the text of: \" + text, container);\n }\n }\n return els;\n};\nfunction getTagNameOfElementAssociatedWithLabelViaFor(container, label) {\n const htmlFor = label.getAttribute('for');\n if (!htmlFor) {\n return null;\n }\n const element = container.querySelector(\"[id=\\\"\" + htmlFor + \"\\\"]\");\n return element ? element.tagName.toLowerCase() : null;\n}\n\n// the reason mentioned above is the same reason we're not using buildQueries\nconst getMultipleError$7 = (c, text) => \"Found multiple elements with the text of: \" + text;\nconst queryByLabelText = wrapSingleQueryWithSuggestion(makeSingleQuery(queryAllByLabelText, getMultipleError$7), queryAllByLabelText.name, 'query');\nconst getByLabelText = makeSingleQuery(getAllByLabelText, getMultipleError$7);\nconst findAllByLabelText = makeFindQuery(wrapAllByQueryWithSuggestion(getAllByLabelText, getAllByLabelText.name, 'findAll'));\nconst findByLabelText = makeFindQuery(wrapSingleQueryWithSuggestion(getByLabelText, getAllByLabelText.name, 'find'));\nconst getAllByLabelTextWithSuggestions = wrapAllByQueryWithSuggestion(getAllByLabelText, getAllByLabelText.name, 'getAll');\nconst getByLabelTextWithSuggestions = wrapSingleQueryWithSuggestion(getByLabelText, getAllByLabelText.name, 'get');\nconst queryAllByLabelTextWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByLabelText, queryAllByLabelText.name, 'queryAll');\n\nconst queryAllByPlaceholderText = function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n checkContainerType(args[0]);\n return queryAllByAttribute('placeholder', ...args);\n};\nconst getMultipleError$6 = (c, text) => \"Found multiple elements with the placeholder text of: \" + text;\nconst getMissingError$6 = (c, text) => \"Unable to find an element with the placeholder text of: \" + text;\nconst queryAllByPlaceholderTextWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByPlaceholderText, queryAllByPlaceholderText.name, 'queryAll');\nconst [queryByPlaceholderText, getAllByPlaceholderText, getByPlaceholderText, findAllByPlaceholderText, findByPlaceholderText] = buildQueries(queryAllByPlaceholderText, getMultipleError$6, getMissingError$6);\n\nconst queryAllByText = function (container, text, _temp) {\n let {\n selector = '*',\n exact = true,\n collapseWhitespace,\n trim,\n ignore = getConfig().defaultIgnore,\n normalizer\n } = _temp === void 0 ? {} : _temp;\n checkContainerType(container);\n const matcher = exact ? matches : fuzzyMatches;\n const matchNormalizer = makeNormalizer({\n collapseWhitespace,\n trim,\n normalizer\n });\n let baseArray = [];\n if (typeof container.matches === 'function' && container.matches(selector)) {\n baseArray = [container];\n }\n return [...baseArray, ...Array.from(container.querySelectorAll(selector))]\n // TODO: `matches` according lib.dom.d.ts can get only `string` but according our code it can handle also boolean :)\n .filter(node => !ignore || !node.matches(ignore)).filter(node => matcher(getNodeText(node), node, text, matchNormalizer));\n};\nconst getMultipleError$5 = (c, text) => \"Found multiple elements with the text: \" + text;\nconst getMissingError$5 = function (c, text, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n collapseWhitespace,\n trim,\n normalizer,\n selector\n } = options;\n const matchNormalizer = makeNormalizer({\n collapseWhitespace,\n trim,\n normalizer\n });\n const normalizedText = matchNormalizer(text.toString());\n const isNormalizedDifferent = normalizedText !== text.toString();\n const isCustomSelector = (selector != null ? selector : '*') !== '*';\n return \"Unable to find an element with the text: \" + (isNormalizedDifferent ? normalizedText + \" (normalized from '\" + text + \"')\" : text) + (isCustomSelector ? \", which matches selector '\" + selector + \"'\" : '') + \". This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.\";\n};\nconst queryAllByTextWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByText, queryAllByText.name, 'queryAll');\nconst [queryByText, getAllByText, getByText, findAllByText, findByText] = buildQueries(queryAllByText, getMultipleError$5, getMissingError$5);\n\nconst queryAllByDisplayValue = function (container, value, _temp) {\n let {\n exact = true,\n collapseWhitespace,\n trim,\n normalizer\n } = _temp === void 0 ? {} : _temp;\n checkContainerType(container);\n const matcher = exact ? matches : fuzzyMatches;\n const matchNormalizer = makeNormalizer({\n collapseWhitespace,\n trim,\n normalizer\n });\n return Array.from(container.querySelectorAll(\"input,textarea,select\")).filter(node => {\n if (node.tagName === 'SELECT') {\n const selectedOptions = Array.from(node.options).filter(option => option.selected);\n return selectedOptions.some(optionNode => matcher(getNodeText(optionNode), optionNode, value, matchNormalizer));\n } else {\n return matcher(node.value, node, value, matchNormalizer);\n }\n });\n};\nconst getMultipleError$4 = (c, value) => \"Found multiple elements with the display value: \" + value + \".\";\nconst getMissingError$4 = (c, value) => \"Unable to find an element with the display value: \" + value + \".\";\nconst queryAllByDisplayValueWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByDisplayValue, queryAllByDisplayValue.name, 'queryAll');\nconst [queryByDisplayValue, getAllByDisplayValue, getByDisplayValue, findAllByDisplayValue, findByDisplayValue] = buildQueries(queryAllByDisplayValue, getMultipleError$4, getMissingError$4);\n\n// Valid tags are img, input, area and custom elements\nconst VALID_TAG_REGEXP = /^(img|input|area|.+-.+)$/i;\nconst queryAllByAltText = function (container, alt, options) {\n if (options === void 0) {\n options = {};\n }\n checkContainerType(container);\n return queryAllByAttribute('alt', container, alt, options).filter(node => VALID_TAG_REGEXP.test(node.tagName));\n};\nconst getMultipleError$3 = (c, alt) => \"Found multiple elements with the alt text: \" + alt;\nconst getMissingError$3 = (c, alt) => \"Unable to find an element with the alt text: \" + alt;\nconst queryAllByAltTextWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByAltText, queryAllByAltText.name, 'queryAll');\nconst [queryByAltText, getAllByAltText, getByAltText, findAllByAltText, findByAltText] = buildQueries(queryAllByAltText, getMultipleError$3, getMissingError$3);\n\nconst isSvgTitle = node => {\n var _node$parentElement;\n return node.tagName.toLowerCase() === 'title' && ((_node$parentElement = node.parentElement) == null ? void 0 : _node$parentElement.tagName.toLowerCase()) === 'svg';\n};\nconst queryAllByTitle = function (container, text, _temp) {\n let {\n exact = true,\n collapseWhitespace,\n trim,\n normalizer\n } = _temp === void 0 ? {} : _temp;\n checkContainerType(container);\n const matcher = exact ? matches : fuzzyMatches;\n const matchNormalizer = makeNormalizer({\n collapseWhitespace,\n trim,\n normalizer\n });\n return Array.from(container.querySelectorAll('[title], svg > title')).filter(node => matcher(node.getAttribute('title'), node, text, matchNormalizer) || isSvgTitle(node) && matcher(getNodeText(node), node, text, matchNormalizer));\n};\nconst getMultipleError$2 = (c, title) => \"Found multiple elements with the title: \" + title + \".\";\nconst getMissingError$2 = (c, title) => \"Unable to find an element with the title: \" + title + \".\";\nconst queryAllByTitleWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByTitle, queryAllByTitle.name, 'queryAll');\nconst [queryByTitle, getAllByTitle, getByTitle, findAllByTitle, findByTitle] = buildQueries(queryAllByTitle, getMultipleError$2, getMissingError$2);\n\n/* eslint-disable complexity */\nconst queryAllByRole = function (container, role, _temp) {\n let {\n hidden = getConfig().defaultHidden,\n name,\n description,\n queryFallbacks = false,\n selected,\n busy,\n checked,\n pressed,\n current,\n level,\n expanded,\n value: {\n now: valueNow,\n min: valueMin,\n max: valueMax,\n text: valueText\n } = {}\n } = _temp === void 0 ? {} : _temp;\n checkContainerType(container);\n if (selected !== undefined) {\n var _allRoles$get;\n // guard against unknown roles\n if (((_allRoles$get = roles.get(role)) == null ? void 0 : _allRoles$get.props['aria-selected']) === undefined) {\n throw new Error(\"\\\"aria-selected\\\" is not supported on role \\\"\" + role + \"\\\".\");\n }\n }\n if (busy !== undefined) {\n var _allRoles$get2;\n // guard against unknown roles\n if (((_allRoles$get2 = roles.get(role)) == null ? void 0 : _allRoles$get2.props['aria-busy']) === undefined) {\n throw new Error(\"\\\"aria-busy\\\" is not supported on role \\\"\" + role + \"\\\".\");\n }\n }\n if (checked !== undefined) {\n var _allRoles$get3;\n // guard against unknown roles\n if (((_allRoles$get3 = roles.get(role)) == null ? void 0 : _allRoles$get3.props['aria-checked']) === undefined) {\n throw new Error(\"\\\"aria-checked\\\" is not supported on role \\\"\" + role + \"\\\".\");\n }\n }\n if (pressed !== undefined) {\n var _allRoles$get4;\n // guard against unknown roles\n if (((_allRoles$get4 = roles.get(role)) == null ? void 0 : _allRoles$get4.props['aria-pressed']) === undefined) {\n throw new Error(\"\\\"aria-pressed\\\" is not supported on role \\\"\" + role + \"\\\".\");\n }\n }\n if (current !== undefined) {\n var _allRoles$get5;\n /* istanbul ignore next */\n // guard against unknown roles\n // All currently released ARIA versions support `aria-current` on all roles.\n // Leaving this for symetry and forward compatibility\n if (((_allRoles$get5 = roles.get(role)) == null ? void 0 : _allRoles$get5.props['aria-current']) === undefined) {\n throw new Error(\"\\\"aria-current\\\" is not supported on role \\\"\" + role + \"\\\".\");\n }\n }\n if (level !== undefined) {\n // guard against using `level` option with any role other than `heading`\n if (role !== 'heading') {\n throw new Error(\"Role \\\"\" + role + \"\\\" cannot have \\\"level\\\" property.\");\n }\n }\n if (valueNow !== undefined) {\n var _allRoles$get6;\n // guard against unknown roles\n if (((_allRoles$get6 = roles.get(role)) == null ? void 0 : _allRoles$get6.props['aria-valuenow']) === undefined) {\n throw new Error(\"\\\"aria-valuenow\\\" is not supported on role \\\"\" + role + \"\\\".\");\n }\n }\n if (valueMax !== undefined) {\n var _allRoles$get7;\n // guard against unknown roles\n if (((_allRoles$get7 = roles.get(role)) == null ? void 0 : _allRoles$get7.props['aria-valuemax']) === undefined) {\n throw new Error(\"\\\"aria-valuemax\\\" is not supported on role \\\"\" + role + \"\\\".\");\n }\n }\n if (valueMin !== undefined) {\n var _allRoles$get8;\n // guard against unknown roles\n if (((_allRoles$get8 = roles.get(role)) == null ? void 0 : _allRoles$get8.props['aria-valuemin']) === undefined) {\n throw new Error(\"\\\"aria-valuemin\\\" is not supported on role \\\"\" + role + \"\\\".\");\n }\n }\n if (valueText !== undefined) {\n var _allRoles$get9;\n // guard against unknown roles\n if (((_allRoles$get9 = roles.get(role)) == null ? void 0 : _allRoles$get9.props['aria-valuetext']) === undefined) {\n throw new Error(\"\\\"aria-valuetext\\\" is not supported on role \\\"\" + role + \"\\\".\");\n }\n }\n if (expanded !== undefined) {\n var _allRoles$get10;\n // guard against unknown roles\n if (((_allRoles$get10 = roles.get(role)) == null ? void 0 : _allRoles$get10.props['aria-expanded']) === undefined) {\n throw new Error(\"\\\"aria-expanded\\\" is not supported on role \\\"\" + role + \"\\\".\");\n }\n }\n const subtreeIsInaccessibleCache = new WeakMap();\n function cachedIsSubtreeInaccessible(element) {\n if (!subtreeIsInaccessibleCache.has(element)) {\n subtreeIsInaccessibleCache.set(element, isSubtreeInaccessible(element));\n }\n return subtreeIsInaccessibleCache.get(element);\n }\n return Array.from(container.querySelectorAll(\n // Only query elements that can be matched by the following filters\n makeRoleSelector(role))).filter(node => {\n const isRoleSpecifiedExplicitly = node.hasAttribute('role');\n if (isRoleSpecifiedExplicitly) {\n const roleValue = node.getAttribute('role');\n if (queryFallbacks) {\n return roleValue.split(' ').filter(Boolean).some(roleAttributeToken => roleAttributeToken === role);\n }\n // other wise only send the first token to match\n const [firstRoleAttributeToken] = roleValue.split(' ');\n return firstRoleAttributeToken === role;\n }\n const implicitRoles = getImplicitAriaRoles(node);\n return implicitRoles.some(implicitRole => {\n return implicitRole === role;\n });\n }).filter(element => {\n if (selected !== undefined) {\n return selected === computeAriaSelected(element);\n }\n if (busy !== undefined) {\n return busy === computeAriaBusy(element);\n }\n if (checked !== undefined) {\n return checked === computeAriaChecked(element);\n }\n if (pressed !== undefined) {\n return pressed === computeAriaPressed(element);\n }\n if (current !== undefined) {\n return current === computeAriaCurrent(element);\n }\n if (expanded !== undefined) {\n return expanded === computeAriaExpanded(element);\n }\n if (level !== undefined) {\n return level === computeHeadingLevel(element);\n }\n if (valueNow !== undefined || valueMax !== undefined || valueMin !== undefined || valueText !== undefined) {\n let valueMatches = true;\n if (valueNow !== undefined) {\n valueMatches && (valueMatches = valueNow === computeAriaValueNow(element));\n }\n if (valueMax !== undefined) {\n valueMatches && (valueMatches = valueMax === computeAriaValueMax(element));\n }\n if (valueMin !== undefined) {\n valueMatches && (valueMatches = valueMin === computeAriaValueMin(element));\n }\n if (valueText !== undefined) {\n var _computeAriaValueText;\n valueMatches && (valueMatches = matches((_computeAriaValueText = computeAriaValueText(element)) != null ? _computeAriaValueText : null, element, valueText, text => text));\n }\n return valueMatches;\n }\n // don't care if aria attributes are unspecified\n return true;\n }).filter(element => {\n if (name === undefined) {\n // Don't care\n return true;\n }\n return matches(computeAccessibleName(element, {\n computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements\n }), element, name, text => text);\n }).filter(element => {\n if (description === undefined) {\n // Don't care\n return true;\n }\n return matches(computeAccessibleDescription(element, {\n computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements\n }), element, description, text => text);\n }).filter(element => {\n return hidden === false ? isInaccessible(element, {\n isSubtreeInaccessible: cachedIsSubtreeInaccessible\n }) === false : true;\n });\n};\nfunction makeRoleSelector(role) {\n var _roleElements$get;\n const explicitRoleSelector = \"*[role~=\\\"\" + role + \"\\\"]\";\n const roleRelations = (_roleElements$get = roleElements.get(role)) != null ? _roleElements$get : new Set();\n const implicitRoleSelectors = new Set(Array.from(roleRelations).map(_ref => {\n let {\n name\n } = _ref;\n return name;\n }));\n\n // Current transpilation config sometimes assumes `...` is always applied to arrays.\n // `...` is equivalent to `Array.prototype.concat` for arrays.\n // If you replace this code with `[explicitRoleSelector, ...implicitRoleSelectors]`, make sure every transpilation target retains the `...` in favor of `Array.prototype.concat`.\n return [explicitRoleSelector].concat(Array.from(implicitRoleSelectors)).join(',');\n}\nconst getNameHint = name => {\n let nameHint = '';\n if (name === undefined) {\n nameHint = '';\n } else if (typeof name === 'string') {\n nameHint = \" and name \\\"\" + name + \"\\\"\";\n } else {\n nameHint = \" and name `\" + name + \"`\";\n }\n return nameHint;\n};\nconst getMultipleError$1 = function (c, role, _temp2) {\n let {\n name\n } = _temp2 === void 0 ? {} : _temp2;\n return \"Found multiple elements with the role \\\"\" + role + \"\\\"\" + getNameHint(name);\n};\nconst getMissingError$1 = function (container, role, _temp3) {\n let {\n hidden = getConfig().defaultHidden,\n name,\n description\n } = _temp3 === void 0 ? {} : _temp3;\n if (getConfig()._disableExpensiveErrorDiagnostics) {\n return \"Unable to find role=\\\"\" + role + \"\\\"\" + getNameHint(name);\n }\n let roles = '';\n Array.from(container.children).forEach(childElement => {\n roles += prettyRoles(childElement, {\n hidden,\n includeDescription: description !== undefined\n });\n });\n let roleMessage;\n if (roles.length === 0) {\n if (hidden === false) {\n roleMessage = 'There are no accessible roles. But there might be some inaccessible roles. ' + 'If you wish to access them, then set the `hidden` option to `true`. ' + 'Learn more about this here: https://testing-library.com/docs/dom-testing-library/api-queries#byrole';\n } else {\n roleMessage = 'There are no available roles.';\n }\n } else {\n roleMessage = (\"\\nHere are the \" + (hidden === false ? 'accessible' : 'available') + \" roles:\\n\\n \" + roles.replace(/\\n/g, '\\n ').replace(/\\n\\s\\s\\n/g, '\\n\\n') + \"\\n\").trim();\n }\n let nameHint = '';\n if (name === undefined) {\n nameHint = '';\n } else if (typeof name === 'string') {\n nameHint = \" and name \\\"\" + name + \"\\\"\";\n } else {\n nameHint = \" and name `\" + name + \"`\";\n }\n let descriptionHint = '';\n if (description === undefined) {\n descriptionHint = '';\n } else if (typeof description === 'string') {\n descriptionHint = \" and description \\\"\" + description + \"\\\"\";\n } else {\n descriptionHint = \" and description `\" + description + \"`\";\n }\n return (\"\\nUnable to find an \" + (hidden === false ? 'accessible ' : '') + \"element with the role \\\"\" + role + \"\\\"\" + nameHint + descriptionHint + \"\\n\\n\" + roleMessage).trim();\n};\nconst queryAllByRoleWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByRole, queryAllByRole.name, 'queryAll');\nconst [queryByRole, getAllByRole, getByRole, findAllByRole, findByRole] = buildQueries(queryAllByRole, getMultipleError$1, getMissingError$1);\n\nconst getTestIdAttribute = () => getConfig().testIdAttribute;\nconst queryAllByTestId = function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n checkContainerType(args[0]);\n return queryAllByAttribute(getTestIdAttribute(), ...args);\n};\nconst getMultipleError = (c, id) => \"Found multiple elements by: [\" + getTestIdAttribute() + \"=\\\"\" + id + \"\\\"]\";\nconst getMissingError = (c, id) => \"Unable to find an element by: [\" + getTestIdAttribute() + \"=\\\"\" + id + \"\\\"]\";\nconst queryAllByTestIdWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByTestId, queryAllByTestId.name, 'queryAll');\nconst [queryByTestId, getAllByTestId, getByTestId, findAllByTestId, findByTestId] = buildQueries(queryAllByTestId, getMultipleError, getMissingError);\n\nvar queries = /*#__PURE__*/Object.freeze({\n __proto__: null,\n queryAllByLabelText: queryAllByLabelTextWithSuggestions,\n queryByLabelText: queryByLabelText,\n getAllByLabelText: getAllByLabelTextWithSuggestions,\n getByLabelText: getByLabelTextWithSuggestions,\n findAllByLabelText: findAllByLabelText,\n findByLabelText: findByLabelText,\n queryByPlaceholderText: queryByPlaceholderText,\n queryAllByPlaceholderText: queryAllByPlaceholderTextWithSuggestions,\n getByPlaceholderText: getByPlaceholderText,\n getAllByPlaceholderText: getAllByPlaceholderText,\n findAllByPlaceholderText: findAllByPlaceholderText,\n findByPlaceholderText: findByPlaceholderText,\n queryByText: queryByText,\n queryAllByText: queryAllByTextWithSuggestions,\n getByText: getByText,\n getAllByText: getAllByText,\n findAllByText: findAllByText,\n findByText: findByText,\n queryByDisplayValue: queryByDisplayValue,\n queryAllByDisplayValue: queryAllByDisplayValueWithSuggestions,\n getByDisplayValue: getByDisplayValue,\n getAllByDisplayValue: getAllByDisplayValue,\n findAllByDisplayValue: findAllByDisplayValue,\n findByDisplayValue: findByDisplayValue,\n queryByAltText: queryByAltText,\n queryAllByAltText: queryAllByAltTextWithSuggestions,\n getByAltText: getByAltText,\n getAllByAltText: getAllByAltText,\n findAllByAltText: findAllByAltText,\n findByAltText: findByAltText,\n queryByTitle: queryByTitle,\n queryAllByTitle: queryAllByTitleWithSuggestions,\n getByTitle: getByTitle,\n getAllByTitle: getAllByTitle,\n findAllByTitle: findAllByTitle,\n findByTitle: findByTitle,\n queryByRole: queryByRole,\n queryAllByRole: queryAllByRoleWithSuggestions,\n getAllByRole: getAllByRole,\n getByRole: getByRole,\n findAllByRole: findAllByRole,\n findByRole: findByRole,\n queryByTestId: queryByTestId,\n queryAllByTestId: queryAllByTestIdWithSuggestions,\n getByTestId: getByTestId,\n getAllByTestId: getAllByTestId,\n findAllByTestId: findAllByTestId,\n findByTestId: findByTestId\n});\n\n/**\n * @typedef {{[key: string]: Function}} FuncMap\n */\n\n/**\n * @param {HTMLElement} element container\n * @param {FuncMap} queries object of functions\n * @param {Object} initialValue for reducer\n * @returns {FuncMap} returns object of functions bound to container\n */\nfunction getQueriesForElement(element, queries$1, initialValue) {\n if (queries$1 === void 0) {\n queries$1 = queries;\n }\n if (initialValue === void 0) {\n initialValue = {};\n }\n return Object.keys(queries$1).reduce((helpers, key) => {\n const fn = queries$1[key];\n helpers[key] = fn.bind(null, element);\n return helpers;\n }, initialValue);\n}\n\nconst isRemoved = result => !result || Array.isArray(result) && !result.length;\n\n// Check if the element is not present.\n// As the name implies, waitForElementToBeRemoved should check `present` --> `removed`\nfunction initialCheck(elements) {\n if (isRemoved(elements)) {\n throw new Error('The element(s) given to waitForElementToBeRemoved are already removed. waitForElementToBeRemoved requires that the element(s) exist(s) before waiting for removal.');\n }\n}\nasync function waitForElementToBeRemoved(callback, options) {\n // created here so we get a nice stacktrace\n const timeoutError = new Error('Timed out in waitForElementToBeRemoved.');\n if (typeof callback !== 'function') {\n initialCheck(callback);\n const elements = Array.isArray(callback) ? callback : [callback];\n const getRemainingElements = elements.map(element => {\n let parent = element.parentElement;\n if (parent === null) return () => null;\n while (parent.parentElement) parent = parent.parentElement;\n return () => parent.contains(element) ? element : null;\n });\n callback = () => getRemainingElements.map(c => c()).filter(Boolean);\n }\n initialCheck(callback());\n return waitForWrapper(() => {\n let result;\n try {\n result = callback();\n } catch (error) {\n if (error.name === 'TestingLibraryElementError') {\n return undefined;\n }\n throw error;\n }\n if (!isRemoved(result)) {\n throw timeoutError;\n }\n return undefined;\n }, options);\n}\n\n/*\neslint\n require-await: \"off\"\n*/\n\nconst eventMap = {\n // Clipboard Events\n copy: {\n EventType: 'ClipboardEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n cut: {\n EventType: 'ClipboardEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n paste: {\n EventType: 'ClipboardEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n // Composition Events\n compositionEnd: {\n EventType: 'CompositionEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n compositionStart: {\n EventType: 'CompositionEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n compositionUpdate: {\n EventType: 'CompositionEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n // Keyboard Events\n keyDown: {\n EventType: 'KeyboardEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n charCode: 0,\n composed: true\n }\n },\n keyPress: {\n EventType: 'KeyboardEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n charCode: 0,\n composed: true\n }\n },\n keyUp: {\n EventType: 'KeyboardEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n charCode: 0,\n composed: true\n }\n },\n // Focus Events\n focus: {\n EventType: 'FocusEvent',\n defaultInit: {\n bubbles: false,\n cancelable: false,\n composed: true\n }\n },\n blur: {\n EventType: 'FocusEvent',\n defaultInit: {\n bubbles: false,\n cancelable: false,\n composed: true\n }\n },\n focusIn: {\n EventType: 'FocusEvent',\n defaultInit: {\n bubbles: true,\n cancelable: false,\n composed: true\n }\n },\n focusOut: {\n EventType: 'FocusEvent',\n defaultInit: {\n bubbles: true,\n cancelable: false,\n composed: true\n }\n },\n // Form Events\n change: {\n EventType: 'Event',\n defaultInit: {\n bubbles: true,\n cancelable: false\n }\n },\n input: {\n EventType: 'InputEvent',\n defaultInit: {\n bubbles: true,\n cancelable: false,\n composed: true\n }\n },\n invalid: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: true\n }\n },\n submit: {\n EventType: 'Event',\n defaultInit: {\n bubbles: true,\n cancelable: true\n }\n },\n reset: {\n EventType: 'Event',\n defaultInit: {\n bubbles: true,\n cancelable: true\n }\n },\n // Mouse Events\n click: {\n EventType: 'MouseEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n button: 0,\n composed: true\n }\n },\n contextMenu: {\n EventType: 'MouseEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n dblClick: {\n EventType: 'MouseEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n drag: {\n EventType: 'DragEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n dragEnd: {\n EventType: 'DragEvent',\n defaultInit: {\n bubbles: true,\n cancelable: false,\n composed: true\n }\n },\n dragEnter: {\n EventType: 'DragEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n dragExit: {\n EventType: 'DragEvent',\n defaultInit: {\n bubbles: true,\n cancelable: false,\n composed: true\n }\n },\n dragLeave: {\n EventType: 'DragEvent',\n defaultInit: {\n bubbles: true,\n cancelable: false,\n composed: true\n }\n },\n dragOver: {\n EventType: 'DragEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n dragStart: {\n EventType: 'DragEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n drop: {\n EventType: 'DragEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n mouseDown: {\n EventType: 'MouseEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n mouseEnter: {\n EventType: 'MouseEvent',\n defaultInit: {\n bubbles: false,\n cancelable: false,\n composed: true\n }\n },\n mouseLeave: {\n EventType: 'MouseEvent',\n defaultInit: {\n bubbles: false,\n cancelable: false,\n composed: true\n }\n },\n mouseMove: {\n EventType: 'MouseEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n mouseOut: {\n EventType: 'MouseEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n mouseOver: {\n EventType: 'MouseEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n mouseUp: {\n EventType: 'MouseEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n // Selection Events\n select: {\n EventType: 'Event',\n defaultInit: {\n bubbles: true,\n cancelable: false\n }\n },\n // Touch Events\n touchCancel: {\n EventType: 'TouchEvent',\n defaultInit: {\n bubbles: true,\n cancelable: false,\n composed: true\n }\n },\n touchEnd: {\n EventType: 'TouchEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n touchMove: {\n EventType: 'TouchEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n touchStart: {\n EventType: 'TouchEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n // UI Events\n resize: {\n EventType: 'UIEvent',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n scroll: {\n EventType: 'UIEvent',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n // Wheel Events\n wheel: {\n EventType: 'WheelEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n // Media Events\n abort: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n canPlay: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n canPlayThrough: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n durationChange: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n emptied: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n encrypted: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n ended: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n loadedData: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n loadedMetadata: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n loadStart: {\n EventType: 'ProgressEvent',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n pause: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n play: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n playing: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n progress: {\n EventType: 'ProgressEvent',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n rateChange: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n seeked: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n seeking: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n stalled: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n suspend: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n timeUpdate: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n volumeChange: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n waiting: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n // Events\n load: {\n // TODO: load events can be UIEvent or Event depending on what generated them\n // This is where this abstraction breaks down.\n // But the common targets are <img />, <script /> and window.\n // Neither of these targets receive a UIEvent\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n error: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n // Animation Events\n animationStart: {\n EventType: 'AnimationEvent',\n defaultInit: {\n bubbles: true,\n cancelable: false\n }\n },\n animationEnd: {\n EventType: 'AnimationEvent',\n defaultInit: {\n bubbles: true,\n cancelable: false\n }\n },\n animationIteration: {\n EventType: 'AnimationEvent',\n defaultInit: {\n bubbles: true,\n cancelable: false\n }\n },\n // Transition Events\n transitionCancel: {\n EventType: 'TransitionEvent',\n defaultInit: {\n bubbles: true,\n cancelable: false\n }\n },\n transitionEnd: {\n EventType: 'TransitionEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true\n }\n },\n transitionRun: {\n EventType: 'TransitionEvent',\n defaultInit: {\n bubbles: true,\n cancelable: false\n }\n },\n transitionStart: {\n EventType: 'TransitionEvent',\n defaultInit: {\n bubbles: true,\n cancelable: false\n }\n },\n // pointer events\n pointerOver: {\n EventType: 'PointerEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n pointerEnter: {\n EventType: 'PointerEvent',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n pointerDown: {\n EventType: 'PointerEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n pointerMove: {\n EventType: 'PointerEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n pointerUp: {\n EventType: 'PointerEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n pointerCancel: {\n EventType: 'PointerEvent',\n defaultInit: {\n bubbles: true,\n cancelable: false,\n composed: true\n }\n },\n pointerOut: {\n EventType: 'PointerEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n pointerLeave: {\n EventType: 'PointerEvent',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n gotPointerCapture: {\n EventType: 'PointerEvent',\n defaultInit: {\n bubbles: true,\n cancelable: false,\n composed: true\n }\n },\n lostPointerCapture: {\n EventType: 'PointerEvent',\n defaultInit: {\n bubbles: true,\n cancelable: false,\n composed: true\n }\n },\n // history events\n popState: {\n EventType: 'PopStateEvent',\n defaultInit: {\n bubbles: true,\n cancelable: false\n }\n },\n // window events\n offline: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n online: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n }\n};\nconst eventAliasMap = {\n doubleClick: 'dblClick'\n};\n\nfunction fireEvent(element, event) {\n return getConfig().eventWrapper(() => {\n if (!event) {\n throw new Error(\"Unable to fire an event - please provide an event object.\");\n }\n if (!element) {\n throw new Error(\"Unable to fire a \\\"\" + event.type + \"\\\" event - please provide a DOM element.\");\n }\n return element.dispatchEvent(event);\n });\n}\nfunction createEvent(eventName, node, init, _temp) {\n let {\n EventType = 'Event',\n defaultInit = {}\n } = _temp === void 0 ? {} : _temp;\n if (!node) {\n throw new Error(\"Unable to fire a \\\"\" + eventName + \"\\\" event - please provide a DOM element.\");\n }\n const eventInit = {\n ...defaultInit,\n ...init\n };\n const {\n target: {\n value,\n files,\n ...targetProperties\n } = {}\n } = eventInit;\n if (value !== undefined) {\n setNativeValue(node, value);\n }\n if (files !== undefined) {\n // input.files is a read-only property so this is not allowed:\n // input.files = [file]\n // so we have to use this workaround to set the property\n Object.defineProperty(node, 'files', {\n configurable: true,\n enumerable: true,\n writable: true,\n value: files\n });\n }\n Object.assign(node, targetProperties);\n const window = getWindowFromNode(node);\n const EventConstructor = window[EventType] || window.Event;\n let event;\n /* istanbul ignore else */\n if (typeof EventConstructor === 'function') {\n event = new EventConstructor(eventName, eventInit);\n } else {\n // IE11 polyfill from https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent#Polyfill\n event = window.document.createEvent(EventType);\n const {\n bubbles,\n cancelable,\n detail,\n ...otherInit\n } = eventInit;\n event.initEvent(eventName, bubbles, cancelable, detail);\n Object.keys(otherInit).forEach(eventKey => {\n event[eventKey] = otherInit[eventKey];\n });\n }\n\n // DataTransfer is not supported in jsdom: https://github.com/jsdom/jsdom/issues/1568\n const dataTransferProperties = ['dataTransfer', 'clipboardData'];\n dataTransferProperties.forEach(dataTransferKey => {\n const dataTransferValue = eventInit[dataTransferKey];\n if (typeof dataTransferValue === 'object') {\n /* istanbul ignore if */\n if (typeof window.DataTransfer === 'function') {\n Object.defineProperty(event, dataTransferKey, {\n value: Object.getOwnPropertyNames(dataTransferValue).reduce((acc, propName) => {\n Object.defineProperty(acc, propName, {\n value: dataTransferValue[propName]\n });\n return acc;\n }, new window.DataTransfer())\n });\n } else {\n Object.defineProperty(event, dataTransferKey, {\n value: dataTransferValue\n });\n }\n }\n });\n return event;\n}\nObject.keys(eventMap).forEach(key => {\n const {\n EventType,\n defaultInit\n } = eventMap[key];\n const eventName = key.toLowerCase();\n createEvent[key] = (node, init) => createEvent(eventName, node, init, {\n EventType,\n defaultInit\n });\n fireEvent[key] = (node, init) => fireEvent(node, createEvent[key](node, init));\n});\n\n// function written after some investigation here:\n// https://github.com/facebook/react/issues/10135#issuecomment-401496776\nfunction setNativeValue(element, value) {\n const {\n set: valueSetter\n } = Object.getOwnPropertyDescriptor(element, 'value') || {};\n const prototype = Object.getPrototypeOf(element);\n const {\n set: prototypeValueSetter\n } = Object.getOwnPropertyDescriptor(prototype, 'value') || {};\n if (prototypeValueSetter && valueSetter !== prototypeValueSetter) {\n prototypeValueSetter.call(element, value);\n } else {\n /* istanbul ignore if */\n // eslint-disable-next-line no-lonely-if -- Can't be ignored by istanbul otherwise\n if (valueSetter) {\n valueSetter.call(element, value);\n } else {\n throw new Error('The given element does not have a value setter');\n }\n }\n}\nObject.keys(eventAliasMap).forEach(aliasKey => {\n const key = eventAliasMap[aliasKey];\n fireEvent[aliasKey] = function () {\n return fireEvent[key](...arguments);\n };\n});\n\n/* eslint complexity:[\"error\", 9] */\n\n// WARNING: `lz-string` only has a default export but statically we assume named exports are allowd\nfunction unindent(string) {\n // remove white spaces first, to save a few bytes.\n // testing-playground will reformat on load any ways.\n return string.replace(/[ \\t]*[\\n][ \\t]*/g, '\\n');\n}\nfunction encode(value) {\n return lzString.compressToEncodedURIComponent(unindent(value));\n}\nfunction getPlaygroundUrl(markup) {\n return \"https://testing-playground.com/#markup=\" + encode(markup);\n}\nconst debug = (element, maxLength, options) => Array.isArray(element) ? element.forEach(el => logDOM(el, maxLength, options)) : logDOM(element, maxLength, options);\nconst logTestingPlaygroundURL = function (element) {\n if (element === void 0) {\n element = getDocument().body;\n }\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!element || !('innerHTML' in element)) {\n console.log(\"The element you're providing isn't a valid DOM element.\");\n return;\n }\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!element.innerHTML) {\n console.log(\"The provided element doesn't have any children.\");\n return;\n }\n const playgroundUrl = getPlaygroundUrl(element.innerHTML);\n console.log(\"Open this URL in your browser\\n\\n\" + playgroundUrl);\n return playgroundUrl;\n};\nconst initialValue = {\n debug,\n logTestingPlaygroundURL\n};\nconst screen = typeof document !== 'undefined' && document.body // eslint-disable-line @typescript-eslint/no-unnecessary-condition\n? getQueriesForElement(document.body, queries, initialValue) : Object.keys(queries).reduce((helpers, key) => {\n // `key` is for all intents and purposes the type of keyof `helpers`, which itself is the type of `initialValue` plus incoming properties from `queries`\n // if `Object.keys(something)` returned Array<keyof typeof something> this explicit type assertion would not be necessary\n // see https://stackoverflow.com/questions/55012174/why-doesnt-object-keys-return-a-keyof-type-in-typescript\n helpers[key] = () => {\n throw new TypeError('For queries bound to document.body a global document has to be available... Learn more: https://testing-library.com/s/screen-global-error');\n };\n return helpers;\n}, initialValue);\n\nexport { buildQueries, configure, createEvent, findAllByAltText, findAllByDisplayValue, findAllByLabelText, findAllByPlaceholderText, findAllByRole, findAllByTestId, findAllByText, findAllByTitle, findByAltText, findByDisplayValue, findByLabelText, findByPlaceholderText, findByRole, findByTestId, findByText, findByTitle, fireEvent, getAllByAltText, getAllByDisplayValue, getAllByLabelTextWithSuggestions as getAllByLabelText, getAllByPlaceholderText, getAllByRole, getAllByTestId, getAllByText, getAllByTitle, getByAltText, getByDisplayValue, getByLabelTextWithSuggestions as getByLabelText, getByPlaceholderText, getByRole, getByTestId, getByText, getByTitle, getConfig, getDefaultNormalizer, getElementError, getMultipleElementsFoundError, getNodeText, getQueriesForElement, getRoles, getSuggestedQuery, isInaccessible, logDOM, logRoles, makeFindQuery, makeGetAllQuery, makeSingleQuery, prettyDOM, queries, queryAllByAltTextWithSuggestions as queryAllByAltText, queryAllByAttribute, queryAllByDisplayValueWithSuggestions as queryAllByDisplayValue, queryAllByLabelTextWithSuggestions as queryAllByLabelText, queryAllByPlaceholderTextWithSuggestions as queryAllByPlaceholderText, queryAllByRoleWithSuggestions as queryAllByRole, queryAllByTestIdWithSuggestions as queryAllByTestId, queryAllByTextWithSuggestions as queryAllByText, queryAllByTitleWithSuggestions as queryAllByTitle, queryByAltText, queryByAttribute, queryByDisplayValue, queryByLabelText, queryByPlaceholderText, queryByRole, queryByTestId, queryByText, queryByTitle, queryHelpers, screen, waitForWrapper as waitFor, waitForElementToBeRemoved, getQueriesForElement as within, wrapAllByQueryWithSuggestion, wrapSingleQueryWithSuggestion };\n","import * as React from 'react';\nimport * as DeprecatedReactTestUtils from 'react-dom/test-utils';\nimport ReactDOM from 'react-dom';\nimport * as ReactDOMClient from 'react-dom/client';\nimport { fireEvent as fireEvent$1, getConfig as getConfig$1, configure as configure$1, prettyDOM, getQueriesForElement } from '@testing-library/dom';\nexport * from '@testing-library/dom';\n\nconst reactAct = React.act ?? DeprecatedReactTestUtils.act;\nfunction getGlobalThis() {\n /* istanbul ignore else */\n if (typeof globalThis !== 'undefined') {\n return globalThis;\n }\n /* istanbul ignore next */\n if (typeof self !== 'undefined') {\n return self;\n }\n /* istanbul ignore next */\n if (typeof window !== 'undefined') {\n return window;\n }\n /* istanbul ignore next */\n if (typeof global !== 'undefined') {\n return global;\n }\n /* istanbul ignore next */\n throw new Error('unable to locate global object');\n}\nfunction setIsReactActEnvironment(isReactActEnvironment) {\n getGlobalThis().IS_REACT_ACT_ENVIRONMENT = isReactActEnvironment;\n}\nfunction getIsReactActEnvironment() {\n return getGlobalThis().IS_REACT_ACT_ENVIRONMENT;\n}\nfunction withGlobalActEnvironment(actImplementation) {\n return callback => {\n const previousActEnvironment = getIsReactActEnvironment();\n setIsReactActEnvironment(true);\n try {\n // The return value of `act` is always a thenable.\n let callbackNeedsToBeAwaited = false;\n const actResult = actImplementation(() => {\n const result = callback();\n if (result !== null && typeof result === 'object' && typeof result.then === 'function') {\n callbackNeedsToBeAwaited = true;\n }\n return result;\n });\n if (callbackNeedsToBeAwaited) {\n const thenable = actResult;\n return {\n then: (resolve, reject) => {\n thenable.then(returnValue => {\n setIsReactActEnvironment(previousActEnvironment);\n resolve(returnValue);\n }, error => {\n setIsReactActEnvironment(previousActEnvironment);\n reject(error);\n });\n }\n };\n } else {\n setIsReactActEnvironment(previousActEnvironment);\n return actResult;\n }\n } catch (error) {\n // Can't be a `finally {}` block since we don't know if we have to immediately restore IS_REACT_ACT_ENVIRONMENT\n // or if we have to await the callback first.\n setIsReactActEnvironment(previousActEnvironment);\n throw error;\n }\n };\n}\nconst act = withGlobalActEnvironment(reactAct);\n\n/* eslint no-console:0 */\n\n// react-testing-library's version of fireEvent will call\n// dom-testing-library's version of fireEvent. The reason\n// we make this distinction however is because we have\n// a few extra events that work a bit differently\nconst fireEvent = function () {\n return fireEvent$1(...arguments);\n};\nObject.keys(fireEvent$1).forEach(key => {\n fireEvent[key] = function () {\n return fireEvent$1[key](...arguments);\n };\n});\n\n// React event system tracks native mouseOver/mouseOut events for\n// running onMouseEnter/onMouseLeave handlers\n// @link https://github.com/facebook/react/blob/b87aabdfe1b7461e7331abb3601d9e6bb27544bc/packages/react-dom/src/events/EnterLeaveEventPlugin.js#L24-L31\nconst mouseEnter = fireEvent.mouseEnter;\nconst mouseLeave = fireEvent.mouseLeave;\nfireEvent.mouseEnter = function () {\n mouseEnter(...arguments);\n return fireEvent.mouseOver(...arguments);\n};\nfireEvent.mouseLeave = function () {\n mouseLeave(...arguments);\n return fireEvent.mouseOut(...arguments);\n};\nconst pointerEnter = fireEvent.pointerEnter;\nconst pointerLeave = fireEvent.pointerLeave;\nfireEvent.pointerEnter = function () {\n pointerEnter(...arguments);\n return fireEvent.pointerOver(...arguments);\n};\nfireEvent.pointerLeave = function () {\n pointerLeave(...arguments);\n return fireEvent.pointerOut(...arguments);\n};\nconst select = fireEvent.select;\nfireEvent.select = (node, init) => {\n select(node, init);\n // React tracks this event only on focused inputs\n node.focus();\n\n // React creates this event when one of the following native events happens\n // - contextMenu\n // - mouseUp\n // - dragEnd\n // - keyUp\n // - keyDown\n // so we can use any here\n // @link https://github.com/facebook/react/blob/b87aabdfe1b7461e7331abb3601d9e6bb27544bc/packages/react-dom/src/events/SelectEventPlugin.js#L203-L224\n fireEvent.keyUp(node, init);\n};\n\n// React event system tracks native focusout/focusin events for\n// running blur/focus handlers\n// @link https://github.com/facebook/react/pull/19186\nconst blur = fireEvent.blur;\nconst focus = fireEvent.focus;\nfireEvent.blur = function () {\n fireEvent.focusOut(...arguments);\n return blur(...arguments);\n};\nfireEvent.focus = function () {\n fireEvent.focusIn(...arguments);\n return focus(...arguments);\n};\n\nlet configForRTL = {\n reactStrictMode: false\n};\nfunction getConfig() {\n return {\n ...getConfig$1(),\n ...configForRTL\n };\n}\nfunction configure(newConfig) {\n if (typeof newConfig === 'function') {\n // Pass the existing config out to the provided function\n // and accept a delta in return\n newConfig = newConfig(getConfig());\n }\n const {\n reactStrictMode,\n ...configForDTL\n } = newConfig;\n configure$1(configForDTL);\n configForRTL = {\n ...configForRTL,\n reactStrictMode\n };\n}\n\nfunction jestFakeTimersAreEnabled() {\n /* istanbul ignore else */\n if (typeof jest !== 'undefined' && jest !== null) {\n return (\n // legacy timers\n setTimeout._isMockFunction === true ||\n // modern timers\n // eslint-disable-next-line prefer-object-has-own -- No Object.hasOwn in all target environments we support.\n Object.prototype.hasOwnProperty.call(setTimeout, 'clock')\n );\n } // istanbul ignore next\n\n return false;\n}\nconfigure$1({\n unstable_advanceTimersWrapper: cb => {\n return act(cb);\n },\n // We just want to run `waitFor` without IS_REACT_ACT_ENVIRONMENT\n // But that's not necessarily how `asyncWrapper` is used since it's a public method.\n // Let's just hope nobody else is using it.\n asyncWrapper: async cb => {\n const previousActEnvironment = getIsReactActEnvironment();\n setIsReactActEnvironment(false);\n try {\n const result = await cb();\n // Drain microtask queue.\n // Otherwise we'll restore the previous act() environment, before we resolve the `waitFor` call.\n // The caller would have no chance to wrap the in-flight Promises in `act()`\n await new Promise(resolve => {\n setTimeout(() => {\n resolve();\n }, 0);\n if (jestFakeTimersAreEnabled()) {\n jest.advanceTimersByTime(0);\n }\n });\n return result;\n } finally {\n setIsReactActEnvironment(previousActEnvironment);\n }\n },\n eventWrapper: cb => {\n let result;\n act(() => {\n result = cb();\n });\n return result;\n }\n});\n\n// Ideally we'd just use a WeakMap where containers are keys and roots are values.\n// We use two variables so that we can bail out in constant time when we render with a new container (most common use case)\n/**\n * @type {Set<import('react-dom').Container>}\n */\nconst mountedContainers = new Set();\n/**\n * @type Array<{container: import('react-dom').Container, root: ReturnType<typeof createConcurrentRoot>}>\n */\nconst mountedRootEntries = [];\nfunction strictModeIfNeeded(innerElement) {\n return getConfig().reactStrictMode ? /*#__PURE__*/React.createElement(React.StrictMode, null, innerElement) : innerElement;\n}\nfunction wrapUiIfNeeded(innerElement, wrapperComponent) {\n return wrapperComponent ? /*#__PURE__*/React.createElement(wrapperComponent, null, innerElement) : innerElement;\n}\nfunction createConcurrentRoot(container, _ref) {\n let {\n hydrate,\n ui,\n wrapper: WrapperComponent\n } = _ref;\n let root;\n if (hydrate) {\n act(() => {\n root = ReactDOMClient.hydrateRoot(container, strictModeIfNeeded(wrapUiIfNeeded(ui, WrapperComponent)));\n });\n } else {\n root = ReactDOMClient.createRoot(container);\n }\n return {\n hydrate() {\n /* istanbul ignore if */\n if (!hydrate) {\n throw new Error('Attempted to hydrate a non-hydrateable root. This is a bug in `@testing-library/react`.');\n }\n // Nothing to do since hydration happens when creating the root object.\n },\n render(element) {\n root.render(element);\n },\n unmount() {\n root.unmount();\n }\n };\n}\nfunction createLegacyRoot(container) {\n return {\n hydrate(element) {\n ReactDOM.hydrate(element, container);\n },\n render(element) {\n ReactDOM.render(element, container);\n },\n unmount() {\n ReactDOM.unmountComponentAtNode(container);\n }\n };\n}\nfunction renderRoot(ui, _ref2) {\n let {\n baseElement,\n container,\n hydrate,\n queries,\n root,\n wrapper: WrapperComponent\n } = _ref2;\n act(() => {\n if (hydrate) {\n root.hydrate(strictModeIfNeeded(wrapUiIfNeeded(ui, WrapperComponent)), container);\n } else {\n root.render(strictModeIfNeeded(wrapUiIfNeeded(ui, WrapperComponent)), container);\n }\n });\n return {\n container,\n baseElement,\n debug: function (el, maxLength, options) {\n if (el === void 0) {\n el = baseElement;\n }\n return Array.isArray(el) ?\n // eslint-disable-next-line no-console\n el.forEach(e => console.log(prettyDOM(e, maxLength, options))) :\n // eslint-disable-next-line no-console,\n console.log(prettyDOM(el, maxLength, options));\n },\n unmount: () => {\n act(() => {\n root.unmount();\n });\n },\n rerender: rerenderUi => {\n renderRoot(rerenderUi, {\n container,\n baseElement,\n root,\n wrapper: WrapperComponent\n });\n // Intentionally do not return anything to avoid unnecessarily complicating the API.\n // folks can use all the same utilities we return in the first place that are bound to the container\n },\n asFragment: () => {\n /* istanbul ignore else (old jsdom limitation) */\n if (typeof document.createRange === 'function') {\n return document.createRange().createContextualFragment(container.innerHTML);\n } else {\n const template = document.createElement('template');\n template.innerHTML = container.innerHTML;\n return template.content;\n }\n },\n ...getQueriesForElement(baseElement, queries)\n };\n}\nfunction render(ui, _temp) {\n let {\n container,\n baseElement = container,\n legacyRoot = false,\n queries,\n hydrate = false,\n wrapper\n } = _temp === void 0 ? {} : _temp;\n if (legacyRoot && typeof ReactDOM.render !== 'function') {\n const error = new Error('`legacyRoot: true` is not supported in this version of React. Please use React 18 instead.');\n Error.captureStackTrace(error, render);\n throw error;\n }\n if (!baseElement) {\n // default to document.body instead of documentElement to avoid output of potentially-large\n // head elements (such as JSS style blocks) in debug output\n baseElement = document.body;\n }\n if (!container) {\n container = baseElement.appendChild(document.createElement('div'));\n }\n let root;\n // eslint-disable-next-line no-negated-condition -- we want to map the evolution of this over time. The root is created first. Only later is it re-used so we don't want to read the case that happens later first.\n if (!mountedContainers.has(container)) {\n const createRootImpl = legacyRoot ? createLegacyRoot : createConcurrentRoot;\n root = createRootImpl(container, {\n hydrate,\n ui,\n wrapper\n });\n mountedRootEntries.push({\n container,\n root\n });\n // we'll add it to the mounted containers regardless of whether it's actually\n // added to document.body so the cleanup method works regardless of whether\n // they're passing us a custom container or not.\n mountedContainers.add(container);\n } else {\n mountedRootEntries.forEach(rootEntry => {\n // Else is unreachable since `mountedContainers` has the `container`.\n // Only reachable if one would accidentally add the container to `mountedContainers` but not the root to `mountedRootEntries`\n /* istanbul ignore else */\n if (rootEntry.container === container) {\n root = rootEntry.root;\n }\n });\n }\n return renderRoot(ui, {\n container,\n baseElement,\n queries,\n hydrate,\n wrapper,\n root\n });\n}\nfunction cleanup() {\n mountedRootEntries.forEach(_ref3 => {\n let {\n root,\n container\n } = _ref3;\n act(() => {\n root.unmount();\n });\n if (container.parentNode === document.body) {\n document.body.removeChild(container);\n }\n });\n mountedRootEntries.length = 0;\n mountedContainers.clear();\n}\nfunction renderHook(renderCallback, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n initialProps,\n ...renderOptions\n } = options;\n if (renderOptions.legacyRoot && typeof ReactDOM.render !== 'function') {\n const error = new Error('`legacyRoot: true` is not supported in this version of React. Please use React 18 instead.');\n Error.captureStackTrace(error, renderHook);\n throw error;\n }\n const result = /*#__PURE__*/React.createRef();\n function TestComponent(_ref4) {\n let {\n renderCallbackProps\n } = _ref4;\n const pendingResult = renderCallback(renderCallbackProps);\n React.useEffect(() => {\n result.current = pendingResult;\n });\n return null;\n }\n const {\n rerender: baseRerender,\n unmount\n } = render( /*#__PURE__*/React.createElement(TestComponent, {\n renderCallbackProps: initialProps\n }), renderOptions);\n function rerender(rerenderCallbackProps) {\n return baseRerender( /*#__PURE__*/React.createElement(TestComponent, {\n renderCallbackProps: rerenderCallbackProps\n }));\n }\n return {\n result,\n rerender,\n unmount\n };\n}\n\n/* eslint func-name-matching:0 */\n\n// if we're running in a test runner that supports afterEach\n// or teardown then we'll automatically run cleanup afterEach test\n// this ensures that tests run in isolation from each other\n// if you don't like this then either import the `pure` module\n// or set the RTL_SKIP_AUTO_CLEANUP env variable to 'true'.\nif (typeof process === 'undefined' || !process.env?.RTL_SKIP_AUTO_CLEANUP) {\n // ignore teardown() in code coverage because Jest does not support it\n /* istanbul ignore else */\n if (typeof afterEach === 'function') {\n afterEach(() => {\n cleanup();\n });\n } else if (typeof teardown === 'function') {\n // Block is guarded by `typeof` check.\n // eslint does not support `typeof` guards.\n // eslint-disable-next-line no-undef\n teardown(() => {\n cleanup();\n });\n }\n\n // No test setup with other test runners available\n /* istanbul ignore else */\n if (typeof beforeAll === 'function' && typeof afterAll === 'function') {\n // This matches the behavior of React < 18.\n let previousIsReactActEnvironment = getIsReactActEnvironment();\n beforeAll(() => {\n previousIsReactActEnvironment = getIsReactActEnvironment();\n setIsReactActEnvironment(true);\n });\n afterAll(() => {\n setIsReactActEnvironment(previousIsReactActEnvironment);\n });\n }\n}\n\nexport { act, cleanup, configure, fireEvent, getConfig, render, renderHook };\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getMouseEventOptions = getMouseEventOptions;\n\nfunction isMousePressEvent(event) {\n return event === 'mousedown' || event === 'mouseup' || event === 'click' || event === 'dblclick';\n} // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons\n\n\nconst BUTTONS_NAMES = {\n none: 0,\n primary: 1,\n secondary: 2,\n auxiliary: 4\n}; // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button\n\nconst BUTTON_NAMES = {\n primary: 0,\n auxiliary: 1,\n secondary: 2\n};\n\nfunction translateButtonNumber(value, from) {\n var _Object$entries$find;\n\n const [mapIn, mapOut] = from === 'button' ? [BUTTON_NAMES, BUTTONS_NAMES] : [BUTTONS_NAMES, BUTTON_NAMES];\n const name = (_Object$entries$find = Object.entries(mapIn).find(([, i]) => i === value)) == null ? void 0 : _Object$entries$find[0]; // istanbul ignore next\n\n return name && Object.prototype.hasOwnProperty.call(mapOut, name) ? mapOut[name] : 0;\n}\n\nfunction convertMouseButtons(event, init, property) {\n if (!isMousePressEvent(event)) {\n return 0;\n }\n\n if (typeof init[property] === 'number') {\n return init[property];\n } else if (property === 'button' && typeof init.buttons === 'number') {\n return translateButtonNumber(init.buttons, 'buttons');\n } else if (property === 'buttons' && typeof init.button === 'number') {\n return translateButtonNumber(init.button, 'button');\n }\n\n return property != 'button' && isMousePressEvent(event) ? 1 : 0;\n}\n\nfunction getMouseEventOptions(event, init, clickCount = 0) {\n var _init;\n\n init = (_init = init) != null ? _init : {};\n return { ...init,\n // https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/detail\n detail: event === 'mousedown' || event === 'mouseup' || event === 'click' ? 1 + clickCount : clickCount,\n buttons: convertMouseButtons(event, init, 'buttons'),\n button: convertMouseButtons(event, init, 'button')\n };\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isElementType = isElementType;\n\nfunction isElementType(element, tag, props) {\n if (element.namespaceURI && element.namespaceURI !== 'http://www.w3.org/1999/xhtml') {\n return false;\n }\n\n tag = Array.isArray(tag) ? tag : [tag]; // tagName is uppercase in HTMLDocument and lowercase in XMLDocument\n\n if (!tag.includes(element.tagName.toLowerCase())) {\n return false;\n }\n\n if (props) {\n return Object.entries(props).every(([k, v]) => element[k] === v);\n }\n\n return true;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isClickableInput = isClickableInput;\n\nvar _isElementType = require(\"../misc/isElementType\");\n\nconst CLICKABLE_INPUT_TYPES = ['button', 'color', 'file', 'image', 'reset', 'submit', 'checkbox', 'radio'];\n\nfunction isClickableInput(element) {\n return (0, _isElementType.isElementType)(element, 'button') || (0, _isElementType.isElementType)(element, 'input') && CLICKABLE_INPUT_TYPES.includes(element.type);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.buildTimeValue = buildTimeValue;\n\nfunction buildTimeValue(value) {\n const onlyDigitsValue = value.replace(/\\D/g, '');\n\n if (onlyDigitsValue.length < 2) {\n return value;\n }\n\n const firstDigit = parseInt(onlyDigitsValue[0], 10);\n const secondDigit = parseInt(onlyDigitsValue[1], 10);\n\n if (firstDigit >= 3 || firstDigit === 2 && secondDigit >= 4) {\n let index;\n\n if (firstDigit >= 3) {\n index = 1;\n } else {\n index = 2;\n }\n\n return build(onlyDigitsValue, index);\n }\n\n if (value.length === 2) {\n return value;\n }\n\n return build(onlyDigitsValue, 2);\n}\n\nfunction build(onlyDigitsValue, index) {\n const hours = onlyDigitsValue.slice(0, index);\n const validHours = Math.min(parseInt(hours, 10), 23);\n const minuteCharacters = onlyDigitsValue.slice(index);\n const parsedMinutes = parseInt(minuteCharacters, 10);\n const validMinutes = Math.min(parsedMinutes, 59);\n return `${validHours.toString().padStart(2, '0')}:${validMinutes.toString().padStart(2, '0')}`;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getSelectionRange = getSelectionRange;\nexports.hasSelectionSupport = hasSelectionSupport;\nexports.setSelectionRange = setSelectionRange;\n\nvar _isElementType = require(\"../misc/isElementType\");\n\n// https://github.com/jsdom/jsdom/blob/c2fb8ff94917a4d45e2398543f5dd2a8fed0bdab/lib/jsdom/living/nodes/HTMLInputElement-impl.js#L45\nvar selectionSupportType;\n\n(function (selectionSupportType) {\n selectionSupportType[\"text\"] = \"text\";\n selectionSupportType[\"search\"] = \"search\";\n selectionSupportType[\"url\"] = \"url\";\n selectionSupportType[\"tel\"] = \"tel\";\n selectionSupportType[\"password\"] = \"password\";\n})(selectionSupportType || (selectionSupportType = {}));\n\nconst InputSelection = Symbol('inputSelection');\n\nfunction hasSelectionSupport(element) {\n return (0, _isElementType.isElementType)(element, 'textarea') || (0, _isElementType.isElementType)(element, 'input') && Boolean(selectionSupportType[element.type]);\n}\n\nfunction getSelectionRange(element) {\n if (hasSelectionSupport(element)) {\n return {\n selectionStart: element.selectionStart,\n selectionEnd: element.selectionEnd\n };\n }\n\n if ((0, _isElementType.isElementType)(element, 'input')) {\n var _InputSelection;\n\n return (_InputSelection = element[InputSelection]) != null ? _InputSelection : {\n selectionStart: null,\n selectionEnd: null\n };\n }\n\n const selection = element.ownerDocument.getSelection(); // there should be no editing if the focusNode is outside of element\n // TODO: properly handle selection ranges\n\n if (selection != null && selection.rangeCount && element.contains(selection.focusNode)) {\n const range = selection.getRangeAt(0);\n return {\n selectionStart: range.startOffset,\n selectionEnd: range.endOffset\n };\n } else {\n return {\n selectionStart: null,\n selectionEnd: null\n };\n }\n}\n\nfunction setSelectionRange(element, newSelectionStart, newSelectionEnd) {\n const {\n selectionStart,\n selectionEnd\n } = getSelectionRange(element);\n\n if (selectionStart === newSelectionStart && selectionEnd === newSelectionEnd) {\n return;\n }\n\n if (hasSelectionSupport(element)) {\n element.setSelectionRange(newSelectionStart, newSelectionEnd);\n }\n\n if ((0, _isElementType.isElementType)(element, 'input')) {\n ;\n element[InputSelection] = {\n selectionStart: newSelectionStart,\n selectionEnd: newSelectionEnd\n };\n } // Moving the selection inside <input> or <textarea> does not alter the document Selection.\n\n\n if ((0, _isElementType.isElementType)(element, 'input') || (0, _isElementType.isElementType)(element, 'textarea')) {\n return;\n }\n\n const range = element.ownerDocument.createRange();\n range.selectNodeContents(element); // istanbul ignore else\n\n if (element.firstChild) {\n range.setStart(element.firstChild, newSelectionStart);\n range.setEnd(element.firstChild, newSelectionEnd);\n }\n\n const selection = element.ownerDocument.getSelection(); // istanbul ignore else\n\n if (selection) {\n selection.removeAllRanges();\n selection.addRange(range);\n }\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isContentEditable = isContentEditable;\n\n//jsdom is not supporting isContentEditable\nfunction isContentEditable(element) {\n return element.hasAttribute('contenteditable') && (element.getAttribute('contenteditable') == 'true' || element.getAttribute('contenteditable') == '');\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getValue = getValue;\n\nvar _isContentEditable = require(\"./isContentEditable\");\n\nfunction getValue(element) {\n // istanbul ignore if\n if (!element) {\n return null;\n }\n\n if ((0, _isContentEditable.isContentEditable)(element)) {\n return element.textContent;\n }\n\n return element.value;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isValidDateValue = isValidDateValue;\n\nfunction isValidDateValue(element, value) {\n const clone = element.cloneNode();\n clone.value = value;\n return clone.value === value;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isValidInputTimeValue = isValidInputTimeValue;\n\nfunction isValidInputTimeValue(element, timeValue) {\n const clone = element.cloneNode();\n clone.value = timeValue;\n return clone.value === timeValue;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.calculateNewValue = calculateNewValue;\n\nvar _selectionRange = require(\"./selectionRange\");\n\nvar _getValue2 = require(\"./getValue\");\n\nvar _isValidDateValue = require(\"./isValidDateValue\");\n\nvar _isValidInputTimeValue = require(\"./isValidInputTimeValue\");\n\nfunction calculateNewValue(newEntry, element, value = (() => {\n var _getValue;\n\n return (_getValue = (0, _getValue2.getValue)(element)) != null ? _getValue :\n /* istanbul ignore next */\n '';\n})(), selectionRange = (0, _selectionRange.getSelectionRange)(element), deleteContent) {\n const selectionStart = selectionRange.selectionStart === null ? value.length : selectionRange.selectionStart;\n const selectionEnd = selectionRange.selectionEnd === null ? value.length : selectionRange.selectionEnd;\n const prologEnd = Math.max(0, selectionStart === selectionEnd && deleteContent === 'backward' ? selectionStart - 1 : selectionStart);\n const prolog = value.substring(0, prologEnd);\n const epilogStart = Math.min(value.length, selectionStart === selectionEnd && deleteContent === 'forward' ? selectionEnd + 1 : selectionEnd);\n const epilog = value.substring(epilogStart, value.length);\n let newValue = `${prolog}${newEntry}${epilog}`;\n const newSelectionStart = prologEnd + newEntry.length;\n\n if (element.type === 'date' && !(0, _isValidDateValue.isValidDateValue)(element, newValue)) {\n newValue = value;\n }\n\n if (element.type === 'time' && !(0, _isValidInputTimeValue.isValidInputTimeValue)(element, newValue)) {\n if ((0, _isValidInputTimeValue.isValidInputTimeValue)(element, newEntry)) {\n newValue = newEntry;\n } else {\n newValue = value;\n }\n }\n\n return {\n newValue,\n newSelectionStart\n };\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isCursorAtEnd = isCursorAtEnd;\nexports.isCursorAtStart = isCursorAtStart;\n\nvar _selectionRange = require(\"./selectionRange\");\n\nvar _getValue2 = require(\"./getValue\");\n\nfunction isCursorAtEnd(element) {\n var _getValue;\n\n const {\n selectionStart,\n selectionEnd\n } = (0, _selectionRange.getSelectionRange)(element);\n return selectionStart === selectionEnd && (selectionStart != null ? selectionStart :\n /* istanbul ignore next */\n 0) === ((_getValue = (0, _getValue2.getValue)(element)) != null ? _getValue :\n /* istanbul ignore next */\n '').length;\n}\n\nfunction isCursorAtStart(element) {\n const {\n selectionStart,\n selectionEnd\n } = (0, _selectionRange.getSelectionRange)(element);\n return selectionStart === selectionEnd && (selectionStart != null ? selectionStart :\n /* istanbul ignore next */\n 0) === 0;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.hasUnreliableEmptyValue = hasUnreliableEmptyValue;\n\nvar _isElementType = require(\"../misc/isElementType\");\n\nvar unreliableValueInputTypes;\n/**\n * Check if an empty IDL value on the element could mean a derivation of displayed value and IDL value\n */\n\n(function (unreliableValueInputTypes) {\n unreliableValueInputTypes[\"number\"] = \"number\";\n})(unreliableValueInputTypes || (unreliableValueInputTypes = {}));\n\nfunction hasUnreliableEmptyValue(element) {\n return (0, _isElementType.isElementType)(element, 'input') && Boolean(unreliableValueInputTypes[element.type]);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.editableInputTypes = void 0;\nexports.isEditable = isEditable;\nexports.isEditableInput = isEditableInput;\n\nvar _isElementType = require(\"../misc/isElementType\");\n\nvar _isContentEditable = require(\"./isContentEditable\");\n\nfunction isEditable(element) {\n return isEditableInput(element) || (0, _isElementType.isElementType)(element, 'textarea', {\n readOnly: false\n }) || (0, _isContentEditable.isContentEditable)(element);\n}\n\nlet editableInputTypes;\nexports.editableInputTypes = editableInputTypes;\n\n(function (editableInputTypes) {\n editableInputTypes[\"text\"] = \"text\";\n editableInputTypes[\"date\"] = \"date\";\n editableInputTypes[\"datetime-local\"] = \"datetime-local\";\n editableInputTypes[\"email\"] = \"email\";\n editableInputTypes[\"month\"] = \"month\";\n editableInputTypes[\"number\"] = \"number\";\n editableInputTypes[\"password\"] = \"password\";\n editableInputTypes[\"search\"] = \"search\";\n editableInputTypes[\"tel\"] = \"tel\";\n editableInputTypes[\"time\"] = \"time\";\n editableInputTypes[\"url\"] = \"url\";\n editableInputTypes[\"week\"] = \"week\";\n})(editableInputTypes || (exports.editableInputTypes = editableInputTypes = {}));\n\nfunction isEditableInput(element) {\n return (0, _isElementType.isElementType)(element, 'input', {\n readOnly: false\n }) && Boolean(editableInputTypes[element.type]);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getSpaceUntilMaxLength = getSpaceUntilMaxLength;\n\nvar _isElementType = require(\"../misc/isElementType\");\n\nvar _getValue = require(\"./getValue\");\n\nvar maxLengthSupportedTypes;\n\n(function (maxLengthSupportedTypes) {\n maxLengthSupportedTypes[\"email\"] = \"email\";\n maxLengthSupportedTypes[\"password\"] = \"password\";\n maxLengthSupportedTypes[\"search\"] = \"search\";\n maxLengthSupportedTypes[\"telephone\"] = \"telephone\";\n maxLengthSupportedTypes[\"text\"] = \"text\";\n maxLengthSupportedTypes[\"url\"] = \"url\";\n})(maxLengthSupportedTypes || (maxLengthSupportedTypes = {}));\n\nfunction getSpaceUntilMaxLength(element) {\n const value = (0, _getValue.getValue)(element);\n /* istanbul ignore if */\n\n if (value === null) {\n return undefined;\n }\n\n const maxLength = getSanitizedMaxLength(element);\n return maxLength ? maxLength - value.length : undefined;\n} // can't use .maxLength property because of a jsdom bug:\n// https://github.com/jsdom/jsdom/issues/2927\n\n\nfunction getSanitizedMaxLength(element) {\n var _element$getAttribute;\n\n if (!supportsMaxLength(element)) {\n return undefined;\n }\n\n const attr = (_element$getAttribute = element.getAttribute('maxlength')) != null ? _element$getAttribute : '';\n return /^\\d+$/.test(attr) && Number(attr) >= 0 ? Number(attr) : undefined;\n}\n\nfunction supportsMaxLength(element) {\n return (0, _isElementType.isElementType)(element, 'textarea') || (0, _isElementType.isElementType)(element, 'input') && Boolean(maxLengthSupportedTypes[element.type]);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isDisabled = isDisabled;\n\n// This should probably be extended with checking the element type\n// https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled\nfunction isDisabled(element) {\n return Boolean(element && element.disabled);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getActiveElement = getActiveElement;\n\nvar _isDisabled = require(\"../misc/isDisabled\");\n\nfunction getActiveElement(document) {\n const activeElement = document.activeElement;\n\n if (activeElement != null && activeElement.shadowRoot) {\n return getActiveElement(activeElement.shadowRoot);\n } else {\n // Browser does not yield disabled elements as document.activeElement - jsdom does\n if ((0, _isDisabled.isDisabled)(activeElement)) {\n return document.ownerDocument ? // TODO: verify behavior in ShadowRoot\n\n /* istanbul ignore next */\n document.ownerDocument.body : document.body;\n }\n\n return activeElement;\n }\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isLabelWithInternallyDisabledControl = isLabelWithInternallyDisabledControl;\n\nvar _isDisabled = require(\"./isDisabled\");\n\nvar _isElementType = require(\"./isElementType\");\n\n// Absolutely NO events fire on label elements that contain their control\n// if that control is disabled. NUTS!\n// no joke. There are NO events for: <label><input disabled /><label>\nfunction isLabelWithInternallyDisabledControl(element) {\n if (!(0, _isElementType.isElementType)(element, 'label')) {\n return false;\n }\n\n const control = element.control;\n return Boolean(control && element.contains(control) && (0, _isDisabled.isDisabled)(control));\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.FOCUSABLE_SELECTOR = void 0;\nconst FOCUSABLE_SELECTOR = ['input:not([type=hidden]):not([disabled])', 'button:not([disabled])', 'select:not([disabled])', 'textarea:not([disabled])', '[contenteditable=\"\"]', '[contenteditable=\"true\"]', 'a[href]', '[tabindex]:not([disabled])'].join(', ');\nexports.FOCUSABLE_SELECTOR = FOCUSABLE_SELECTOR;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isFocusable = isFocusable;\n\nvar _isLabelWithInternallyDisabledControl = require(\"../misc/isLabelWithInternallyDisabledControl\");\n\nvar _selector = require(\"./selector\");\n\nfunction isFocusable(element) {\n return !(0, _isLabelWithInternallyDisabledControl.isLabelWithInternallyDisabledControl)(element) && element.matches(_selector.FOCUSABLE_SELECTOR);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.eventWrapper = eventWrapper;\n\nvar _dom = require(\"@testing-library/dom\");\n\nfunction eventWrapper(cb) {\n let result;\n (0, _dom.getConfig)().eventWrapper(() => {\n result = cb();\n });\n return result;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.TEXT_NODE = void 0;\nexports.checkContainerType = checkContainerType;\nexports.getDocument = getDocument;\nexports.getWindowFromNode = getWindowFromNode;\nexports.jestFakeTimersAreEnabled = jestFakeTimersAreEnabled;\n// Constant node.nodeType for text nodes, see:\n// https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType#Node_type_constants\nconst TEXT_NODE = 3;\nexports.TEXT_NODE = TEXT_NODE;\nfunction jestFakeTimersAreEnabled() {\n /* istanbul ignore else */\n // eslint-disable-next-line\n if (typeof jest !== 'undefined' && jest !== null) {\n return (\n // legacy timers\n setTimeout._isMockFunction === true ||\n // modern timers\n // eslint-disable-next-line prefer-object-has-own -- not supported by our support matrix\n Object.prototype.hasOwnProperty.call(setTimeout, 'clock')\n );\n }\n // istanbul ignore next\n return false;\n}\nfunction getDocument() {\n /* istanbul ignore if */\n if (typeof window === 'undefined') {\n throw new Error('Could not find default container');\n }\n return window.document;\n}\nfunction getWindowFromNode(node) {\n if (node.defaultView) {\n // node is document\n return node.defaultView;\n } else if (node.ownerDocument && node.ownerDocument.defaultView) {\n // node is a DOM node\n return node.ownerDocument.defaultView;\n } else if (node.window) {\n // node is window\n return node.window;\n } else if (node.ownerDocument && node.ownerDocument.defaultView === null) {\n throw new Error(`It looks like the window object is not available for the provided node.`);\n } else if (node.then instanceof Function) {\n throw new Error(`It looks like you passed a Promise object instead of a DOM node. Did you do something like \\`fireEvent.click(screen.findBy...\\` when you meant to use a \\`getBy\\` query \\`fireEvent.click(screen.getBy...\\`, or await the findBy query \\`fireEvent.click(await screen.findBy...\\`?`);\n } else if (Array.isArray(node)) {\n throw new Error(`It looks like you passed an Array instead of a DOM node. Did you do something like \\`fireEvent.click(screen.getAllBy...\\` when you meant to use a \\`getBy\\` query \\`fireEvent.click(screen.getBy...\\`?`);\n } else if (typeof node.debug === 'function' && typeof node.logTestingPlaygroundURL === 'function') {\n throw new Error(`It looks like you passed a \\`screen\\` object. Did you do something like \\`fireEvent.click(screen, ...\\` when you meant to use a query, e.g. \\`fireEvent.click(screen.getBy..., \\`?`);\n } else {\n // The user passed something unusual to a calling function\n throw new Error(`The given node is not an Element, the node type is: ${typeof node}.`);\n }\n}\nfunction checkContainerType(container) {\n if (!container || !(typeof container.querySelector === 'function') || !(typeof container.querySelectorAll === 'function')) {\n throw new TypeError(`Expected container to be an Element, a Document or a DocumentFragment but got ${getTypeName(container)}.`);\n }\n function getTypeName(object) {\n if (typeof object === 'object') {\n return object === null ? 'null' : object.constructor.name;\n }\n return typeof object;\n }\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isVisible = isVisible;\n\nvar _helpers = require(\"@testing-library/dom/dist/helpers\");\n\nfunction isVisible(element) {\n const window = (0, _helpers.getWindowFromNode)(element);\n\n for (let el = element; (_el = el) != null && _el.ownerDocument; el = el.parentElement) {\n var _el;\n\n const display = window.getComputedStyle(el).display;\n\n if (display === 'none') {\n return false;\n }\n }\n\n return true;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isDocument = isDocument;\n\nfunction isDocument(el) {\n return el.nodeType === el.DOCUMENT_NODE;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.wait = wait;\n\nfunction wait(time) {\n return new Promise(resolve => setTimeout(() => resolve(), time));\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.hasPointerEvents = hasPointerEvents;\n\nvar _helpers = require(\"@testing-library/dom/dist/helpers\");\n\nfunction hasPointerEvents(element) {\n const window = (0, _helpers.getWindowFromNode)(element);\n\n for (let el = element; (_el = el) != null && _el.ownerDocument; el = el.parentElement) {\n var _el;\n\n const pointerEvents = window.getComputedStyle(el).pointerEvents;\n\n if (pointerEvents && !['inherit', 'unset'].includes(pointerEvents)) {\n return pointerEvents !== 'none';\n }\n }\n\n return true;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.hasFormSubmit = void 0;\n\nconst hasFormSubmit = form => !!(form && (form.querySelector('input[type=\"submit\"]') || form.querySelector('button[type=\"submit\"]')));\n\nexports.hasFormSubmit = hasFormSubmit;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _getMouseEventOptions = require(\"./click/getMouseEventOptions\");\n\nObject.keys(_getMouseEventOptions).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _getMouseEventOptions[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _getMouseEventOptions[key];\n }\n });\n});\n\nvar _isClickableInput = require(\"./click/isClickableInput\");\n\nObject.keys(_isClickableInput).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _isClickableInput[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _isClickableInput[key];\n }\n });\n});\n\nvar _buildTimeValue = require(\"./edit/buildTimeValue\");\n\nObject.keys(_buildTimeValue).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _buildTimeValue[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _buildTimeValue[key];\n }\n });\n});\n\nvar _calculateNewValue = require(\"./edit/calculateNewValue\");\n\nObject.keys(_calculateNewValue).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _calculateNewValue[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _calculateNewValue[key];\n }\n });\n});\n\nvar _cursorPosition = require(\"./edit/cursorPosition\");\n\nObject.keys(_cursorPosition).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _cursorPosition[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _cursorPosition[key];\n }\n });\n});\n\nvar _getValue = require(\"./edit/getValue\");\n\nObject.keys(_getValue).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _getValue[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _getValue[key];\n }\n });\n});\n\nvar _hasUnreliableEmptyValue = require(\"./edit/hasUnreliableEmptyValue\");\n\nObject.keys(_hasUnreliableEmptyValue).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _hasUnreliableEmptyValue[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _hasUnreliableEmptyValue[key];\n }\n });\n});\n\nvar _isContentEditable = require(\"./edit/isContentEditable\");\n\nObject.keys(_isContentEditable).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _isContentEditable[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _isContentEditable[key];\n }\n });\n});\n\nvar _isEditable = require(\"./edit/isEditable\");\n\nObject.keys(_isEditable).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _isEditable[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _isEditable[key];\n }\n });\n});\n\nvar _isValidDateValue = require(\"./edit/isValidDateValue\");\n\nObject.keys(_isValidDateValue).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _isValidDateValue[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _isValidDateValue[key];\n }\n });\n});\n\nvar _isValidInputTimeValue = require(\"./edit/isValidInputTimeValue\");\n\nObject.keys(_isValidInputTimeValue).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _isValidInputTimeValue[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _isValidInputTimeValue[key];\n }\n });\n});\n\nvar _maxLength = require(\"./edit/maxLength\");\n\nObject.keys(_maxLength).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _maxLength[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _maxLength[key];\n }\n });\n});\n\nvar _selectionRange = require(\"./edit/selectionRange\");\n\nObject.keys(_selectionRange).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _selectionRange[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _selectionRange[key];\n }\n });\n});\n\nvar _getActiveElement = require(\"./focus/getActiveElement\");\n\nObject.keys(_getActiveElement).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _getActiveElement[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _getActiveElement[key];\n }\n });\n});\n\nvar _isFocusable = require(\"./focus/isFocusable\");\n\nObject.keys(_isFocusable).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _isFocusable[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _isFocusable[key];\n }\n });\n});\n\nvar _selector = require(\"./focus/selector\");\n\nObject.keys(_selector).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _selector[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _selector[key];\n }\n });\n});\n\nvar _eventWrapper = require(\"./misc/eventWrapper\");\n\nObject.keys(_eventWrapper).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _eventWrapper[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _eventWrapper[key];\n }\n });\n});\n\nvar _isElementType = require(\"./misc/isElementType\");\n\nObject.keys(_isElementType).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _isElementType[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _isElementType[key];\n }\n });\n});\n\nvar _isLabelWithInternallyDisabledControl = require(\"./misc/isLabelWithInternallyDisabledControl\");\n\nObject.keys(_isLabelWithInternallyDisabledControl).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _isLabelWithInternallyDisabledControl[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _isLabelWithInternallyDisabledControl[key];\n }\n });\n});\n\nvar _isVisible = require(\"./misc/isVisible\");\n\nObject.keys(_isVisible).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _isVisible[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _isVisible[key];\n }\n });\n});\n\nvar _isDisabled = require(\"./misc/isDisabled\");\n\nObject.keys(_isDisabled).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _isDisabled[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _isDisabled[key];\n }\n });\n});\n\nvar _isDocument = require(\"./misc/isDocument\");\n\nObject.keys(_isDocument).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _isDocument[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _isDocument[key];\n }\n });\n});\n\nvar _wait = require(\"./misc/wait\");\n\nObject.keys(_wait).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _wait[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _wait[key];\n }\n });\n});\n\nvar _hasPointerEvents = require(\"./misc/hasPointerEvents\");\n\nObject.keys(_hasPointerEvents).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _hasPointerEvents[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _hasPointerEvents[key];\n }\n });\n});\n\nvar _hasFormSubmit = require(\"./misc/hasFormSubmit\");\n\nObject.keys(_hasFormSubmit).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _hasFormSubmit[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _hasFormSubmit[key];\n }\n });\n});","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.hover = hover;\nexports.unhover = unhover;\n\nvar _dom = require(\"@testing-library/dom\");\n\nvar _utils = require(\"./utils\");\n\n// includes `element`\nfunction getParentElements(element) {\n const parentElements = [element];\n let currentElement = element;\n\n while ((currentElement = currentElement.parentElement) != null) {\n parentElements.push(currentElement);\n }\n\n return parentElements;\n}\n\nfunction hover(element, init, {\n skipPointerEventsCheck = false\n} = {}) {\n if (!skipPointerEventsCheck && !(0, _utils.hasPointerEvents)(element)) {\n throw new Error('unable to hover element as it has or inherits pointer-events set to \"none\".');\n }\n\n if ((0, _utils.isLabelWithInternallyDisabledControl)(element)) return;\n const parentElements = getParentElements(element).reverse();\n\n _dom.fireEvent.pointerOver(element, init);\n\n for (const el of parentElements) {\n _dom.fireEvent.pointerEnter(el, init);\n }\n\n if (!(0, _utils.isDisabled)(element)) {\n _dom.fireEvent.mouseOver(element, (0, _utils.getMouseEventOptions)('mouseover', init));\n\n for (const el of parentElements) {\n _dom.fireEvent.mouseEnter(el, (0, _utils.getMouseEventOptions)('mouseenter', init));\n }\n }\n\n _dom.fireEvent.pointerMove(element, init);\n\n if (!(0, _utils.isDisabled)(element)) {\n _dom.fireEvent.mouseMove(element, (0, _utils.getMouseEventOptions)('mousemove', init));\n }\n}\n\nfunction unhover(element, init, {\n skipPointerEventsCheck = false\n} = {}) {\n if (!skipPointerEventsCheck && !(0, _utils.hasPointerEvents)(element)) {\n throw new Error('unable to unhover element as it has or inherits pointer-events set to \"none\".');\n }\n\n if ((0, _utils.isLabelWithInternallyDisabledControl)(element)) return;\n const parentElements = getParentElements(element);\n\n _dom.fireEvent.pointerMove(element, init);\n\n if (!(0, _utils.isDisabled)(element)) {\n _dom.fireEvent.mouseMove(element, (0, _utils.getMouseEventOptions)('mousemove', init));\n }\n\n _dom.fireEvent.pointerOut(element, init);\n\n for (const el of parentElements) {\n _dom.fireEvent.pointerLeave(el, init);\n }\n\n if (!(0, _utils.isDisabled)(element)) {\n _dom.fireEvent.mouseOut(element, (0, _utils.getMouseEventOptions)('mouseout', init));\n\n for (const el of parentElements) {\n _dom.fireEvent.mouseLeave(el, (0, _utils.getMouseEventOptions)('mouseleave', init));\n }\n }\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.blur = blur;\n\nvar _utils = require(\"./utils\");\n\nfunction blur(element) {\n if (!(0, _utils.isFocusable)(element)) return;\n const wasActive = (0, _utils.getActiveElement)(element.ownerDocument) === element;\n if (!wasActive) return;\n (0, _utils.eventWrapper)(() => element.blur());\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.focus = focus;\n\nvar _utils = require(\"./utils\");\n\nfunction focus(element) {\n if (!(0, _utils.isFocusable)(element)) return;\n const isAlreadyActive = (0, _utils.getActiveElement)(element.ownerDocument) === element;\n if (isAlreadyActive) return;\n (0, _utils.eventWrapper)(() => element.focus());\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.click = click;\nexports.dblClick = dblClick;\n\nvar _dom = require(\"@testing-library/dom\");\n\nvar _utils = require(\"./utils\");\n\nvar _hover = require(\"./hover\");\n\nvar _blur = require(\"./blur\");\n\nvar _focus = require(\"./focus\");\n\nfunction getPreviouslyFocusedElement(element) {\n const focusedElement = element.ownerDocument.activeElement;\n const wasAnotherElementFocused = focusedElement && focusedElement !== element.ownerDocument.body && focusedElement !== element;\n return wasAnotherElementFocused ? focusedElement : null;\n}\n\nfunction clickLabel(label, init, {\n clickCount\n}) {\n if ((0, _utils.isLabelWithInternallyDisabledControl)(label)) return;\n\n _dom.fireEvent.pointerDown(label, init);\n\n _dom.fireEvent.mouseDown(label, (0, _utils.getMouseEventOptions)('mousedown', init, clickCount));\n\n _dom.fireEvent.pointerUp(label, init);\n\n _dom.fireEvent.mouseUp(label, (0, _utils.getMouseEventOptions)('mouseup', init, clickCount));\n\n fireClick(label, (0, _utils.getMouseEventOptions)('click', init, clickCount)); // clicking the label will trigger a click of the label.control\n // however, it will not focus the label.control so we have to do it\n // ourselves.\n\n if (label.control) (0, _focus.focus)(label.control);\n}\n\nfunction clickBooleanElement(element, init, {\n clickCount\n}) {\n _dom.fireEvent.pointerDown(element, init);\n\n if (!element.disabled) {\n _dom.fireEvent.mouseDown(element, (0, _utils.getMouseEventOptions)('mousedown', init, clickCount));\n }\n\n (0, _focus.focus)(element);\n\n _dom.fireEvent.pointerUp(element, init);\n\n if (!element.disabled) {\n _dom.fireEvent.mouseUp(element, (0, _utils.getMouseEventOptions)('mouseup', init, clickCount));\n\n fireClick(element, (0, _utils.getMouseEventOptions)('click', init, clickCount));\n }\n}\n\nfunction clickElement(element, init, {\n clickCount\n}) {\n const previousElement = getPreviouslyFocusedElement(element);\n\n _dom.fireEvent.pointerDown(element, init);\n\n if (!(0, _utils.isDisabled)(element)) {\n const continueDefaultHandling = _dom.fireEvent.mouseDown(element, (0, _utils.getMouseEventOptions)('mousedown', init, clickCount));\n\n if (continueDefaultHandling) {\n const closestFocusable = findClosest(element, _utils.isFocusable);\n\n if (previousElement && !closestFocusable) {\n (0, _blur.blur)(previousElement);\n } else if (closestFocusable) {\n (0, _focus.focus)(closestFocusable);\n }\n }\n }\n\n _dom.fireEvent.pointerUp(element, init);\n\n if (!(0, _utils.isDisabled)(element)) {\n _dom.fireEvent.mouseUp(element, (0, _utils.getMouseEventOptions)('mouseup', init, clickCount));\n\n fireClick(element, (0, _utils.getMouseEventOptions)('click', init, clickCount));\n const parentLabel = element.closest('label');\n if (parentLabel != null && parentLabel.control) (0, _focus.focus)(parentLabel.control);\n }\n}\n\nfunction findClosest(element, callback) {\n let el = element;\n\n do {\n if (callback(el)) {\n return el;\n }\n\n el = el.parentElement;\n } while (el && el !== element.ownerDocument.body);\n\n return undefined;\n}\n\nfunction click(element, init, {\n skipHover = false,\n clickCount = 0,\n skipPointerEventsCheck = false\n} = {}) {\n if (!skipPointerEventsCheck && !(0, _utils.hasPointerEvents)(element)) {\n throw new Error('unable to click element as it has or inherits pointer-events set to \"none\".');\n } // We just checked for `pointerEvents`. We can always skip this one in `hover`.\n\n\n if (!skipHover) (0, _hover.hover)(element, init, {\n skipPointerEventsCheck: true\n });\n\n if ((0, _utils.isElementType)(element, 'label')) {\n clickLabel(element, init, {\n clickCount\n });\n } else if ((0, _utils.isElementType)(element, 'input')) {\n if (element.type === 'checkbox' || element.type === 'radio') {\n clickBooleanElement(element, init, {\n clickCount\n });\n } else {\n clickElement(element, init, {\n clickCount\n });\n }\n } else {\n clickElement(element, init, {\n clickCount\n });\n }\n}\n\nfunction fireClick(element, mouseEventOptions) {\n if (mouseEventOptions.button === 2) {\n _dom.fireEvent.contextMenu(element, mouseEventOptions);\n } else {\n _dom.fireEvent.click(element, mouseEventOptions);\n }\n}\n\nfunction dblClick(element, init, {\n skipPointerEventsCheck = false\n} = {}) {\n if (!skipPointerEventsCheck && !(0, _utils.hasPointerEvents)(element)) {\n throw new Error('unable to double-click element as it has or inherits pointer-events set to \"none\".');\n }\n\n (0, _hover.hover)(element, init, {\n skipPointerEventsCheck\n });\n click(element, init, {\n skipHover: true,\n clickCount: 0,\n skipPointerEventsCheck\n });\n click(element, init, {\n skipHover: true,\n clickCount: 1,\n skipPointerEventsCheck\n });\n\n _dom.fireEvent.dblClick(element, (0, _utils.getMouseEventOptions)('dblclick', init, 2));\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getNextKeyDef = getNextKeyDef;\nvar bracketDict;\n\n(function (bracketDict) {\n bracketDict[\"{\"] = \"}\";\n bracketDict[\"[\"] = \"]\";\n})(bracketDict || (bracketDict = {}));\n\nvar legacyModifiers;\n\n(function (legacyModifiers) {\n legacyModifiers[\"alt\"] = \"alt\";\n legacyModifiers[\"ctrl\"] = \"ctrl\";\n legacyModifiers[\"meta\"] = \"meta\";\n legacyModifiers[\"shift\"] = \"shift\";\n})(legacyModifiers || (legacyModifiers = {}));\n\nvar legacyKeyMap;\n/**\n * Get the next key from keyMap\n *\n * Keys can be referenced by `{key}` or `{special}` as well as physical locations per `[code]`.\n * Everything else will be interpreted as a typed character - e.g. `a`.\n * Brackets `{` and `[` can be escaped by doubling - e.g. `foo[[bar` translates to `foo[bar`.\n * Keeping the key pressed can be written as `{key>}`.\n * When keeping the key pressed you can choose how long (how many keydown and keypress) the key is pressed `{key>3}`.\n * You can then release the key per `{key>3/}` or keep it pressed and continue with the next key.\n * Modifiers like `{shift}` imply being kept pressed. This can be turned of per `{shift/}`.\n */\n\n(function (legacyKeyMap) {\n legacyKeyMap[\"ctrl\"] = \"Control\";\n legacyKeyMap[\"del\"] = \"Delete\";\n legacyKeyMap[\"esc\"] = \"Escape\";\n legacyKeyMap[\"space\"] = \" \";\n})(legacyKeyMap || (legacyKeyMap = {}));\n\nfunction getNextKeyDef(text, options) {\n var _options$keyboardMap$;\n\n const {\n type,\n descriptor,\n consumedLength,\n releasePrevious,\n releaseSelf,\n repeat\n } = readNextDescriptor(text);\n const keyDef = (_options$keyboardMap$ = options.keyboardMap.find(def => {\n if (type === '[') {\n var _def$code;\n\n return ((_def$code = def.code) == null ? void 0 : _def$code.toLowerCase()) === descriptor.toLowerCase();\n } else if (type === '{') {\n var _def$key;\n\n const key = mapLegacyKey(descriptor);\n return ((_def$key = def.key) == null ? void 0 : _def$key.toLowerCase()) === key.toLowerCase();\n }\n\n return def.key === descriptor;\n })) != null ? _options$keyboardMap$ : {\n key: 'Unknown',\n code: 'Unknown',\n [type === '[' ? 'code' : 'key']: descriptor\n };\n return {\n keyDef,\n consumedLength,\n releasePrevious,\n releaseSelf,\n repeat\n };\n}\n\nfunction readNextDescriptor(text) {\n let pos = 0;\n const startBracket = text[pos] in bracketDict ? text[pos] : '';\n pos += startBracket.length; // `foo{{bar` is an escaped char at position 3,\n // but `foo{{{>5}bar` should be treated as `{` pressed down for 5 keydowns.\n\n const startBracketRepeated = startBracket ? text.match(new RegExp(`^\\\\${startBracket}+`))[0].length : 0;\n const isEscapedChar = startBracketRepeated === 2 || startBracket === '{' && startBracketRepeated > 3;\n const type = isEscapedChar ? '' : startBracket;\n return {\n type,\n ...(type === '' ? readPrintableChar(text, pos) : readTag(text, pos, type))\n };\n}\n\nfunction readPrintableChar(text, pos) {\n const descriptor = text[pos];\n assertDescriptor(descriptor, text, pos);\n pos += descriptor.length;\n return {\n consumedLength: pos,\n descriptor,\n releasePrevious: false,\n releaseSelf: true,\n repeat: 1\n };\n}\n\nfunction readTag(text, pos, startBracket) {\n var _text$slice$match, _text$slice$match$, _text$slice$match2;\n\n const releasePreviousModifier = text[pos] === '/' ? '/' : '';\n pos += releasePreviousModifier.length;\n const descriptor = (_text$slice$match = text.slice(pos).match(/^\\w+/)) == null ? void 0 : _text$slice$match[0];\n assertDescriptor(descriptor, text, pos);\n pos += descriptor.length;\n const repeatModifier = (_text$slice$match$ = (_text$slice$match2 = text.slice(pos).match(/^>\\d+/)) == null ? void 0 : _text$slice$match2[0]) != null ? _text$slice$match$ : '';\n pos += repeatModifier.length;\n const releaseSelfModifier = text[pos] === '/' || !repeatModifier && text[pos] === '>' ? text[pos] : '';\n pos += releaseSelfModifier.length;\n const expectedEndBracket = bracketDict[startBracket];\n const endBracket = text[pos] === expectedEndBracket ? expectedEndBracket : '';\n\n if (!endBracket) {\n throw new Error(getErrorMessage([!repeatModifier && 'repeat modifier', !releaseSelfModifier && 'release modifier', `\"${expectedEndBracket}\"`].filter(Boolean).join(' or '), text[pos], text));\n }\n\n pos += endBracket.length;\n return {\n consumedLength: pos,\n descriptor,\n releasePrevious: !!releasePreviousModifier,\n repeat: repeatModifier ? Math.max(Number(repeatModifier.substr(1)), 1) : 1,\n releaseSelf: hasReleaseSelf(startBracket, descriptor, releaseSelfModifier, repeatModifier)\n };\n}\n\nfunction assertDescriptor(descriptor, text, pos) {\n if (!descriptor) {\n throw new Error(getErrorMessage('key descriptor', text[pos], text));\n }\n}\n\nfunction getEnumValue(f, key) {\n return f[key];\n}\n\nfunction hasReleaseSelf(startBracket, descriptor, releaseSelfModifier, repeatModifier) {\n if (releaseSelfModifier) {\n return releaseSelfModifier === '/';\n }\n\n if (repeatModifier) {\n return false;\n }\n\n if (startBracket === '{' && getEnumValue(legacyModifiers, descriptor.toLowerCase())) {\n return false;\n }\n\n return true;\n}\n\nfunction mapLegacyKey(descriptor) {\n var _getEnumValue;\n\n return (_getEnumValue = getEnumValue(legacyKeyMap, descriptor)) != null ? _getEnumValue : descriptor;\n}\n\nfunction getErrorMessage(expected, found, text) {\n return `Expected ${expected} but found \"${found != null ? found : ''}\" in \"${text}\"\n See https://github.com/testing-library/user-event/blob/main/README.md#keyboardtext-options\n for more information about how userEvent parses your input.`;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.keydownBehavior = void 0;\n\nvar _utils = require(\"../../utils\");\n\n/**\n * This file should contain behavior for arrow keys as described here:\n * https://w3c.github.io/uievents-code/#key-arrowpad-section\n */\nconst keydownBehavior = [{\n // TODO: implement for contentEditable\n matches: (keyDef, element) => (keyDef.key === 'ArrowLeft' || keyDef.key === 'ArrowRight') && (0, _utils.isElementType)(element, ['input', 'textarea']),\n handle: (keyDef, element) => {\n var _ref;\n\n const {\n selectionStart,\n selectionEnd\n } = (0, _utils.getSelectionRange)(element);\n const direction = keyDef.key === 'ArrowLeft' ? -1 : 1;\n const newPos = (_ref = selectionStart === selectionEnd ? (selectionStart != null ? selectionStart :\n /* istanbul ignore next */\n 0) + direction : direction < 0 ? selectionStart : selectionEnd) != null ? _ref :\n /* istanbul ignore next */\n 0;\n (0, _utils.setSelectionRange)(element, newPos, newPos);\n }\n}];\nexports.keydownBehavior = keydownBehavior;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.carryValue = carryValue;\n\nvar _utils = require(\"../../utils\");\n\nfunction carryValue(element, state, newValue) {\n const value = (0, _utils.getValue)(element);\n state.carryValue = value !== newValue && value === '' && (0, _utils.hasUnreliableEmptyValue)(element) ? newValue : undefined;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.fireChangeForInputTimeIfValid = fireChangeForInputTimeIfValid;\n\nvar _dom = require(\"@testing-library/dom\");\n\nvar _utils = require(\"../../utils\");\n\nfunction fireChangeForInputTimeIfValid(el, prevValue, timeNewEntry) {\n if ((0, _utils.isValidInputTimeValue)(el, timeNewEntry) && prevValue !== timeNewEntry) {\n _dom.fireEvent.change(el, {\n target: {\n value: timeNewEntry\n }\n });\n }\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.fireInputEvent = fireInputEvent;\n\nvar _dom = require(\"@testing-library/dom\");\n\nvar _utils = require(\"../../utils\");\n\nfunction fireInputEvent(element, {\n newValue,\n newSelectionStart,\n eventOverrides\n}) {\n // apply the changes before firing the input event, so that input handlers can access the altered dom and selection\n if ((0, _utils.isContentEditable)(element)) {\n applyNative(element, 'textContent', newValue);\n } else\n /* istanbul ignore else */\n if ((0, _utils.isElementType)(element, ['input', 'textarea'])) {\n applyNative(element, 'value', newValue);\n } else {\n // TODO: properly type guard\n throw new Error('Invalid Element');\n }\n\n setSelectionRangeAfterInput(element, newSelectionStart);\n\n _dom.fireEvent.input(element, { ...eventOverrides\n });\n\n setSelectionRangeAfterInputHandler(element, newValue, newSelectionStart);\n}\n\nfunction setSelectionRangeAfterInput(element, newSelectionStart) {\n (0, _utils.setSelectionRange)(element, newSelectionStart, newSelectionStart);\n}\n\nfunction setSelectionRangeAfterInputHandler(element, newValue, newSelectionStart) {\n const value = (0, _utils.getValue)(element); // don't apply this workaround on elements that don't necessarily report the visible value - e.g. number\n // TODO: this could probably be only applied when there is keyboardState.carryValue\n\n const isUnreliableValue = value === '' && (0, _utils.hasUnreliableEmptyValue)(element);\n\n if (!isUnreliableValue && value === newValue) {\n const {\n selectionStart\n } = (0, _utils.getSelectionRange)(element);\n\n if (selectionStart === value.length) {\n // The value was changed as expected, but the cursor was moved to the end\n // TODO: this could probably be only applied when we work around a framework setter on the element in applyNative\n (0, _utils.setSelectionRange)(element, newSelectionStart, newSelectionStart);\n }\n }\n}\n\nconst initial = Symbol('initial input value/textContent');\nconst onBlur = Symbol('onBlur');\n\n/**\n * React tracks the changes on element properties.\n * This workaround tries to alter the DOM element without React noticing,\n * so that it later picks up the change.\n *\n * @see https://github.com/facebook/react/blob/148f8e497c7d37a3c7ab99f01dec2692427272b1/packages/react-dom/src/client/inputValueTracking.js#L51-L104\n */\nfunction applyNative(element, propName, propValue) {\n const descriptor = Object.getOwnPropertyDescriptor(element, propName);\n const nativeDescriptor = Object.getOwnPropertyDescriptor(element.constructor.prototype, propName);\n\n if (descriptor && nativeDescriptor) {\n Object.defineProperty(element, propName, nativeDescriptor);\n } // Keep track of the initial value to determine if a change event should be dispatched.\n // CONSTRAINT: We can not determine what happened between focus event and our first API call.\n\n\n if (element[initial] === undefined) {\n element[initial] = String(element[propName]);\n }\n\n element[propName] = propValue; // Add an event listener for the blur event to the capture phase on the window.\n // CONSTRAINT: Currently there is no cross-platform solution to unshift the event handler stack.\n // Our change event might occur after other event handlers on the blur event have been processed.\n\n if (!element[onBlur]) {\n var _element$ownerDocumen;\n\n (_element$ownerDocumen = element.ownerDocument.defaultView) == null ? void 0 : _element$ownerDocumen.addEventListener('blur', element[onBlur] = () => {\n const initV = element[initial]; // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n\n delete element[onBlur]; // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n\n delete element[initial];\n\n if (String(element[propName]) !== initV) {\n _dom.fireEvent.change(element);\n }\n }, {\n capture: true,\n once: true\n });\n }\n\n if (descriptor) {\n Object.defineProperty(element, propName, descriptor);\n }\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _carryValue = require(\"./carryValue\");\n\nObject.keys(_carryValue).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _carryValue[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _carryValue[key];\n }\n });\n});\n\nvar _fireChangeForInputTimeIfValid = require(\"./fireChangeForInputTimeIfValid\");\n\nObject.keys(_fireChangeForInputTimeIfValid).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _fireChangeForInputTimeIfValid[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _fireChangeForInputTimeIfValid[key];\n }\n });\n});\n\nvar _fireInputEvent = require(\"./fireInputEvent\");\n\nObject.keys(_fireInputEvent).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _fireInputEvent[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return _fireInputEvent[key];\n }\n });\n});","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.keydownBehavior = void 0;\n\nvar _utils = require(\"../../utils\");\n\nvar _shared = require(\"../shared\");\n\n/**\n * This file should contain behavior for arrow keys as described here:\n * https://w3c.github.io/uievents-code/#key-controlpad-section\n */\nconst keydownBehavior = [{\n matches: (keyDef, element) => (keyDef.key === 'Home' || keyDef.key === 'End') && ((0, _utils.isElementType)(element, ['input', 'textarea']) || (0, _utils.isContentEditable)(element)),\n handle: (keyDef, element) => {\n // This could probably been improved by collapsing a selection range\n if (keyDef.key === 'Home') {\n (0, _utils.setSelectionRange)(element, 0, 0);\n } else {\n var _getValue$length, _getValue;\n\n const newPos = (_getValue$length = (_getValue = (0, _utils.getValue)(element)) == null ? void 0 : _getValue.length) != null ? _getValue$length :\n /* istanbul ignore next */\n 0;\n (0, _utils.setSelectionRange)(element, newPos, newPos);\n }\n }\n}, {\n matches: (keyDef, element) => (keyDef.key === 'PageUp' || keyDef.key === 'PageDown') && (0, _utils.isElementType)(element, ['input']),\n handle: (keyDef, element) => {\n // This could probably been improved by collapsing a selection range\n if (keyDef.key === 'PageUp') {\n (0, _utils.setSelectionRange)(element, 0, 0);\n } else {\n var _getValue$length2, _getValue2;\n\n const newPos = (_getValue$length2 = (_getValue2 = (0, _utils.getValue)(element)) == null ? void 0 : _getValue2.length) != null ? _getValue$length2 :\n /* istanbul ignore next */\n 0;\n (0, _utils.setSelectionRange)(element, newPos, newPos);\n }\n }\n}, {\n matches: (keyDef, element) => keyDef.key === 'Delete' && (0, _utils.isEditable)(element) && !(0, _utils.isCursorAtEnd)(element),\n handle: (keDef, element, options, state) => {\n const {\n newValue,\n newSelectionStart\n } = (0, _utils.calculateNewValue)('', element, state.carryValue, undefined, 'forward');\n (0, _shared.fireInputEvent)(element, {\n newValue,\n newSelectionStart,\n eventOverrides: {\n inputType: 'deleteContentForward'\n }\n });\n (0, _shared.carryValue)(element, state, newValue);\n }\n}];\nexports.keydownBehavior = keydownBehavior;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.keypressBehavior = void 0;\n\nvar _dom = require(\"@testing-library/dom\");\n\nvar _shared = require(\"../shared\");\n\nvar _utils = require(\"../../utils\");\n\n/**\n * This file should cover the behavior for keys that produce character input\n */\nconst keypressBehavior = [{\n matches: (keyDef, element) => {\n var _keyDef$key;\n\n return ((_keyDef$key = keyDef.key) == null ? void 0 : _keyDef$key.length) === 1 && (0, _utils.isElementType)(element, 'input', {\n type: 'time',\n readOnly: false\n });\n },\n handle: (keyDef, element, options, state) => {\n var _state$carryValue;\n\n let newEntry = keyDef.key;\n const textToBeTyped = ((_state$carryValue = state.carryValue) != null ? _state$carryValue : '') + newEntry;\n const timeNewEntry = (0, _utils.buildTimeValue)(textToBeTyped);\n\n if ((0, _utils.isValidInputTimeValue)(element, timeNewEntry)) {\n newEntry = timeNewEntry;\n }\n\n const {\n newValue,\n newSelectionStart\n } = (0, _utils.calculateNewValue)(newEntry, element);\n const prevValue = (0, _utils.getValue)(element); // this check was provided by fireInputEventIfNeeded\n // TODO: verify if it is even needed by this handler\n\n if (prevValue !== newValue) {\n (0, _shared.fireInputEvent)(element, {\n newValue,\n newSelectionStart,\n eventOverrides: {\n data: keyDef.key,\n inputType: 'insertText'\n }\n });\n }\n\n (0, _shared.fireChangeForInputTimeIfValid)(element, prevValue, timeNewEntry);\n state.carryValue = textToBeTyped;\n }\n}, {\n matches: (keyDef, element) => {\n var _keyDef$key2;\n\n return ((_keyDef$key2 = keyDef.key) == null ? void 0 : _keyDef$key2.length) === 1 && (0, _utils.isElementType)(element, 'input', {\n type: 'date',\n readOnly: false\n });\n },\n handle: (keyDef, element, options, state) => {\n var _state$carryValue2;\n\n let newEntry = keyDef.key;\n const textToBeTyped = ((_state$carryValue2 = state.carryValue) != null ? _state$carryValue2 : '') + newEntry;\n const isValidToBeTyped = (0, _utils.isValidDateValue)(element, textToBeTyped);\n\n if (isValidToBeTyped) {\n newEntry = textToBeTyped;\n }\n\n const {\n newValue,\n newSelectionStart\n } = (0, _utils.calculateNewValue)(newEntry, element);\n const prevValue = (0, _utils.getValue)(element); // this check was provided by fireInputEventIfNeeded\n // TODO: verify if it is even needed by this handler\n\n if (prevValue !== newValue) {\n (0, _shared.fireInputEvent)(element, {\n newValue,\n newSelectionStart,\n eventOverrides: {\n data: keyDef.key,\n inputType: 'insertText'\n }\n });\n }\n\n if (isValidToBeTyped) {\n _dom.fireEvent.change(element, {\n target: {\n value: textToBeTyped\n }\n });\n }\n\n state.carryValue = textToBeTyped;\n }\n}, {\n matches: (keyDef, element) => {\n var _keyDef$key3;\n\n return ((_keyDef$key3 = keyDef.key) == null ? void 0 : _keyDef$key3.length) === 1 && (0, _utils.isElementType)(element, 'input', {\n type: 'number',\n readOnly: false\n });\n },\n handle: (keyDef, element, options, state) => {\n var _ref, _state$carryValue3, _newValue$match, _newValue$match2;\n\n if (!/[\\d.\\-e]/.test(keyDef.key)) {\n return;\n }\n\n const oldValue = (_ref = (_state$carryValue3 = state.carryValue) != null ? _state$carryValue3 : (0, _utils.getValue)(element)) != null ? _ref :\n /* istanbul ignore next */\n '';\n const {\n newValue,\n newSelectionStart\n } = (0, _utils.calculateNewValue)(keyDef.key, element, oldValue); // the browser allows some invalid input but not others\n // it allows up to two '-' at any place before any 'e' or one directly following 'e'\n // it allows one '.' at any place before e\n\n const valueParts = newValue.split('e', 2);\n\n if (Number((_newValue$match = newValue.match(/-/g)) == null ? void 0 : _newValue$match.length) > 2 || Number((_newValue$match2 = newValue.match(/\\./g)) == null ? void 0 : _newValue$match2.length) > 1 || valueParts[1] && !/^-?\\d*$/.test(valueParts[1])) {\n return;\n }\n\n (0, _shared.fireInputEvent)(element, {\n newValue,\n newSelectionStart,\n eventOverrides: {\n data: keyDef.key,\n inputType: 'insertText'\n }\n });\n const appliedValue = (0, _utils.getValue)(element);\n\n if (appliedValue === newValue) {\n state.carryValue = undefined;\n } else {\n state.carryValue = newValue;\n }\n }\n}, {\n matches: (keyDef, element) => {\n var _keyDef$key4;\n\n return ((_keyDef$key4 = keyDef.key) == null ? void 0 : _keyDef$key4.length) === 1 && ((0, _utils.isElementType)(element, ['input', 'textarea'], {\n readOnly: false\n }) && !(0, _utils.isClickableInput)(element) || (0, _utils.isContentEditable)(element)) && (0, _utils.getSpaceUntilMaxLength)(element) !== 0;\n },\n handle: (keyDef, element) => {\n const {\n newValue,\n newSelectionStart\n } = (0, _utils.calculateNewValue)(keyDef.key, element);\n (0, _shared.fireInputEvent)(element, {\n newValue,\n newSelectionStart,\n eventOverrides: {\n data: keyDef.key,\n inputType: 'insertText'\n }\n });\n }\n}, {\n matches: (keyDef, element) => keyDef.key === 'Enter' && ((0, _utils.isElementType)(element, 'textarea', {\n readOnly: false\n }) || (0, _utils.isContentEditable)(element)) && (0, _utils.getSpaceUntilMaxLength)(element) !== 0,\n handle: (keyDef, element, options, state) => {\n const {\n newValue,\n newSelectionStart\n } = (0, _utils.calculateNewValue)('\\n', element);\n const inputType = (0, _utils.isContentEditable)(element) && !state.modifiers.shift ? 'insertParagraph' : 'insertLineBreak';\n (0, _shared.fireInputEvent)(element, {\n newValue,\n newSelectionStart,\n eventOverrides: {\n inputType\n }\n });\n }\n}];\nexports.keypressBehavior = keypressBehavior;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getKeyEventProps = getKeyEventProps;\nexports.getMouseEventProps = getMouseEventProps;\n\nfunction getKeyEventProps(keyDef, state) {\n var _keyDef$keyCode, _keyDef$key;\n\n return {\n key: keyDef.key,\n code: keyDef.code,\n altKey: state.modifiers.alt,\n ctrlKey: state.modifiers.ctrl,\n metaKey: state.modifiers.meta,\n shiftKey: state.modifiers.shift,\n\n /** @deprecated use code instead */\n keyCode: (_keyDef$keyCode = keyDef.keyCode) != null ? _keyDef$keyCode : // istanbul ignore next\n ((_keyDef$key = keyDef.key) == null ? void 0 : _keyDef$key.length) === 1 ? keyDef.key.charCodeAt(0) : undefined\n };\n}\n\nfunction getMouseEventProps(state) {\n return {\n altKey: state.modifiers.alt,\n ctrlKey: state.modifiers.ctrl,\n metaKey: state.modifiers.meta,\n shiftKey: state.modifiers.shift\n };\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.preKeyupBehavior = exports.preKeydownBehavior = exports.postKeyupBehavior = exports.keyupBehavior = exports.keypressBehavior = exports.keydownBehavior = void 0;\n\nvar _dom = require(\"@testing-library/dom\");\n\nvar _utils = require(\"../../utils\");\n\nvar _getEventProps = require(\"../getEventProps\");\n\nvar _shared = require(\"../shared\");\n\n/**\n * This file should contain behavior for functional keys as described here:\n * https://w3c.github.io/uievents-code/#key-alphanumeric-functional\n */\nconst modifierKeys = {\n Alt: 'alt',\n Control: 'ctrl',\n Shift: 'shift',\n Meta: 'meta'\n};\nconst preKeydownBehavior = [// modifierKeys switch on the modifier BEFORE the keydown event\n...Object.entries(modifierKeys).map(([key, modKey]) => ({\n matches: keyDef => keyDef.key === key,\n handle: (keyDef, element, options, state) => {\n state.modifiers[modKey] = true;\n }\n})), // AltGraph produces an extra keydown for Control\n// The modifier does not change\n{\n matches: keyDef => keyDef.key === 'AltGraph',\n handle: (keyDef, element, options, state) => {\n var _options$keyboardMap$;\n\n const ctrlKeyDef = (_options$keyboardMap$ = options.keyboardMap.find(k => k.key === 'Control')) != null ? _options$keyboardMap$ :\n /* istanbul ignore next */\n {\n key: 'Control',\n code: 'Control'\n };\n\n _dom.fireEvent.keyDown(element, (0, _getEventProps.getKeyEventProps)(ctrlKeyDef, state));\n }\n}];\nexports.preKeydownBehavior = preKeydownBehavior;\nconst keydownBehavior = [{\n matches: keyDef => keyDef.key === 'CapsLock',\n handle: (keyDef, element, options, state) => {\n state.modifiers.caps = !state.modifiers.caps;\n }\n}, {\n matches: (keyDef, element) => keyDef.key === 'Backspace' && (0, _utils.isEditable)(element) && !(0, _utils.isCursorAtStart)(element),\n handle: (keyDef, element, options, state) => {\n const {\n newValue,\n newSelectionStart\n } = (0, _utils.calculateNewValue)('', element, state.carryValue, undefined, 'backward');\n (0, _shared.fireInputEvent)(element, {\n newValue,\n newSelectionStart,\n eventOverrides: {\n inputType: 'deleteContentBackward'\n }\n });\n (0, _shared.carryValue)(element, state, newValue);\n }\n}];\nexports.keydownBehavior = keydownBehavior;\nconst keypressBehavior = [{\n matches: (keyDef, element) => keyDef.key === 'Enter' && (0, _utils.isElementType)(element, 'input') && ['checkbox', 'radio'].includes(element.type),\n handle: (keyDef, element) => {\n const form = element.form;\n\n if ((0, _utils.hasFormSubmit)(form)) {\n _dom.fireEvent.submit(form);\n }\n }\n}, {\n matches: (keyDef, element) => keyDef.key === 'Enter' && ((0, _utils.isClickableInput)(element) || // Links with href defined should handle Enter the same as a click\n (0, _utils.isElementType)(element, 'a') && Boolean(element.href)),\n handle: (keyDef, element, options, state) => {\n _dom.fireEvent.click(element, (0, _getEventProps.getMouseEventProps)(state));\n }\n}, {\n matches: (keyDef, element) => keyDef.key === 'Enter' && (0, _utils.isElementType)(element, 'input'),\n handle: (keyDef, element) => {\n const form = element.form;\n\n if (form && (form.querySelectorAll('input').length === 1 || (0, _utils.hasFormSubmit)(form))) {\n _dom.fireEvent.submit(form);\n }\n }\n}];\nexports.keypressBehavior = keypressBehavior;\nconst preKeyupBehavior = [// modifierKeys switch off the modifier BEFORE the keyup event\n...Object.entries(modifierKeys).map(([key, modKey]) => ({\n matches: keyDef => keyDef.key === key,\n handle: (keyDef, element, options, state) => {\n state.modifiers[modKey] = false;\n }\n}))];\nexports.preKeyupBehavior = preKeyupBehavior;\nconst keyupBehavior = [{\n matches: (keyDef, element) => keyDef.key === ' ' && (0, _utils.isClickableInput)(element),\n handle: (keyDef, element, options, state) => {\n _dom.fireEvent.click(element, (0, _getEventProps.getMouseEventProps)(state));\n }\n}];\nexports.keyupBehavior = keyupBehavior;\nconst postKeyupBehavior = [// AltGraph produces an extra keyup for Control\n// The modifier does not change\n{\n matches: keyDef => keyDef.key === 'AltGraph',\n handle: (keyDef, element, options, state) => {\n var _options$keyboardMap$2;\n\n const ctrlKeyDef = (_options$keyboardMap$2 = options.keyboardMap.find(k => k.key === 'Control')) != null ? _options$keyboardMap$2 :\n /* istanbul ignore next */\n {\n key: 'Control',\n code: 'Control'\n };\n\n _dom.fireEvent.keyUp(element, (0, _getEventProps.getKeyEventProps)(ctrlKeyDef, state));\n }\n}];\nexports.postKeyupBehavior = postKeyupBehavior;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.replaceBehavior = exports.preKeyupBehavior = exports.preKeydownBehavior = exports.postKeyupBehavior = exports.keyupBehavior = exports.keypressBehavior = exports.keydownBehavior = void 0;\n\nvar _utils = require(\"../../utils\");\n\nvar arrowKeys = _interopRequireWildcard(require(\"./arrow\"));\n\nvar controlKeys = _interopRequireWildcard(require(\"./control\"));\n\nvar characterKeys = _interopRequireWildcard(require(\"./character\"));\n\nvar functionalKeys = _interopRequireWildcard(require(\"./functional\"));\n\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\n\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nconst replaceBehavior = [{\n matches: (keyDef, element) => keyDef.key === 'selectall' && (0, _utils.isElementType)(element, ['input', 'textarea']),\n handle: (keyDef, element, options, state) => {\n var _state$carryValue;\n\n (0, _utils.setSelectionRange)(element, 0, ((_state$carryValue = state.carryValue) != null ? _state$carryValue : element.value).length);\n }\n}];\nexports.replaceBehavior = replaceBehavior;\nconst preKeydownBehavior = [...functionalKeys.preKeydownBehavior];\nexports.preKeydownBehavior = preKeydownBehavior;\nconst keydownBehavior = [...arrowKeys.keydownBehavior, ...controlKeys.keydownBehavior, ...functionalKeys.keydownBehavior];\nexports.keydownBehavior = keydownBehavior;\nconst keypressBehavior = [...functionalKeys.keypressBehavior, ...characterKeys.keypressBehavior];\nexports.keypressBehavior = keypressBehavior;\nconst preKeyupBehavior = [...functionalKeys.preKeyupBehavior];\nexports.preKeyupBehavior = preKeyupBehavior;\nconst keyupBehavior = [...functionalKeys.keyupBehavior];\nexports.keyupBehavior = keyupBehavior;\nconst postKeyupBehavior = [...functionalKeys.postKeyupBehavior];\nexports.postKeyupBehavior = postKeyupBehavior;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.keyboardImplementation = keyboardImplementation;\nexports.releaseAllKeys = releaseAllKeys;\n\nvar _dom = require(\"@testing-library/dom\");\n\nvar _utils = require(\"../utils\");\n\nvar _getNextKeyDef = require(\"./getNextKeyDef\");\n\nvar plugins = _interopRequireWildcard(require(\"./plugins\"));\n\nvar _getEventProps = require(\"./getEventProps\");\n\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\n\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nasync function keyboardImplementation(text, options, state) {\n var _state$repeatKey;\n\n const {\n document\n } = options;\n\n const getCurrentElement = () => getActive(document);\n\n const {\n keyDef,\n consumedLength,\n releasePrevious,\n releaseSelf,\n repeat\n } = (_state$repeatKey = state.repeatKey) != null ? _state$repeatKey : (0, _getNextKeyDef.getNextKeyDef)(text, options);\n const replace = applyPlugins(plugins.replaceBehavior, keyDef, getCurrentElement(), options, state);\n\n if (!replace) {\n const pressed = state.pressed.find(p => p.keyDef === keyDef); // Release the key automatically if it was pressed before.\n // Do not release the key on iterations on `state.repeatKey`.\n\n if (pressed && !state.repeatKey) {\n keyup(keyDef, getCurrentElement, options, state, pressed.unpreventedDefault);\n }\n\n if (!releasePrevious) {\n const unpreventedDefault = keydown(keyDef, getCurrentElement, options, state);\n\n if (unpreventedDefault && hasKeyPress(keyDef, state)) {\n keypress(keyDef, getCurrentElement, options, state);\n } // Release the key only on the last iteration on `state.repeatKey`.\n\n\n if (releaseSelf && repeat <= 1) {\n keyup(keyDef, getCurrentElement, options, state, unpreventedDefault);\n }\n }\n }\n\n if (repeat > 1) {\n state.repeatKey = {\n // don't consume again on the next iteration\n consumedLength: 0,\n keyDef,\n releasePrevious,\n releaseSelf,\n repeat: repeat - 1\n };\n } else {\n delete state.repeatKey;\n }\n\n if (text.length > consumedLength || repeat > 1) {\n if (options.delay > 0) {\n await (0, _utils.wait)(options.delay);\n }\n\n return keyboardImplementation(text.slice(consumedLength), options, state);\n }\n\n return void undefined;\n}\n\nfunction getActive(document) {\n var _getActiveElement;\n\n return (_getActiveElement = (0, _utils.getActiveElement)(document)) != null ? _getActiveElement :\n /* istanbul ignore next */\n document.body;\n}\n\nfunction releaseAllKeys(options, state) {\n const getCurrentElement = () => getActive(options.document);\n\n for (const k of state.pressed) {\n keyup(k.keyDef, getCurrentElement, options, state, k.unpreventedDefault);\n }\n}\n\nfunction keydown(keyDef, getCurrentElement, options, state) {\n const element = getCurrentElement(); // clear carried characters when focus is moved\n\n if (element !== state.activeElement) {\n state.carryValue = undefined;\n state.carryChar = '';\n }\n\n state.activeElement = element;\n applyPlugins(plugins.preKeydownBehavior, keyDef, element, options, state);\n\n const unpreventedDefault = _dom.fireEvent.keyDown(element, (0, _getEventProps.getKeyEventProps)(keyDef, state));\n\n state.pressed.push({\n keyDef,\n unpreventedDefault\n });\n\n if (unpreventedDefault) {\n // all default behavior like keypress/submit etc is applied to the currentElement\n applyPlugins(plugins.keydownBehavior, keyDef, getCurrentElement(), options, state);\n }\n\n return unpreventedDefault;\n}\n\nfunction keypress(keyDef, getCurrentElement, options, state) {\n const element = getCurrentElement();\n\n const unpreventedDefault = _dom.fireEvent.keyPress(element, (0, _getEventProps.getKeyEventProps)(keyDef, state));\n\n if (unpreventedDefault) {\n applyPlugins(plugins.keypressBehavior, keyDef, getCurrentElement(), options, state);\n }\n}\n\nfunction keyup(keyDef, getCurrentElement, options, state, unprevented) {\n const element = getCurrentElement();\n applyPlugins(plugins.preKeyupBehavior, keyDef, element, options, state);\n\n const unpreventedDefault = _dom.fireEvent.keyUp(element, (0, _getEventProps.getKeyEventProps)(keyDef, state));\n\n if (unprevented && unpreventedDefault) {\n applyPlugins(plugins.keyupBehavior, keyDef, getCurrentElement(), options, state);\n }\n\n state.pressed = state.pressed.filter(k => k.keyDef !== keyDef);\n applyPlugins(plugins.postKeyupBehavior, keyDef, element, options, state);\n}\n\nfunction applyPlugins(pluginCollection, keyDef, element, options, state) {\n const plugin = pluginCollection.find(p => p.matches(keyDef, element, options, state));\n\n if (plugin) {\n plugin.handle(keyDef, element, options, state);\n }\n\n return !!plugin;\n}\n\nfunction hasKeyPress(keyDef, state) {\n var _keyDef$key;\n\n return (((_keyDef$key = keyDef.key) == null ? void 0 : _keyDef$key.length) === 1 || keyDef.key === 'Enter') && !state.modifiers.ctrl && !state.modifiers.alt;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.DOM_KEY_LOCATION = void 0;\n\n/**\n * @internal Do not create/alter this by yourself as this type might be subject to changes.\n */\nlet DOM_KEY_LOCATION;\nexports.DOM_KEY_LOCATION = DOM_KEY_LOCATION;\n\n(function (DOM_KEY_LOCATION) {\n DOM_KEY_LOCATION[DOM_KEY_LOCATION[\"STANDARD\"] = 0] = \"STANDARD\";\n DOM_KEY_LOCATION[DOM_KEY_LOCATION[\"LEFT\"] = 1] = \"LEFT\";\n DOM_KEY_LOCATION[DOM_KEY_LOCATION[\"RIGHT\"] = 2] = \"RIGHT\";\n DOM_KEY_LOCATION[DOM_KEY_LOCATION[\"NUMPAD\"] = 3] = \"NUMPAD\";\n})(DOM_KEY_LOCATION || (exports.DOM_KEY_LOCATION = DOM_KEY_LOCATION = {}));","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.defaultKeyMap = void 0;\n\nvar _types = require(\"./types\");\n\n/**\n * Mapping for a default US-104-QWERTY keyboard\n */\nconst defaultKeyMap = [// alphanumeric keys\n...'0123456789'.split('').map(c => ({\n code: `Digit${c}`,\n key: c\n})), ...')!@#$%^&*('.split('').map((c, i) => ({\n code: `Digit${i}`,\n key: c,\n shiftKey: true\n})), ...'abcdefghijklmnopqrstuvwxyz'.split('').map(c => ({\n code: `Key${c.toUpperCase()}`,\n key: c\n})), ...'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split('').map(c => ({\n code: `Key${c}`,\n key: c,\n shiftKey: true\n})), // alphanumeric block - functional\n{\n code: 'Space',\n key: ' '\n}, {\n code: 'AltLeft',\n key: 'Alt',\n location: _types.DOM_KEY_LOCATION.LEFT,\n keyCode: 18\n}, {\n code: 'AltRight',\n key: 'Alt',\n location: _types.DOM_KEY_LOCATION.RIGHT,\n keyCode: 18\n}, {\n code: 'ShiftLeft',\n key: 'Shift',\n location: _types.DOM_KEY_LOCATION.LEFT,\n keyCode: 16\n}, {\n code: 'ShiftRight',\n key: 'Shift',\n location: _types.DOM_KEY_LOCATION.RIGHT,\n keyCode: 16\n}, {\n code: 'ControlLeft',\n key: 'Control',\n location: _types.DOM_KEY_LOCATION.LEFT,\n keyCode: 17\n}, {\n code: 'ControlRight',\n key: 'Control',\n location: _types.DOM_KEY_LOCATION.RIGHT,\n keyCode: 17\n}, {\n code: 'MetaLeft',\n key: 'Meta',\n location: _types.DOM_KEY_LOCATION.LEFT,\n keyCode: 93\n}, {\n code: 'MetaRight',\n key: 'Meta',\n location: _types.DOM_KEY_LOCATION.RIGHT,\n keyCode: 93\n}, {\n code: 'OSLeft',\n key: 'OS',\n location: _types.DOM_KEY_LOCATION.LEFT,\n keyCode: 91\n}, {\n code: 'OSRight',\n key: 'OS',\n location: _types.DOM_KEY_LOCATION.RIGHT,\n keyCode: 91\n}, {\n code: 'CapsLock',\n key: 'CapsLock',\n keyCode: 20\n}, {\n code: 'Backspace',\n key: 'Backspace',\n keyCode: 8\n}, {\n code: 'Enter',\n key: 'Enter',\n keyCode: 13\n}, // function\n{\n code: 'Escape',\n key: 'Escape',\n keyCode: 27\n}, // arrows\n{\n code: 'ArrowUp',\n key: 'ArrowUp',\n keyCode: 38\n}, {\n code: 'ArrowDown',\n key: 'ArrowDown',\n keyCode: 40\n}, {\n code: 'ArrowLeft',\n key: 'ArrowLeft',\n keyCode: 37\n}, {\n code: 'ArrowRight',\n key: 'ArrowRight',\n keyCode: 39\n}, // control pad\n{\n code: 'Home',\n key: 'Home',\n keyCode: 36\n}, {\n code: 'End',\n key: 'End',\n keyCode: 35\n}, {\n code: 'Delete',\n key: 'Delete',\n keyCode: 46\n}, {\n code: 'PageUp',\n key: 'PageUp',\n keyCode: 33\n}, {\n code: 'PageDown',\n key: 'PageDown',\n keyCode: 34\n} // TODO: add mappings\n];\nexports.defaultKeyMap = defaultKeyMap;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.specialCharMap = void 0;\n\n/**\n * @deprecated This list of strings with special meaning is no longer necessary\n * as we've introduced a standardized way to describe any keystroke for `userEvent`.\n * @see https://testing-library.com/docs/ecosystem-user-event#keyboardtext-options\n */\nconst specialCharMap = {\n arrowLeft: '{arrowleft}',\n arrowRight: '{arrowright}',\n arrowDown: '{arrowdown}',\n arrowUp: '{arrowup}',\n enter: '{enter}',\n escape: '{esc}',\n delete: '{del}',\n backspace: '{backspace}',\n home: '{home}',\n end: '{end}',\n selectAll: '{selectall}',\n space: '{space}',\n whitespace: ' ',\n pageUp: '{pageUp}',\n pageDown: '{pageDown}'\n};\nexports.specialCharMap = specialCharMap;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.keyboard = keyboard;\nexports.keyboardImplementationWrapper = keyboardImplementationWrapper;\nObject.defineProperty(exports, \"specialCharMap\", {\n enumerable: true,\n get: function () {\n return _specialCharMap.specialCharMap;\n }\n});\n\nvar _dom = require(\"@testing-library/dom\");\n\nvar _keyboardImplementation = require(\"./keyboardImplementation\");\n\nvar _keyMap = require(\"./keyMap\");\n\nvar _specialCharMap = require(\"./specialCharMap\");\n\nfunction keyboard(text, options) {\n var _options$delay;\n\n const {\n promise,\n state\n } = keyboardImplementationWrapper(text, options);\n\n if (((_options$delay = options == null ? void 0 : options.delay) != null ? _options$delay : 0) > 0) {\n return (0, _dom.getConfig)().asyncWrapper(() => promise.then(() => state));\n } else {\n // prevent users from dealing with UnhandledPromiseRejectionWarning in sync call\n promise.catch(console.error);\n return state;\n }\n}\n\nfunction keyboardImplementationWrapper(text, config = {}) {\n const {\n keyboardState: state = createKeyboardState(),\n delay = 0,\n document: doc = document,\n autoModify = false,\n keyboardMap = _keyMap.defaultKeyMap\n } = config;\n const options = {\n delay,\n document: doc,\n autoModify,\n keyboardMap\n };\n return {\n promise: (0, _keyboardImplementation.keyboardImplementation)(text, options, state),\n state,\n releaseAllKeys: () => (0, _keyboardImplementation.releaseAllKeys)(options, state)\n };\n}\n\nfunction createKeyboardState() {\n return {\n activeElement: null,\n pressed: [],\n carryChar: '',\n modifiers: {\n alt: false,\n caps: false,\n ctrl: false,\n meta: false,\n shift: false\n }\n };\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.typeImplementation = typeImplementation;\n\nvar _utils = require(\"../utils\");\n\nvar _click = require(\"../click\");\n\nvar _keyboard = require(\"../keyboard\");\n\nasync function typeImplementation(element, text, {\n delay,\n skipClick = false,\n skipAutoClose = false,\n initialSelectionStart = undefined,\n initialSelectionEnd = undefined\n}) {\n // TODO: properly type guard\n // we use this workaround for now to prevent changing behavior\n if (element.disabled) return;\n if (!skipClick) (0, _click.click)(element); // The focused element could change between each event, so get the currently active element each time\n\n const currentElement = () => (0, _utils.getActiveElement)(element.ownerDocument); // by default, a new element has its selection start and end at 0\n // but most of the time when people call \"type\", they expect it to type\n // at the end of the current input value. So, if the selection start\n // and end are both the default of 0, then we'll go ahead and change\n // them to the length of the current value.\n // the only time it would make sense to pass the initialSelectionStart or\n // initialSelectionEnd is if you have an input with a value and want to\n // explicitly start typing with the cursor at 0. Not super common.\n\n\n const value = (0, _utils.getValue)(currentElement());\n const {\n selectionStart,\n selectionEnd\n } = (0, _utils.getSelectionRange)(element);\n\n if (value != null && (selectionStart === null || selectionStart === 0) && (selectionEnd === null || selectionEnd === 0)) {\n (0, _utils.setSelectionRange)(currentElement(), initialSelectionStart != null ? initialSelectionStart : value.length, initialSelectionEnd != null ? initialSelectionEnd : value.length);\n }\n\n const {\n promise,\n releaseAllKeys\n } = (0, _keyboard.keyboardImplementationWrapper)(text, {\n delay,\n document: element.ownerDocument\n });\n\n if (delay > 0) {\n await promise;\n }\n\n if (!skipAutoClose) {\n releaseAllKeys();\n } // eslint-disable-next-line consistent-return -- we need to return the internal Promise so that it is catchable if we don't await\n\n\n return promise;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.type = type;\n\nvar _dom = require(\"@testing-library/dom\");\n\nvar _typeImplementation = require(\"./typeImplementation\");\n\n// this needs to be wrapped in the event/asyncWrapper for React's act and angular's change detection\n// depending on whether it will be async.\nfunction type(element, text, {\n delay = 0,\n ...options\n} = {}) {\n // we do not want to wrap in the asyncWrapper if we're not\n // going to actually be doing anything async, so we only wrap\n // if the delay is greater than 0\n if (delay > 0) {\n return (0, _dom.getConfig)().asyncWrapper(() => (0, _typeImplementation.typeImplementation)(element, text, {\n delay,\n ...options\n }));\n } else {\n return void (0, _typeImplementation.typeImplementation)(element, text, {\n delay,\n ...options\n }) // prevents users from dealing with UnhandledPromiseRejectionWarning\n .catch(console.error);\n }\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.clear = clear;\n\nvar _utils = require(\"./utils\");\n\nvar _type = require(\"./type\");\n\nfunction clear(element) {\n var _element$selectionSta, _element$selectionEnd;\n\n if (!(0, _utils.isElementType)(element, ['input', 'textarea'])) {\n // TODO: support contenteditable\n throw new Error('clear currently only supports input and textarea elements.');\n }\n\n if ((0, _utils.isDisabled)(element)) {\n return;\n } // TODO: track the selection range ourselves so we don't have to do this input \"type\" trickery\n // just like cypress does: https://github.com/cypress-io/cypress/blob/8d7f1a0bedc3c45a2ebf1ff50324b34129fdc683/packages/driver/src/dom/selection.ts#L16-L37\n\n\n const elementType = element.type;\n\n if (elementType !== 'textarea') {\n // setSelectionRange is not supported on certain types of inputs, e.g. \"number\" or \"email\"\n ;\n element.type = 'text';\n }\n\n (0, _type.type)(element, '{selectall}{del}', {\n delay: 0,\n initialSelectionStart: (_element$selectionSta = element.selectionStart) != null ? _element$selectionSta :\n /* istanbul ignore next */\n undefined,\n initialSelectionEnd: (_element$selectionEnd = element.selectionEnd) != null ? _element$selectionEnd :\n /* istanbul ignore next */\n undefined\n });\n\n if (elementType !== 'textarea') {\n ;\n element.type = elementType;\n }\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.tab = tab;\n\nvar _dom = require(\"@testing-library/dom\");\n\nvar _utils = require(\"./utils\");\n\nvar _focus = require(\"./focus\");\n\nvar _blur = require(\"./blur\");\n\nfunction getNextElement(currentIndex, shift, elements, focusTrap) {\n if ((0, _utils.isDocument)(focusTrap) && (currentIndex === 0 && shift || currentIndex === elements.length - 1 && !shift)) {\n return focusTrap.body;\n }\n\n const nextIndex = shift ? currentIndex - 1 : currentIndex + 1;\n const defaultIndex = shift ? elements.length - 1 : 0;\n return elements[nextIndex] || elements[defaultIndex];\n}\n\nfunction tab({\n shift = false,\n focusTrap\n} = {}) {\n var _focusTrap$ownerDocum, _focusTrap;\n\n const doc = (_focusTrap$ownerDocum = (_focusTrap = focusTrap) == null ? void 0 : _focusTrap.ownerDocument) != null ? _focusTrap$ownerDocum : document;\n const previousElement = (0, _utils.getActiveElement)(doc);\n\n if (!focusTrap) {\n focusTrap = doc;\n }\n\n const focusableElements = focusTrap.querySelectorAll(_utils.FOCUSABLE_SELECTOR);\n const enabledElements = Array.from(focusableElements).filter(el => el === previousElement || el.getAttribute('tabindex') !== '-1' && !(0, _utils.isDisabled)(el) && // Hidden elements are not tabable\n (0, _utils.isVisible)(el));\n if (enabledElements.length === 0) return;\n const orderedElements = enabledElements.map((el, idx) => ({\n el,\n idx\n })).sort((a, b) => {\n // tabindex has no effect if the active element has tabindex=\"-1\"\n if (previousElement && previousElement.getAttribute('tabindex') === '-1') {\n return a.idx - b.idx;\n }\n\n const tabIndexA = Number(a.el.getAttribute('tabindex'));\n const tabIndexB = Number(b.el.getAttribute('tabindex'));\n const diff = tabIndexA - tabIndexB;\n return diff === 0 ? a.idx - b.idx : diff;\n }).map(({\n el\n }) => el); // TODO: verify/remove type casts\n\n const checkedRadio = {};\n let prunedElements = [];\n orderedElements.forEach(currentElement => {\n // For radio groups keep only the active radio\n // If there is no active radio, keep only the checked radio\n // If there is no checked radio, treat like everything else\n const el = currentElement;\n\n if (el.type === 'radio' && el.name) {\n // If the active element is part of the group, add only that\n const prev = previousElement;\n\n if (prev && prev.type === el.type && prev.name === el.name) {\n if (el === prev) {\n prunedElements.push(el);\n }\n\n return;\n } // If we stumble upon a checked radio, remove the others\n\n\n if (el.checked) {\n prunedElements = prunedElements.filter(e => e.type !== el.type || e.name !== el.name);\n prunedElements.push(el);\n checkedRadio[el.name] = el;\n return;\n } // If we already found the checked one, skip\n\n\n if (typeof checkedRadio[el.name] !== 'undefined') {\n return;\n }\n }\n\n prunedElements.push(el);\n });\n const index = prunedElements.findIndex(el => el === previousElement);\n const nextElement = getNextElement(index, shift, prunedElements, focusTrap);\n const shiftKeyInit = {\n key: 'Shift',\n keyCode: 16,\n shiftKey: true\n };\n const tabKeyInit = {\n key: 'Tab',\n keyCode: 9,\n shiftKey: shift\n };\n let continueToTab = true; // not sure how to make it so there's no previous element...\n // istanbul ignore else\n\n if (previousElement) {\n // preventDefault on the shift key makes no difference\n if (shift) _dom.fireEvent.keyDown(previousElement, { ...shiftKeyInit\n });\n continueToTab = _dom.fireEvent.keyDown(previousElement, { ...tabKeyInit\n });\n }\n\n const keyUpTarget = !continueToTab && previousElement ? previousElement : nextElement;\n\n if (continueToTab) {\n if (nextElement === doc.body) {\n /* istanbul ignore else */\n if (previousElement) {\n (0, _blur.blur)(previousElement);\n }\n } else {\n (0, _focus.focus)(nextElement);\n }\n }\n\n _dom.fireEvent.keyUp(keyUpTarget, { ...tabKeyInit\n });\n\n if (shift) {\n _dom.fireEvent.keyUp(keyUpTarget, { ...shiftKeyInit,\n shiftKey: false\n });\n }\n}\n/*\neslint\n complexity: \"off\",\n max-statements: \"off\",\n*/","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.upload = upload;\n\nvar _dom = require(\"@testing-library/dom\");\n\nvar _click = require(\"./click\");\n\nvar _blur = require(\"./blur\");\n\nvar _focus = require(\"./focus\");\n\nvar _utils = require(\"./utils\");\n\nfunction upload(element, fileOrFiles, init, {\n applyAccept = false\n} = {}) {\n var _input$files;\n\n const input = (0, _utils.isElementType)(element, 'label') ? element.control : element;\n\n if (!input || !(0, _utils.isElementType)(input, 'input', {\n type: 'file'\n })) {\n throw new TypeError(`The ${input === element ? 'given' : 'associated'} ${input == null ? void 0 : input.tagName} element does not accept file uploads`);\n }\n\n if ((0, _utils.isDisabled)(element)) return;\n (0, _click.click)(element, init == null ? void 0 : init.clickInit);\n const files = (Array.isArray(fileOrFiles) ? fileOrFiles : [fileOrFiles]).filter(file => !applyAccept || isAcceptableFile(file, input.accept)).slice(0, input.multiple ? undefined : 1); // blur fires when the file selector pops up\n\n (0, _blur.blur)(element); // focus fires when they make their selection\n\n (0, _focus.focus)(element); // do not fire an input event if the file selection does not change\n\n if (files.length === ((_input$files = input.files) == null ? void 0 : _input$files.length) && files.every((f, i) => {\n var _input$files2;\n\n return f === ((_input$files2 = input.files) == null ? void 0 : _input$files2.item(i));\n })) {\n return;\n } // the event fired in the browser isn't actually an \"input\" or \"change\" event\n // but a new Event with a type set to \"input\" and \"change\"\n // Kinda odd...\n\n\n const inputFiles = { ...files,\n length: files.length,\n item: index => files[index],\n\n [Symbol.iterator]() {\n let i = 0;\n return {\n next: () => ({\n done: i >= files.length,\n value: files[i++]\n })\n };\n }\n\n };\n (0, _dom.fireEvent)(input, (0, _dom.createEvent)('input', input, {\n target: {\n files: inputFiles\n },\n bubbles: true,\n cancelable: false,\n composed: true\n }));\n\n _dom.fireEvent.change(input, {\n target: {\n files: inputFiles\n },\n ...(init == null ? void 0 : init.changeInit)\n });\n}\n\nfunction isAcceptableFile(file, accept) {\n if (!accept) {\n return true;\n }\n\n const wildcards = ['audio/*', 'image/*', 'video/*'];\n return accept.split(',').some(acceptToken => {\n if (acceptToken.startsWith('.')) {\n // tokens starting with a dot represent a file extension\n return file.name.endsWith(acceptToken);\n } else if (wildcards.includes(acceptToken)) {\n return file.type.startsWith(acceptToken.substr(0, acceptToken.length - 1));\n }\n\n return file.type === acceptToken;\n });\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.selectOptions = exports.deselectOptions = void 0;\n\nvar _dom = require(\"@testing-library/dom\");\n\nvar _utils = require(\"./utils\");\n\nvar _click = require(\"./click\");\n\nvar _focus = require(\"./focus\");\n\nvar _hover = require(\"./hover\");\n\nfunction selectOptionsBase(newValue, select, values, init, {\n skipPointerEventsCheck = false\n} = {}) {\n if (!newValue && !select.multiple) {\n throw (0, _dom.getConfig)().getElementError(`Unable to deselect an option in a non-multiple select. Use selectOptions to change the selection instead.`, select);\n }\n\n const valArray = Array.isArray(values) ? values : [values];\n const allOptions = Array.from(select.querySelectorAll('option, [role=\"option\"]'));\n const selectedOptions = valArray.map(val => {\n if (typeof val !== 'string' && allOptions.includes(val)) {\n return val;\n } else {\n const matchingOption = allOptions.find(o => o.value === val || o.innerHTML === val);\n\n if (matchingOption) {\n return matchingOption;\n } else {\n throw (0, _dom.getConfig)().getElementError(`Value \"${String(val)}\" not found in options`, select);\n }\n }\n }).filter(option => !(0, _utils.isDisabled)(option));\n if ((0, _utils.isDisabled)(select) || !selectedOptions.length) return;\n\n if ((0, _utils.isElementType)(select, 'select')) {\n if (select.multiple) {\n for (const option of selectedOptions) {\n const withPointerEvents = skipPointerEventsCheck ? true : (0, _utils.hasPointerEvents)(option); // events fired for multiple select are weird. Can't use hover...\n\n if (withPointerEvents) {\n _dom.fireEvent.pointerOver(option, init);\n\n _dom.fireEvent.pointerEnter(select, init);\n\n _dom.fireEvent.mouseOver(option);\n\n _dom.fireEvent.mouseEnter(select);\n\n _dom.fireEvent.pointerMove(option, init);\n\n _dom.fireEvent.mouseMove(option, init);\n\n _dom.fireEvent.pointerDown(option, init);\n\n _dom.fireEvent.mouseDown(option, init);\n }\n\n (0, _focus.focus)(select);\n\n if (withPointerEvents) {\n _dom.fireEvent.pointerUp(option, init);\n\n _dom.fireEvent.mouseUp(option, init);\n }\n\n selectOption(option);\n\n if (withPointerEvents) {\n _dom.fireEvent.click(option, init);\n }\n }\n } else if (selectedOptions.length === 1) {\n const withPointerEvents = skipPointerEventsCheck ? true : (0, _utils.hasPointerEvents)(select); // the click to open the select options\n\n if (withPointerEvents) {\n (0, _click.click)(select, init, {\n skipPointerEventsCheck\n });\n } else {\n (0, _focus.focus)(select);\n }\n\n selectOption(selectedOptions[0]);\n\n if (withPointerEvents) {\n // the browser triggers another click event on the select for the click on the option\n // this second click has no 'down' phase\n _dom.fireEvent.pointerOver(select, init);\n\n _dom.fireEvent.pointerEnter(select, init);\n\n _dom.fireEvent.mouseOver(select);\n\n _dom.fireEvent.mouseEnter(select);\n\n _dom.fireEvent.pointerUp(select, init);\n\n _dom.fireEvent.mouseUp(select, init);\n\n _dom.fireEvent.click(select, init);\n }\n } else {\n throw (0, _dom.getConfig)().getElementError(`Cannot select multiple options on a non-multiple select`, select);\n }\n } else if (select.getAttribute('role') === 'listbox') {\n selectedOptions.forEach(option => {\n (0, _hover.hover)(option, init, {\n skipPointerEventsCheck\n });\n (0, _click.click)(option, init, {\n skipPointerEventsCheck\n });\n (0, _hover.unhover)(option, init, {\n skipPointerEventsCheck\n });\n });\n } else {\n throw (0, _dom.getConfig)().getElementError(`Cannot select options on elements that are neither select nor listbox elements`, select);\n }\n\n function selectOption(option) {\n option.selected = newValue;\n (0, _dom.fireEvent)(select, (0, _dom.createEvent)('input', select, {\n bubbles: true,\n cancelable: false,\n composed: true,\n ...init\n }));\n\n _dom.fireEvent.change(select, init);\n }\n}\n\nconst selectOptions = selectOptionsBase.bind(null, true);\nexports.selectOptions = selectOptions;\nconst deselectOptions = selectOptionsBase.bind(null, false);\nexports.deselectOptions = deselectOptions;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.paste = paste;\n\nvar _dom = require(\"@testing-library/dom\");\n\nvar _utils = require(\"./utils\");\n\nfunction isSupportedElement(element) {\n return (0, _utils.isElementType)(element, 'input') && Boolean(_utils.editableInputTypes[element.type]) || (0, _utils.isElementType)(element, 'textarea');\n}\n\nfunction paste(element, text, init, {\n initialSelectionStart,\n initialSelectionEnd\n} = {}) {\n // TODO: implement for contenteditable\n if (!isSupportedElement(element)) {\n throw new TypeError(`The given ${element.tagName} element is currently unsupported.\n A PR extending this implementation would be very much welcome at https://github.com/testing-library/user-event`);\n }\n\n if ((0, _utils.isDisabled)(element)) {\n return;\n }\n\n (0, _utils.eventWrapper)(() => element.focus()); // by default, a new element has it's selection start and end at 0\n // but most of the time when people call \"paste\", they expect it to paste\n // at the end of the current input value. So, if the selection start\n // and end are both the default of 0, then we'll go ahead and change\n // them to the length of the current value.\n // the only time it would make sense to pass the initialSelectionStart or\n // initialSelectionEnd is if you have an input with a value and want to\n // explicitely start typing with the cursor at 0. Not super common.\n\n if (element.selectionStart === 0 && element.selectionEnd === 0) {\n (0, _utils.setSelectionRange)(element, initialSelectionStart != null ? initialSelectionStart : element.value.length, initialSelectionEnd != null ? initialSelectionEnd : element.value.length);\n }\n\n _dom.fireEvent.paste(element, init);\n\n if (element.readOnly) {\n return;\n }\n\n text = text.substr(0, (0, _utils.getSpaceUntilMaxLength)(element));\n const {\n newValue,\n newSelectionStart\n } = (0, _utils.calculateNewValue)(text, element);\n\n _dom.fireEvent.input(element, {\n inputType: 'insertFromPaste',\n target: {\n value: newValue\n }\n });\n\n (0, _utils.setSelectionRange)(element, // TODO: investigate why the selection caused by invalid parameters was expected\n {\n newSelectionStart,\n selectionEnd: newSelectionStart\n }, {});\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nObject.defineProperty(exports, \"specialChars\", {\n enumerable: true,\n get: function () {\n return _keyboard.specialCharMap;\n }\n});\n\nvar _click = require(\"./click\");\n\nvar _type = require(\"./type\");\n\nvar _clear = require(\"./clear\");\n\nvar _tab = require(\"./tab\");\n\nvar _hover = require(\"./hover\");\n\nvar _upload = require(\"./upload\");\n\nvar _selectOptions = require(\"./select-options\");\n\nvar _paste = require(\"./paste\");\n\nvar _keyboard = require(\"./keyboard\");\n\nconst userEvent = {\n click: _click.click,\n dblClick: _click.dblClick,\n type: _type.type,\n clear: _clear.clear,\n tab: _tab.tab,\n hover: _hover.hover,\n unhover: _hover.unhover,\n upload: _upload.upload,\n selectOptions: _selectOptions.selectOptions,\n deselectOptions: _selectOptions.deselectOptions,\n paste: _paste.paste,\n keyboard: _keyboard.keyboard\n};\nvar _default = userEvent;\nexports.default = _default;","import { fireEvent, screen, SelectorMatcherOptions } from \"@testing-library/react\";\r\nimport userEvent from \"@testing-library/user-event\";\r\n\r\n/**\r\n * Attempt to write a value to a form field\r\n *\r\n * @param {RegExp} labelText matcher to find the form field\r\n * @param {string?} value - optional value to update the field with. If falsy the field won't be updated\r\n * @param {string?} extraSearchOptions - optional SelectorMatcherOptions to pass into screen.getByLabelText\r\n * @param {string?} type - optional value to specify special types of input we are updating\r\n * @param {string?} clear - optional flag to clear the input before typing\r\n */\r\nexport const updateFormField = (\r\n labelText: RegExp,\r\n value?: string,\r\n extraSearchOptions?: SelectorMatcherOptions,\r\n type?: \"date\" | \"select\",\r\n clear?: boolean\r\n) => {\r\n try {\r\n if (value) {\r\n const input = screen.getByLabelText(labelText, extraSearchOptions);\r\n if (type === \"select\") {\r\n userEvent.selectOptions(input, value);\r\n } else if (type === \"date\") {\r\n fireEvent.change(input, { target: { value } });\r\n } else {\r\n if (clear) {\r\n userEvent.clear(input);\r\n }\r\n userEvent.type(input, value);\r\n }\r\n }\r\n } catch (e) {\r\n console.error(\"Error\", `Failed to set the field '${labelText}' with '${value}'`);\r\n throw e;\r\n }\r\n};\r\n\r\nexport const toIsoDateString = (date: Date) => {\r\n const isoDateString = date.toISOString();\r\n return isoDateString.split(\"T\")[0];\r\n};\r\n\r\nexport const setTestId = (id: string) => setIfTest(id, undefined) as string;\r\n\r\nexport const setIfTest = (\r\n isTest: string | number | boolean,\r\n isNotTest: string | number | boolean\r\n) => (process.env.NODE_ENV === \"test\" ? isTest : isNotTest);\r\n","import { useRef, useState } from \"react\";\r\nimport { Controller, useFieldArray, useFormContext } from \"react-hook-form\";\r\nimport { InvoiceAttributeValues } from \"./InvoiceAttributeValues\";\r\nimport { createInvoicePayment } from \"./invoiceHelpers\";\r\nimport { InvoiceListModel, InvoiceModel, InvoicePayment } from \"./Models/InvoiceTypes\";\r\nimport { OverDueOrPaid } from \"./OverDueOrPaid\";\r\nimport { Button } from \"#components/Button/Button\";\r\nimport { ButtonVariants } from \"#components/Button/buttonTypes\";\r\nimport { IconButton } from \"#components/Button/IconButton\";\r\nimport { CurrencyField } from \"#components/CurrencyField/CurrencyField\";\r\nimport { validateCurrency } from \"#components/CurrencyField/currencyUtils\";\r\nimport { IconPosition } from \"#components/Icons/iconTypes\";\r\nimport { Link } from \"#components/Link/Link\";\r\nimport { Modal } from \"#components/Modal/Modal\";\r\nimport Select from \"#components/Select/Select\";\r\nimport { TextareaField } from \"#components/TextareaField/TextareaField\";\r\nimport { PaymentPageFormValues } from \"#features/PaymentMethodForm/PaymentInfoModel\";\r\nimport { formatCurrency } from \"#utilities/Currency\";\r\nimport { cx } from \"#utilities/cx\";\r\nimport { getPageData } from \"#utilities/GetPageData\";\r\nimport { setTestId } from \"#utilities/TestTools/StandardMethods\";\r\n\r\nconst testId = setTestId(\"invoice-item-id\");\r\n\r\ninterface InvoiceItemProps {\r\n item: InvoiceModel;\r\n invoices: InvoiceListModel;\r\n itemClass: string;\r\n iconClass: string;\r\n toggleSingle: (id: string) => void;\r\n isNotInvoiced: boolean;\r\n invoicePayments: InvoicePayment[];\r\n}\r\n\r\nconst COMMENTS_PLACEHOLDERS: Record<string, string> = {\r\n [\"Financing\"]: \"Please provide the name of the finance company.\",\r\n};\r\n\r\nexport const InvoiceItem = ({\r\n item,\r\n invoices,\r\n itemClass,\r\n iconClass,\r\n toggleSingle,\r\n isNotInvoiced,\r\n invoicePayments,\r\n}: InvoiceItemProps) => {\r\n const formContext = useFormContext<PaymentPageFormValues>();\r\n\r\n const invoicePaymentsArr = useFieldArray({\r\n control: formContext.control,\r\n name: \"invoicePayments\",\r\n });\r\n\r\n const invoicePaymentIdx = invoicePayments.findIndex((f) => f.id === item.Id);\r\n const invoicePayment = invoicePayments[invoicePaymentIdx];\r\n\r\n const baseUrl = getPageData().ApiBaseUrl;\r\n const [showConfirmation, setShowConfirmation] = useState<boolean>(false);\r\n\r\n const payInvoice = (finance?: boolean) => {\r\n invoicePaymentsArr.append(createInvoicePayment(item, isNotInvoiced ? 0 : undefined, finance), {\r\n shouldFocus: !isNotInvoiced,\r\n });\r\n\r\n if (finance) {\r\n formContext.setValue(\"premiumFinanceAgreement\", null);\r\n }\r\n };\r\n\r\n const amountInputRef = useRef(null);\r\n\r\n const removeInvoicePayment = () => {\r\n invoicePaymentsArr.remove(invoicePaymentIdx);\r\n\r\n if (invoicePayment.financedDownAmount != 0) {\r\n formContext.setValue(\"premiumFinanceAgreement\", null);\r\n formContext.setValue(\"enableFinancingAutoPay\", null);\r\n }\r\n };\r\n\r\n const confirmPayInvoice = () => {\r\n if (item.LastPaidDate) {\r\n setShowConfirmation(true);\r\n } else {\r\n payInvoice();\r\n }\r\n };\r\n\r\n const getCommentsPlaceholder = () => {\r\n if (isNotInvoiced) {\r\n return \"Provide details about the not invoiced payment e.g., quote # or policy #.\";\r\n }\r\n\r\n return (\r\n (invoicePayment && COMMENTS_PLACEHOLDERS[invoicePayment.commentReason]) ||\r\n \"Please provide a comment indicating why this amount is different than the invoice amount.\"\r\n );\r\n };\r\n\r\n const isCredit = item.Amount < 0;\r\n\r\n const getPayButtonText = () => {\r\n if (isNotInvoiced) {\r\n return \"Add\";\r\n }\r\n\r\n return isCredit ? \"Apply Credit\" : \"Pay Now\";\r\n };\r\n\r\n const getTogglerTitle = () => {\r\n if (itemClass === \"expanded\") {\r\n return \"Click to collapse invoice details\";\r\n }\r\n return \"Click to expand invoice details\";\r\n };\r\n\r\n const getCanFinanceInvoice = () => {\r\n if (!item) return false;\r\n if (!item.IsFinancingEligible) return false;\r\n if (item.LastPaidDate != null) return false;\r\n return true;\r\n };\r\n\r\n const getIsFinancingCompatible = () => {\r\n const firstFinancedPayment = invoicePayments.find((x) => x.financedDownAmount != 0);\r\n\r\n const firstFinancedInvoice = firstFinancedPayment\r\n ? invoices.Invoices.find((f) => f.Id === firstFinancedPayment.id)\r\n : null;\r\n\r\n if (\r\n firstFinancedInvoice &&\r\n item.FinanceEligibilityHash !== firstFinancedInvoice.FinanceEligibilityHash\r\n )\r\n return false;\r\n\r\n return true;\r\n };\r\n\r\n const invoiceIsFinanced = invoicePayment ? invoicePayment.financedDownAmount != 0 : false;\r\n // If there is a payment and it doesn't have a downpayment just assume it's a Pay Now.\r\n // This way we won't instantly remove it when the user backspaces the amount or types a 0 in a partial payment\r\n const invoiceIsPaid = invoicePayment && !invoiceIsFinanced;\r\n const financeEligibility = getCanFinanceInvoice();\r\n const financingCompatible = getIsFinancingCompatible();\r\n\r\n const hasSignedPfa = formContext.watch(\"premiumFinanceAgreement\") != null;\r\n\r\n return (\r\n <div\r\n className={cx(\r\n \"invoice-item\",\r\n isNotInvoiced && \"not-invoiced\",\r\n financeEligibility || invoiceIsFinanced ? \"has-finance\" : \"no-finance\",\r\n itemClass\r\n )}\r\n key={item.Id}\r\n role=\"row\"\r\n >\r\n {/* \r\n there is a dummy record inserted into the invoice list to allow the user to \r\n pay an arbitrary amount. It should not have an expand/collapse since it doesn't have\r\n any attributes on it\r\n */}\r\n {isNotInvoiced ? (\r\n <div className=\"expander\" role=\"cell\">\r\n \r\n </div>\r\n ) : (\r\n <IconButton\r\n title={getTogglerTitle()}\r\n iconName={iconClass}\r\n className=\"expander\"\r\n style={{ alignSelf: \"start\" }}\r\n onClick={() => {\r\n toggleSingle(item.Id);\r\n }}\r\n aria-expanded={itemClass === \"expanded\"}\r\n />\r\n )}\r\n <div className=\"spacer\"></div>\r\n <div className=\"item-entry item-id\" data-testid={testId} data-label=\"Invoice\" role=\"cell\">\r\n {item.Id}\r\n </div>\r\n <div className=\"spacer\"></div>\r\n <div\r\n className={cx(\"item-entry\", \"item-name\", isNotInvoiced && \"two-col-name\")}\r\n data-label=\"Name\"\r\n role=\"cell\"\r\n >\r\n {item.Name}\r\n </div>\r\n {!isNotInvoiced && (\r\n <>\r\n <div className=\"spacer\"></div>\r\n <div className=\"item-entry item-due-date\" data-label=\"Due Date\" role=\"cell\">\r\n <OverDueOrPaid\r\n isOverDue={item.PastDue}\r\n isPaid={item.LastPaidDate !== null}\r\n navigateTo={`${baseUrl}Receipts?id=${item.PublicId}&viewingMode=web`}\r\n >\r\n {item.DueDateString}\r\n </OverDueOrPaid>\r\n </div>\r\n </>\r\n )}\r\n <div className=\"spacer\"></div>\r\n <div className=\"item-entry item-amount\" data-label=\"Amount\" role=\"cell\">\r\n {formatCurrency(isNotInvoiced ? 0 : item.Amount)}\r\n {item.Amount < 0 && <span> credit</span>}\r\n </div>\r\n <InvoiceAttributeValues item={item} />\r\n {financeEligibility ? (\r\n <div className=\"financing-banner-container\" role=\"cell\">\r\n <div className=\"financing-banner\">\r\n {financingCompatible ? (\r\n hasSignedPfa && invoiceIsFinanced ? (\r\n <>Finalize for {formatCurrency(invoicePayment.financedDownAmount)} down today.</>\r\n ) : (\r\n <>\r\n Finance for an estimated {formatCurrency(item.DownPaymentAmount)} down and{\" \"}\r\n {item.NumberOfInstallments} payments of ${item.InstallmentAmount}/mo.\r\n </>\r\n )\r\n ) : (\r\n <>\r\n Not eligible to finance with selected invoice. Please create another payment to\r\n finance this invoice.\r\n </>\r\n )}\r\n </div>\r\n </div>\r\n ) : null}\r\n <div className=\"item-controls\" role=\"cell\">\r\n {financeEligibility ? (\r\n invoiceIsFinanced ? (\r\n <Button\r\n variant={ButtonVariants.outline}\r\n icon=\"highlight_off\"\r\n iconPosition={IconPosition.right}\r\n style={{ gap: \"0.25rem\" }}\r\n onClick={() => removeInvoicePayment()}\r\n aria-label=\"Remove financing\"\r\n >\r\n {hasSignedPfa ? (\r\n <>{formatCurrency(invoicePayment.financedDownAmount)}</>\r\n ) : (\r\n <>Pending</>\r\n )}\r\n </Button>\r\n ) : (\r\n <Button\r\n className=\"finance-btn\"\r\n onClick={() => {\r\n payInvoice(true);\r\n }}\r\n disabled={invoiceIsPaid || !getIsFinancingCompatible()}\r\n >\r\n Finance\r\n </Button>\r\n )\r\n ) : (\r\n <div />\r\n )}\r\n\r\n {invoiceIsPaid ? (\r\n <Controller\r\n name={`invoicePayments.${invoicePaymentIdx}.paidAmount`}\r\n control={formContext.control}\r\n rules={{\r\n validate: {\r\n validateCurrency: (value) => validateCurrency(value, isCredit),\r\n maximumAmount: (value) => {\r\n if (isNotInvoiced) return;\r\n\r\n if (!isCredit && Number(value) > item.MaximumAmount) {\r\n return `Payment amount cannot exceed ${formatCurrency(item.MaximumAmount)}`;\r\n }\r\n\r\n if (isCredit && Number(value) < item.Amount) {\r\n return `Credit amount cannot exceed ${formatCurrency(item.Amount)}`;\r\n }\r\n },\r\n },\r\n }}\r\n render={({ field, fieldState }) => (\r\n <CurrencyField\r\n {...field}\r\n ref={(e) => {\r\n field.ref(e);\r\n amountInputRef.current = e;\r\n }}\r\n onMount={() => {\r\n // focus notInvoiced ourselves to avoid textarea focus bug\r\n if (isNotInvoiced) {\r\n amountInputRef.current?.focus();\r\n amountInputRef.current?.select();\r\n }\r\n }}\r\n label=\"Invoice Amount\"\r\n labelHidden={true}\r\n className=\"partial-payment-amount\"\r\n triggerValidation={formContext.trigger}\r\n placeholder=\"0.00\"\r\n error={fieldState.error}\r\n readOnly={!item.AllowPartialPayment}\r\n onBlur={(e) => {\r\n const val = Number.parseFloat(e.target.value);\r\n if (Number.isNaN(val) || val == 0) {\r\n removeInvoicePayment();\r\n }\r\n }}\r\n icon={\r\n <IconButton\r\n title=\"Remove payment\"\r\n iconName=\"cancel\"\r\n onClick={removeInvoicePayment}\r\n />\r\n }\r\n />\r\n )}\r\n />\r\n ) : (\r\n <Button\r\n onClick={() => {\r\n confirmPayInvoice();\r\n }}\r\n disabled={invoiceIsFinanced}\r\n className=\"paynow-btn\"\r\n >\r\n {getPayButtonText()}\r\n </Button>\r\n )}\r\n </div>\r\n\r\n {invoiceIsPaid && (isNotInvoiced || invoicePayment.paidAmount != item.Amount) && !isCredit ? (\r\n <div className=\"item-partial-payment\" role=\"cell\">\r\n {!isNotInvoiced ? (\r\n <Select\r\n label=\"Reason for Partial Payment\"\r\n options={[\r\n { Text: \"Select a reason\", Value: \"\" },\r\n { Text: \"Financing\", Value: \"Financing\" },\r\n { Text: \"Incorrect invoice amount\", Value: \"Incorrect invoice amount\" },\r\n { Text: \"Other\", Value: \"Other\" },\r\n ]}\r\n errors={formContext.formState.errors}\r\n {...formContext.register(`invoicePayments.${invoicePaymentIdx}.commentReason`, {\r\n required: \"A reason is required.\",\r\n })}\r\n />\r\n ) : null}\r\n <TextareaField\r\n label=\"Comments\"\r\n placeholder={getCommentsPlaceholder()}\r\n errors={formContext.formState.errors}\r\n {...formContext.register(`invoicePayments.${invoicePaymentIdx}.comment`, {\r\n required: \"Comments are required.\",\r\n })}\r\n />\r\n </div>\r\n ) : null}\r\n\r\n <Modal\r\n isOpen={showConfirmation}\r\n title=\"Payment Confirmation\"\r\n handleClose={() => {\r\n setShowConfirmation(false);\r\n }}\r\n className=\"payment-confirmation-modal modal-small\"\r\n >\r\n <div>\r\n <div>\r\n <p>\r\n This invoice was paid on: <strong>{item.LastPaidDateString}</strong>.\r\n </p>\r\n <p>\r\n <Link href={`${baseUrl}receipts/${item?.PublicId}?viewingMode=web`}>\r\n View Receipt\r\n </Link>\r\n </p>\r\n <br />\r\n <p>\r\n <strong>Are you sure you want to make another payment?</strong>\r\n </p>\r\n </div>\r\n <div className=\"action-container\">\r\n <Button\r\n variant={ButtonVariants.outline}\r\n className=\"medium\"\r\n onClick={() => {\r\n setShowConfirmation(false);\r\n }}\r\n >\r\n Cancel\r\n </Button>\r\n <Button\r\n className=\"medium\"\r\n onClick={() => {\r\n payInvoice();\r\n setShowConfirmation(false);\r\n }}\r\n >\r\n Proceed\r\n </Button>\r\n </div>\r\n </div>\r\n </Modal>\r\n </div>\r\n );\r\n};\r\n","import { useState } from \"react\";\r\nimport { useFormContext } from \"react-hook-form\";\r\nimport { InvoiceGridHeaderButton } from \"./InvoiceGridHeaderButton\";\r\nimport { InvoiceItem } from \"./InvoiceItem\";\r\nimport { InvoiceListModel } from \"./Models/InvoiceTypes\";\r\nimport { IconButton } from \"#components/Button/IconButton\";\r\nimport { PaymentPageFormValues } from \"#features/PaymentMethodForm/PaymentInfoModel\";\r\nimport { cx } from \"#utilities/cx\";\r\nimport { CurrentSort } from \"#utilities/Sorting\";\r\n\r\ntype ToggleableItem = { [key: string]: boolean };\r\n\r\ninterface InvoiceGridProps {\r\n invoices?: InvoiceListModel;\r\n sort?: CurrentSort;\r\n children?: React.ReactNode;\r\n setSort?: (sort: CurrentSort) => void;\r\n}\r\n\r\nexport const notInvoicedId: string = \"Not Invoiced\";\r\nconst allKey: string = \"all\";\r\n\r\nexport const InvoiceGrid = ({ invoices, sort, setSort, children }: InvoiceGridProps) => {\r\n const formContext = useFormContext<PaymentPageFormValues>();\r\n\r\n const invoicePayments = formContext.watch(\"invoicePayments\");\r\n\r\n const [expanded, setExpanded] = useState<ToggleableItem>(\r\n invoices.Invoices.reduce(\r\n (acc, inv) => {\r\n if (inv.Id !== notInvoicedId) {\r\n acc[inv.Id] = true;\r\n }\r\n return acc;\r\n },\r\n { [allKey]: true }\r\n )\r\n );\r\n\r\n // expand all invoice items\r\n const toggleAll = () => {\r\n let curStateIs = false;\r\n\r\n if (expanded[allKey] ?? false) {\r\n curStateIs = !expanded[allKey];\r\n } else {\r\n curStateIs = true;\r\n }\r\n\r\n const newState = { [allKey]: curStateIs };\r\n invoices.Invoices.forEach((inv) => {\r\n if (inv.Id !== notInvoicedId) {\r\n newState[inv.Id] = curStateIs;\r\n }\r\n });\r\n\r\n setExpanded(newState);\r\n };\r\n\r\n // expand a single invoice item\r\n const toggleSingle = (id: string) => {\r\n let curStateIs = false;\r\n if (expanded[id] ?? false) {\r\n curStateIs = !expanded[id];\r\n } else {\r\n curStateIs = true;\r\n }\r\n\r\n const newState = { [id]: curStateIs };\r\n\r\n // search the list for any invoices with a different expansion state\r\n const misMatch = Object.entries(expanded)\r\n .filter((f) => f[0] !== id && f[0] !== allKey)\r\n .find((i) => i[1] !== curStateIs);\r\n\r\n // if we can't find one then it will be undefined\r\n // we should then toggle the allKey to be the same as all of the children\r\n if (misMatch === undefined) {\r\n newState[allKey] = curStateIs;\r\n }\r\n\r\n setExpanded({ ...expanded, ...newState });\r\n };\r\n\r\n // icon name associated to the current expansion state\r\n const iconClassName = (id: string) =>\r\n (expanded[id] ?? false) === true ? \"expand_less\" : \"expand_more\";\r\n\r\n // container class name associated to the current expansion state\r\n const itemClassName = (id: string) =>\r\n (expanded[id] ?? false) === true ? \"expanded\" : \"collapsed\";\r\n\r\n const headerIconTitle = () => {\r\n if (itemClassName(allKey).includes(\"expanded\")) {\r\n return \"Click to collapse all invoice details\";\r\n }\r\n return \"Click to expand all invoice details\";\r\n };\r\n\r\n return (\r\n <div\r\n className={cx(\r\n \"invoice-grid\",\r\n invoices.Invoices.some((x) => x.IsFinancingEligible) && \"has-financing\"\r\n )}\r\n role=\"table\"\r\n aria-label=\"Invoices\"\r\n aria-describedby=\"number-invoices\"\r\n >\r\n {children}\r\n <div className=\"invoice-grid-header\" role=\"row\">\r\n <div style={{ display: \"flex\" }} role=\"columnheader\">\r\n <IconButton\r\n iconName={iconClassName(allKey)}\r\n className=\"expander\"\r\n onClick={toggleAll}\r\n title={headerIconTitle()}\r\n />\r\n </div>\r\n <div></div>\r\n <div role=\"columnheader\">\r\n <InvoiceGridHeaderButton\r\n columnName=\"Id\"\r\n displayName=\"Invoice #\"\r\n currentSort={sort}\r\n setSort={setSort}\r\n />\r\n </div>\r\n <div></div>\r\n <div role=\"columnheader\">\r\n <InvoiceGridHeaderButton columnName=\"Name\" currentSort={sort} setSort={setSort} />\r\n </div>\r\n <div></div>\r\n <div role=\"columnheader\">\r\n <InvoiceGridHeaderButton\r\n columnName=\"DueDate\"\r\n displayName=\"Due Date\"\r\n currentSort={sort}\r\n setSort={setSort}\r\n />\r\n </div>\r\n <div></div>\r\n <div role=\"columnheader\">\r\n <InvoiceGridHeaderButton columnName=\"Amount\" currentSort={sort} setSort={setSort} />\r\n </div>\r\n <div></div>\r\n <div role=\"columnheader\"> </div>\r\n </div>\r\n <div className=\"invoice-items\" role=\"rowgroup\">\r\n {invoices.Invoices.map((item) => {\r\n return (\r\n <InvoiceItem\r\n key={item.Id}\r\n iconClass={iconClassName(item.Id)}\r\n itemClass={itemClassName(item.Id)}\r\n isNotInvoiced={item.Id === notInvoicedId}\r\n item={item}\r\n invoices={invoices}\r\n toggleSingle={toggleSingle}\r\n invoicePayments={invoicePayments}\r\n />\r\n );\r\n })}\r\n </div>\r\n </div>\r\n );\r\n};\r\n","import { formatCurrency } from \"./Currency\";\r\nimport { looksLikeDate } from \"./DateTools\";\r\n\r\n/**\r\n * Handle a string value.\r\n * Add permutations of the string for as many possible ways of entering the string as possible\r\n * Attempt to detect if the string is actually a date and if it is - treat it as a date\r\n *\r\n * @param prop The string to add to the search list\r\n * @returns\r\n */\r\nexport const normalizeString = (prop: string): Array<string> => {\r\n // if we have an empty string then bail out early\r\n if (!prop) {\r\n return [];\r\n }\r\n\r\n // if it looks like a date and parses like a date\r\n // then it is probably a date dressed up as a string\r\n if (looksLikeDate(prop) && !isNaN(new Date(prop).getTime())) {\r\n return normalizeDate(new Date(prop));\r\n }\r\n\r\n const filterableValues = new Set<string>();\r\n\r\n // handle the permutations of a string that we want to consider\r\n const asLower = prop.toLowerCase();\r\n filterableValues.add(asLower);\r\n // remove any spaces so that you can search for 'Mc Donald' or 'McDonald' and get the same results\r\n filterableValues.add(`${asLower}`.replaceAll(/ {1,}/g, \"\"));\r\n // remove any special characters so that you can search for 'OBrian' or \"O'Brian\" and get the same results\r\n // first permutation will replace special characters with a space\r\n // - this allows for 'o brian' and can get more interesting when other punctuation is present\r\n // second permutation will remove them completely\r\n // - this allows for 'obrian'\r\n filterableValues.add(`${asLower}`.replaceAll(/[^0-9a-z]+/g, \" \").replaceAll(/ {2,}/g, \" \"));\r\n filterableValues.add(`${asLower}`.replaceAll(/[^0-9a-z]+/g, \"\"));\r\n\r\n return Array.from(filterableValues);\r\n};\r\n\r\n/**\r\n * Handle a date property.\r\n * Generate permutations of the date with and without leading zeros on day and month\r\n *\r\n * @param prop the date to generate search keys for\r\n */\r\nexport const normalizeDate = (prop: Date | string): Array<string> => {\r\n const parsed: Date = typeof prop === \"string\" ? new Date(prop as string) : prop;\r\n\r\n // garbage date - bail out\r\n if (!parsed || isNaN(parsed.getTime())) {\r\n return [];\r\n }\r\n\r\n const filterableValues = new Set<string>();\r\n\r\n const month = parsed.getMonth() + 1;\r\n const date = parsed.getDate();\r\n const year = parsed.getFullYear();\r\n\r\n // date without any leading zeros\r\n filterableValues.add(`${month}/${date}/${year}`);\r\n\r\n // date with 'possible' leading zeros\r\n // the magic of a Set will only add unique values.\r\n // So we don't have to worry about creating duplicates at this point\r\n\r\n // possible leading on the month and day\r\n filterableValues.add(`${`0${month}`.slice(-2)}/${`0${date}`.slice(-2)}/${year}`);\r\n\r\n // possible leading on just the month\r\n filterableValues.add(`${`0${month}`.slice(-2)}/${date}/${year}`);\r\n\r\n // possible leading on just the day\r\n filterableValues.add(`${month}/${`0${date}`.slice(-2)}/${year}`);\r\n\r\n return Array.from(filterableValues);\r\n};\r\n\r\n/**\r\n * Handle a currency property.\r\n * Generate permutations of a currency property\r\n *\r\n * @param prop the number to generate search keys for\r\n */\r\nexport const normalizeCurrency = (prop: number): Array<string> => {\r\n if (!prop) {\r\n return [];\r\n }\r\n\r\n const filterableValues = new Set<string>();\r\n\r\n // as a raw number - it may or may not include decimals\r\n filterableValues.add(prop.toString());\r\n\r\n const asCurrency = formatCurrency(prop);\r\n // as currency field ($ and commas and decimals places)\r\n filterableValues.add(asCurrency);\r\n\r\n // remove the comma so that 5,555.55 and 5555.55 will both be matchable\r\n filterableValues.add(asCurrency.replaceAll(\",\", \"\"));\r\n\r\n return Array.from(filterableValues);\r\n};\r\n","/*\r\n * decimal.js-light v2.5.1\r\n * An arbitrary-precision Decimal type for JavaScript.\r\n * https://github.com/MikeMcl/decimal.js-light\r\n * Copyright (c) 2020 Michael Mclaughlin <M8ch88l@gmail.com>\r\n * MIT Expat Licence\r\n */\r\n\r\n\r\n// ------------------------------------ EDITABLE DEFAULTS ------------------------------------- //\r\n\r\n\r\n// The limit on the value of `precision`, and on the value of the first argument to\r\n// `toDecimalPlaces`, `toExponential`, `toFixed`, `toPrecision` and `toSignificantDigits`.\r\nvar MAX_DIGITS = 1e9, // 0 to 1e9\r\n\r\n\r\n // The initial configuration properties of the Decimal constructor.\r\n defaults = {\r\n\r\n // These values must be integers within the stated ranges (inclusive).\r\n // Most of these values can be changed during run-time using `Decimal.config`.\r\n\r\n // The maximum number of significant digits of the result of a calculation or base conversion.\r\n // E.g. `Decimal.config({ precision: 20 });`\r\n precision: 20, // 1 to MAX_DIGITS\r\n\r\n // The rounding mode used by default by `toInteger`, `toDecimalPlaces`, `toExponential`,\r\n // `toFixed`, `toPrecision` and `toSignificantDigits`.\r\n //\r\n // ROUND_UP 0 Away from zero.\r\n // ROUND_DOWN 1 Towards zero.\r\n // ROUND_CEIL 2 Towards +Infinity.\r\n // ROUND_FLOOR 3 Towards -Infinity.\r\n // ROUND_HALF_UP 4 Towards nearest neighbour. If equidistant, up.\r\n // ROUND_HALF_DOWN 5 Towards nearest neighbour. If equidistant, down.\r\n // ROUND_HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour.\r\n // ROUND_HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity.\r\n // ROUND_HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity.\r\n //\r\n // E.g.\r\n // `Decimal.rounding = 4;`\r\n // `Decimal.rounding = Decimal.ROUND_HALF_UP;`\r\n rounding: 4, // 0 to 8\r\n\r\n // The exponent value at and beneath which `toString` returns exponential notation.\r\n // JavaScript numbers: -7\r\n toExpNeg: -7, // 0 to -MAX_E\r\n\r\n // The exponent value at and above which `toString` returns exponential notation.\r\n // JavaScript numbers: 21\r\n toExpPos: 21, // 0 to MAX_E\r\n\r\n // The natural logarithm of 10.\r\n // 115 digits\r\n LN10: '2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286'\r\n },\r\n\r\n\r\n// ------------------------------------ END OF EDITABLE DEFAULTS -------------------------------- //\r\n\r\n\r\n Decimal,\r\n external = true,\r\n\r\n decimalError = '[DecimalError] ',\r\n invalidArgument = decimalError + 'Invalid argument: ',\r\n exponentOutOfRange = decimalError + 'Exponent out of range: ',\r\n\r\n mathfloor = Math.floor,\r\n mathpow = Math.pow,\r\n\r\n isDecimal = /^(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?$/i,\r\n\r\n ONE,\r\n BASE = 1e7,\r\n LOG_BASE = 7,\r\n MAX_SAFE_INTEGER = 9007199254740991,\r\n MAX_E = mathfloor(MAX_SAFE_INTEGER / LOG_BASE), // 1286742750677284\r\n\r\n // Decimal.prototype object\r\n P = {};\r\n\r\n\r\n// Decimal prototype methods\r\n\r\n\r\n/*\r\n * absoluteValue abs\r\n * comparedTo cmp\r\n * decimalPlaces dp\r\n * dividedBy div\r\n * dividedToIntegerBy idiv\r\n * equals eq\r\n * exponent\r\n * greaterThan gt\r\n * greaterThanOrEqualTo gte\r\n * isInteger isint\r\n * isNegative isneg\r\n * isPositive ispos\r\n * isZero\r\n * lessThan lt\r\n * lessThanOrEqualTo lte\r\n * logarithm log\r\n * minus sub\r\n * modulo mod\r\n * naturalExponential exp\r\n * naturalLogarithm ln\r\n * negated neg\r\n * plus add\r\n * precision sd\r\n * squareRoot sqrt\r\n * times mul\r\n * toDecimalPlaces todp\r\n * toExponential\r\n * toFixed\r\n * toInteger toint\r\n * toNumber\r\n * toPower pow\r\n * toPrecision\r\n * toSignificantDigits tosd\r\n * toString\r\n * valueOf val\r\n */\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the absolute value of this Decimal.\r\n *\r\n */\r\nP.absoluteValue = P.abs = function () {\r\n var x = new this.constructor(this);\r\n if (x.s) x.s = 1;\r\n return x;\r\n};\r\n\r\n\r\n/*\r\n * Return\r\n * 1 if the value of this Decimal is greater than the value of `y`,\r\n * -1 if the value of this Decimal is less than the value of `y`,\r\n * 0 if they have the same value\r\n *\r\n */\r\nP.comparedTo = P.cmp = function (y) {\r\n var i, j, xdL, ydL,\r\n x = this;\r\n\r\n y = new x.constructor(y);\r\n\r\n // Signs differ?\r\n if (x.s !== y.s) return x.s || -y.s;\r\n\r\n // Compare exponents.\r\n if (x.e !== y.e) return x.e > y.e ^ x.s < 0 ? 1 : -1;\r\n\r\n xdL = x.d.length;\r\n ydL = y.d.length;\r\n\r\n // Compare digit by digit.\r\n for (i = 0, j = xdL < ydL ? xdL : ydL; i < j; ++i) {\r\n if (x.d[i] !== y.d[i]) return x.d[i] > y.d[i] ^ x.s < 0 ? 1 : -1;\r\n }\r\n\r\n // Compare lengths.\r\n return xdL === ydL ? 0 : xdL > ydL ^ x.s < 0 ? 1 : -1;\r\n};\r\n\r\n\r\n/*\r\n * Return the number of decimal places of the value of this Decimal.\r\n *\r\n */\r\nP.decimalPlaces = P.dp = function () {\r\n var x = this,\r\n w = x.d.length - 1,\r\n dp = (w - x.e) * LOG_BASE;\r\n\r\n // Subtract the number of trailing zeros of the last word.\r\n w = x.d[w];\r\n if (w) for (; w % 10 == 0; w /= 10) dp--;\r\n\r\n return dp < 0 ? 0 : dp;\r\n};\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the value of this Decimal divided by `y`, truncated to\r\n * `precision` significant digits.\r\n *\r\n */\r\nP.dividedBy = P.div = function (y) {\r\n return divide(this, new this.constructor(y));\r\n};\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the integer part of dividing the value of this Decimal\r\n * by the value of `y`, truncated to `precision` significant digits.\r\n *\r\n */\r\nP.dividedToIntegerBy = P.idiv = function (y) {\r\n var x = this,\r\n Ctor = x.constructor;\r\n return round(divide(x, new Ctor(y), 0, 1), Ctor.precision);\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Decimal is equal to the value of `y`, otherwise return false.\r\n *\r\n */\r\nP.equals = P.eq = function (y) {\r\n return !this.cmp(y);\r\n};\r\n\r\n\r\n/*\r\n * Return the (base 10) exponent value of this Decimal (this.e is the base 10000000 exponent).\r\n *\r\n */\r\nP.exponent = function () {\r\n return getBase10Exponent(this);\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Decimal is greater than the value of `y`, otherwise return\r\n * false.\r\n *\r\n */\r\nP.greaterThan = P.gt = function (y) {\r\n return this.cmp(y) > 0;\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Decimal is greater than or equal to the value of `y`,\r\n * otherwise return false.\r\n *\r\n */\r\nP.greaterThanOrEqualTo = P.gte = function (y) {\r\n return this.cmp(y) >= 0;\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Decimal is an integer, otherwise return false.\r\n *\r\n */\r\nP.isInteger = P.isint = function () {\r\n return this.e > this.d.length - 2;\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Decimal is negative, otherwise return false.\r\n *\r\n */\r\nP.isNegative = P.isneg = function () {\r\n return this.s < 0;\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Decimal is positive, otherwise return false.\r\n *\r\n */\r\nP.isPositive = P.ispos = function () {\r\n return this.s > 0;\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Decimal is 0, otherwise return false.\r\n *\r\n */\r\nP.isZero = function () {\r\n return this.s === 0;\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Decimal is less than `y`, otherwise return false.\r\n *\r\n */\r\nP.lessThan = P.lt = function (y) {\r\n return this.cmp(y) < 0;\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Decimal is less than or equal to `y`, otherwise return false.\r\n *\r\n */\r\nP.lessThanOrEqualTo = P.lte = function (y) {\r\n return this.cmp(y) < 1;\r\n};\r\n\r\n\r\n/*\r\n * Return the logarithm of the value of this Decimal to the specified base, truncated to\r\n * `precision` significant digits.\r\n *\r\n * If no base is specified, return log[10](x).\r\n *\r\n * log[base](x) = ln(x) / ln(base)\r\n *\r\n * The maximum error of the result is 1 ulp (unit in the last place).\r\n *\r\n * [base] {number|string|Decimal} The base of the logarithm.\r\n *\r\n */\r\nP.logarithm = P.log = function (base) {\r\n var r,\r\n x = this,\r\n Ctor = x.constructor,\r\n pr = Ctor.precision,\r\n wpr = pr + 5;\r\n\r\n // Default base is 10.\r\n if (base === void 0) {\r\n base = new Ctor(10);\r\n } else {\r\n base = new Ctor(base);\r\n\r\n // log[-b](x) = NaN\r\n // log[0](x) = NaN\r\n // log[1](x) = NaN\r\n if (base.s < 1 || base.eq(ONE)) throw Error(decimalError + 'NaN');\r\n }\r\n\r\n // log[b](-x) = NaN\r\n // log[b](0) = -Infinity\r\n if (x.s < 1) throw Error(decimalError + (x.s ? 'NaN' : '-Infinity'));\r\n\r\n // log[b](1) = 0\r\n if (x.eq(ONE)) return new Ctor(0);\r\n\r\n external = false;\r\n r = divide(ln(x, wpr), ln(base, wpr), wpr);\r\n external = true;\r\n\r\n return round(r, pr);\r\n};\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the value of this Decimal minus `y`, truncated to\r\n * `precision` significant digits.\r\n *\r\n */\r\nP.minus = P.sub = function (y) {\r\n var x = this;\r\n y = new x.constructor(y);\r\n return x.s == y.s ? subtract(x, y) : add(x, (y.s = -y.s, y));\r\n};\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the value of this Decimal modulo `y`, truncated to\r\n * `precision` significant digits.\r\n *\r\n */\r\nP.modulo = P.mod = function (y) {\r\n var q,\r\n x = this,\r\n Ctor = x.constructor,\r\n pr = Ctor.precision;\r\n\r\n y = new Ctor(y);\r\n\r\n // x % 0 = NaN\r\n if (!y.s) throw Error(decimalError + 'NaN');\r\n\r\n // Return x if x is 0.\r\n if (!x.s) return round(new Ctor(x), pr);\r\n\r\n // Prevent rounding of intermediate calculations.\r\n external = false;\r\n q = divide(x, y, 0, 1).times(y);\r\n external = true;\r\n\r\n return x.minus(q);\r\n};\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the natural exponential of the value of this Decimal,\r\n * i.e. the base e raised to the power the value of this Decimal, truncated to `precision`\r\n * significant digits.\r\n *\r\n */\r\nP.naturalExponential = P.exp = function () {\r\n return exp(this);\r\n};\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the natural logarithm of the value of this Decimal,\r\n * truncated to `precision` significant digits.\r\n *\r\n */\r\nP.naturalLogarithm = P.ln = function () {\r\n return ln(this);\r\n};\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the value of this Decimal negated, i.e. as if multiplied by\r\n * -1.\r\n *\r\n */\r\nP.negated = P.neg = function () {\r\n var x = new this.constructor(this);\r\n x.s = -x.s || 0;\r\n return x;\r\n};\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the value of this Decimal plus `y`, truncated to\r\n * `precision` significant digits.\r\n *\r\n */\r\nP.plus = P.add = function (y) {\r\n var x = this;\r\n y = new x.constructor(y);\r\n return x.s == y.s ? add(x, y) : subtract(x, (y.s = -y.s, y));\r\n};\r\n\r\n\r\n/*\r\n * Return the number of significant digits of the value of this Decimal.\r\n *\r\n * [z] {boolean|number} Whether to count integer-part trailing zeros: true, false, 1 or 0.\r\n *\r\n */\r\nP.precision = P.sd = function (z) {\r\n var e, sd, w,\r\n x = this;\r\n\r\n if (z !== void 0 && z !== !!z && z !== 1 && z !== 0) throw Error(invalidArgument + z);\r\n\r\n e = getBase10Exponent(x) + 1;\r\n w = x.d.length - 1;\r\n sd = w * LOG_BASE + 1;\r\n w = x.d[w];\r\n\r\n // If non-zero...\r\n if (w) {\r\n\r\n // Subtract the number of trailing zeros of the last word.\r\n for (; w % 10 == 0; w /= 10) sd--;\r\n\r\n // Add the number of digits of the first word.\r\n for (w = x.d[0]; w >= 10; w /= 10) sd++;\r\n }\r\n\r\n return z && e > sd ? e : sd;\r\n};\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the square root of this Decimal, truncated to `precision`\r\n * significant digits.\r\n *\r\n */\r\nP.squareRoot = P.sqrt = function () {\r\n var e, n, pr, r, s, t, wpr,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n // Negative or zero?\r\n if (x.s < 1) {\r\n if (!x.s) return new Ctor(0);\r\n\r\n // sqrt(-x) = NaN\r\n throw Error(decimalError + 'NaN');\r\n }\r\n\r\n e = getBase10Exponent(x);\r\n external = false;\r\n\r\n // Initial estimate.\r\n s = Math.sqrt(+x);\r\n\r\n // Math.sqrt underflow/overflow?\r\n // Pass x to Math.sqrt as integer, then adjust the exponent of the result.\r\n if (s == 0 || s == 1 / 0) {\r\n n = digitsToString(x.d);\r\n if ((n.length + e) % 2 == 0) n += '0';\r\n s = Math.sqrt(n);\r\n e = mathfloor((e + 1) / 2) - (e < 0 || e % 2);\r\n\r\n if (s == 1 / 0) {\r\n n = '5e' + e;\r\n } else {\r\n n = s.toExponential();\r\n n = n.slice(0, n.indexOf('e') + 1) + e;\r\n }\r\n\r\n r = new Ctor(n);\r\n } else {\r\n r = new Ctor(s.toString());\r\n }\r\n\r\n pr = Ctor.precision;\r\n s = wpr = pr + 3;\r\n\r\n // Newton-Raphson iteration.\r\n for (;;) {\r\n t = r;\r\n r = t.plus(divide(x, t, wpr + 2)).times(0.5);\r\n\r\n if (digitsToString(t.d).slice(0, wpr) === (n = digitsToString(r.d)).slice(0, wpr)) {\r\n n = n.slice(wpr - 3, wpr + 1);\r\n\r\n // The 4th rounding digit may be in error by -1 so if the 4 rounding digits are 9999 or\r\n // 4999, i.e. approaching a rounding boundary, continue the iteration.\r\n if (s == wpr && n == '4999') {\r\n\r\n // On the first iteration only, check to see if rounding up gives the exact result as the\r\n // nines may infinitely repeat.\r\n round(t, pr + 1, 0);\r\n\r\n if (t.times(t).eq(x)) {\r\n r = t;\r\n break;\r\n }\r\n } else if (n != '9999') {\r\n break;\r\n }\r\n\r\n wpr += 4;\r\n }\r\n }\r\n\r\n external = true;\r\n\r\n return round(r, pr);\r\n};\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the value of this Decimal times `y`, truncated to\r\n * `precision` significant digits.\r\n *\r\n */\r\nP.times = P.mul = function (y) {\r\n var carry, e, i, k, r, rL, t, xdL, ydL,\r\n x = this,\r\n Ctor = x.constructor,\r\n xd = x.d,\r\n yd = (y = new Ctor(y)).d;\r\n\r\n // Return 0 if either is 0.\r\n if (!x.s || !y.s) return new Ctor(0);\r\n\r\n y.s *= x.s;\r\n e = x.e + y.e;\r\n xdL = xd.length;\r\n ydL = yd.length;\r\n\r\n // Ensure xd points to the longer array.\r\n if (xdL < ydL) {\r\n r = xd;\r\n xd = yd;\r\n yd = r;\r\n rL = xdL;\r\n xdL = ydL;\r\n ydL = rL;\r\n }\r\n\r\n // Initialise the result array with zeros.\r\n r = [];\r\n rL = xdL + ydL;\r\n for (i = rL; i--;) r.push(0);\r\n\r\n // Multiply!\r\n for (i = ydL; --i >= 0;) {\r\n carry = 0;\r\n for (k = xdL + i; k > i;) {\r\n t = r[k] + yd[i] * xd[k - i - 1] + carry;\r\n r[k--] = t % BASE | 0;\r\n carry = t / BASE | 0;\r\n }\r\n\r\n r[k] = (r[k] + carry) % BASE | 0;\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (; !r[--rL];) r.pop();\r\n\r\n if (carry) ++e;\r\n else r.shift();\r\n\r\n y.d = r;\r\n y.e = e;\r\n\r\n return external ? round(y, Ctor.precision) : y;\r\n};\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the value of this Decimal rounded to a maximum of `dp`\r\n * decimal places using rounding mode `rm` or `rounding` if `rm` is omitted.\r\n *\r\n * If `dp` is omitted, return a new Decimal whose value is the value of this Decimal.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\nP.toDecimalPlaces = P.todp = function (dp, rm) {\r\n var x = this,\r\n Ctor = x.constructor;\r\n\r\n x = new Ctor(x);\r\n if (dp === void 0) return x;\r\n\r\n checkInt32(dp, 0, MAX_DIGITS);\r\n\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n\r\n return round(x, dp + getBase10Exponent(x) + 1, rm);\r\n};\r\n\r\n\r\n/*\r\n * Return a string representing the value of this Decimal in exponential notation rounded to\r\n * `dp` fixed decimal places using rounding mode `rounding`.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\nP.toExponential = function (dp, rm) {\r\n var str,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (dp === void 0) {\r\n str = toString(x, true);\r\n } else {\r\n checkInt32(dp, 0, MAX_DIGITS);\r\n\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n\r\n x = round(new Ctor(x), dp + 1, rm);\r\n str = toString(x, true, dp + 1);\r\n }\r\n\r\n return str;\r\n};\r\n\r\n\r\n/*\r\n * Return a string representing the value of this Decimal in normal (fixed-point) notation to\r\n * `dp` fixed decimal places and rounded using rounding mode `rm` or `rounding` if `rm` is\r\n * omitted.\r\n *\r\n * As with JavaScript numbers, (-0).toFixed(0) is '0', but e.g. (-0.00001).toFixed(0) is '-0'.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * (-0).toFixed(0) is '0', but (-0.1).toFixed(0) is '-0'.\r\n * (-0).toFixed(1) is '0.0', but (-0.01).toFixed(1) is '-0.0'.\r\n * (-0).toFixed(3) is '0.000'.\r\n * (-0.5).toFixed(0) is '-0'.\r\n *\r\n */\r\nP.toFixed = function (dp, rm) {\r\n var str, y,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (dp === void 0) return toString(x);\r\n\r\n checkInt32(dp, 0, MAX_DIGITS);\r\n\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n\r\n y = round(new Ctor(x), dp + getBase10Exponent(x) + 1, rm);\r\n str = toString(y.abs(), false, dp + getBase10Exponent(y) + 1);\r\n\r\n // To determine whether to add the minus sign look at the value before it was rounded,\r\n // i.e. look at `x` rather than `y`.\r\n return x.isneg() && !x.isZero() ? '-' + str : str;\r\n};\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the value of this Decimal rounded to a whole number using\r\n * rounding mode `rounding`.\r\n *\r\n */\r\nP.toInteger = P.toint = function () {\r\n var x = this,\r\n Ctor = x.constructor;\r\n return round(new Ctor(x), getBase10Exponent(x) + 1, Ctor.rounding);\r\n};\r\n\r\n\r\n/*\r\n * Return the value of this Decimal converted to a number primitive.\r\n *\r\n */\r\nP.toNumber = function () {\r\n return +this;\r\n};\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the value of this Decimal raised to the power `y`,\r\n * truncated to `precision` significant digits.\r\n *\r\n * For non-integer or very large exponents pow(x, y) is calculated using\r\n *\r\n * x^y = exp(y*ln(x))\r\n *\r\n * The maximum error is 1 ulp (unit in last place).\r\n *\r\n * y {number|string|Decimal} The power to which to raise this Decimal.\r\n *\r\n */\r\nP.toPower = P.pow = function (y) {\r\n var e, k, pr, r, sign, yIsInt,\r\n x = this,\r\n Ctor = x.constructor,\r\n guard = 12,\r\n yn = +(y = new Ctor(y));\r\n\r\n // pow(x, 0) = 1\r\n if (!y.s) return new Ctor(ONE);\r\n\r\n x = new Ctor(x);\r\n\r\n // pow(0, y > 0) = 0\r\n // pow(0, y < 0) = Infinity\r\n if (!x.s) {\r\n if (y.s < 1) throw Error(decimalError + 'Infinity');\r\n return x;\r\n }\r\n\r\n // pow(1, y) = 1\r\n if (x.eq(ONE)) return x;\r\n\r\n pr = Ctor.precision;\r\n\r\n // pow(x, 1) = x\r\n if (y.eq(ONE)) return round(x, pr);\r\n\r\n e = y.e;\r\n k = y.d.length - 1;\r\n yIsInt = e >= k;\r\n sign = x.s;\r\n\r\n if (!yIsInt) {\r\n\r\n // pow(x < 0, y non-integer) = NaN\r\n if (sign < 0) throw Error(decimalError + 'NaN');\r\n\r\n // If y is a small integer use the 'exponentiation by squaring' algorithm.\r\n } else if ((k = yn < 0 ? -yn : yn) <= MAX_SAFE_INTEGER) {\r\n r = new Ctor(ONE);\r\n\r\n // Max k of 9007199254740991 takes 53 loop iterations.\r\n // Maximum digits array length; leaves [28, 34] guard digits.\r\n e = Math.ceil(pr / LOG_BASE + 4);\r\n\r\n external = false;\r\n\r\n for (;;) {\r\n if (k % 2) {\r\n r = r.times(x);\r\n truncate(r.d, e);\r\n }\r\n\r\n k = mathfloor(k / 2);\r\n if (k === 0) break;\r\n\r\n x = x.times(x);\r\n truncate(x.d, e);\r\n }\r\n\r\n external = true;\r\n\r\n return y.s < 0 ? new Ctor(ONE).div(r) : round(r, pr);\r\n }\r\n\r\n // Result is negative if x is negative and the last digit of integer y is odd.\r\n sign = sign < 0 && y.d[Math.max(e, k)] & 1 ? -1 : 1;\r\n\r\n x.s = 1;\r\n external = false;\r\n r = y.times(ln(x, pr + guard));\r\n external = true;\r\n r = exp(r);\r\n r.s = sign;\r\n\r\n return r;\r\n};\r\n\r\n\r\n/*\r\n * Return a string representing the value of this Decimal rounded to `sd` significant digits\r\n * using rounding mode `rounding`.\r\n *\r\n * Return exponential notation if `sd` is less than the number of digits necessary to represent\r\n * the integer part of the value in normal notation.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\nP.toPrecision = function (sd, rm) {\r\n var e, str,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (sd === void 0) {\r\n e = getBase10Exponent(x);\r\n str = toString(x, e <= Ctor.toExpNeg || e >= Ctor.toExpPos);\r\n } else {\r\n checkInt32(sd, 1, MAX_DIGITS);\r\n\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n\r\n x = round(new Ctor(x), sd, rm);\r\n e = getBase10Exponent(x);\r\n str = toString(x, sd <= e || e <= Ctor.toExpNeg, sd);\r\n }\r\n\r\n return str;\r\n};\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the value of this Decimal rounded to a maximum of `sd`\r\n * significant digits using rounding mode `rm`, or to `precision` and `rounding` respectively if\r\n * omitted.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\nP.toSignificantDigits = P.tosd = function (sd, rm) {\r\n var x = this,\r\n Ctor = x.constructor;\r\n\r\n if (sd === void 0) {\r\n sd = Ctor.precision;\r\n rm = Ctor.rounding;\r\n } else {\r\n checkInt32(sd, 1, MAX_DIGITS);\r\n\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n }\r\n\r\n return round(new Ctor(x), sd, rm);\r\n};\r\n\r\n\r\n/*\r\n * Return a string representing the value of this Decimal.\r\n *\r\n * Return exponential notation if this Decimal has a positive exponent equal to or greater than\r\n * `toExpPos`, or a negative exponent equal to or less than `toExpNeg`.\r\n *\r\n */\r\nP.toString = P.valueOf = P.val = P.toJSON = P[Symbol.for('nodejs.util.inspect.custom')] = function () {\r\n var x = this,\r\n e = getBase10Exponent(x),\r\n Ctor = x.constructor;\r\n\r\n return toString(x, e <= Ctor.toExpNeg || e >= Ctor.toExpPos);\r\n};\r\n\r\n\r\n// Helper functions for Decimal.prototype (P) and/or Decimal methods, and their callers.\r\n\r\n\r\n/*\r\n * add P.minus, P.plus\r\n * checkInt32 P.todp, P.toExponential, P.toFixed, P.toPrecision, P.tosd\r\n * digitsToString P.log, P.sqrt, P.pow, toString, exp, ln\r\n * divide P.div, P.idiv, P.log, P.mod, P.sqrt, exp, ln\r\n * exp P.exp, P.pow\r\n * getBase10Exponent P.exponent, P.sd, P.toint, P.sqrt, P.todp, P.toFixed, P.toPrecision,\r\n * P.toString, divide, round, toString, exp, ln\r\n * getLn10 P.log, ln\r\n * getZeroString digitsToString, toString\r\n * ln P.log, P.ln, P.pow, exp\r\n * parseDecimal Decimal\r\n * round P.abs, P.idiv, P.log, P.minus, P.mod, P.neg, P.plus, P.toint, P.sqrt,\r\n * P.times, P.todp, P.toExponential, P.toFixed, P.pow, P.toPrecision, P.tosd,\r\n * divide, getLn10, exp, ln\r\n * subtract P.minus, P.plus\r\n * toString P.toExponential, P.toFixed, P.toPrecision, P.toString, P.valueOf\r\n * truncate P.pow\r\n *\r\n * Throws: P.log, P.mod, P.sd, P.sqrt, P.pow, checkInt32, divide, round,\r\n * getLn10, exp, ln, parseDecimal, Decimal, config\r\n */\r\n\r\n\r\nfunction add(x, y) {\r\n var carry, d, e, i, k, len, xd, yd,\r\n Ctor = x.constructor,\r\n pr = Ctor.precision;\r\n\r\n // If either is zero...\r\n if (!x.s || !y.s) {\r\n\r\n // Return x if y is zero.\r\n // Return y if y is non-zero.\r\n if (!y.s) y = new Ctor(x);\r\n return external ? round(y, pr) : y;\r\n }\r\n\r\n xd = x.d;\r\n yd = y.d;\r\n\r\n // x and y are finite, non-zero numbers with the same sign.\r\n\r\n k = x.e;\r\n e = y.e;\r\n xd = xd.slice();\r\n i = k - e;\r\n\r\n // If base 1e7 exponents differ...\r\n if (i) {\r\n if (i < 0) {\r\n d = xd;\r\n i = -i;\r\n len = yd.length;\r\n } else {\r\n d = yd;\r\n e = k;\r\n len = xd.length;\r\n }\r\n\r\n // Limit number of zeros prepended to max(ceil(pr / LOG_BASE), len) + 1.\r\n k = Math.ceil(pr / LOG_BASE);\r\n len = k > len ? k + 1 : len + 1;\r\n\r\n if (i > len) {\r\n i = len;\r\n d.length = 1;\r\n }\r\n\r\n // Prepend zeros to equalise exponents. Note: Faster to use reverse then do unshifts.\r\n d.reverse();\r\n for (; i--;) d.push(0);\r\n d.reverse();\r\n }\r\n\r\n len = xd.length;\r\n i = yd.length;\r\n\r\n // If yd is longer than xd, swap xd and yd so xd points to the longer array.\r\n if (len - i < 0) {\r\n i = len;\r\n d = yd;\r\n yd = xd;\r\n xd = d;\r\n }\r\n\r\n // Only start adding at yd.length - 1 as the further digits of xd can be left as they are.\r\n for (carry = 0; i;) {\r\n carry = (xd[--i] = xd[i] + yd[i] + carry) / BASE | 0;\r\n xd[i] %= BASE;\r\n }\r\n\r\n if (carry) {\r\n xd.unshift(carry);\r\n ++e;\r\n }\r\n\r\n // Remove trailing zeros.\r\n // No need to check for zero, as +x + +y != 0 && -x + -y != 0\r\n for (len = xd.length; xd[--len] == 0;) xd.pop();\r\n\r\n y.d = xd;\r\n y.e = e;\r\n\r\n return external ? round(y, pr) : y;\r\n}\r\n\r\n\r\nfunction checkInt32(i, min, max) {\r\n if (i !== ~~i || i < min || i > max) {\r\n throw Error(invalidArgument + i);\r\n }\r\n}\r\n\r\n\r\nfunction digitsToString(d) {\r\n var i, k, ws,\r\n indexOfLastWord = d.length - 1,\r\n str = '',\r\n w = d[0];\r\n\r\n if (indexOfLastWord > 0) {\r\n str += w;\r\n for (i = 1; i < indexOfLastWord; i++) {\r\n ws = d[i] + '';\r\n k = LOG_BASE - ws.length;\r\n if (k) str += getZeroString(k);\r\n str += ws;\r\n }\r\n\r\n w = d[i];\r\n ws = w + '';\r\n k = LOG_BASE - ws.length;\r\n if (k) str += getZeroString(k);\r\n } else if (w === 0) {\r\n return '0';\r\n }\r\n\r\n // Remove trailing zeros of last w.\r\n for (; w % 10 === 0;) w /= 10;\r\n\r\n return str + w;\r\n}\r\n\r\n\r\nvar divide = (function () {\r\n\r\n // Assumes non-zero x and k, and hence non-zero result.\r\n function multiplyInteger(x, k) {\r\n var temp,\r\n carry = 0,\r\n i = x.length;\r\n\r\n for (x = x.slice(); i--;) {\r\n temp = x[i] * k + carry;\r\n x[i] = temp % BASE | 0;\r\n carry = temp / BASE | 0;\r\n }\r\n\r\n if (carry) x.unshift(carry);\r\n\r\n return x;\r\n }\r\n\r\n function compare(a, b, aL, bL) {\r\n var i, r;\r\n\r\n if (aL != bL) {\r\n r = aL > bL ? 1 : -1;\r\n } else {\r\n for (i = r = 0; i < aL; i++) {\r\n if (a[i] != b[i]) {\r\n r = a[i] > b[i] ? 1 : -1;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return r;\r\n }\r\n\r\n function subtract(a, b, aL) {\r\n var i = 0;\r\n\r\n // Subtract b from a.\r\n for (; aL--;) {\r\n a[aL] -= i;\r\n i = a[aL] < b[aL] ? 1 : 0;\r\n a[aL] = i * BASE + a[aL] - b[aL];\r\n }\r\n\r\n // Remove leading zeros.\r\n for (; !a[0] && a.length > 1;) a.shift();\r\n }\r\n\r\n return function (x, y, pr, dp) {\r\n var cmp, e, i, k, prod, prodL, q, qd, rem, remL, rem0, sd, t, xi, xL, yd0, yL, yz,\r\n Ctor = x.constructor,\r\n sign = x.s == y.s ? 1 : -1,\r\n xd = x.d,\r\n yd = y.d;\r\n\r\n // Either 0?\r\n if (!x.s) return new Ctor(x);\r\n if (!y.s) throw Error(decimalError + 'Division by zero');\r\n\r\n e = x.e - y.e;\r\n yL = yd.length;\r\n xL = xd.length;\r\n q = new Ctor(sign);\r\n qd = q.d = [];\r\n\r\n // Result exponent may be one less than e.\r\n for (i = 0; yd[i] == (xd[i] || 0); ) ++i;\r\n if (yd[i] > (xd[i] || 0)) --e;\r\n\r\n if (pr == null) {\r\n sd = pr = Ctor.precision;\r\n } else if (dp) {\r\n sd = pr + (getBase10Exponent(x) - getBase10Exponent(y)) + 1;\r\n } else {\r\n sd = pr;\r\n }\r\n\r\n if (sd < 0) return new Ctor(0);\r\n\r\n // Convert precision in number of base 10 digits to base 1e7 digits.\r\n sd = sd / LOG_BASE + 2 | 0;\r\n i = 0;\r\n\r\n // divisor < 1e7\r\n if (yL == 1) {\r\n k = 0;\r\n yd = yd[0];\r\n sd++;\r\n\r\n // k is the carry.\r\n for (; (i < xL || k) && sd--; i++) {\r\n t = k * BASE + (xd[i] || 0);\r\n qd[i] = t / yd | 0;\r\n k = t % yd | 0;\r\n }\r\n\r\n // divisor >= 1e7\r\n } else {\r\n\r\n // Normalise xd and yd so highest order digit of yd is >= BASE/2\r\n k = BASE / (yd[0] + 1) | 0;\r\n\r\n if (k > 1) {\r\n yd = multiplyInteger(yd, k);\r\n xd = multiplyInteger(xd, k);\r\n yL = yd.length;\r\n xL = xd.length;\r\n }\r\n\r\n xi = yL;\r\n rem = xd.slice(0, yL);\r\n remL = rem.length;\r\n\r\n // Add zeros to make remainder as long as divisor.\r\n for (; remL < yL;) rem[remL++] = 0;\r\n\r\n yz = yd.slice();\r\n yz.unshift(0);\r\n yd0 = yd[0];\r\n\r\n if (yd[1] >= BASE / 2) ++yd0;\r\n\r\n do {\r\n k = 0;\r\n\r\n // Compare divisor and remainder.\r\n cmp = compare(yd, rem, yL, remL);\r\n\r\n // If divisor < remainder.\r\n if (cmp < 0) {\r\n\r\n // Calculate trial digit, k.\r\n rem0 = rem[0];\r\n if (yL != remL) rem0 = rem0 * BASE + (rem[1] || 0);\r\n\r\n // k will be how many times the divisor goes into the current remainder.\r\n k = rem0 / yd0 | 0;\r\n\r\n // Algorithm:\r\n // 1. product = divisor * trial digit (k)\r\n // 2. if product > remainder: product -= divisor, k--\r\n // 3. remainder -= product\r\n // 4. if product was < remainder at 2:\r\n // 5. compare new remainder and divisor\r\n // 6. If remainder > divisor: remainder -= divisor, k++\r\n\r\n if (k > 1) {\r\n if (k >= BASE) k = BASE - 1;\r\n\r\n // product = divisor * trial digit.\r\n prod = multiplyInteger(yd, k);\r\n prodL = prod.length;\r\n remL = rem.length;\r\n\r\n // Compare product and remainder.\r\n cmp = compare(prod, rem, prodL, remL);\r\n\r\n // product > remainder.\r\n if (cmp == 1) {\r\n k--;\r\n\r\n // Subtract divisor from product.\r\n subtract(prod, yL < prodL ? yz : yd, prodL);\r\n }\r\n } else {\r\n\r\n // cmp is -1.\r\n // If k is 0, there is no need to compare yd and rem again below, so change cmp to 1\r\n // to avoid it. If k is 1 there is a need to compare yd and rem again below.\r\n if (k == 0) cmp = k = 1;\r\n prod = yd.slice();\r\n }\r\n\r\n prodL = prod.length;\r\n if (prodL < remL) prod.unshift(0);\r\n\r\n // Subtract product from remainder.\r\n subtract(rem, prod, remL);\r\n\r\n // If product was < previous remainder.\r\n if (cmp == -1) {\r\n remL = rem.length;\r\n\r\n // Compare divisor and new remainder.\r\n cmp = compare(yd, rem, yL, remL);\r\n\r\n // If divisor < new remainder, subtract divisor from remainder.\r\n if (cmp < 1) {\r\n k++;\r\n\r\n // Subtract divisor from remainder.\r\n subtract(rem, yL < remL ? yz : yd, remL);\r\n }\r\n }\r\n\r\n remL = rem.length;\r\n } else if (cmp === 0) {\r\n k++;\r\n rem = [0];\r\n } // if cmp === 1, k will be 0\r\n\r\n // Add the next digit, k, to the result array.\r\n qd[i++] = k;\r\n\r\n // Update the remainder.\r\n if (cmp && rem[0]) {\r\n rem[remL++] = xd[xi] || 0;\r\n } else {\r\n rem = [xd[xi]];\r\n remL = 1;\r\n }\r\n\r\n } while ((xi++ < xL || rem[0] !== void 0) && sd--);\r\n }\r\n\r\n // Leading zero?\r\n if (!qd[0]) qd.shift();\r\n\r\n q.e = e;\r\n\r\n return round(q, dp ? pr + getBase10Exponent(q) + 1 : pr);\r\n };\r\n})();\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the natural exponential of `x` truncated to `sd`\r\n * significant digits.\r\n *\r\n * Taylor/Maclaurin series.\r\n *\r\n * exp(x) = x^0/0! + x^1/1! + x^2/2! + x^3/3! + ...\r\n *\r\n * Argument reduction:\r\n * Repeat x = x / 32, k += 5, until |x| < 0.1\r\n * exp(x) = exp(x / 2^k)^(2^k)\r\n *\r\n * Previously, the argument was initially reduced by\r\n * exp(x) = exp(r) * 10^k where r = x - k * ln10, k = floor(x / ln10)\r\n * to first put r in the range [0, ln10], before dividing by 32 until |x| < 0.1, but this was\r\n * found to be slower than just dividing repeatedly by 32 as above.\r\n *\r\n * (Math object integer min/max: Math.exp(709) = 8.2e+307, Math.exp(-745) = 5e-324)\r\n *\r\n * exp(x) is non-terminating for any finite, non-zero x.\r\n *\r\n */\r\nfunction exp(x, sd) {\r\n var denominator, guard, pow, sum, t, wpr,\r\n i = 0,\r\n k = 0,\r\n Ctor = x.constructor,\r\n pr = Ctor.precision;\r\n\r\n if (getBase10Exponent(x) > 16) throw Error(exponentOutOfRange + getBase10Exponent(x));\r\n\r\n // exp(0) = 1\r\n if (!x.s) return new Ctor(ONE);\r\n\r\n if (sd == null) {\r\n external = false;\r\n wpr = pr;\r\n } else {\r\n wpr = sd;\r\n }\r\n\r\n t = new Ctor(0.03125);\r\n\r\n while (x.abs().gte(0.1)) {\r\n x = x.times(t); // x = x / 2^5\r\n k += 5;\r\n }\r\n\r\n // Estimate the precision increase necessary to ensure the first 4 rounding digits are correct.\r\n guard = Math.log(mathpow(2, k)) / Math.LN10 * 2 + 5 | 0;\r\n wpr += guard;\r\n denominator = pow = sum = new Ctor(ONE);\r\n Ctor.precision = wpr;\r\n\r\n for (;;) {\r\n pow = round(pow.times(x), wpr);\r\n denominator = denominator.times(++i);\r\n t = sum.plus(divide(pow, denominator, wpr));\r\n\r\n if (digitsToString(t.d).slice(0, wpr) === digitsToString(sum.d).slice(0, wpr)) {\r\n while (k--) sum = round(sum.times(sum), wpr);\r\n Ctor.precision = pr;\r\n return sd == null ? (external = true, round(sum, pr)) : sum;\r\n }\r\n\r\n sum = t;\r\n }\r\n}\r\n\r\n\r\n// Calculate the base 10 exponent from the base 1e7 exponent.\r\nfunction getBase10Exponent(x) {\r\n var e = x.e * LOG_BASE,\r\n w = x.d[0];\r\n\r\n // Add the number of digits of the first word of the digits array.\r\n for (; w >= 10; w /= 10) e++;\r\n return e;\r\n}\r\n\r\n\r\nfunction getLn10(Ctor, sd, pr) {\r\n\r\n if (sd > Ctor.LN10.sd()) {\r\n\r\n\r\n // Reset global state in case the exception is caught.\r\n external = true;\r\n if (pr) Ctor.precision = pr;\r\n throw Error(decimalError + 'LN10 precision limit exceeded');\r\n }\r\n\r\n return round(new Ctor(Ctor.LN10), sd);\r\n}\r\n\r\n\r\nfunction getZeroString(k) {\r\n var zs = '';\r\n for (; k--;) zs += '0';\r\n return zs;\r\n}\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the natural logarithm of `x` truncated to `sd` significant\r\n * digits.\r\n *\r\n * ln(n) is non-terminating (n != 1)\r\n *\r\n */\r\nfunction ln(y, sd) {\r\n var c, c0, denominator, e, numerator, sum, t, wpr, x2,\r\n n = 1,\r\n guard = 10,\r\n x = y,\r\n xd = x.d,\r\n Ctor = x.constructor,\r\n pr = Ctor.precision;\r\n\r\n // ln(-x) = NaN\r\n // ln(0) = -Infinity\r\n if (x.s < 1) throw Error(decimalError + (x.s ? 'NaN' : '-Infinity'));\r\n\r\n // ln(1) = 0\r\n if (x.eq(ONE)) return new Ctor(0);\r\n\r\n if (sd == null) {\r\n external = false;\r\n wpr = pr;\r\n } else {\r\n wpr = sd;\r\n }\r\n\r\n if (x.eq(10)) {\r\n if (sd == null) external = true;\r\n return getLn10(Ctor, wpr);\r\n }\r\n\r\n wpr += guard;\r\n Ctor.precision = wpr;\r\n c = digitsToString(xd);\r\n c0 = c.charAt(0);\r\n e = getBase10Exponent(x);\r\n\r\n if (Math.abs(e) < 1.5e15) {\r\n\r\n // Argument reduction.\r\n // The series converges faster the closer the argument is to 1, so using\r\n // ln(a^b) = b * ln(a), ln(a) = ln(a^b) / b\r\n // multiply the argument by itself until the leading digits of the significand are 7, 8, 9,\r\n // 10, 11, 12 or 13, recording the number of multiplications so the sum of the series can\r\n // later be divided by this number, then separate out the power of 10 using\r\n // ln(a*10^b) = ln(a) + b*ln(10).\r\n\r\n // max n is 21 (gives 0.9, 1.0 or 1.1) (9e15 / 21 = 4.2e14).\r\n //while (c0 < 9 && c0 != 1 || c0 == 1 && c.charAt(1) > 1) {\r\n // max n is 6 (gives 0.7 - 1.3)\r\n while (c0 < 7 && c0 != 1 || c0 == 1 && c.charAt(1) > 3) {\r\n x = x.times(y);\r\n c = digitsToString(x.d);\r\n c0 = c.charAt(0);\r\n n++;\r\n }\r\n\r\n e = getBase10Exponent(x);\r\n\r\n if (c0 > 1) {\r\n x = new Ctor('0.' + c);\r\n e++;\r\n } else {\r\n x = new Ctor(c0 + '.' + c.slice(1));\r\n }\r\n } else {\r\n\r\n // The argument reduction method above may result in overflow if the argument y is a massive\r\n // number with exponent >= 1500000000000000 (9e15 / 6 = 1.5e15), so instead recall this\r\n // function using ln(x*10^e) = ln(x) + e*ln(10).\r\n t = getLn10(Ctor, wpr + 2, pr).times(e + '');\r\n x = ln(new Ctor(c0 + '.' + c.slice(1)), wpr - guard).plus(t);\r\n\r\n Ctor.precision = pr;\r\n return sd == null ? (external = true, round(x, pr)) : x;\r\n }\r\n\r\n // x is reduced to a value near 1.\r\n\r\n // Taylor series.\r\n // ln(y) = ln((1 + x)/(1 - x)) = 2(x + x^3/3 + x^5/5 + x^7/7 + ...)\r\n // where x = (y - 1)/(y + 1) (|x| < 1)\r\n sum = numerator = x = divide(x.minus(ONE), x.plus(ONE), wpr);\r\n x2 = round(x.times(x), wpr);\r\n denominator = 3;\r\n\r\n for (;;) {\r\n numerator = round(numerator.times(x2), wpr);\r\n t = sum.plus(divide(numerator, new Ctor(denominator), wpr));\r\n\r\n if (digitsToString(t.d).slice(0, wpr) === digitsToString(sum.d).slice(0, wpr)) {\r\n sum = sum.times(2);\r\n\r\n // Reverse the argument reduction.\r\n if (e !== 0) sum = sum.plus(getLn10(Ctor, wpr + 2, pr).times(e + ''));\r\n sum = divide(sum, new Ctor(n), wpr);\r\n\r\n Ctor.precision = pr;\r\n return sd == null ? (external = true, round(sum, pr)) : sum;\r\n }\r\n\r\n sum = t;\r\n denominator += 2;\r\n }\r\n}\r\n\r\n\r\n/*\r\n * Parse the value of a new Decimal `x` from string `str`.\r\n */\r\nfunction parseDecimal(x, str) {\r\n var e, i, len;\r\n\r\n // Decimal point?\r\n if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');\r\n\r\n // Exponential form?\r\n if ((i = str.search(/e/i)) > 0) {\r\n\r\n // Determine exponent.\r\n if (e < 0) e = i;\r\n e += +str.slice(i + 1);\r\n str = str.substring(0, i);\r\n } else if (e < 0) {\r\n\r\n // Integer.\r\n e = str.length;\r\n }\r\n\r\n // Determine leading zeros.\r\n for (i = 0; str.charCodeAt(i) === 48;) ++i;\r\n\r\n // Determine trailing zeros.\r\n for (len = str.length; str.charCodeAt(len - 1) === 48;) --len;\r\n str = str.slice(i, len);\r\n\r\n if (str) {\r\n len -= i;\r\n e = e - i - 1;\r\n x.e = mathfloor(e / LOG_BASE);\r\n x.d = [];\r\n\r\n // Transform base\r\n\r\n // e is the base 10 exponent.\r\n // i is where to slice str to get the first word of the digits array.\r\n i = (e + 1) % LOG_BASE;\r\n if (e < 0) i += LOG_BASE;\r\n\r\n if (i < len) {\r\n if (i) x.d.push(+str.slice(0, i));\r\n for (len -= LOG_BASE; i < len;) x.d.push(+str.slice(i, i += LOG_BASE));\r\n str = str.slice(i);\r\n i = LOG_BASE - str.length;\r\n } else {\r\n i -= len;\r\n }\r\n\r\n for (; i--;) str += '0';\r\n x.d.push(+str);\r\n\r\n if (external && (x.e > MAX_E || x.e < -MAX_E)) throw Error(exponentOutOfRange + e);\r\n } else {\r\n\r\n // Zero.\r\n x.s = 0;\r\n x.e = 0;\r\n x.d = [0];\r\n }\r\n\r\n return x;\r\n}\r\n\r\n\r\n/*\r\n * Round `x` to `sd` significant digits, using rounding mode `rm` if present (truncate otherwise).\r\n */\r\n function round(x, sd, rm) {\r\n var i, j, k, n, rd, doRound, w, xdi,\r\n xd = x.d;\r\n\r\n // rd: the rounding digit, i.e. the digit after the digit that may be rounded up.\r\n // w: the word of xd which contains the rounding digit, a base 1e7 number.\r\n // xdi: the index of w within xd.\r\n // n: the number of digits of w.\r\n // i: what would be the index of rd within w if all the numbers were 7 digits long (i.e. if\r\n // they had leading zeros)\r\n // j: if > 0, the actual index of rd within w (if < 0, rd is a leading zero).\r\n\r\n // Get the length of the first word of the digits array xd.\r\n for (n = 1, k = xd[0]; k >= 10; k /= 10) n++;\r\n i = sd - n;\r\n\r\n // Is the rounding digit in the first word of xd?\r\n if (i < 0) {\r\n i += LOG_BASE;\r\n j = sd;\r\n w = xd[xdi = 0];\r\n } else {\r\n xdi = Math.ceil((i + 1) / LOG_BASE);\r\n k = xd.length;\r\n if (xdi >= k) return x;\r\n w = k = xd[xdi];\r\n\r\n // Get the number of digits of w.\r\n for (n = 1; k >= 10; k /= 10) n++;\r\n\r\n // Get the index of rd within w.\r\n i %= LOG_BASE;\r\n\r\n // Get the index of rd within w, adjusted for leading zeros.\r\n // The number of leading zeros of w is given by LOG_BASE - n.\r\n j = i - LOG_BASE + n;\r\n }\r\n\r\n if (rm !== void 0) {\r\n k = mathpow(10, n - j - 1);\r\n\r\n // Get the rounding digit at index j of w.\r\n rd = w / k % 10 | 0;\r\n\r\n // Are there any non-zero digits after the rounding digit?\r\n doRound = sd < 0 || xd[xdi + 1] !== void 0 || w % k;\r\n\r\n // The expression `w % mathpow(10, n - j - 1)` returns all the digits of w to the right of the\r\n // digit at (left-to-right) index j, e.g. if w is 908714 and j is 2, the expression will give\r\n // 714.\r\n\r\n doRound = rm < 4\r\n ? (rd || doRound) && (rm == 0 || rm == (x.s < 0 ? 3 : 2))\r\n : rd > 5 || rd == 5 && (rm == 4 || doRound || rm == 6 &&\r\n\r\n // Check whether the digit to the left of the rounding digit is odd.\r\n ((i > 0 ? j > 0 ? w / mathpow(10, n - j) : 0 : xd[xdi - 1]) % 10) & 1 ||\r\n rm == (x.s < 0 ? 8 : 7));\r\n }\r\n\r\n if (sd < 1 || !xd[0]) {\r\n if (doRound) {\r\n k = getBase10Exponent(x);\r\n xd.length = 1;\r\n\r\n // Convert sd to decimal places.\r\n sd = sd - k - 1;\r\n\r\n // 1, 0.1, 0.01, 0.001, 0.0001 etc.\r\n xd[0] = mathpow(10, (LOG_BASE - sd % LOG_BASE) % LOG_BASE);\r\n x.e = mathfloor(-sd / LOG_BASE) || 0;\r\n } else {\r\n xd.length = 1;\r\n\r\n // Zero.\r\n xd[0] = x.e = x.s = 0;\r\n }\r\n\r\n return x;\r\n }\r\n\r\n // Remove excess digits.\r\n if (i == 0) {\r\n xd.length = xdi;\r\n k = 1;\r\n xdi--;\r\n } else {\r\n xd.length = xdi + 1;\r\n k = mathpow(10, LOG_BASE - i);\r\n\r\n // E.g. 56700 becomes 56000 if 7 is the rounding digit.\r\n // j > 0 means i > number of leading zeros of w.\r\n xd[xdi] = j > 0 ? (w / mathpow(10, n - j) % mathpow(10, j) | 0) * k : 0;\r\n }\r\n\r\n if (doRound) {\r\n for (;;) {\r\n\r\n // Is the digit to be rounded up in the first word of xd?\r\n if (xdi == 0) {\r\n if ((xd[0] += k) == BASE) {\r\n xd[0] = 1;\r\n ++x.e;\r\n }\r\n\r\n break;\r\n } else {\r\n xd[xdi] += k;\r\n if (xd[xdi] != BASE) break;\r\n xd[xdi--] = 0;\r\n k = 1;\r\n }\r\n }\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (i = xd.length; xd[--i] === 0;) xd.pop();\r\n\r\n if (external && (x.e > MAX_E || x.e < -MAX_E)) {\r\n throw Error(exponentOutOfRange + getBase10Exponent(x));\r\n }\r\n\r\n return x;\r\n}\r\n\r\n\r\nfunction subtract(x, y) {\r\n var d, e, i, j, k, len, xd, xe, xLTy, yd,\r\n Ctor = x.constructor,\r\n pr = Ctor.precision;\r\n\r\n // Return y negated if x is zero.\r\n // Return x if y is zero and x is non-zero.\r\n if (!x.s || !y.s) {\r\n if (y.s) y.s = -y.s;\r\n else y = new Ctor(x);\r\n return external ? round(y, pr) : y;\r\n }\r\n\r\n xd = x.d;\r\n yd = y.d;\r\n\r\n // x and y are non-zero numbers with the same sign.\r\n\r\n e = y.e;\r\n xe = x.e;\r\n xd = xd.slice();\r\n k = xe - e;\r\n\r\n // If exponents differ...\r\n if (k) {\r\n xLTy = k < 0;\r\n\r\n if (xLTy) {\r\n d = xd;\r\n k = -k;\r\n len = yd.length;\r\n } else {\r\n d = yd;\r\n e = xe;\r\n len = xd.length;\r\n }\r\n\r\n // Numbers with massively different exponents would result in a very high number of zeros\r\n // needing to be prepended, but this can be avoided while still ensuring correct rounding by\r\n // limiting the number of zeros to `Math.ceil(pr / LOG_BASE) + 2`.\r\n i = Math.max(Math.ceil(pr / LOG_BASE), len) + 2;\r\n\r\n if (k > i) {\r\n k = i;\r\n d.length = 1;\r\n }\r\n\r\n // Prepend zeros to equalise exponents.\r\n d.reverse();\r\n for (i = k; i--;) d.push(0);\r\n d.reverse();\r\n\r\n // Base 1e7 exponents equal.\r\n } else {\r\n\r\n // Check digits to determine which is the bigger number.\r\n\r\n i = xd.length;\r\n len = yd.length;\r\n xLTy = i < len;\r\n if (xLTy) len = i;\r\n\r\n for (i = 0; i < len; i++) {\r\n if (xd[i] != yd[i]) {\r\n xLTy = xd[i] < yd[i];\r\n break;\r\n }\r\n }\r\n\r\n k = 0;\r\n }\r\n\r\n if (xLTy) {\r\n d = xd;\r\n xd = yd;\r\n yd = d;\r\n y.s = -y.s;\r\n }\r\n\r\n len = xd.length;\r\n\r\n // Append zeros to xd if shorter.\r\n // Don't add zeros to yd if shorter as subtraction only needs to start at yd length.\r\n for (i = yd.length - len; i > 0; --i) xd[len++] = 0;\r\n\r\n // Subtract yd from xd.\r\n for (i = yd.length; i > k;) {\r\n if (xd[--i] < yd[i]) {\r\n for (j = i; j && xd[--j] === 0;) xd[j] = BASE - 1;\r\n --xd[j];\r\n xd[i] += BASE;\r\n }\r\n\r\n xd[i] -= yd[i];\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (; xd[--len] === 0;) xd.pop();\r\n\r\n // Remove leading zeros and adjust exponent accordingly.\r\n for (; xd[0] === 0; xd.shift()) --e;\r\n\r\n // Zero?\r\n if (!xd[0]) return new Ctor(0);\r\n\r\n y.d = xd;\r\n y.e = e;\r\n\r\n //return external && xd.length >= pr / LOG_BASE ? round(y, pr) : y;\r\n return external ? round(y, pr) : y;\r\n}\r\n\r\n\r\nfunction toString(x, isExp, sd) {\r\n var k,\r\n e = getBase10Exponent(x),\r\n str = digitsToString(x.d),\r\n len = str.length;\r\n\r\n if (isExp) {\r\n if (sd && (k = sd - len) > 0) {\r\n str = str.charAt(0) + '.' + str.slice(1) + getZeroString(k);\r\n } else if (len > 1) {\r\n str = str.charAt(0) + '.' + str.slice(1);\r\n }\r\n\r\n str = str + (e < 0 ? 'e' : 'e+') + e;\r\n } else if (e < 0) {\r\n str = '0.' + getZeroString(-e - 1) + str;\r\n if (sd && (k = sd - len) > 0) str += getZeroString(k);\r\n } else if (e >= len) {\r\n str += getZeroString(e + 1 - len);\r\n if (sd && (k = sd - e - 1) > 0) str = str + '.' + getZeroString(k);\r\n } else {\r\n if ((k = e + 1) < len) str = str.slice(0, k) + '.' + str.slice(k);\r\n if (sd && (k = sd - len) > 0) {\r\n if (e + 1 === len) str += '.';\r\n str += getZeroString(k);\r\n }\r\n }\r\n\r\n return x.s < 0 ? '-' + str : str;\r\n}\r\n\r\n\r\n// Does not strip trailing zeros.\r\nfunction truncate(arr, len) {\r\n if (arr.length > len) {\r\n arr.length = len;\r\n return true;\r\n }\r\n}\r\n\r\n\r\n// Decimal methods\r\n\r\n\r\n/*\r\n * clone\r\n * config/set\r\n */\r\n\r\n\r\n/*\r\n * Create and return a Decimal constructor with the same configuration properties as this Decimal\r\n * constructor.\r\n *\r\n */\r\nfunction clone(obj) {\r\n var i, p, ps;\r\n\r\n /*\r\n * The Decimal constructor and exported function.\r\n * Return a new Decimal instance.\r\n *\r\n * value {number|string|Decimal} A numeric value.\r\n *\r\n */\r\n function Decimal(value) {\r\n var x = this;\r\n\r\n // Decimal called without new.\r\n if (!(x instanceof Decimal)) return new Decimal(value);\r\n\r\n // Retain a reference to this Decimal constructor, and shadow Decimal.prototype.constructor\r\n // which points to Object.\r\n x.constructor = Decimal;\r\n\r\n // Duplicate.\r\n if (value instanceof Decimal) {\r\n x.s = value.s;\r\n x.e = value.e;\r\n x.d = (value = value.d) ? value.slice() : value;\r\n return;\r\n }\r\n\r\n if (typeof value === 'number') {\r\n\r\n // Reject Infinity/NaN.\r\n if (value * 0 !== 0) {\r\n throw Error(invalidArgument + value);\r\n }\r\n\r\n if (value > 0) {\r\n x.s = 1;\r\n } else if (value < 0) {\r\n value = -value;\r\n x.s = -1;\r\n } else {\r\n x.s = 0;\r\n x.e = 0;\r\n x.d = [0];\r\n return;\r\n }\r\n\r\n // Fast path for small integers.\r\n if (value === ~~value && value < 1e7) {\r\n x.e = 0;\r\n x.d = [value];\r\n return;\r\n }\r\n\r\n return parseDecimal(x, value.toString());\r\n } else if (typeof value !== 'string') {\r\n throw Error(invalidArgument + value);\r\n }\r\n\r\n // Minus sign?\r\n if (value.charCodeAt(0) === 45) {\r\n value = value.slice(1);\r\n x.s = -1;\r\n } else {\r\n x.s = 1;\r\n }\r\n\r\n if (isDecimal.test(value)) parseDecimal(x, value);\r\n else throw Error(invalidArgument + value);\r\n }\r\n\r\n Decimal.prototype = P;\r\n\r\n Decimal.ROUND_UP = 0;\r\n Decimal.ROUND_DOWN = 1;\r\n Decimal.ROUND_CEIL = 2;\r\n Decimal.ROUND_FLOOR = 3;\r\n Decimal.ROUND_HALF_UP = 4;\r\n Decimal.ROUND_HALF_DOWN = 5;\r\n Decimal.ROUND_HALF_EVEN = 6;\r\n Decimal.ROUND_HALF_CEIL = 7;\r\n Decimal.ROUND_HALF_FLOOR = 8;\r\n\r\n Decimal.clone = clone;\r\n Decimal.config = Decimal.set = config;\r\n\r\n if (obj === void 0) obj = {};\r\n if (obj) {\r\n ps = ['precision', 'rounding', 'toExpNeg', 'toExpPos', 'LN10'];\r\n for (i = 0; i < ps.length;) if (!obj.hasOwnProperty(p = ps[i++])) obj[p] = this[p];\r\n }\r\n\r\n Decimal.config(obj);\r\n\r\n return Decimal;\r\n}\r\n\r\n\r\n/*\r\n * Configure global settings for a Decimal constructor.\r\n *\r\n * `obj` is an object with one or more of the following properties,\r\n *\r\n * precision {number}\r\n * rounding {number}\r\n * toExpNeg {number}\r\n * toExpPos {number}\r\n *\r\n * E.g. Decimal.config({ precision: 20, rounding: 4 })\r\n *\r\n */\r\nfunction config(obj) {\r\n if (!obj || typeof obj !== 'object') {\r\n throw Error(decimalError + 'Object expected');\r\n }\r\n var i, p, v,\r\n ps = [\r\n 'precision', 1, MAX_DIGITS,\r\n 'rounding', 0, 8,\r\n 'toExpNeg', -1 / 0, 0,\r\n 'toExpPos', 0, 1 / 0\r\n ];\r\n\r\n for (i = 0; i < ps.length; i += 3) {\r\n if ((v = obj[p = ps[i]]) !== void 0) {\r\n if (mathfloor(v) === v && v >= ps[i + 1] && v <= ps[i + 2]) this[p] = v;\r\n else throw Error(invalidArgument + p + ': ' + v);\r\n }\r\n }\r\n\r\n if ((v = obj[p = 'LN10']) !== void 0) {\r\n if (v == Math.LN10) this[p] = new this(v);\r\n else throw Error(invalidArgument + p + ': ' + v);\r\n }\r\n\r\n return this;\r\n}\r\n\r\n\r\n// Create and configure initial Decimal constructor.\r\nexport var Decimal = clone(defaults);\r\n\r\n// Internal constant.\r\nONE = new Decimal(1);\r\n\r\nexport default Decimal;\r\n","import Decimal from \"decimal.js-light\";\r\n\r\n/** Add two financial amounts together without encountering floating point precision errors */\r\nexport const precisionAdd = (a: number, b: number) => {\r\n if (isNaN(a) || isNaN(b)) return NaN;\r\n\r\n return new Decimal(a != null ? a : 0).add(b != null ? b : 0).toNumber();\r\n};\r\n","import { notInvoicedId } from \"./InvoiceGrid\";\r\nimport { AttributeValueModel, InvoiceModel, InvoicePayment } from \"./Models/InvoiceTypes\";\r\nimport {\r\n PaymentPageFormValues,\r\n PaymentPageModel,\r\n} from \"#features/PaymentMethodForm/PaymentInfoModel\";\r\nimport { formatCurrency } from \"#utilities/Currency\";\r\nimport { normalizeCurrency, normalizeDate, normalizeString } from \"#utilities/Filtering\";\r\nimport { precisionAdd } from \"#utilities/FinanceArithmetic\";\r\nimport { getPageData } from \"#utilities/GetPageData\";\r\n\r\nexport const maxInvoicesPaidAmount = 10_000_000;\r\n\r\nconst filterAttributes = (attribute: AttributeValueModel, filterText: string) =>\r\n normalizeString(attribute.Value).some((x) => x.includes(filterText));\r\n\r\nexport const filterInvoices = (\r\n invoices: InvoiceModel[],\r\n filterText: string,\r\n alwaysInclude?: string[]\r\n) => {\r\n const filter = filterText.toLowerCase();\r\n const filteredInvoices = invoices.filter(\r\n (invoice) =>\r\n alwaysInclude?.includes(invoice.Id) ||\r\n normalizeString(invoice.Id).some((x) => x.includes(filter)) ||\r\n normalizeString(invoice.Name).some((x) => x.includes(filter)) ||\r\n normalizeDate(invoice.DueDate).some((x) => x.includes(filter)) ||\r\n normalizeCurrency(invoice.Amount).some((x) => x.includes(filter)) ||\r\n invoice.AttributeValues.some((x) => filterAttributes(x, filter))\r\n );\r\n\r\n return filteredInvoices;\r\n};\r\n\r\nexport const hasFinancedInvoices = (invoicePayments: InvoicePayment[]) => {\r\n return invoicePayments.some((x) => x.financedDownAmount != 0);\r\n};\r\n\r\nexport const validateInvoicePayments = (payments: Array<InvoicePayment>) => {\r\n if (payments.length === 0) {\r\n return \"One or more invoices must be selected for payment.\";\r\n }\r\n\r\n const summedAmount = precisionAdd(\r\n calculateTotalInvoicePayments(payments),\r\n calculateTotalDownPayments(payments)\r\n );\r\n\r\n if (summedAmount <= 0) {\r\n return `Total Amount is ${formatCurrency(summedAmount)} but must be greater than 0.`;\r\n }\r\n\r\n if (summedAmount > maxInvoicesPaidAmount) {\r\n return `Invoice total amount cannot exceed ${formatCurrency(maxInvoicesPaidAmount)}`;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nexport const calculateTotalInvoicePayments = (payments: InvoicePayment[]) => {\r\n return payments.reduce((acc, item) => {\r\n acc = precisionAdd(acc, Number(item.paidAmount));\r\n return acc;\r\n }, 0);\r\n};\r\n\r\nexport const calculateTotalDownPayments = (payments: InvoicePayment[]) => {\r\n return payments.reduce((acc, item) => {\r\n acc = precisionAdd(acc, Number(item.financedDownAmount));\r\n return acc;\r\n }, 0);\r\n};\r\n\r\nexport const getPaidAmount = (\r\n formValues: Pick<\r\n PaymentPageFormValues,\r\n \"invoicePayments\" | \"amount\" | \"managedInvoicePaymentMethod\" | \"premiumFinanceAgreement\"\r\n >,\r\n includeFinanced?: boolean\r\n) => {\r\n const pageData = getPageData<PaymentPageModel>();\r\n\r\n if (pageData.EnableInvoices || pageData.ManagedInvoice) {\r\n return precisionAdd(\r\n calculateTotalInvoicePayments(formValues.invoicePayments),\r\n includeFinanced ? calculateTotalDownPayments(formValues.invoicePayments) : 0\r\n );\r\n } else {\r\n return Number(formValues.amount === \"\" ? 0 : formValues.amount ?? 0);\r\n }\r\n};\r\n\r\n/**\r\n * Payments are created in several places. Lets consolidate the logic in one place\r\n *\r\n * @param invoice An invoice to create a payment from\r\n * @param amount Overrides the paid amount\r\n * @returns The payment corresponding to the invoice\r\n */\r\nexport const createInvoicePayment = (\r\n invoice: InvoiceModel,\r\n amount?: number,\r\n finance?: boolean\r\n): InvoicePayment => {\r\n return {\r\n id: invoice.Id,\r\n paidAmount: !finance ? amount ?? invoice.Amount : 0,\r\n comment: invoice.Comment,\r\n divisionId: invoice.DivisionId,\r\n name: invoice.Name,\r\n verification: invoice.Verification,\r\n dataToken: invoice.DataToken,\r\n financedDownAmount: finance ? amount ?? invoice.DownPaymentAmount : 0,\r\n financeEligibilityHash: invoice.FinanceEligibilityHash,\r\n } as InvoicePayment;\r\n};\r\n\r\n/**\r\n * Based on the values on the query string, lets create the corresponding payments\r\n *\r\n * @param invoices the list of invoices we have\r\n * @param qsParsed the parsed query string collection\r\n * @returns a list of payments\r\n */\r\nexport const createPaymentsFromQueryString = (\r\n invoices: InvoiceModel[],\r\n qsParsed: { [key: string]: string | string[] }\r\n): InvoicePayment[] => {\r\n const payments: InvoicePayment[] = [];\r\n\r\n // convert whatever we have (single item or array) into an array\r\n const financeIds = [].concat(qsParsed.financedInvoiceId);\r\n const payNowIds = [].concat(qsParsed.invoiceId);\r\n\r\n for (const invoiceId of [...financeIds, ...payNowIds]) {\r\n const invoice = invoices.find((invoice) => invoice.Id === invoiceId);\r\n if (!invoice) continue;\r\n if (payments.some((x) => x.id === invoiceId)) continue;\r\n\r\n if (\r\n financeIds.includes(invoiceId) &&\r\n !payments.some(\r\n (payment) =>\r\n invoices.find((i) => i.Id === payment.id).FinanceEligibilityHash !==\r\n invoice.FinanceEligibilityHash\r\n )\r\n ) {\r\n payments.push(createInvoicePayment(invoice, undefined, true));\r\n } else if (payNowIds.includes(invoiceId)) {\r\n payments.push(createInvoicePayment(invoice));\r\n }\r\n }\r\n\r\n if (qsParsed.notInvoiced) {\r\n const ni = invoices.find((f) => f.Id === notInvoicedId);\r\n if (ni) {\r\n const parsed = parseFloat(qsParsed.notInvoiced as string);\r\n // if we just have garbage for the not invoiced amount - lets just ignore the whole thing\r\n if (!isNaN(parsed)) {\r\n const existingPayment = payments.find((x) => x.id === notInvoicedId);\r\n if (existingPayment) {\r\n existingPayment.paidAmount = parsed;\r\n } else {\r\n const notInvoicedInvoice = {\r\n ...createInvoicePayment(ni),\r\n paidAmount: parsed,\r\n };\r\n payments.push(notInvoicedInvoice);\r\n }\r\n }\r\n }\r\n }\r\n\r\n return payments;\r\n};\r\n","import { forwardRef } from \"react\";\r\nimport { FieldErrors, get, UseFormRegister } from \"react-hook-form\";\r\nimport { PaymentPageFormValues } from \"./PaymentInfoModel\";\r\nimport { Disclaimer } from \"#components/Disclaimer/Disclaimer\";\r\n\r\ninterface FinanceDisclaimerProps extends React.InputHTMLAttributes<HTMLInputElement> {\r\n errors?: FieldErrors;\r\n register: UseFormRegister<PaymentPageFormValues>;\r\n}\r\n\r\nexport const FinanceDisclaimer = forwardRef<HTMLInputElement, FinanceDisclaimerProps>(\r\n ({ errors, register, ...props }: FinanceDisclaimerProps, ref) => {\r\n const name = \"acceptFinanceConnectDisclaimer\";\r\n const id = \"accept-finance-connect-disclaimer\";\r\n\r\n const errorMessage = get(errors, name)?.message;\r\n const hasError = !!errorMessage;\r\n\r\n return (\r\n <Disclaimer\r\n text={`By checking this box, I am agreeing to ePayPolicy's [Finance Connect Provider Notice](https://epaypolicy.com/terms-FC).`}\r\n labelId={id}\r\n name={name}\r\n error={errorMessage}\r\n >\r\n <div className={`checkbox-input ${errorMessage ? \"error\" : \"\"}`}>\r\n <input\r\n ref={ref}\r\n className=\"styled-checkbox\"\r\n id={id}\r\n name={name}\r\n type=\"checkbox\"\r\n aria-invalid={hasError ? \"true\" : \"false\"}\r\n aria-describedby={`error-${name}`}\r\n {...register(name, {\r\n required: \"Please confirm that you accept the terms by checking the box.\",\r\n })}\r\n {...props}\r\n />\r\n </div>\r\n </Disclaimer>\r\n );\r\n }\r\n);\r\n","import \"./css/paymentDisclaimer.css\";\r\nimport { forwardRef } from \"react\";\r\nimport { FieldErrors, get, useFormContext, UseFormRegister } from \"react-hook-form\";\r\nimport { PaymentPageFormValues, PaymentPageModel } from \"./PaymentInfoModel\";\r\nimport { Disclaimer } from \"#components/Disclaimer/Disclaimer\";\r\nimport { Link } from \"#components/Link/Link\";\r\nimport { PaymentFlow } from \"#features/PaymentInfo/PaymentInfo.types\";\r\nimport { formatCurrency } from \"#utilities/Currency\";\r\nimport { cx } from \"#utilities/cx\";\r\nimport { getPageData } from \"#utilities/GetPageData\";\r\n\r\ninterface PaymentDisclaimerProps extends React.InputHTMLAttributes<HTMLInputElement> {\r\n fee?: number;\r\n errors?: FieldErrors;\r\n paymentFlow: PaymentFlow;\r\n register: UseFormRegister<PaymentPageFormValues>;\r\n}\r\n\r\nexport const PaymentDisclaimer = forwardRef<HTMLInputElement, PaymentDisclaimerProps>(\r\n ({ errors, register, paymentFlow, fee = undefined, ...props }: PaymentDisclaimerProps, ref) => {\r\n const pageData = getPageData<PaymentPageModel>();\r\n const name = \"acceptPaymentPageDisclaimer\";\r\n const id = \"accept-payment-page-disclaimer\";\r\n\r\n const formContext = useFormContext<PaymentPageFormValues>();\r\n\r\n const enableScheduledPayments = formContext.watch(\"enableScheduledPayments\");\r\n\r\n const getStandardDisclaimer = (): JSX.Element => (\r\n <div>\r\n By clicking \"Complete Payment\", I authorize {pageData.LegalName} to charge my account.\r\n {fee > 0 && (\r\n <>\r\n {` I understand that ${enableScheduledPayments ? \"each of the payments\" : \"this payment\"} includes a ${formatCurrency(fee)} administrative fee assessed by `}\r\n <Link href=\"https://epaypolicy.com/\">epay3, Inc.</Link>\r\n </>\r\n )}\r\n </div>\r\n );\r\n\r\n const getAutoPayPayLessDisclaimer = (): JSX.Element => (\r\n <div>\r\n {` By clicking \"Enroll Now\", I agree to enroll in automatic payments and authorize ${pageData.LegalName} to debit my account when invoices are due. I understand that each payment may include a fee assessed by `}\r\n <Link href=\"https://epaypolicy.com/\">epay3, Inc.</Link>\r\n </div>\r\n );\r\n\r\n const errorMessage = get(errors, name)?.message;\r\n const hasError = !!errorMessage;\r\n\r\n const getDisclaimerText = (): JSX.Element => {\r\n if (paymentFlow === PaymentFlow.AutoPay) {\r\n return getAutoPayPayLessDisclaimer();\r\n } else {\r\n return getStandardDisclaimer();\r\n }\r\n };\r\n\r\n return (\r\n <div>\r\n <div className={\"payment-disclaimer std-component-space\"}>\r\n {pageData.RequireAcceptanceOfPaymentPageDisclaimer && (\r\n <div className=\"checkbox-container\">\r\n <div className={cx(\"checkbox-input\", errorMessage && \"error\")}>\r\n <input\r\n ref={ref}\r\n className=\"styled-checkbox\"\r\n id={id}\r\n name={name}\r\n type=\"checkbox\"\r\n aria-invalid={hasError ? \"true\" : \"false\"}\r\n aria-describedby={`error-${name}`}\r\n {...register(name, {\r\n required: \"Please confirm that you accept the terms by checking the box.\",\r\n })}\r\n {...props}\r\n />\r\n </div>\r\n </div>\r\n )}\r\n <label htmlFor={id}>{getDisclaimerText()}</label>\r\n </div>\r\n\r\n <Disclaimer\r\n text={pageData.PaymentPageDisclaimer ?? \"\"}\r\n labelId={id}\r\n name={name}\r\n error={errorMessage}\r\n // Need to pass a truthy value to keep alignment when checkbox is rendered\r\n children={pageData.RequireAcceptanceOfPaymentPageDisclaimer ? <></> : null}\r\n />\r\n </div>\r\n );\r\n }\r\n);\r\n","import \"./css/paymentFormErrors.css\";\r\nimport { useEffect, useState } from \"react\";\r\nimport { useForm } from \"react-hook-form\";\r\nimport { ERROR_TEXT_CLASS } from \"#components/Shared/BasicError\";\r\nimport { useHasTabs } from \"#utilities/MediaQuery\";\r\n\r\n/**\r\n * Displays a message on the mobile view when there are errors on the form.\r\n */\r\nexport const PaymentFormErrors = () => {\r\n const formContext = useForm();\r\n const values = formContext.watch();\r\n\r\n /**\r\n * Since not all the errors are handled by react-hook-form, checking the DOM directly\r\n * is the simplest way to detect if there are any errors on the form.\r\n * We tried this with purely CSS but iOS Safari is not repainting properly when the `:has` condition updates in CSS\r\n */\r\n useEffect(() => {\r\n const leftColumnHasErrors =\r\n document.querySelector(`.main-with-sidebar .left-column .${ERROR_TEXT_CLASS}`) != null;\r\n const rightColumnHasErrors =\r\n document.querySelector(`.main-with-sidebar .right-column .${ERROR_TEXT_CLASS}`) != null;\r\n\r\n if (leftColumnHasErrors && rightColumnHasErrors) {\r\n setMobileError(\"Please resolve errors above and on Payer Information tab.\");\r\n } else if (leftColumnHasErrors) {\r\n setMobileError(\"Please resolve errors on Payer Information tab.\");\r\n } else if (rightColumnHasErrors) {\r\n setMobileError(\"Please resolve errors above.\");\r\n } else {\r\n setMobileError(null);\r\n }\r\n }, [values]);\r\n\r\n const hasTabs = useHasTabs();\r\n\r\n const [mobileError, setMobileError] = useState<string | null>(null);\r\n if (!hasTabs) return null;\r\n if (!mobileError) return null;\r\n\r\n return (\r\n <div className=\"small-form-errors\">\r\n <p role=\"alert\">{mobileError}</p>\r\n </div>\r\n );\r\n};\r\n","import { useFormContext } from \"react-hook-form\";\r\nimport { PaymentPageFormValues, ScheduledPaymentsEndOption } from \"./PaymentInfoModel\";\r\nimport TitleText from \"#components/TitleText/TitleText\";\r\nimport { formatCurrency } from \"#utilities/Currency\";\r\nimport { setTestId } from \"#utilities/TestTools/StandardMethods\";\r\n\r\nconst amountTestId = setTestId(\"payment-amount\");\r\nconst totalAmountTestId = setTestId(\"payment-total-amount\");\r\n\r\ninterface Props {\r\n amount: string;\r\n fee: string;\r\n total: string;\r\n}\r\n\r\nexport const PaymentTypeHeader = ({ amount, fee, total }: Props) => {\r\n const formContext = useFormContext<PaymentPageFormValues>();\r\n\r\n const nanToZero = (formattedAmount: string) => {\r\n if (formattedAmount.includes(\"NaN\")) {\r\n return formatCurrency(0);\r\n }\r\n return formattedAmount;\r\n };\r\n\r\n const formatDateInput = (date: string) => {\r\n const dateParts = date?.split(\"-\").map((x) => Number.parseInt(x)) ?? [];\r\n if (dateParts.length !== 3 || dateParts.some((x) => isNaN(x) || x == null))\r\n return \"Invalid Date\";\r\n\r\n const [year, month, day] = dateParts;\r\n\r\n return `${month}/${day}/${year}`;\r\n };\r\n\r\n const enableScheduledPayments = formContext.watch(\"enableScheduledPayments\");\r\n const startDate = formContext.watch(\"startDate\");\r\n const scheduledPaymentsEndOption = formContext.watch(\"scheduledPaymentsEndOption\");\r\n const endDate = formContext.watch(\"endDate\");\r\n const numberOfPayments = formContext.watch(\"numberOfPayments\");\r\n const intervalCount = formContext.watch(\"intervalCount\");\r\n const intervalId = formContext.watch(\"intervalId\");\r\n\r\n return (\r\n <>\r\n <div className=\"row justify-center std-component-space-even\">\r\n <div className=\"col-4\">\r\n <TitleText>Amount</TitleText>\r\n <TitleText data-testid={amountTestId}>{nanToZero(amount)}</TitleText>\r\n </div>\r\n <div className=\"col-4\">\r\n <TitleText>Fee</TitleText>\r\n <TitleText>{nanToZero(fee)}</TitleText>\r\n </div>\r\n <div className=\"col-4\">\r\n <TitleText className=\"bold\">\r\n {enableScheduledPayments ? \"Each Payment\" : \"Total\"}\r\n </TitleText>\r\n <TitleText className=\"bold\" data-testid={totalAmountTestId}>\r\n {nanToZero(total)}\r\n </TitleText>\r\n </div>\r\n </div>\r\n {enableScheduledPayments ? (\r\n <>\r\n <hr />\r\n <div className=\"row justify-center std-component-space-even\">\r\n <div className=\"col-4\">\r\n <TitleText>Starts</TitleText>\r\n <TitleText>{formatDateInput(startDate)}</TitleText>\r\n </div>\r\n <div className=\"col-4\">\r\n <TitleText>Ends</TitleText>\r\n <TitleText>\r\n {scheduledPaymentsEndOption === ScheduledPaymentsEndOption.EndDate\r\n ? formatDateInput(endDate)\r\n : null}\r\n {scheduledPaymentsEndOption === ScheduledPaymentsEndOption.Never\r\n ? \"When Cancelled\"\r\n : null}\r\n {scheduledPaymentsEndOption === ScheduledPaymentsEndOption.NumberOfPayments\r\n ? `After ${isNaN(numberOfPayments) ? \"_\" : numberOfPayments} Payment${numberOfPayments === 1 ? \"\" : \"s\"}`\r\n : null}\r\n </TitleText>\r\n </div>\r\n <div className=\"col-4\">\r\n <TitleText>Frequency</TitleText>\r\n <TitleText>\r\n Every {isNaN(intervalCount) ? \"_\" : intervalCount}{\" \"}\r\n {intervalId === 3\r\n ? `Month${intervalCount === 1 ? \"\" : \"s\"}`\r\n : intervalId === 4\r\n ? `Year${intervalCount === 1 ? \"\" : \"s\"}`\r\n : null}\r\n </TitleText>\r\n </div>\r\n </div>\r\n </>\r\n ) : null}\r\n </>\r\n );\r\n};\r\n","export const creditCardsToIcons = {\r\n [\"Visa\"]: \"cc-visa\",\r\n [\"MasterCard\"]: \"cc-mastercard\",\r\n [\"Discover\"]: \"cc-discover\",\r\n [\"American Express\"]: \"cc-amex\",\r\n} as const;\r\n","import { CardIcon } from \"#components/Icons/CardIcon\";\r\nimport { creditCardsToIcons } from \"#components/Icons/CreditCardIcons\";\r\nimport Icon from \"#components/Icons/Icon\";\r\nimport { PayerTokenViewModel } from \"#features/PaymentMethodForm/PaymentInfoModel\";\r\n\r\ninterface Props {\r\n item: PayerTokenViewModel;\r\n isSelected: boolean;\r\n onSelect?: (publicId: string) => void;\r\n onExpandClick?: () => void;\r\n onDeleteClick?: (publicId: string) => void;\r\n onSelectBlur?: () => void;\r\n}\r\nexport const PayerToken = ({\r\n item,\r\n isSelected,\r\n onSelect,\r\n onExpandClick,\r\n onDeleteClick,\r\n onSelectBlur,\r\n}: Props) => {\r\n // I don't understand why I am sometimes getting an undefined at this point\r\n if (undefined === item) {\r\n return null;\r\n }\r\n\r\n const cardIconName = creditCardsToIcons[item.PaymentMethodType];\r\n\r\n return (\r\n <div className=\"payer-token-single\">\r\n <button\r\n aria-label={`select${isSelected ? \"ed\" : \"\"} payment method ending in ${item.MaskedAccountNumber.slice(-4)}`}\r\n className=\"clickable item-select\"\r\n title=\"select entry\"\r\n onClick={(e) => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n isSelected ? onExpandClick?.() : onSelect?.(item.PublicId);\r\n }}\r\n onBlur={() => {\r\n onSelectBlur?.();\r\n }}\r\n >\r\n {cardIconName ? (\r\n <CardIcon className=\"payment-type-icon\" icon={cardIconName} />\r\n ) : (\r\n <Icon className=\"payment-type-icon\">account_balance</Icon>\r\n )}\r\n <span className=\"masked-card\">{item.MaskedAccountNumber}</span>\r\n {isSelected && (\r\n <Icon className=\"toggle-expand\" toolTip=\"Toggle saved payment methods list\">\r\n expand_more\r\n </Icon>\r\n )}\r\n </button>\r\n {!isSelected && (\r\n <button\r\n aria-label={`delete payment method ending in ${item.MaskedAccountNumber.slice(-4)}`}\r\n className=\"clickable delete\"\r\n onClick={(e) => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n onDeleteClick?.(item.PublicId);\r\n }}\r\n title=\"delete entry\"\r\n >\r\n <Icon>delete</Icon>\r\n </button>\r\n )}\r\n </div>\r\n );\r\n};\r\n","import \"./css/savedPayerTokens.css\";\r\nimport { useState } from \"react\";\r\nimport { PayerToken } from \"./PayerToken\";\r\nimport { ConfirmationModal } from \"#components/Confirmation/ConfirmationModal\";\r\nimport { PayerTokenViewModel } from \"#features/PaymentMethodForm/PaymentInfoModel\";\r\n\r\ninterface Props {\r\n payerTokens: PayerTokenViewModel[];\r\n selectedValue: string | undefined;\r\n setSelectedValue: (selected: string) => void;\r\n deletePayerToken: (publicId: string) => void;\r\n}\r\n\r\nexport const SavedPayerTokens = ({\r\n payerTokens,\r\n selectedValue,\r\n setSelectedValue,\r\n deletePayerToken,\r\n}: Props) => {\r\n const selectedItem: PayerTokenViewModel = payerTokens.find((f) => f.PublicId === selectedValue);\r\n const [isExpanded, setIsExpanded] = useState<boolean>(false);\r\n const [toDelete, setToDelete] = useState<string | undefined>(undefined);\r\n const [showConfirm, setShowConfirm] = useState<boolean>(false);\r\n\r\n const doDelete = async () => {\r\n deletePayerToken(toDelete);\r\n setToDelete(undefined);\r\n // if we have deleted the currently selected, then just select the next one in the list\r\n if (selectedValue === toDelete && payerTokens.length > 1) {\r\n setSelectedValue(payerTokens[1].PublicId);\r\n }\r\n };\r\n\r\n const changeSelectedValue = (newValue: string) => {\r\n setSelectedValue(newValue);\r\n setIsExpanded(false);\r\n };\r\n\r\n return (\r\n <div>\r\n <div className=\"saved-payer-tokens form-input\">\r\n <div className=\"wrapper\">\r\n <label id=\"drop-down-list\" htmlFor=\"selected-item\" className=\"text-label\">\r\n Saved Payment Methods\r\n </label>\r\n <div className={`selected ${isExpanded ? \"expanded\" : \"collapsed\"}`} id=\"selected-item\">\r\n <PayerToken\r\n isSelected={true}\r\n item={selectedItem}\r\n onExpandClick={() => setIsExpanded(!isExpanded)}\r\n onSelectBlur={() => {\r\n /* blur too fast and the select won't fire */\r\n window.setTimeout(() => {\r\n setIsExpanded(false);\r\n }, 300);\r\n }}\r\n />\r\n </div>\r\n </div>\r\n {isExpanded && (\r\n <ul\r\n className={`drop-down-list ${isExpanded ? \"expanded\" : \"collapsed\"}`}\r\n aria-labelledby=\"drop-down-list\"\r\n >\r\n {payerTokens.map((pt: PayerTokenViewModel) => {\r\n return (\r\n <li className=\"drop-down-item clickable\" key={`pt-${pt.PublicId}`}>\r\n <PayerToken\r\n isSelected={false}\r\n item={pt}\r\n onDeleteClick={(e) => {\r\n setToDelete(e);\r\n setShowConfirm(true);\r\n }}\r\n onSelect={changeSelectedValue}\r\n />\r\n </li>\r\n );\r\n })}\r\n </ul>\r\n )}\r\n\r\n <ConfirmationModal\r\n title=\"Confirmation\"\r\n isOpen={showConfirm}\r\n handleClose={() => {\r\n setShowConfirm(false);\r\n }}\r\n handleConfirm={() => {\r\n doDelete();\r\n setShowConfirm(false);\r\n }}\r\n className=\"modal-small\"\r\n >\r\n <p>Are you sure you want to delete this saved payment?</p>\r\n </ConfirmationModal>\r\n </div>\r\n </div>\r\n );\r\n};\r\n","import \"./PaymentInfo.css\";\r\nimport { MouseEvent, useEffect } from \"react\";\r\nimport {\r\n FieldErrors,\r\n useFormContext,\r\n UseFormGetValues,\r\n UseFormRegister,\r\n UseFormSetValue,\r\n UseFormWatch,\r\n} from \"react-hook-form\";\r\nimport { PaymentFlow } from \"./PaymentInfo.types\";\r\nimport { hasEnteredPaymentDetails } from \"./PaymentInfoDetails\";\r\nimport { PaymentInfoTabs } from \"./PaymentInfoTabs\";\r\nimport { Button } from \"#components/Button/Button\";\r\nimport { Collapsible } from \"#components/Collapsible/Collapsible\";\r\nimport { CollapsibleState } from \"#components/Collapsible/CollapsibleState\";\r\nimport { IconSize } from \"#components/Icons/iconTypes\";\r\nimport { ReCaptcha } from \"#components/ReCaptcha/ReCaptcha\";\r\nimport { Spinner } from \"#components/Spinner/Spinner\";\r\nimport { SpinnerType } from \"#components/Spinner/SpinnerTypes\";\r\nimport { AutoPayToggle } from \"#features/AutoPay/AutoPayToggle\";\r\nimport { getPaidAmount, hasFinancedInvoices } from \"#features/Invoices/invoiceHelpers\";\r\nimport { InvoiceListModel } from \"#features/Invoices/Models/InvoiceTypes\";\r\nimport { PayerFees } from \"#features/PayerFees/usePayerFees\";\r\nimport { FinanceDisclaimer } from \"#features/PaymentMethodForm/FinanceDisclaimer\";\r\nimport { PaymentDisclaimer } from \"#features/PaymentMethodForm/PaymentDisclaimer\";\r\nimport { PaymentFormErrors } from \"#features/PaymentMethodForm/PaymentFormErrors\";\r\nimport {\r\n PayerTokenViewModel,\r\n PaymentMethod,\r\n PaymentPageFormValues,\r\n PaymentPageModel,\r\n} from \"#features/PaymentMethodForm/PaymentInfoModel\";\r\nimport { PaymentTypeHeader } from \"#features/PaymentMethodForm/PaymentTypeHeader\";\r\nimport { SavedPayerTokens } from \"#features/PaymentMethodForm/SavedPayerTokens\";\r\nimport { PaymentForms } from \"#pages/PaymentForms\";\r\nimport { formatCurrency } from \"#utilities/Currency\";\r\nimport { precisionAdd } from \"#utilities/FinanceArithmetic\";\r\nimport { getPageData } from \"#utilities/GetPageData\";\r\n\r\ntype Props = {\r\n acceptedPaymentMethods: PaymentMethod[];\r\n register: UseFormRegister<PaymentPageFormValues>;\r\n errors: FieldErrors<PaymentPageFormValues>;\r\n getValues: UseFormGetValues<PaymentPageFormValues>;\r\n setValue: UseFormSetValue<PaymentPageFormValues>;\r\n watch: UseFormWatch<PaymentPageFormValues>;\r\n recaptchaKey: string;\r\n payerTokens: PayerTokenViewModel[];\r\n deletePayerToken: (publicId: string) => void;\r\n isSubmitting: boolean;\r\n achDisclaimer?: string;\r\n invoices?: InvoiceListModel;\r\n payerFees: PayerFees;\r\n paymentFlow?: PaymentFlow;\r\n showSavePaymentOption?: boolean;\r\n recaptchaLoaded?: boolean;\r\n};\r\n\r\nexport default function PaymentInfo({\r\n acceptedPaymentMethods,\r\n register,\r\n errors,\r\n getValues,\r\n setValue,\r\n watch,\r\n recaptchaKey,\r\n payerTokens,\r\n deletePayerToken,\r\n isSubmitting,\r\n achDisclaimer,\r\n invoices,\r\n payerFees,\r\n paymentFlow = PaymentFlow.Manual,\r\n showSavePaymentOption = true,\r\n recaptchaLoaded = true,\r\n}: Props) {\r\n const selectedPaymentType = watch(\"paymentMethod\");\r\n const pageData = getPageData<PaymentPageModel>();\r\n\r\n const paidAmount = getPaidAmount(getValues(), true);\r\n\r\n const achTotal = precisionAdd(paidAmount, payerFees.achPayerFee);\r\n const creditCardTotal = precisionAdd(paidAmount, payerFees.creditCardPayerFee);\r\n const isACH = selectedPaymentType === \"Ach\";\r\n const payerTokenList: PayerTokenViewModel[] = payerTokens.filter((f) =>\r\n isACH ? f.PaymentMethodType === \"ACH\" : f.PaymentMethodType !== \"ACH\"\r\n );\r\n const {\r\n formState: { dirtyFields },\r\n } = useFormContext<PaymentPageFormValues>();\r\n\r\n const isPaymentDetailsEntered = hasEnteredPaymentDetails(dirtyFields);\r\n\r\n const onPaymentTypeChange = (type: PaymentMethod) => {\r\n setValue(\"paymentMethod\", type);\r\n };\r\n\r\n const currentSelection = getValues(\"tokenPublicId\");\r\n\r\n // - need a default select incase the user just goes with the default,\r\n // in which case the change event will never fire.\r\n // - only set the value if the current value isn't set, the list is bigger than zero\r\n // or the current value isn't in the currently filtered list\r\n useEffect(() => {\r\n const inCurrentList = payerTokenList.findIndex((f) => f.PublicId === currentSelection);\r\n\r\n if (payerTokenList.length > 0 && (undefined === currentSelection || inCurrentList === -1)) {\r\n setValue(\"tokenPublicId\", payerTokenList[0].PublicId);\r\n }\r\n }, [payerTokenList, setValue, currentSelection]);\r\n\r\n const changePaymentType = (paymentType: PaymentMethod, e: MouseEvent<HTMLButtonElement>) => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n\r\n onPaymentTypeChange(paymentType);\r\n };\r\n\r\n const invoicePayments = watch(\"invoicePayments\");\r\n const anyInvoicesFinanced = hasFinancedInvoices(invoicePayments);\r\n const showCvv = paymentFlow === PaymentFlow.Manual;\r\n\r\n const shouldShowAutoPay =\r\n invoices?.EnableAutopay &&\r\n pageData.ShowAutoPay &&\r\n !invoices?.AutoPaySubscriptionId &&\r\n !anyInvoicesFinanced &&\r\n invoices.Invoices.length > 0;\r\n\r\n useEffect(() => {\r\n if (!shouldShowAutoPay) {\r\n setValue(\"enableAutoPay\", false);\r\n }\r\n }, [shouldShowAutoPay, setValue]);\r\n\r\n return (\r\n <>\r\n <PaymentInfoTabs\r\n achDisclaimer={achDisclaimer}\r\n acceptedPaymentMethods={acceptedPaymentMethods}\r\n selectedPaymentType={selectedPaymentType}\r\n changePaymentType={changePaymentType}\r\n >\r\n {paymentFlow === PaymentFlow.Manual && (\r\n <>\r\n <PaymentTypeHeader\r\n amount={formatCurrency(paidAmount)}\r\n fee={formatCurrency(isACH ? payerFees.achPayerFee : payerFees.creditCardPayerFee)}\r\n total={formatCurrency(isACH ? achTotal : creditCardTotal)}\r\n />\r\n\r\n <hr className=\"std-component-space\" />\r\n </>\r\n )}\r\n {payerTokenList.length > 0 && (\r\n <SavedPayerTokens\r\n payerTokens={payerTokenList}\r\n selectedValue={watch(\"tokenPublicId\")}\r\n setSelectedValue={(x) => {\r\n setValue(\"tokenPublicId\", x);\r\n }}\r\n deletePayerToken={deletePayerToken}\r\n />\r\n )}\r\n\r\n {payerTokenList.length === 0 ? (\r\n <PaymentForms\r\n selectedPaymentType={selectedPaymentType}\r\n showSaveOption={showSavePaymentOption}\r\n showCvv={showCvv}\r\n />\r\n ) : (\r\n <>\r\n <hr className=\"std-component-space\" />\r\n <Collapsible\r\n title=\"Add New\"\r\n label=\"Add New\"\r\n defaultState={\r\n isPaymentDetailsEntered ? CollapsibleState.open : CollapsibleState.closed\r\n }\r\n >\r\n <PaymentForms\r\n selectedPaymentType={selectedPaymentType}\r\n showSaveOption={showSavePaymentOption}\r\n showCvv={showCvv}\r\n />\r\n </Collapsible>\r\n </>\r\n )}\r\n </PaymentInfoTabs>\r\n {shouldShowAutoPay && paymentFlow === PaymentFlow.Manual && (\r\n <AutoPayToggle autoPayEmailOffsetDays={invoices?.AutoPayEmailOffset} />\r\n )}\r\n\r\n <div className=\"flow\">\r\n {anyInvoicesFinanced ? <FinanceDisclaimer register={register} errors={errors} /> : null}\r\n\r\n <PaymentDisclaimer\r\n fee={isACH ? payerFees.achPayerFee : payerFees.creditCardPayerFee}\r\n paymentFlow={paymentFlow}\r\n register={register}\r\n errors={errors}\r\n />\r\n\r\n {paymentFlow === PaymentFlow.Manual && (\r\n <ReCaptcha\r\n recaptchaKey={recaptchaKey}\r\n errors={errors}\r\n register={register}\r\n setValue={setValue}\r\n />\r\n )}\r\n\r\n <PaymentFormErrors />\r\n </div>\r\n\r\n <div className={paymentFlow === PaymentFlow.AutoPay ? \"enrollment-btn-wrapper\" : \"\"}>\r\n <Button\r\n id=\"submitPayment\"\r\n type=\"submit\"\r\n className=\"fixed-bottom full-width\"\r\n disabled={isSubmitting || !recaptchaLoaded}\r\n >\r\n {isSubmitting ? (\r\n <span className=\"justify-center\">\r\n <Spinner type={SpinnerType.inline} size={IconSize.medium} />\r\n Processing...\r\n </span>\r\n ) : (\r\n <span>{paymentFlow === PaymentFlow.AutoPay ? \"Enroll Now\" : \"Complete Payment\"}</span>\r\n )}\r\n </Button>\r\n </div>\r\n </>\r\n );\r\n}\r\n","import \"./AutoPayPaylessEnrollmentPage.css\";\r\nimport { useState } from \"react\";\r\nimport { FormProvider, useForm } from \"react-hook-form\";\r\nimport { Button } from \"#components/Button/Button\";\r\nimport { ButtonSize, ButtonVariants } from \"#components/Button/buttonTypes\";\r\nimport FormHeading from \"#components/FormHeading/FormHeading\";\r\nimport TextField from \"#components/TextField/FormTextField\";\r\nimport { useToast } from \"#context/Toaster\";\r\nimport { PayerFees } from \"#features/PayerFees/usePayerFees\";\r\nimport PaymentInfo from \"#features/PaymentInfo/PaymentInfo\";\r\nimport { PaymentFlow } from \"#features/PaymentInfo/PaymentInfo.types\";\r\nimport {\r\n AutoPayPayLessEnrollmentModel,\r\n AutoPayPayLessPageResponseModel,\r\n PaymentPageFormValues,\r\n PaymentPageModel,\r\n} from \"#features/PaymentMethodForm/PaymentInfoModel\";\r\nimport {\r\n getTransactionAttributeDisplayValue,\r\n handleValidThrough,\r\n hasPaymentInfo,\r\n prefillPaymentPage,\r\n} from \"#features/PaymentMethodForm/PaymentPageHelpers\";\r\nimport { ApiClient } from \"#utilities/ApiClient\";\r\nimport { StandardEmailValidation } from \"#utilities/Email\";\r\n\r\ninterface AutoPayPaylessEnrollmentPageProps {\r\n onShowAutoPayPaylessEnrollmentPage: (display: boolean) => void;\r\n pageData: PaymentPageModel;\r\n transactionAttributeValues: { [key: string]: string };\r\n deletePayerToken: (publicId: string) => void;\r\n payerFees: PayerFees;\r\n payerName: string;\r\n emailAddress: string;\r\n invoicePayerName: string;\r\n autoPayEmailOffsetDays?: number;\r\n}\r\n\r\nexport const AutoPayPaylessEnrollmentPage = ({\r\n onShowAutoPayPaylessEnrollmentPage,\r\n pageData,\r\n transactionAttributeValues,\r\n deletePayerToken,\r\n payerFees,\r\n payerName,\r\n emailAddress,\r\n invoicePayerName,\r\n autoPayEmailOffsetDays,\r\n}: AutoPayPaylessEnrollmentPageProps) => {\r\n const { clearToast, setErrorToast } = useToast();\r\n const [selectedTab, setSelectedTab] = useState<number>(0);\r\n const defaultFormValues = prefillPaymentPage(pageData);\r\n const formContext = useForm<PaymentPageFormValues>({\r\n defaultValues: {\r\n ...defaultFormValues,\r\n ...{\r\n payer: payerName,\r\n emailaddress: emailAddress,\r\n },\r\n },\r\n });\r\n const {\r\n register,\r\n handleSubmit,\r\n setValue,\r\n getValues,\r\n watch,\r\n formState: { errors, isSubmitting },\r\n } = formContext;\r\n\r\n const onSubmit = async (data: PaymentPageFormValues) => {\r\n clearToast();\r\n\r\n try {\r\n if (hasPaymentInfo(data)) {\r\n data.tokenPublicId = null;\r\n }\r\n\r\n handleValidThrough(data);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n const { transactionAttributes, ...paymentModel } = data;\r\n\r\n const responseData: AutoPayPayLessPageResponseModel = await ApiClient.post<\r\n AutoPayPayLessPageResponseModel,\r\n AutoPayPayLessEnrollmentModel\r\n >(\"ScheduledPayments/AutoPayCreate\", {\r\n autoPayCreateModel: {\r\n ...paymentModel,\r\n ...{ cvc: \"000\" }, // cvc is not required for pay less auto pay but needs a value for server side validation\r\n },\r\n transactionAttributeValues,\r\n });\r\n\r\n if (responseData.Success) {\r\n let url = \"ScheduledPayments?autoPayPayLessEnrollmentSuccess=true\";\r\n\r\n if (responseData.Secret) {\r\n url += `&secret=${responseData.Secret}`;\r\n }\r\n\r\n window.location.replace(`${pageData.ApiBaseUrl}${url}`);\r\n\r\n // don't resolve so we show spinner until new page loads\r\n return new Promise(() => {});\r\n } else {\r\n setErrorToast(`Failed to enroll in Autopay. ${responseData.ErrorMessage || \"\"}`);\r\n }\r\n } catch (e) {\r\n setErrorToast(`Failed to enroll in Autopay.`);\r\n }\r\n };\r\n\r\n const changeTab = (e: React.MouseEvent<HTMLButtonElement, MouseEvent>, changeTo: number) => {\r\n e.preventDefault();\r\n setSelectedTab(changeTo);\r\n window.scrollTo(0, 0);\r\n };\r\n\r\n return (\r\n <FormProvider {...formContext}>\r\n <form onSubmit={handleSubmit(onSubmit)}>\r\n <div className=\"autopay-payless-enrollment-page main-with-sidebar\" role=\"tablist\">\r\n <div className={`left-column box ${selectedTab === 0 ? \"\" : \"not-\"}selected`}>\r\n <button\r\n role=\"tab\"\r\n id=\"tab-control-0\"\r\n aria-selected={selectedTab === 0 ? \"true\" : \"false\"}\r\n aria-controls=\"autopay-enroll-tab\"\r\n className=\"tab-select tab-zero fixed\"\r\n onClick={(e) => {\r\n changeTab(e, 0);\r\n }}\r\n >\r\n <FormHeading>\r\n Enroll\r\n <br className=\"break-when-small\" /> in AutoPay\r\n </FormHeading>\r\n </button>\r\n <div\r\n className=\"tab-body\"\r\n id=\"autopay-enroll-tab\"\r\n aria-labelledby=\"tab-control-0\"\r\n role=\"tabpanel\"\r\n >\r\n <div className=\"enrollment-section\">\r\n Enroll in AutoPay to make future payments easy. Invoices will be paid automatically\r\n using the payment information you enter. You will receive an email notification{\" \"}\r\n {autoPayEmailOffsetDays} days before the automatic payment so you can review and\r\n cancel the payment as needed.\r\n </div>\r\n <div className=\"return-to-payment-section\">\r\n Need to make a payment today?{\" \"}\r\n <Button\r\n variant={ButtonVariants.text}\r\n size={ButtonSize.medium}\r\n onClick={() => onShowAutoPayPaylessEnrollmentPage(false)}\r\n className=\"autopay-payless-link\"\r\n >\r\n Return to the payment page\r\n </Button>\r\n <hr />\r\n </div>\r\n <FormHeading>\r\n Payer\r\n <br className=\"break-when-small\" /> Information\r\n </FormHeading>\r\n <div className=\"account-name-section\">\r\n An AutoPay subscription {invoicePayerName} will be set up with the details below\r\n </div>\r\n <div className=\"search-criteria-section\">\r\n <div className=\"row\">\r\n <div className=\"col-sm-12 col-md-6\">\r\n <TextField\r\n label={pageData.PayerLabel || \"Payer Name\"}\r\n {...register(\"payer\", {\r\n required: `${pageData.PayerLabel || \"Payer name\"} is required.`,\r\n })}\r\n errors={errors}\r\n maxLength={150}\r\n />\r\n </div>\r\n <div className=\"col-sm-12 col-md-6\">\r\n <TextField\r\n label=\"Email Address\"\r\n {...register(\"emailaddress\", StandardEmailValidation)}\r\n errors={errors}\r\n inputMode=\"email\"\r\n maxLength={150}\r\n />\r\n </div>\r\n </div>\r\n <div className={`modify-account-details-column`}>\r\n <Button\r\n variant={ButtonVariants.text}\r\n size={ButtonSize.medium}\r\n onClick={() => onShowAutoPayPaylessEnrollmentPage(false)}\r\n className=\"autopay-payless-link\"\r\n >\r\n Modify Account Details\r\n </Button>\r\n </div>\r\n <div className=\"custom-fields-container\">\r\n {pageData.TransactionAttributes.map((ta) => {\r\n return (\r\n <div key={ta.Id} className=\"custom-fields-container-item\">\r\n <span className=\"bold\">{ta.Name}</span>\r\n <div>\r\n {getTransactionAttributeDisplayValue(transactionAttributeValues, ta)}\r\n </div>\r\n </div>\r\n );\r\n })}\r\n </div>\r\n <div>\r\n <button\r\n className=\"clickable button primary full-width hide-on-big fixed-bottom\"\r\n onClick={(e) => {\r\n changeTab(e, 1);\r\n }}\r\n >\r\n Continue\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div\r\n className={`right-column box payment-details-section ${selectedTab === 1 ? \"\" : \"not-\"}selected`}\r\n >\r\n <button\r\n id=\"tab-control-1\"\r\n role=\"tab\"\r\n aria-selected={selectedTab === 1 ? \"true\" : \"false\"}\r\n aria-controls=\"payment-details-tab\"\r\n className={`tab-select tab-one fixed`}\r\n onClick={(e) => {\r\n changeTab(e, 1);\r\n }}\r\n >\r\n <FormHeading>\r\n Payment\r\n <br className=\"break-when-small\" /> Details\r\n </FormHeading>\r\n </button>\r\n <div\r\n className=\"tab-body\"\r\n id=\"payment-details-tab\"\r\n aria-labelledby=\"tab-control-1\"\r\n role=\"tabpanel\"\r\n >\r\n <PaymentInfo\r\n acceptedPaymentMethods={pageData.AcceptedPaymentMethods}\r\n register={register}\r\n errors={errors}\r\n getValues={getValues}\r\n setValue={setValue}\r\n watch={watch}\r\n recaptchaKey={pageData.GoogleDataSiteClientKey}\r\n payerTokens={pageData.PayerTokenViewModels}\r\n deletePayerToken={deletePayerToken}\r\n achDisclaimer={pageData.AchDisclaimer}\r\n isSubmitting={isSubmitting}\r\n payerFees={payerFees}\r\n paymentFlow={PaymentFlow.AutoPay}\r\n showSavePaymentOption={false}\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n </FormProvider>\r\n );\r\n};\r\n","import { IconButton } from \"#components/Button/IconButton\";\r\nimport Tooltip from \"#components/Tooltip/Tooltip\";\r\nimport { ArrowPaths } from \"#components/Tooltip/ToolTipArrowPaths\";\r\nimport { useTooltip } from \"#hooks/useTooltip\";\r\n\r\ninterface AutoPayPaylessEnrollmentProps {\r\n disabled: boolean;\r\n onShowAutoPayPaylessEnrollment: (display: boolean) => void;\r\n}\r\n\r\nexport const AutoPayPaylessEnrollment = ({\r\n disabled,\r\n onShowAutoPayPaylessEnrollment: onShowAutoPayPaylessEnrollment,\r\n}: AutoPayPaylessEnrollmentProps) => {\r\n const { showToolTip, handleFocusAndClick, buttonRef, centreOnRef } = useTooltip();\r\n const autoPayEnrollmentMessage = `Enroll in AutoPay without making a payment. ${disabled ? \"Option not available when an invoice is financed.\" : \"\"}`;\r\n\r\n return (\r\n <div className=\"autopay-wrapper\">\r\n <button\r\n type=\"button\"\r\n onClick={() => onShowAutoPayPaylessEnrollment(true)}\r\n disabled={disabled}\r\n className=\"autopay-btn underline\"\r\n >\r\n Enroll in AutoPay\r\n </button>\r\n <div ref={centreOnRef}>\r\n <IconButton\r\n title={autoPayEnrollmentMessage}\r\n iconName=\"info_outline\"\r\n type=\"button\"\r\n onClick={handleFocusAndClick}\r\n ref={buttonRef}\r\n ></IconButton>\r\n </div>\r\n {showToolTip && (\r\n <Tooltip\r\n allowedPlacements={[\"bottom\"]}\r\n offsetBy={4}\r\n arrowPath={ArrowPaths.Default}\r\n className=\"autopay-tooltip\"\r\n referenceElement={centreOnRef}\r\n >\r\n {autoPayEnrollmentMessage}\r\n </Tooltip>\r\n )}\r\n </div>\r\n );\r\n};\r\n","export const MAX_NUMBER_TO_DISPLAY = 100;\r\n","import Select from \"#components/Select/Select\";\r\nimport { useNoInvoiceColumns } from \"#utilities/MediaQuery\";\r\nimport { CurrentSort, SortDirection } from \"#utilities/Sorting\";\r\nimport { setTestId } from \"#utilities/TestTools/StandardMethods\";\r\n\r\nconst testId = setTestId(\"mobile-sort-container\");\r\n\r\ninterface MobileInvoiceSortProps {\r\n invoiceSort: CurrentSort | undefined;\r\n setInvoiceSort: (newSort: CurrentSort | undefined) => void;\r\n}\r\n\r\nexport const MobileInvoiceSort = ({ invoiceSort, setInvoiceSort }: MobileInvoiceSortProps) => {\r\n const shouldDisplay = useNoInvoiceColumns();\r\n\r\n const getValueAndSelected = (colName: string, dir: SortDirection) => {\r\n return {\r\n Value: JSON.stringify({ columnName: colName, sortDirection: dir }),\r\n };\r\n };\r\n\r\n if (!shouldDisplay) {\r\n return null;\r\n }\r\n\r\n return (\r\n <div className=\"mobile-invoice-sort\" data-testid={testId}>\r\n <Select\r\n name=\"mobile-sort\"\r\n id=\"mobile-sort\"\r\n label=\"Sort By\"\r\n onChange={(event: React.ChangeEvent<HTMLSelectElement>) => {\r\n setInvoiceSort(JSON.parse(event.target.value) as CurrentSort);\r\n }}\r\n value={JSON.stringify(invoiceSort)}\r\n options={[\r\n { Text: \"Invoice (ascending)\", ...getValueAndSelected(\"Id\", SortDirection.Asc) },\r\n { Text: \"Invoice (descending)\", ...getValueAndSelected(\"Id\", SortDirection.Desc) },\r\n { Text: \"Name (ascending)\", ...getValueAndSelected(\"Name\", SortDirection.Asc) },\r\n { Text: \"Name (descending)\", ...getValueAndSelected(\"Name\", SortDirection.Desc) },\r\n {\r\n Text: \"Due Date (newest first)\",\r\n ...getValueAndSelected(\"DueDate\", SortDirection.Desc),\r\n },\r\n {\r\n Text: \"Due Date (oldest first)\",\r\n ...getValueAndSelected(\"DueDate\", SortDirection.Asc),\r\n },\r\n { Text: \"Amount (highest first)\", ...getValueAndSelected(\"Amount\", SortDirection.Desc) },\r\n { Text: \"Amount (lowest first)\", ...getValueAndSelected(\"Amount\", SortDirection.Asc) },\r\n ]}\r\n />\r\n </div>\r\n );\r\n};\r\n","import \"./divider.css\";\r\n\r\ninterface Props {\r\n className?: string;\r\n}\r\n\r\nexport const Divider = ({ className }: Props) => {\r\n return <div className={`divider ${className ? className : \"\"}`}></div>;\r\n};\r\n","import { ChangeEvent, useState } from \"react\";\r\nimport { useFieldArray, useFormContext } from \"react-hook-form\";\r\nimport { notInvoicedId } from \"./InvoiceGrid\";\r\nimport { createInvoicePayment } from \"./invoiceHelpers\";\r\nimport { MobileInvoiceSort } from \"./MobileInvoiceSort\";\r\nimport { InvoiceListModel, InvoicePayment } from \"./Models/InvoiceTypes\";\r\nimport { Button } from \"#components/Button/Button\";\r\nimport { ButtonVariants } from \"#components/Button/buttonTypes\";\r\nimport { Divider } from \"#components/Divider/Divider\";\r\nimport Icon from \"#components/Icons/Icon\";\r\nimport { IconPosition } from \"#components/Icons/iconTypes\";\r\nimport { Modal } from \"#components/Modal/Modal\";\r\nimport FormTextField from \"#components/TextField/FormTextField\";\r\nimport { PaymentPageFormValues } from \"#features/PaymentMethodForm/PaymentInfoModel\";\r\nimport { CurrentSort } from \"#utilities/Sorting\";\r\n\r\ninterface InvoiceHeaderControlsProps {\r\n invoicePayments: InvoicePayment[];\r\n invoices?: InvoiceListModel;\r\n filterText: string;\r\n setFilterText: (ft: string) => void;\r\n invoiceSort: CurrentSort | undefined;\r\n setInvoiceSort: (newSort: CurrentSort | undefined) => void;\r\n hideInvoiceButtons: boolean;\r\n}\r\n\r\nexport const InvoiceHeaderControls = ({\r\n invoicePayments,\r\n invoices,\r\n filterText,\r\n setFilterText,\r\n invoiceSort,\r\n setInvoiceSort,\r\n hideInvoiceButtons = false,\r\n}: InvoiceHeaderControlsProps) => {\r\n const [showConfirmation, setShowConfirmation] = useState<boolean>(false);\r\n\r\n const formContext = useFormContext<PaymentPageFormValues>();\r\n\r\n const invoicePaymentsArr = useFieldArray({\r\n control: formContext.control,\r\n name: \"invoicePayments\",\r\n });\r\n\r\n const clearAll = () => {\r\n formContext.clearErrors(\"invoicePayments\");\r\n invoicePaymentsArr.replace([]);\r\n\r\n formContext.setValue(\"premiumFinanceAgreement\", null);\r\n formContext.setValue(\"enableFinancingAutoPay\", null);\r\n };\r\n\r\n const confirmPayAll = () => {\r\n const atLeastOnePaid = invoices.Invoices.find((f) => !!f.LastPaidDate);\r\n if (atLeastOnePaid) {\r\n setShowConfirmation(true);\r\n } else {\r\n payAll();\r\n }\r\n };\r\n\r\n const payAll = () => {\r\n const unpaidInvoices = invoices.Invoices.filter(\r\n (invoice) =>\r\n !invoicePayments.some((payment) => payment.id === invoice.Id) &&\r\n invoice.Id !== notInvoicedId\r\n );\r\n\r\n invoicePaymentsArr.append(\r\n unpaidInvoices.map((invoice) => createInvoicePayment(invoice)),\r\n { shouldFocus: false }\r\n );\r\n };\r\n\r\n return (\r\n <>\r\n <div className=\"invoice-controls\">\r\n <div className=\"invoice-search\">\r\n <FormTextField\r\n label=\"Search Invoices List\"\r\n placeholder=\"Filter list by invoice #, amount, date, etc.\"\r\n name=\"sil\"\r\n icon={<Icon>search</Icon>}\r\n iconPosition={IconPosition.left}\r\n value={filterText}\r\n onChange={(event: ChangeEvent<HTMLInputElement>) => setFilterText(event.target.value)}\r\n />\r\n </div>\r\n {!hideInvoiceButtons && (\r\n <div className=\"invoice-buttons\">\r\n <Button\r\n variant={ButtonVariants.plain}\r\n disabled={invoicePayments.length === 0}\r\n onClick={clearAll}\r\n className=\"clear-all-btn\"\r\n >\r\n Clear All\r\n </Button>\r\n <Divider />\r\n <Button\r\n variant={ButtonVariants.primary}\r\n disabled={\r\n invoicePayments.filter((x) => x.id !== notInvoicedId).length ===\r\n invoices.Invoices.filter((x) => x.Id !== notInvoicedId).length\r\n }\r\n onClick={confirmPayAll}\r\n >\r\n Pay All\r\n </Button>\r\n </div>\r\n )}\r\n <MobileInvoiceSort invoiceSort={invoiceSort} setInvoiceSort={setInvoiceSort} />\r\n </div>\r\n <Modal\r\n isOpen={showConfirmation}\r\n title=\"Payment Confirmation\"\r\n handleClose={() => {\r\n setShowConfirmation(false);\r\n }}\r\n className=\"payment-confirmation-modal\"\r\n >\r\n <div>\r\n <div>\r\n <p>One or more of the selected invoices have already been paid.</p>\r\n <br />\r\n <p>\r\n <strong>Do you want to continue?</strong>\r\n </p>\r\n </div>\r\n <div className=\"action-container\">\r\n <Button\r\n variant={ButtonVariants.outline}\r\n className=\"medium\"\r\n onClick={() => {\r\n setShowConfirmation(false);\r\n }}\r\n >\r\n Cancel\r\n </Button>\r\n <Button\r\n className=\"medium\"\r\n onClick={() => {\r\n payAll();\r\n setShowConfirmation(false);\r\n }}\r\n >\r\n Proceed\r\n </Button>\r\n </div>\r\n </div>\r\n </Modal>\r\n </>\r\n );\r\n};\r\n","import { useRef, useState } from \"react\";\r\nimport {\r\n calculateTotalDownPayments,\r\n calculateTotalInvoicePayments,\r\n hasFinancedInvoices,\r\n} from \"./invoiceHelpers\";\r\nimport { InvoicePayment } from \"./Models/InvoiceTypes\";\r\nimport { IconButton } from \"#components/Button/IconButton\";\r\nimport { Divider } from \"#components/Divider/Divider\";\r\nimport Tooltip from \"#components/Tooltip/Tooltip\";\r\nimport { PaymentPageModel } from \"#features/PaymentMethodForm/PaymentInfoModel\";\r\nimport { formatCurrency } from \"#utilities/Currency\";\r\nimport { cx } from \"#utilities/cx\";\r\nimport { getPageData } from \"#utilities/GetPageData\";\r\nimport { setTestId } from \"#utilities/TestTools/StandardMethods\";\r\n\r\nconst testId = setTestId(\"invoice-total-amount\");\r\n\r\ninterface InvoiceSummaryProps {\r\n invoicePayments: InvoicePayment[];\r\n pfaIsSigned: boolean;\r\n anyInvoicesFinancingEligible: boolean;\r\n}\r\n\r\nexport const InvoiceSummary = ({\r\n invoicePayments,\r\n pfaIsSigned,\r\n anyInvoicesFinancingEligible,\r\n}: InvoiceSummaryProps) => {\r\n const totalAmountPayNow = calculateTotalInvoicePayments(invoicePayments);\r\n const totalAmountFinanced = calculateTotalDownPayments(invoicePayments);\r\n\r\n const financingEnabled = getPageData<PaymentPageModel>().EnableFinancing;\r\n const anyInvoicesFinanced = hasFinancedInvoices(invoicePayments);\r\n\r\n return (\r\n <div className=\"invoice-summary\">\r\n {financingEnabled && (\r\n <>\r\n <div className=\"invoice-total\">\r\n {anyInvoicesFinanced ? (\r\n <>\r\n <span className=\"invoice-total-text\">Total of Selected Down Payment Invoices:</span>\r\n <span className={cx(\"invoice-total-amount\", !pfaIsSigned && \"pending\")}>\r\n <span data-testid={testId} className=\"amount\">\r\n {pfaIsSigned ? (\r\n formatCurrency(totalAmountFinanced)\r\n ) : (\r\n <>\r\n Pending <PendingIcon />\r\n </>\r\n )}\r\n </span>\r\n </span>\r\n </>\r\n ) : (\r\n <>\r\n <span className=\"invoice-total-text\">\r\n No invoices {anyInvoicesFinancingEligible ? \"selected\" : \"eligible\"} for\r\n financing.\r\n </span>\r\n </>\r\n )}\r\n </div>\r\n <Divider className=\"dark no-pad\" />\r\n </>\r\n )}\r\n <div className=\"invoice-total\">\r\n <span className=\"invoice-total-text\">Total of Selected Pay Now Invoices:</span>\r\n <span className={`invoice-total-amount`}>\r\n <span data-testid={testId} className=\"amount\">\r\n {formatCurrency(totalAmountPayNow)}\r\n </span>\r\n </span>\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nconst PendingIcon = () => {\r\n const ref = useRef<HTMLButtonElement>(null);\r\n\r\n const [tooltipVisible, setTooltipVisible] = useState<boolean>(false);\r\n\r\n return (\r\n <>\r\n <IconButton\r\n title=\"Pending\"\r\n className=\"pending-icon\"\r\n iconName=\"info_outline\"\r\n onMouseEnter={() => setTooltipVisible(true)}\r\n onMouseOut={() => setTooltipVisible(false)}\r\n onFocus={() => setTooltipVisible(true)}\r\n onBlur={() => setTooltipVisible(false)}\r\n tabIndex={0}\r\n role=\"button\"\r\n ref={ref}\r\n />\r\n {tooltipVisible && (\r\n <Tooltip\r\n id={\"invoice-summary-pending-tooltip\"}\r\n referenceElement={ref}\r\n className=\"invoice-summary-pending-tooltip\"\r\n offsetBy={24}\r\n overridePlacement=\"top\"\r\n >\r\n Please sign the PFA to view the total\r\n </Tooltip>\r\n )}\r\n </>\r\n );\r\n};\r\n","import \"./AutoPayContainer.css\";\r\nimport { useState } from \"react\";\r\nimport { AutoPayLearnMore } from \"./AutoPayLearnMore\";\r\nimport { Button } from \"#components/Button/Button\";\r\nimport { ButtonVariants } from \"#components/Button/buttonTypes\";\r\nimport { ConfirmationModal } from \"#components/Confirmation/ConfirmationModal\";\r\nimport { useToast } from \"#context/Toaster\";\r\nimport { BaseModel } from \"#features/PaymentMethodForm/PaymentInfoModel\";\r\nimport { ApiClient, WithStatus } from \"#utilities/ApiClient\";\r\n\r\ninterface Props {\r\n showCancelButton: boolean;\r\n autoPaySubscriptionId?: number;\r\n onAutoPayCancel: () => void;\r\n autoPayEmailOffsetDays?: number;\r\n}\r\n\r\nexport type CancelAutoPayRequest = {\r\n id: number;\r\n};\r\n\r\nexport const AutoPayInfo = ({\r\n showCancelButton,\r\n autoPaySubscriptionId,\r\n onAutoPayCancel,\r\n autoPayEmailOffsetDays,\r\n}: Props) => {\r\n const { setErrorToast, setSuccessToast, clearToast } = useToast();\r\n const [showConfirm, setShowConfirm] = useState<boolean>(false);\r\n\r\n const cancelAutoPay = async () => {\r\n try {\r\n clearToast();\r\n const request: CancelAutoPayRequest = {\r\n id: autoPaySubscriptionId,\r\n };\r\n const data: WithStatus<BaseModel> = await ApiClient.post(\r\n \"Invoices/CancelAutoPaySubscription\",\r\n request\r\n );\r\n\r\n if (data.Success) {\r\n setSuccessToast(\"The automatic payment subscription has been cancelled.\");\r\n onAutoPayCancel();\r\n } else {\r\n setErrorToast(\"The automatic payment subscription could not be cancelled.\");\r\n }\r\n } catch (e) {\r\n console.error(e);\r\n setErrorToast(\r\n \"The automatic payment subscription could not be cancelled due to an unexpected error.\"\r\n );\r\n }\r\n };\r\n\r\n if (!autoPaySubscriptionId) {\r\n return null;\r\n }\r\n\r\n return (\r\n <div className=\"autopay-container\">\r\n <div className=\"autopay-message-cancel\">\r\n <div className=\"autopay-message\">AutoPay is currently enabled.</div>\r\n {showCancelButton && (\r\n <Button\r\n id=\"cancel-autopay\"\r\n type=\"button\"\r\n className=\"small\"\r\n variant={ButtonVariants.outline}\r\n onClick={() => setShowConfirm(true)}\r\n >\r\n Cancel AutoPay\r\n </Button>\r\n )}\r\n <AutoPayLearnMore autoPayEmailOffsetDays={autoPayEmailOffsetDays} />\r\n </div>\r\n <ConfirmationModal\r\n title=\"Cancel AutoPay Subscription\"\r\n isOpen={showConfirm}\r\n handleClose={() => {\r\n setShowConfirm(false);\r\n }}\r\n handleConfirm={() => {\r\n cancelAutoPay();\r\n setShowConfirm(false);\r\n }}\r\n className=\"modal-small\"\r\n >\r\n <p>Are you sure you would like to cancel your AutoPay subscription?</p>\r\n </ConfirmationModal>\r\n </div>\r\n );\r\n};\r\n","import \"./css/invoicesContainer.css\";\r\nimport { useCallback, useEffect, useMemo, useState } from \"react\";\r\nimport { useFormContext } from \"react-hook-form\";\r\nimport { AutoPayPaylessEnrollment } from \"./AutopayPaylessEnrollment\";\r\nimport { MAX_NUMBER_TO_DISPLAY } from \"./InvoiceConstants\";\r\nimport { InvoiceGrid, notInvoicedId } from \"./InvoiceGrid\";\r\nimport { InvoiceHeaderControls } from \"./InvoiceHeaderControls\";\r\nimport { filterInvoices, hasFinancedInvoices, validateInvoicePayments } from \"./invoiceHelpers\";\r\nimport { InvoiceSummary } from \"./InvoiceSummary\";\r\nimport { InvoiceListModel, InvoiceModel } from \"./Models/InvoiceTypes\";\r\nimport { Button } from \"#components/Button/Button\";\r\nimport { ButtonSize, ButtonVariants } from \"#components/Button/buttonTypes\";\r\nimport { IconSize } from \"#components/Icons/iconTypes\";\r\nimport { InputError } from \"#components/Shared/InputError\";\r\nimport { Spinner } from \"#components/Spinner/Spinner\";\r\nimport { SpinnerType } from \"#components/Spinner/SpinnerTypes\";\r\nimport { AutoPayInfo } from \"#features/AutoPay/AutoPayInfo\";\r\nimport {\r\n PaymentPageFormValues,\r\n PaymentPageModel,\r\n} from \"#features/PaymentMethodForm/PaymentInfoModel\";\r\nimport { getPageData } from \"#utilities/GetPageData\";\r\nimport { CurrentSort, SortDirection, SortingAttributes } from \"#utilities/Sorting\";\r\n\r\ninterface InvoicesContainerProps {\r\n busy?: boolean;\r\n invoices?: InvoiceListModel;\r\n showAutoPay: boolean;\r\n onAutoPayCancel: () => void;\r\n onShowAutoPayPaylessEnrollment: (display: boolean) => void;\r\n anyInvoicesFinancingEligible: boolean;\r\n hideInvoiceButtons: boolean;\r\n}\r\n\r\nexport const InvoicesContainer = ({\r\n busy,\r\n invoices,\r\n showAutoPay,\r\n onAutoPayCancel,\r\n onShowAutoPayPaylessEnrollment,\r\n anyInvoicesFinancingEligible,\r\n hideInvoiceButtons,\r\n}: InvoicesContainerProps) => {\r\n const formContext = useFormContext<PaymentPageFormValues>();\r\n const invoicePayments = formContext.watch(\"invoicePayments\");\r\n const premiumFinanceAgreement = formContext.watch(\"premiumFinanceAgreement\");\r\n\r\n const [filterText, setFilterText] = useState<string>(\"\");\r\n const [invoiceSort, setInvoiceSort] = useState<CurrentSort | undefined>(undefined);\r\n const [invoicesTouched, setInvoicesTouched] = useState(false);\r\n const [showAll, setShowAll] = useState(false);\r\n const payerName = invoices?.PayerName ? ` for ${invoices?.PayerName}` : \"\";\r\n const enableAutoPay = invoices?.EnableAutopay;\r\n const enableAutoPayPaylessEnrollment = invoices?.EnableAutopayPaylessEnrollment;\r\n const autoPayEmailOffsetDays = invoices?.AutoPayEmailOffset;\r\n const pageData = getPageData<PaymentPageModel>();\r\n\r\n useEffect(() => {\r\n setFilterText(\"\");\r\n }, [invoices]);\r\n\r\n useEffect(() => {\r\n if (invoicePayments.length > 0) {\r\n setInvoicesTouched(true);\r\n }\r\n }, [invoicePayments]);\r\n\r\n const sortInvoices = useCallback(\r\n () => {\r\n const data: InvoiceListModel = { ...invoices };\r\n\r\n // handle the whacky non-data row\r\n const found = data.Invoices?.find((f) => f.Id === notInvoicedId);\r\n if (found) {\r\n (found as SortingAttributes<InvoiceModel>).alwaysBottom = true;\r\n }\r\n\r\n let setToDefault = false;\r\n const realSort: CurrentSort = { ...invoiceSort };\r\n if ((invoiceSort?.sortDirection ?? SortDirection.None) === SortDirection.None) {\r\n setToDefault = true;\r\n realSort.columnName = \"Id\";\r\n realSort.sortDirection = SortDirection.Asc;\r\n }\r\n\r\n if (data.Invoices) {\r\n if (filterText.trim().length > 0) {\r\n const paidInvoiceIds = invoicePayments.map((x) => x.id);\r\n\r\n const paidInvoices = data.Invoices.filter((x) => paidInvoiceIds.includes(x.Id));\r\n const unpaidInvoices = data.Invoices.filter((x) => !paidInvoiceIds.includes(x.Id));\r\n\r\n // sort the paid/unpaid invoices separately then add the paid invoices at the bottom\r\n // this lets us still properly sort the paid ones on the bottom\r\n data.Invoices = [unpaidInvoices, paidInvoices].flatMap((invoices) =>\r\n invoices.sortObject(realSort.columnName, realSort.sortDirection)\r\n );\r\n } else {\r\n data.Invoices = data.Invoices.sortObject(realSort.columnName, realSort.sortDirection);\r\n }\r\n }\r\n\r\n if (setToDefault && invoiceSort) {\r\n setInvoiceSort(setToDefault ? undefined : invoiceSort);\r\n }\r\n\r\n return data;\r\n },\r\n // We do not want to add invoicePayments to the deps because we don't want paid invoices to move\r\n // to the bottom until the user requests a new sort or changes the search filter\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n [invoices, filterText, invoiceSort]\r\n );\r\n\r\n useEffect(() => {\r\n setInvoicesTouched(false);\r\n }, [invoices]);\r\n function addUniqueObjects(array: InvoiceModel[] = [], newObjects: InvoiceModel[] = []) {\r\n // Iterate over each object in the array of new objects\r\n newObjects.forEach((newObject) => {\r\n // Check if the object already exists in the array based on the 'id' property\r\n const exists = array.some((item) => item.Id === newObject.Id);\r\n\r\n // Add the new object only if it doesn't exist\r\n if (!exists) {\r\n array.push(newObject);\r\n }\r\n });\r\n }\r\n\r\n const error =\r\n invoicesTouched || formContext.formState.submitCount > 0\r\n ? validateInvoicePayments(invoicePayments)\r\n : null;\r\n\r\n // filter the invoice list if requested\r\n const invoiceData = useMemo(sortInvoices, [sortInvoices, showAll]);\r\n\r\n const paidInvoiceIds = invoicePayments.map((x) => x.id);\r\n const paidInvoices = invoiceData?.Invoices?.filter((x) => paidInvoiceIds.includes(x.Id));\r\n\r\n if (filterText && (invoiceData?.Invoices?.length ?? -1) > 0) {\r\n // get the list of invoice ids that have a payment on them\r\n // filter the list and pass in the invoices with a payment as the always include list\r\n invoiceData.Invoices = filterInvoices(invoiceData.Invoices, filterText);\r\n }\r\n\r\n const notInvoiced = invoiceData?.Invoices?.find((f) => f.Id === notInvoicedId);\r\n if (!showAll && invoiceData?.Invoices?.length > MAX_NUMBER_TO_DISPLAY) {\r\n invoiceData.Invoices = invoiceData.Invoices.slice(0, MAX_NUMBER_TO_DISPLAY);\r\n }\r\n addUniqueObjects(invoiceData?.Invoices, paidInvoices);\r\n\r\n if (notInvoiced && !filterText) {\r\n addUniqueObjects(invoiceData?.Invoices, [notInvoiced]);\r\n }\r\n\r\n const hasInvoices = !!invoiceData?.Invoices?.length;\r\n const invoicesExist = !!invoices?.Invoices?.length;\r\n const showAutopayPaylessEnrollment =\r\n enableAutoPay &&\r\n pageData.ShowAutoPay &&\r\n enableAutoPayPaylessEnrollment &&\r\n !invoiceData?.AutoPaySubscriptionId &&\r\n !invoiceData?.Exception;\r\n\r\n const truncatingInvoices = invoiceData?.Invoices?.length < invoices?.Invoices?.length;\r\n return (\r\n <div className=\"invoice-list\">\r\n {!busy && !invoices && <div>Please fill in the fields above to view your open invoices</div>}\r\n {busy && (\r\n <Spinner\r\n size={IconSize.small}\r\n type={SpinnerType.inline}\r\n label=\"Searching for open invoices...\"\r\n />\r\n )}\r\n {!busy && invoices && (\r\n <>\r\n {showAutopayPaylessEnrollment && (\r\n <AutoPayPaylessEnrollment\r\n onShowAutoPayPaylessEnrollment={onShowAutoPayPaylessEnrollment}\r\n disabled={hasFinancedInvoices(invoicePayments)}\r\n />\r\n )}\r\n {invoices.Invoices.length > 0 && (\r\n <InvoiceHeaderControls\r\n invoicePayments={invoicePayments}\r\n invoices={invoiceData}\r\n filterText={filterText}\r\n setFilterText={setFilterText}\r\n setInvoiceSort={setInvoiceSort}\r\n invoiceSort={invoiceSort}\r\n hideInvoiceButtons={hideInvoiceButtons}\r\n />\r\n )}\r\n <div className=\"invoice-table\">\r\n {invoiceData?.Exception && (\r\n <div className=\"invoice-status\">{invoiceData?.Exception}</div>\r\n )}\r\n {!invoiceData?.Exception && hasInvoices && enableAutoPay && showAutoPay && (\r\n <AutoPayInfo\r\n showCancelButton={invoices.AutoPayCancelable}\r\n autoPaySubscriptionId={invoices?.AutoPaySubscriptionId}\r\n onAutoPayCancel={onAutoPayCancel}\r\n autoPayEmailOffsetDays={autoPayEmailOffsetDays}\r\n />\r\n )}\r\n {!invoiceData?.Exception && !hasInvoices && (\r\n <div className=\"invoices-for\">No invoices were found{payerName}</div>\r\n )}\r\n <InputError\r\n error={typeof error === \"string\" ? { message: error } : undefined}\r\n name=\"invoicePayments\"\r\n className=\"big-error\"\r\n />\r\n {hasInvoices && (\r\n <InvoiceGrid invoices={invoiceData} sort={invoiceSort} setSort={setInvoiceSort}>\r\n <div\r\n role=\"caption\"\r\n id=\"number-invoices\"\r\n className=\"invoices-for\"\r\n data-testid=\"number-invoices\"\r\n >\r\n <span>\r\n {`Displaying ${truncatingInvoices ? `${invoiceData.Invoices.length} of ` : \"\"}`}\r\n <strong>{invoices.Invoices.length}</strong> Invoices{payerName}\r\n </span>\r\n {!showAll && invoices.Invoices.length > MAX_NUMBER_TO_DISPLAY && (\r\n <Button\r\n variant={ButtonVariants.outline}\r\n onClick={() => setShowAll(true)}\r\n size={ButtonSize.small}\r\n >\r\n Show All\r\n </Button>\r\n )}\r\n </div>\r\n </InvoiceGrid>\r\n )}\r\n </div>\r\n {invoicesExist && (\r\n <InvoiceSummary\r\n invoicePayments={invoicePayments}\r\n pfaIsSigned={premiumFinanceAgreement != null}\r\n anyInvoicesFinancingEligible={anyInvoicesFinancingEligible}\r\n />\r\n )}\r\n </>\r\n )}\r\n </div>\r\n );\r\n};\r\n","export interface InvoiceListModel {\r\n PayerName: string;\r\n EmailAddresses: string[];\r\n AutoPaySubscriptionId?: number;\r\n EnableAutopay: boolean;\r\n EnableAutopayPaylessEnrollment: boolean;\r\n AutoPayEmailOffset: number;\r\n AutoPayCancelable: boolean;\r\n Invoices: InvoiceModel[];\r\n Status: InvoiceStatus;\r\n Exception?: string;\r\n AnyFinancingEligible: boolean;\r\n}\r\n\r\nexport enum InvoiceStatus {\r\n Success = \"Success\",\r\n AccountNotFound = \"AccountNotFound\",\r\n Error = \"Error\",\r\n}\r\n\r\nexport interface AttributeValueModel {\r\n Name: string;\r\n ParameterName: string;\r\n Value: string;\r\n}\r\n\r\ninterface InvoiceItemModel {\r\n Id: string;\r\n AttributeValues: AttributeValueModel[];\r\n}\r\n\r\nexport interface InvoiceModel {\r\n Id: string;\r\n Name: string;\r\n DueDate?: Date;\r\n Amount: number;\r\n MaximumAmount: number;\r\n AllowPartialPayment: boolean;\r\n Comment?: string;\r\n DivisionId: string;\r\n DownPaymentAmount?: number;\r\n NumberOfInstallments: number;\r\n InstallmentAmount?: number;\r\n AttributeValues: AttributeValueModel[];\r\n SearchAttributeValues: { [key: string]: string };\r\n InvoiceItems: InvoiceItemModel[];\r\n PolicyEffectiveDate?: Date;\r\n PolicyNumber?: string;\r\n PublicId?: string;\r\n LastPaidDate?: Date;\r\n PastDue: boolean;\r\n DueDateString?: string;\r\n LastPaidDateString?: string;\r\n FieldId: string;\r\n IsFinancingEligible: boolean;\r\n FinanceStatusDescription?: string;\r\n FinanceEligibilityHash?: string;\r\n Verification: string;\r\n DataToken: string;\r\n}\r\n\r\nexport interface InvoicePayment {\r\n id: string;\r\n paidAmount: number;\r\n financedDownAmount: number;\r\n comment?: string;\r\n divisionId: string;\r\n commentReason?: string;\r\n name: string;\r\n verification: string;\r\n dataToken: string;\r\n financeEligibilityHash?: string;\r\n}\r\n","import \"./Table.css\";\r\nimport { HTMLProps, ReactNode } from \"react\";\r\nimport { cx } from \"#utilities/cx\";\r\n\r\ntype Props = HTMLProps<HTMLTableElement> & {\r\n children?: ReactNode;\r\n type?: string;\r\n};\r\n\r\nconst Table = ({ children, type, className = \"\", ...props }: Props) => {\r\n return (\r\n <table {...props} className={cx(\"table\", type, className)}>\r\n {children}\r\n </table>\r\n );\r\n};\r\n\r\nexport default Table;\r\n","import React, { ReactNode } from \"react\";\r\n\r\ntype Props = {\r\n children?: ReactNode;\r\n};\r\n\r\nconst TableBody = ({ children }: Props) => {\r\n return <tbody>{children}</tbody>;\r\n};\r\n\r\nexport default TableBody;\r\n","import React, { ReactNode } from \"react\";\r\n\r\ntype Props = {\r\n children?: ReactNode;\r\n className?: string | undefined;\r\n width?: string;\r\n};\r\n\r\nconst TableData = ({ className = \"\", width = \"auto\", children }: Props) => {\r\n return (\r\n <td className={`td ${className}`} style={{ width: width }}>\r\n {children}\r\n </td>\r\n );\r\n};\r\n\r\nexport default TableData;\r\n","import React, { ReactNode } from \"react\";\r\n\r\ntype Props = {\r\n children?: ReactNode;\r\n};\r\n\r\nconst TableRow = ({ children }: Props) => {\r\n return <tr className=\"tr\">{children}</tr>;\r\n};\r\n\r\nexport default TableRow;\r\n","import Table from \"#components/Table/Table\";\r\nimport TableBody from \"#components/Table/TableBody\";\r\nimport TableData from \"#components/Table/TableData\";\r\nimport TableRow from \"#components/Table/TableRow\";\r\nimport { ManagedInvoiceLineItemModel } from \"#features/PaymentMethodForm/PaymentInfoModel\";\r\nimport { formatCurrency } from \"#utilities/Currency\";\r\n\r\ntype BreakdownSectionProps = {\r\n title: string;\r\n items: Array<ManagedInvoiceLineItemModel>;\r\n};\r\n\r\nexport const BreakdownSection = ({ title, items }: BreakdownSectionProps) => {\r\n return (\r\n <div>\r\n <h5>{title}</h5>\r\n <Table className=\"striped-table\">\r\n <TableBody>\r\n {items.map((item, index) => (\r\n <TableRow key={index}>\r\n <TableData>{item.Description}</TableData>\r\n <TableData className=\"text-align-right\">{formatCurrency(item.Amount)}</TableData>\r\n </TableRow>\r\n ))}\r\n </TableBody>\r\n </Table>\r\n </div>\r\n );\r\n};\r\n","import \"./PremiumBreakdownModal.css\";\r\nimport React from \"react\";\r\nimport { ManagedInvoiceModel } from \"../PaymentMethodForm/PaymentInfoModel\";\r\nimport { BreakdownSection } from \"./BreakdownSection\";\r\nimport { Modal } from \"#components/Modal/Modal.tsx\";\r\nimport { formatCurrency } from \"#utilities/Currency\";\r\n\r\ntype PremiumBreakdownModalProps = {\r\n isOpen: boolean;\r\n onClose: () => void;\r\n invoice: ManagedInvoiceModel;\r\n};\r\n\r\nexport const PremiumBreakdownModal = ({ isOpen, onClose, invoice }: PremiumBreakdownModalProps) => {\r\n if (!isOpen) return null;\r\n\r\n const hasLineItems = !!invoice.LineItems?.length;\r\n const hasTaxes = !!invoice.Taxes?.length;\r\n const hasFees = !!invoice.Fees?.length;\r\n\r\n const noData = !hasLineItems && !hasTaxes && !hasFees;\r\n\r\n return (\r\n <Modal isOpen={isOpen} handleClose={onClose} title=\"Premium Breakdown\">\r\n {/* we need tabIndex to be able to scroll the div with keyboard */}\r\n {/* eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex */}\r\n <div className=\"modal-premium-breakdown-body\" tabIndex={0}>\r\n {hasLineItems && <BreakdownSection title=\"Line Items\" items={invoice.LineItems} />}\r\n {hasLineItems && hasTaxes && <hr />}\r\n {hasTaxes && <BreakdownSection title=\"Taxes\" items={invoice.Taxes} />}\r\n {hasTaxes && hasFees && <hr />}\r\n {hasFees && <BreakdownSection title=\"Fees\" items={invoice.Fees} />}\r\n {noData && <p>No information found.</p>}\r\n <div className=\"total-amount\">\r\n <span>Total Amount:</span>\r\n <span>{formatCurrency(invoice.Amount)}</span>\r\n </div>\r\n </div>\r\n </Modal>\r\n );\r\n};\r\n","import \"./ManagedInvoice.css\";\r\nimport \"./PremiumBreakdownModal.css\";\r\nimport { useState } from \"react\";\r\nimport { useFormContext } from \"react-hook-form\";\r\nimport { PremiumBreakdownModal } from \"./PremiumBreakdownModal\";\r\nimport { Button } from \"#components/Button/Button\";\r\nimport { ButtonSize, ButtonVariants } from \"#components/Button/buttonTypes\";\r\nimport {\r\n ManagedInvoiceModel,\r\n PaymentPageFormValues,\r\n PaymentPageModel,\r\n} from \"#features/PaymentMethodForm/PaymentInfoModel\";\r\nimport { RequestPremiumFinanceAgreementResponse } from \"#features/PremiumFinanceAgreement/PremiumFinanceAgreementModel\";\r\nimport { formatCurrency } from \"#utilities/Currency\";\r\nimport { getPageData } from \"#utilities/GetPageData\";\r\nimport { useMediaQuery } from \"#utilities/MediaQuery\";\r\n\r\ntype Props = {\r\n invoice: ManagedInvoiceModel;\r\n onManagedInvoicePayNow: () => void;\r\n onManagedInvoiceFinance: () => void;\r\n pfaResponse: RequestPremiumFinanceAgreementResponse;\r\n};\r\n\r\nexport const ManagedInvoice = ({\r\n invoice,\r\n onManagedInvoicePayNow,\r\n onManagedInvoiceFinance,\r\n pfaResponse,\r\n}: Props) => {\r\n const formContext = useFormContext<PaymentPageFormValues>();\r\n const pageData = getPageData<PaymentPageModel>();\r\n\r\n const pfa = formContext.watch(\"premiumFinanceAgreement\");\r\n\r\n const isSmall = useMediaQuery(\"(max-width: 80rem)\");\r\n\r\n const [isModalOpen, setModalOpen] = useState(false);\r\n\r\n // I am rendering this in a different spot on mobile because I can't force it to go to last row in the grid\r\n const dueDateField = (\r\n <div className=\"managed-invoice-field managed-invoice-due-date\">\r\n <div className=\"managed-invoice-field-header\">Due Date</div>\r\n <div className=\"managed-invoice-field-value-special\">\r\n {new Date(invoice.DueDate).toLocaleDateString()}\r\n </div>\r\n </div>\r\n );\r\n\r\n const isPfaSigned = pfa != null;\r\n const openModal = () => setModalOpen(true);\r\n const closeModal = () => setModalOpen(false);\r\n\r\n return (\r\n <>\r\n <hr />\r\n <div className=\"managed-invoice\" role=\"grid\">\r\n <div className=\"managed-invoice-field managed-invoice-name\" role=\"gridcell\">\r\n <div className=\"managed-invoice-field-header\">Name</div>\r\n <div className=\"managed-invoice-field-value\">{invoice.CustomerName}</div>\r\n </div>\r\n {!isSmall && dueDateField}\r\n <div className=\"managed-invoice-field\" role=\"gridcell\">\r\n <div className=\"managed-invoice-field-header\">Invoice Number</div>\r\n <div className=\"managed-invoice-field-value\">{invoice.InvoiceNumber}</div>\r\n </div>\r\n <div className=\"managed-invoice-field\" role=\"gridcell\">\r\n <div className=\"managed-invoice-field-header\">Policy Number</div>\r\n <div className=\"managed-invoice-field-value\">{invoice.PolicyNumber}</div>\r\n </div>\r\n <div className=\"managed-invoice-field\" role=\"gridcell\">\r\n <div className=\"managed-invoice-field-header\">Effective Date</div>\r\n <div className=\"managed-invoice-field-value\">\r\n {invoice.EffectiveDate ? new Date(invoice.EffectiveDate).toLocaleDateString() : \"N/A\"}\r\n </div>\r\n </div>\r\n <div className=\"managed-invoice-field managed-invoice-amount\" role=\"gridcell\">\r\n <div className=\"managed-invoice-field-header\">Amount</div>\r\n <div className=\"managed-invoice-field-value-special\">\r\n {formatCurrency(invoice.Amount)}\r\n {invoice.ShowBreakdownDuringPayment && (\r\n <Button\r\n variant={ButtonVariants.link}\r\n size={ButtonSize.small}\r\n className=\"underline\"\r\n onClick={openModal}\r\n >\r\n View Amount Breakdown\r\n </Button>\r\n )}\r\n </div>\r\n </div>\r\n {isSmall && dueDateField}\r\n {/* additional attributes will go here */}\r\n </div>\r\n <hr />\r\n {pageData.EnableFinancing && pageData.ManagedInvoice.IsFinancingEligible ? (\r\n <>\r\n <div className=\"managed-invoice-payment-types\">\r\n <label className=\"managed-invoice-payment-type\">\r\n <div className=\"managed-invoice-payment-type-header\">\r\n <input\r\n type=\"radio\"\r\n {...formContext.register(\"managedInvoicePaymentMethod\")}\r\n value=\"payNow\"\r\n aria-labelledby=\"managed-invoice-pay-now\"\r\n onClick={onManagedInvoicePayNow}\r\n />\r\n <div className=\"managed-invoice-payment-type-title\" id=\"managed-invoice-pay-now\">\r\n Pay Now\r\n </div>\r\n </div>\r\n <div className=\"managed-invoice-payment-details\">\r\n <div className=\"managed-invoice-payment-details-item\">\r\n <div className=\"managed-invoice-payment-details-item-name\">Amount</div>\r\n <div className=\"managed-invoice-payment-details-item-value\">\r\n {formatCurrency(invoice.Amount)}\r\n </div>\r\n </div>\r\n </div>\r\n </label>\r\n <label className=\"managed-invoice-payment-type\">\r\n <div className=\"managed-invoice-payment-type-header\">\r\n <input\r\n type=\"radio\"\r\n {...formContext.register(\"managedInvoicePaymentMethod\")}\r\n value=\"finance\"\r\n aria-labelledby=\"managed-invoice-finance\"\r\n onClick={onManagedInvoiceFinance}\r\n />\r\n <div className=\"managed-invoice-payment-type-title\" id=\"managed-invoice-finance\">\r\n Finance\r\n </div>\r\n </div>\r\n <div className=\"managed-invoice-payment-details\">\r\n <div className=\"managed-invoice-payment-details-item\">\r\n <div className=\"managed-invoice-payment-details-item-name\">Down payment</div>\r\n <div className=\"managed-invoice-payment-details-item-value\">\r\n {formatCurrency(\r\n isPfaSigned\r\n ? pfaResponse.premiumFinanceAgreement.FinanceDetails.DownPaymentAmount\r\n : Number(pageData.ManagedInvoice.QuickQuote.DownPayment)\r\n )}\r\n </div>\r\n </div>\r\n <div className=\"managed-invoice-payment-details-item\">\r\n <div className=\"managed-invoice-payment-details-item-name\">\r\n Installment Amount\r\n </div>\r\n <div className=\"managed-invoice-payment-details-item-value\">\r\n {formatCurrency(\r\n isPfaSigned\r\n ? pfaResponse.premiumFinanceAgreement.FinanceDetails.InstallmentAmount\r\n : Number(pageData.ManagedInvoice.QuickQuote.InstallmentAmount)\r\n )}\r\n </div>\r\n </div>\r\n <div className=\"managed-invoice-payment-details-item\">\r\n <div className=\"managed-invoice-payment-details-item-name\">\r\n Number of Payments\r\n </div>\r\n <div className=\"managed-invoice-payment-details-item-value\">\r\n {isPfaSigned\r\n ? pfaResponse.premiumFinanceAgreement.FinanceDetails.NumberOfPayments\r\n : pageData.ManagedInvoice.QuickQuote!.NumberOfInstallments}\r\n </div>\r\n </div>\r\n </div>\r\n </label>\r\n </div>\r\n </>\r\n ) : null}\r\n <PremiumBreakdownModal isOpen={isModalOpen} onClose={closeModal} invoice={invoice} />\r\n </>\r\n );\r\n};\r\n","import { useEffect, useState } from \"react\";\r\nimport { PayerFeeModel, PaymentPageFormValues } from \"#features/PaymentMethodForm/PaymentInfoModel\";\r\nimport { ApiClient } from \"#utilities/ApiClient\";\r\nimport { useDebounceExceptTests } from \"#utilities/debounce\";\r\n\r\nconst debounceTimeout = 500;\r\n\r\nexport const usePayerFees = (formValues: PaymentPageFormValues, paidAmount: number) => {\r\n const [achPayerFee, setAchPayerFee] = useState(0);\r\n const [creditCardPayerFee, setCreditCardPayerFee] = useState(0);\r\n\r\n const calculatePayerFees = useDebounceExceptTests(() => {\r\n const { transactionAttributes } = formValues;\r\n\r\n const attributes = { ...transactionAttributes, amount: paidAmount.toString() };\r\n\r\n ApiClient.get<PayerFeeModel>(\"Payments/PayerFee\", attributes).then((data) => {\r\n setAchPayerFee(data.AchPayerFee);\r\n setCreditCardPayerFee(data.CreditCardPayerFee);\r\n });\r\n }, debounceTimeout);\r\n\r\n useEffect(() => {\r\n if (paidAmount < 0.01) {\r\n setAchPayerFee(0);\r\n setCreditCardPayerFee(0);\r\n return;\r\n }\r\n\r\n calculatePayerFees();\r\n }, [paidAmount, calculatePayerFees]);\r\n\r\n return { achPayerFee, creditCardPayerFee };\r\n};\r\n\r\nexport type PayerFees = ReturnType<typeof usePayerFees>;\r\n","import { FieldErrors, UseFormRegister } from \"react-hook-form\";\r\nimport { Image } from \"#components/Image\";\r\nimport Select from \"#components/Select/Select\";\r\nimport FormTextField from \"#components/TextField/FormTextField\";\r\nimport {\r\n PaymentPageFormValues,\r\n TransactionAttribute,\r\n TransactionAttributeType,\r\n} from \"#features/PaymentMethodForm/PaymentInfoModel\";\r\n\r\ninterface Props {\r\n transactionAttributes?: TransactionAttribute[];\r\n register: UseFormRegister<PaymentPageFormValues>;\r\n errors: FieldErrors<PaymentPageFormValues>;\r\n onChange: () => void;\r\n}\r\n\r\nconst TransactionAttributeToFieldName = (ta: TransactionAttribute) =>\r\n `transactionAttributes.${ta.ParameterName}` as keyof PaymentPageFormValues;\r\n\r\nexport const CustomFields = ({ transactionAttributes, register, errors, onChange }: Props) => {\r\n return (\r\n <>\r\n {transactionAttributes.map((ta) => {\r\n const fieldName = TransactionAttributeToFieldName(ta);\r\n\r\n // made this into a variable since it needed to be in a <></> when inline which made it look like it always had content\r\n const toolTip = ta.ImageUri ? <Image src={ta.ImageUri} /> : null;\r\n\r\n switch (ta.TransactionAttributeType) {\r\n case TransactionAttributeType.Text:\r\n return (\r\n <FormTextField\r\n key={fieldName}\r\n label={ta.Name}\r\n errors={errors}\r\n tooltipContent={toolTip}\r\n placeholder={ta.Placeholder}\r\n {...register(fieldName, {\r\n onChange: onChange,\r\n validate: {\r\n isRequired: (value) => {\r\n if (ta.IsRequired && !value) {\r\n return ta.RequiredErrorMessage || `${ta.Name} is required`;\r\n }\r\n return true;\r\n },\r\n hasPattern: (value) => {\r\n if (ta.RegularExpression) {\r\n if (!new RegExp(ta.RegularExpression).test(value as string)) {\r\n return (\r\n ta.RegularExpressionErrorMessage ||\r\n `${ta.Name} is not in the correct format`\r\n );\r\n }\r\n }\r\n return true;\r\n },\r\n },\r\n })}\r\n />\r\n );\r\n case TransactionAttributeType.Selection:\r\n return (\r\n <Select\r\n key={fieldName}\r\n label={ta.Name}\r\n errors={errors}\r\n options={ta.Options}\r\n {...register(fieldName, { onChange: onChange })}\r\n />\r\n );\r\n default:\r\n return (\r\n <div key={ta.Id}>Error: Unknown custom field type: {ta.TransactionAttributeType}</div>\r\n );\r\n }\r\n })}\r\n </>\r\n );\r\n};\r\n","import { useState } from \"react\";\r\nimport { useFormContext } from \"react-hook-form\";\r\nimport { PremiumFinanceAgreementModel } from \"./PremiumFinanceAgreementModel\";\r\nimport { Button } from \"#components/Button/Button\";\r\nimport { ButtonVariants } from \"#components/Button/buttonTypes\";\r\nimport { Modal } from \"#components/Modal/Modal\";\r\nimport ToggleSwitch from \"#components/ToggleSwitch/ToggleSwitch\";\r\nimport { PaymentPageFormValues } from \"#features/PaymentMethodForm/PaymentInfoModel\";\r\nimport { formatCurrency } from \"#utilities/Currency\";\r\n\r\ntype Props = {\r\n pfa: PremiumFinanceAgreementModel;\r\n};\r\n\r\nexport const FinanceAutopay = ({ pfa }: Props) => {\r\n const formContext = useFormContext<PaymentPageFormValues>();\r\n\r\n const enableFinancingAutoPay = formContext.watch(\"enableFinancingAutoPay\");\r\n\r\n const [autoPayTermsModal, setAutoPayTermsModal] = useState(false);\r\n\r\n return (\r\n <>\r\n {pfa.AllowFinanceAutoPay ? (\r\n <>\r\n <ToggleSwitch\r\n name=\"enableFinancingAutoPay\"\r\n // Original verbiage from the AC, but we are going to match original payment page behavior for now\r\n // label=\"Enable automatic payments for future installments\"\r\n label={pfa.AutoPayDisclaimer}\r\n {...formContext.register(\"enableFinancingAutoPay\")}\r\n />\r\n {enableFinancingAutoPay ? (\r\n <div className=\"finance-autopay-disclaimer\">\r\n <span className=\"red-asterisk\">*</span>\r\n Estimated additional autopay fee for ACH of{\" \"}\r\n {formatCurrency(pfa.FinanceDetails.AutoPayAchFee)} or Credit Card of{\" \"}\r\n {formatCurrency(pfa.FinanceDetails.AutoPayCreditCardFee)} assessed by ePayPolicy.\r\n </div>\r\n ) : null}\r\n </>\r\n ) : null}\r\n <div className=\"finance-autopay-terms-and-conditions\">\r\n {pfa?.AutoPayTermsAndConditions != null ? (\r\n <Button variant={ButtonVariants.text} onClick={() => setAutoPayTermsModal(true)}>\r\n Terms & Conditions\r\n </Button>\r\n ) : null}\r\n </div>\r\n <Modal\r\n isOpen={autoPayTermsModal}\r\n handleClose={() => setAutoPayTermsModal(false)}\r\n title=\"Terms & Conditions\"\r\n className=\"finance-autopay-terms-and-conditions-modal\"\r\n >\r\n {pfa?.AutoPayTermsAndConditions}\r\n </Modal>\r\n </>\r\n );\r\n};\r\n","export const isValidPhoneNumber = (input: string) => {\r\n return (\r\n input.length > 9 &&\r\n input.match(\r\n /^(\\+?1-?)?(\\([2-9]([02-9]\\d|1[02-9])\\)|[2-9]([02-9]\\d|1[02-9]))-?[2-9]\\d{2}-?\\d{4}$/\r\n )\r\n );\r\n};\r\n","import \"./PremiumFinanceAgreement.css\";\r\nimport { useEffect, useState } from \"react\";\r\nimport { UseFormReturn } from \"react-hook-form\";\r\nimport { Disclaimer } from \"../../components/Disclaimer/Disclaimer\";\r\nimport { PremiumFinanceAgreementModel } from \"./PremiumFinanceAgreementModel\";\r\nimport { Button } from \"#components/Button/Button\";\r\nimport { ButtonVariants } from \"#components/Button/buttonTypes\";\r\nimport { IconButton } from \"#components/Button/IconButton\";\r\nimport CheckBox from \"#components/CheckBox/CheckBox\";\r\nimport { IconSize } from \"#components/Icons/iconTypes\";\r\nimport FormTextField from \"#components/TextField/FormTextField\";\r\nimport { PremiumFinanceAgreementFormValues } from \"#features/PaymentMethodForm/PaymentInfoModel\";\r\nimport { getPageData } from \"#utilities/GetPageData\";\r\nimport { isValidPhoneNumber } from \"#utilities/PhoneNumber\";\r\n\r\ntype Props = {\r\n pfa: PremiumFinanceAgreementModel;\r\n base64EncodedPdf: string;\r\n form: UseFormReturn<PremiumFinanceAgreementFormValues>;\r\n onAgree: () => void;\r\n onCancel: () => void;\r\n};\r\n\r\nexport const PremiumFinanceAgreement = ({\r\n base64EncodedPdf,\r\n form,\r\n onAgree,\r\n onCancel,\r\n pfa,\r\n}: Props) => {\r\n const [pdfElement, setPdfElement] = useState<HTMLDivElement>(null);\r\n\r\n useEffect(() => {\r\n if (!pdfElement) return;\r\n if (!base64EncodedPdf) return;\r\n\r\n window.embedPDF(base64EncodedPdf, pdfElement);\r\n }, [pdfElement, base64EncodedPdf]);\r\n\r\n const onSubmit = () => {\r\n onAgree();\r\n };\r\n\r\n const downloadPfa = () => {\r\n showDocument(base64EncodedPdf, \"application/pdf\");\r\n };\r\n\r\n const showDocument = (base64str: string, contentType: string): void => {\r\n const byte: Uint8Array = base64ToArrayBuffer(base64str);\r\n const blob: Blob = new Blob([byte], { type: contentType });\r\n window.open(URL.createObjectURL(blob), \"_blank\");\r\n };\r\n\r\n const base64ToArrayBuffer = (base64Str: string): Uint8Array => {\r\n const binaryString: string = window.atob(base64Str);\r\n const binaryLen: number = binaryString.length;\r\n const bytes: Uint8Array = new Uint8Array(binaryLen);\r\n for (let i = 0; i < binaryLen; i++) {\r\n const ascii: number = binaryString.charCodeAt(i);\r\n bytes[i] = ascii;\r\n }\r\n return bytes;\r\n };\r\n\r\n return (\r\n <form\r\n onSubmit={(e) => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n form.handleSubmit(onSubmit)();\r\n }}\r\n >\r\n <div\r\n className=\"premium-finance-agreement-pdf-box\"\r\n data-pdf-viewer-url={`${getPageData().ApiBaseUrl}Scripts/pdf-viewer/viewer.html`}\r\n ref={(node) => setPdfElement(node)}\r\n ></div>\r\n <div className=\"premium-finance-agreement-footer\">\r\n <span className=\"premium-finance-agreement-download-warning\">\r\n If you're having trouble viewing this agreement, you can download it to your device.\r\n </span>\r\n <div className=\"premium-finance-agreement-consent\">\r\n {pfa.PersonalLinesDisclaimer && (\r\n <Disclaimer\r\n text={pfa.PersonalLinesDisclaimer}\r\n error={form.formState.errors.personalLinesConsent?.message}\r\n labelId=\"pfa-agree-to-terms-personal-lines\"\r\n name=\"pfa-agree-to-terms-personal-lines\"\r\n >\r\n <div className=\"checkbox-input\">\r\n <input\r\n className=\"styled-checkbox\"\r\n id=\"pfa-agree-to-terms-personal-lines\"\r\n name=\"pfa-agree-to-terms-personal-lines\"\r\n type=\"checkbox\"\r\n aria-invalid={\r\n form.formState.errors.personalLinesConsent != null ? \"true\" : \"false\"\r\n }\r\n aria-describedby=\"error-pfa-agree-to-terms-personal-lines\"\r\n {...form.register(\"personalLinesConsent\", {\r\n validate: (value) => value || \"Agreement is required.\",\r\n })}\r\n />\r\n </div>\r\n </Disclaimer>\r\n )}\r\n </div>\r\n <div className=\"premium-finance-agreement-consent\">\r\n <CheckBox\r\n id=\"pfa-agree-to-terms\"\r\n label=\"By checking this box, I assert that I have reviewed and agree to all the terms set forth in the premium finance agreement. Digitally sign the Premium Finance Agreement\"\r\n {...form.register(\"consent\", {\r\n validate: (value) => value || \"Agreement is required.\",\r\n })}\r\n errors={form.formState.errors}\r\n inline\r\n className=\"agreement-consent-checkbox\"\r\n />\r\n </div>\r\n </div>\r\n\r\n <div className=\"row\">\r\n <div className=\"col-sm\">\r\n <FormTextField\r\n label=\"Name\"\r\n {...form.register(\"name\", { required: \"Name is required.\" })}\r\n errors={form.formState.errors}\r\n />\r\n </div>\r\n <div className=\"col-sm\">\r\n <FormTextField\r\n label=\"Phone Number\"\r\n type=\"tel\"\r\n {...form.register(\"phone\", {\r\n required: \"Phone number is required.\",\r\n validate: (value) =>\r\n isValidPhoneNumber(value) || \"Please enter a valid phone number.\",\r\n })}\r\n errors={form.formState.errors}\r\n />\r\n </div>\r\n <div className=\"col-sm\">\r\n <FormTextField\r\n label=\"Email Address\"\r\n type=\"email\"\r\n {...form.register(\"email\", {\r\n required: \"Email address is required.\",\r\n pattern: {\r\n value: /^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$/,\r\n message: \"Please enter a valid email address.\",\r\n },\r\n })}\r\n errors={form.formState.errors}\r\n />\r\n </div>\r\n </div>\r\n <div className=\"premium-finance-agreement-actions\">\r\n <Button\r\n className=\"premium-finance-agreement-download\"\r\n icon=\"file_download\"\r\n onClick={downloadPfa}\r\n >\r\n Download Agreement\r\n </Button>\r\n <IconButton\r\n title=\"Download Agreement\"\r\n iconName=\"download\"\r\n variant={ButtonVariants.outline}\r\n iconSize={IconSize.small}\r\n className=\"premium-finance-agreement-download-mobile\"\r\n onClick={downloadPfa}\r\n />\r\n <Button variant={ButtonVariants.outline} onClick={onCancel}>\r\n Cancel\r\n </Button>\r\n <Button type=\"submit\">Agree</Button>\r\n </div>\r\n </form>\r\n );\r\n};\r\n","import \"./FinanceDetails.css\";\r\nimport { useEffect, useRef, useState } from \"react\";\r\nimport { FieldError, useForm, useFormContext } from \"react-hook-form\";\r\nimport { FinanceAutopay } from \"./FinanceAutopay\";\r\nimport { Button } from \"#components/Button/Button\";\r\nimport { ButtonVariants } from \"#components/Button/buttonTypes\";\r\nimport { Collapsible } from \"#components/Collapsible/Collapsible\";\r\nimport { CollapsibleState } from \"#components/Collapsible/CollapsibleState\";\r\nimport FormHeading from \"#components/FormHeading/FormHeading\";\r\nimport Icon from \"#components/Icons/Icon\";\r\nimport { IconPosition, IconSize } from \"#components/Icons/iconTypes\";\r\nimport { Modal } from \"#components/Modal/Modal\";\r\nimport { BasicError } from \"#components/Shared/BasicError\";\r\nimport { InputError } from \"#components/Shared/InputError\";\r\nimport { Spinner } from \"#components/Spinner/Spinner\";\r\nimport { SpinnerType } from \"#components/Spinner/SpinnerTypes\";\r\nimport SubTitle from \"#components/SubTitle/SubTitle\";\r\nimport Table from \"#components/Table/Table\";\r\nimport TableBody from \"#components/Table/TableBody\";\r\nimport TableData from \"#components/Table/TableData\";\r\nimport TableRow from \"#components/Table/TableRow\";\r\nimport { InvoiceListModel } from \"#features/Invoices/Models/InvoiceTypes\";\r\nimport {\r\n PaymentPageFormValues,\r\n PaymentPageModel,\r\n PremiumFinanceAgreementFormValues,\r\n} from \"#features/PaymentMethodForm/PaymentInfoModel\";\r\nimport { PremiumFinanceAgreement } from \"#features/PremiumFinanceAgreement/PremiumFinanceAgreement\";\r\nimport {\r\n InvoicesAgreementSearchModel,\r\n RequestPremiumFinanceAgreementResponse,\r\n} from \"#features/PremiumFinanceAgreement/PremiumFinanceAgreementModel\";\r\nimport { ApiClient } from \"#utilities/ApiClient\";\r\nimport { formatCurrency } from \"#utilities/Currency\";\r\nimport { cx } from \"#utilities/cx\";\r\nimport { getPageData } from \"#utilities/GetPageData\";\r\n\r\ntype Props = {\r\n invoices: InvoiceListModel;\r\n\r\n collapsibleState: CollapsibleState;\r\n onCollapsibleStateChange: (state: CollapsibleState) => void;\r\n\r\n anyInvoicesFinanced: boolean;\r\n anyInvoicesFinancingEligible: boolean;\r\n\r\n onContinueToPayment: () => void;\r\n\r\n pfaResponse: RequestPremiumFinanceAgreementResponse;\r\n setPfaResponse: (val: RequestPremiumFinanceAgreementResponse) => void;\r\n};\r\n\r\nexport const FinanceDetails = ({\r\n invoices,\r\n collapsibleState,\r\n onCollapsibleStateChange,\r\n anyInvoicesFinanced,\r\n anyInvoicesFinancingEligible,\r\n onContinueToPayment,\r\n pfaResponse,\r\n setPfaResponse,\r\n}: Props) => {\r\n const formContext = useFormContext<PaymentPageFormValues>();\r\n const pageData = getPageData<PaymentPageModel>();\r\n\r\n const [pfaModal, setPfaModal] = useState(false);\r\n const [pfaLoading, setPfaLoading] = useState(false);\r\n const pfa = pfaResponse?.premiumFinanceAgreement;\r\n const [pfaError, setPfaError] = useState<string | null>(null);\r\n\r\n const abortController = useRef<AbortController>(null);\r\n\r\n const signedPfa = formContext.getValues(\"premiumFinanceAgreement\");\r\n\r\n const pfaForm = useForm<PremiumFinanceAgreementFormValues>({\r\n defaultValues: signedPfa ?? {\r\n quoteNumber: \"\",\r\n name: \"\",\r\n phone: \"\",\r\n email: \"\",\r\n consent: false,\r\n personalLinesConsent: false,\r\n },\r\n });\r\n\r\n const invoicePayments = formContext.watch(\"invoicePayments\");\r\n const financePayments = invoicePayments\r\n .filter((x) => x.financedDownAmount != 0)\r\n .map((x) => x.id)\r\n .join(\",\");\r\n\r\n // If we add or remove any finance payments, abort the active PFA request.\r\n useEffect(\r\n () => {\r\n if (pfaLoading) {\r\n abortController.current.abort();\r\n }\r\n },\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n [financePayments, abortController]\r\n );\r\n\r\n const loadPremiumFinanceAgreement = async () => {\r\n if (pfaLoading) return;\r\n\r\n if (signedPfa && pfaResponse) {\r\n setPfaModal(true);\r\n pfaForm.reset(formContext.getValues(\"premiumFinanceAgreement\"));\r\n return;\r\n }\r\n\r\n try {\r\n setPfaError(null);\r\n setPfaLoading(true);\r\n\r\n const { transactionAttributes, payer, emailaddress } = formContext.getValues();\r\n const invoiceAttributes = { ...transactionAttributes, payer, emailAddress: emailaddress };\r\n\r\n abortController.current = new AbortController();\r\n\r\n const response = await ApiClient.post<\r\n RequestPremiumFinanceAgreementResponse,\r\n InvoicesAgreementSearchModel\r\n >(\r\n pageData.ManagedInvoice\r\n ? `Invoice/${pageData.ManagedInvoice.Id}/RequestPremiumFinanceAgreement`\r\n : \"Finance/RequestPremiumFinanceAgreement\",\r\n pageData.ManagedInvoice\r\n ? undefined\r\n : {\r\n InvoiceAgreementSearchModels: formContext\r\n .getValues(\"invoicePayments\")\r\n .filter((invoice) => invoice.financedDownAmount != 0)\r\n .map((invoice) => ({\r\n DownPaymentAmount: invoice.financedDownAmount.toString(),\r\n Id: invoice.id,\r\n FinanceEligibilityHash: invoices.Invoices.find((x) => x.Id === invoice.id)\r\n .FinanceEligibilityHash,\r\n })),\r\n InvoiceAttributes: Object.keys(invoiceAttributes).map((key) => ({\r\n Key: key,\r\n Value: invoiceAttributes[key],\r\n })),\r\n },\r\n null,\r\n abortController.current.signal\r\n );\r\n\r\n const publicErrorMessage = response.premiumFinanceAgreement[\"PublicErrorMessage\"];\r\n if (publicErrorMessage) {\r\n setPfaError(publicErrorMessage);\r\n } else {\r\n setPfaResponse(response);\r\n setPfaModal(true);\r\n }\r\n } catch (e) {\r\n if ((e as Error).name !== \"AbortError\") {\r\n setPfaError(\r\n \"Something has gone wrong when trying to retrieve your premium finance agreement. Please click the button to retry or pay your financed invoice in full.\"\r\n );\r\n }\r\n } finally {\r\n setPfaLoading(false);\r\n delete abortController.current;\r\n }\r\n };\r\n\r\n const onPfaAgree = () => {\r\n setPfaModal(false);\r\n\r\n formContext.setValue(\"premiumFinanceAgreement\", {\r\n ...pfaForm.getValues(),\r\n quoteNumber: pfa!.QuoteNumber,\r\n companyName: pfa!.PremiumFinanceCompanyName,\r\n });\r\n\r\n if (pfa.AllowFinanceAutoPay) {\r\n formContext.setValue(\"enableFinancingAutoPay\", true);\r\n }\r\n\r\n // Copy the new invoice data from the premium finance agreement to the financed invoices\r\n formContext.setValue(\r\n \"invoicePayments\",\r\n formContext.getValues(\"invoicePayments\").map((payment) => {\r\n // only do this for financed invoice payments\r\n if (payment.financedDownAmount === 0) {\r\n return payment;\r\n }\r\n\r\n const pfaInvoice = pfa?.FinancedInvoices.find((x) => x.Id === payment.id);\r\n if (!pfaInvoice) return payment;\r\n\r\n return {\r\n ...payment,\r\n dataToken: pfaInvoice.DataToken,\r\n verification: pfaInvoice.Verification,\r\n financedDownAmount: pfaInvoice.DownPaymentAmount,\r\n };\r\n })\r\n );\r\n };\r\n\r\n const onPfaCancel = () => {\r\n setPfaModal(false);\r\n setPfaResponse(null);\r\n\r\n formContext.setValue(\"premiumFinanceAgreement\", null);\r\n formContext.setValue(\"enableFinancingAutoPay\", null);\r\n };\r\n\r\n const error = formContext.formState.errors[\"premiumFinanceAgreement\"] as FieldError;\r\n\r\n const enableFinancingAutoPay = formContext.watch(\"enableFinancingAutoPay\");\r\n\r\n return (\r\n <Collapsible\r\n disabled={!anyInvoicesFinanced}\r\n title=\"Financing Details\"\r\n label=\"Financing Details\"\r\n subtitle={\r\n !anyInvoicesFinanced\r\n ? anyInvoicesFinancingEligible\r\n ? \"No invoices were selected to finance.\"\r\n : \"No invoices were eligible to finance.\"\r\n : undefined\r\n }\r\n state={anyInvoicesFinanced ? collapsibleState : CollapsibleState.closed}\r\n onStateChange={onCollapsibleStateChange}\r\n >\r\n <div className=\"finance-details\">\r\n {signedPfa ? (\r\n <>\r\n <div className=\"finance-company-details\">\r\n {pfa.PremiumFinanceCompanyLogoUri && (\r\n <img\r\n className=\"finance-company-logo\"\r\n src={pfa.PremiumFinanceCompanyLogoUri}\r\n alt={`${pfa.PremiumFinanceCompanyName} Logo`}\r\n />\r\n )}\r\n <h4 className=\"finance-company-name\">\r\n Financial Plan Provided by {pfa.PremiumFinanceCompanyName}\r\n </h4>\r\n </div>\r\n </>\r\n ) : null}\r\n <Button\r\n className={cx(\r\n \"finance-details-show-pfa-button\",\r\n \"full-width\",\r\n !signedPfa && !pfaError && !pfaLoading && !pfaModal && \"pulse-button\",\r\n pfaError && \"error\"\r\n )}\r\n variant={signedPfa ? ButtonVariants.outline : ButtonVariants.primary}\r\n icon={signedPfa ? \"task_alt\" : undefined}\r\n iconPosition={IconPosition.left}\r\n onClick={loadPremiumFinanceAgreement}\r\n disabled={pfaLoading}\r\n >\r\n {pfaLoading ? (\r\n <>\r\n Loading\r\n <Spinner className=\"spinner-white\" size={IconSize.small} type={SpinnerType.inline} />\r\n </>\r\n ) : (\r\n <>View{signedPfa ? \"\" : \" and Sign\"} Premium Finance Agreement</>\r\n )}\r\n </Button>\r\n <InputError error={error} name=\"premiumFinanceAgreement\" className=\"big-error\" />\r\n {pfaError ? <BasicError error={pfaError} name=\"pfaError\" className=\"big-error\" /> : null}\r\n <div className=\"financial-breakdown\">\r\n <FormHeading id=\"financial-breakdown-heading\">\r\n Financial Breakdown\r\n {!signedPfa ? (\r\n <>\r\n {\" \"}\r\n <Icon>warning_amber</Icon>\r\n </>\r\n ) : null}\r\n </FormHeading>\r\n {!signedPfa ? (\r\n <SubTitle color=\"gray\">Pending a signed Premium Finance Agreement</SubTitle>\r\n ) : null}\r\n <Table\r\n className=\"financial-breakdown-table\"\r\n aria-labelledby=\"financial-breakdown-heading\"\r\n >\r\n <TableBody>\r\n <TableRow>\r\n <TableData>Down Payment Amount</TableData>\r\n <TableData className=\"text-align-right\">\r\n {signedPfa ? formatCurrency(pfa.FinanceDetails.DownPaymentAmount) : \"Pending\"}\r\n </TableData>\r\n </TableRow>\r\n <TableRow>\r\n <TableData>Installment Amount</TableData>\r\n <TableData className=\"text-align-right\">\r\n {signedPfa ? formatCurrency(pfa.FinanceDetails.InstallmentAmount) : \"Pending\"}\r\n {signedPfa && enableFinancingAutoPay && (\r\n <span className=\"additional-fee\">\r\n <br />+ Additional Fee*\r\n </span>\r\n )}\r\n </TableData>\r\n </TableRow>\r\n <TableRow>\r\n <TableData>Number of Payments</TableData>\r\n <TableData className=\"text-align-right\">\r\n {signedPfa ? pfa.FinanceDetails.NumberOfPayments : \"Pending\"}\r\n </TableData>\r\n </TableRow>\r\n <TableRow>\r\n <TableData>Next Installment Due Date</TableData>\r\n <TableData className=\"text-align-right\">\r\n {signedPfa ? pfa.FinanceDetails.NextInstallmentDueDateString : \"Pending\"}\r\n </TableData>\r\n </TableRow>\r\n </TableBody>\r\n </Table>\r\n </div>\r\n {pfa && signedPfa ? <FinanceAutopay pfa={pfa} /> : null}\r\n <Button className=\"full-width\" disabled={!signedPfa} onClick={onContinueToPayment}>\r\n Continue to Payment\r\n </Button>\r\n </div>\r\n <Modal\r\n isOpen={pfaModal}\r\n title=\"Premium Finance Agreement\"\r\n className=\"premium-finance-agreement\"\r\n handleClose={() => setPfaModal(false)}\r\n >\r\n {pfaModal && (\r\n <PremiumFinanceAgreement\r\n pfa={pfa}\r\n base64EncodedPdf={pfaResponse?.base64EncodedPdf}\r\n form={pfaForm}\r\n onAgree={onPfaAgree}\r\n onCancel={onPfaCancel}\r\n />\r\n )}\r\n </Modal>\r\n </Collapsible>\r\n );\r\n};\r\n","import \"../TextField/TextField.css\";\r\nimport { ChangeEventHandler, CSSProperties, forwardRef } from \"react\";\r\nimport { FieldError } from \"react-hook-form\";\r\nimport { InputWrapper } from \"#components/Shared/InputWrapper\";\r\n\r\ntype Props = {\r\n type?: string;\r\n label?: string;\r\n placeholder?: string;\r\n required?: boolean;\r\n name: string;\r\n error?: FieldError;\r\n values?: string | number | readonly string[];\r\n touched?: { [key: string]: string };\r\n style?: CSSProperties;\r\n onChange?: ChangeEventHandler<HTMLInputElement>;\r\n disabled?: boolean;\r\n};\r\n\r\nconst DateInput = forwardRef<HTMLInputElement, Props>(\r\n (\r\n {\r\n type = \"date\",\r\n label = \"\",\r\n placeholder = \"\",\r\n required = false,\r\n name,\r\n error,\r\n values = [],\r\n style = {},\r\n onChange,\r\n disabled = false,\r\n ...props\r\n },\r\n ref\r\n ) => {\r\n return (\r\n <>\r\n <InputWrapper fieldType=\"text-field\" name={name} label={label} error={error}>\r\n <input\r\n type={type}\r\n id={name}\r\n name={name}\r\n onChange={onChange}\r\n value={values[name]}\r\n placeholder={placeholder ? placeholder : label}\r\n aria-describedby={`error-${name}`}\r\n disabled={disabled}\r\n required={required}\r\n style={style}\r\n {...props}\r\n ref={ref}\r\n />\r\n </InputWrapper>\r\n </>\r\n );\r\n }\r\n);\r\n\r\nexport default DateInput;\r\n","import \"./RecurringPaymentsForm.css\";\r\nimport { useFormContext } from \"react-hook-form\";\r\nimport DateInput from \"#components/DateInput/DateInput\";\r\nimport Select from \"#components/Select/Select\";\r\nimport FormTextField from \"#components/TextField/FormTextField\";\r\nimport ToggleSwitch from \"#components/ToggleSwitch/ToggleSwitch\";\r\nimport {\r\n PaymentPageFormValues,\r\n ScheduledPaymentsEndOption,\r\n} from \"#features/PaymentMethodForm/PaymentInfoModel\";\r\n\r\nexport const RecurringPaymentsForm = () => {\r\n const formContext = useFormContext<PaymentPageFormValues>();\r\n\r\n const enableScheduledPayments = formContext.watch(\"enableScheduledPayments\");\r\n const endOption = formContext.watch(\"scheduledPaymentsEndOption\");\r\n\r\n const isTooFarInFuture = (date: Date, years: number) => {\r\n const futureDate = new Date();\r\n futureDate.setFullYear(futureDate.getFullYear() + years);\r\n\r\n return date > futureDate;\r\n };\r\n\r\n return (\r\n <>\r\n <div className=\"recurring-payments-form\">\r\n <ToggleSwitch\r\n label=\"Recurring Payments\"\r\n {...formContext.register(\"enableScheduledPayments\")}\r\n />\r\n\r\n {enableScheduledPayments ? (\r\n <>\r\n <h5>Starts</h5>\r\n <div className=\"recurring-payments-section\">\r\n <DateInput\r\n label=\"Start Date\"\r\n error={formContext.formState.errors[\"startDate\"]}\r\n name=\"startDate\"\r\n {...formContext.register(\"startDate\", {\r\n required: \"Start date is required.\",\r\n validate: {\r\n tooFarInFuture: (value) => {\r\n if (isTooFarInFuture(new Date(value), 5)) {\r\n return \"Start date cannot be more than 5 years in the future.\";\r\n }\r\n },\r\n thirtyDaysInPast: (value) => {\r\n const date = new Date(value);\r\n\r\n const thirtyDaysAgo = new Date();\r\n thirtyDaysAgo.setDate(thirtyDaysAgo.getDate() - 30);\r\n\r\n if (date.getTime() < thirtyDaysAgo.getTime()) {\r\n return \"Start date cannot be more than 30 days in the past.\";\r\n }\r\n\r\n return true;\r\n },\r\n mustBeBeforeEndDate: (value, { endDate }) => {\r\n if (endOption === ScheduledPaymentsEndOption.EndDate && endDate) {\r\n if (new Date(endDate) < new Date(value)) {\r\n return \"Start Date must be before End Date.\";\r\n }\r\n }\r\n },\r\n },\r\n deps: [\"endDate\"],\r\n })}\r\n />\r\n <div className=\"form-input form-input-empty\"></div>\r\n </div>\r\n <h5>Ends</h5>\r\n <div className=\"recurring-payments-section\">\r\n <Select\r\n label=\"End\"\r\n options={[\r\n { Text: \"When Cancelled\", Value: ScheduledPaymentsEndOption.Never },\r\n { Text: \"On or Before\", Value: ScheduledPaymentsEndOption.EndDate },\r\n { Text: \"After\", Value: ScheduledPaymentsEndOption.NumberOfPayments },\r\n ]}\r\n {...formContext.register(\"scheduledPaymentsEndOption\")}\r\n />\r\n {endOption === ScheduledPaymentsEndOption.EndDate ? (\r\n <>\r\n <DateInput\r\n label=\"End Date\"\r\n error={formContext.formState.errors[\"endDate\"]}\r\n {...formContext.register(\"endDate\", {\r\n required: \"End date is required.\",\r\n validate: {\r\n tooFarInFuture: (value) => {\r\n if (isTooFarInFuture(new Date(value), 20)) {\r\n return \"End date cannot be more than 20 years in the future.\";\r\n }\r\n },\r\n mustBeInFuture: (value) => {\r\n const date = new Date(value);\r\n\r\n const today = new Date(new Date().toDateString());\r\n\r\n if (date.getTime() < today.getTime()) {\r\n return \"End date must be in the future.\";\r\n }\r\n\r\n return true;\r\n },\r\n mustBeAfterStartDate: (value, { startDate }) => {\r\n if (value) {\r\n if (new Date(startDate) > new Date(value)) {\r\n return \"End Date must be after Start Date.\";\r\n }\r\n }\r\n },\r\n },\r\n deps: [\"startDate\"],\r\n })}\r\n />\r\n </>\r\n ) : endOption === ScheduledPaymentsEndOption.NumberOfPayments ? (\r\n <>\r\n <FormTextField\r\n label=\"Number of Payments\"\r\n placeholder=\"Number of Payments\"\r\n className=\"no-arrows\"\r\n type=\"number\"\r\n inputMode=\"numeric\"\r\n errors={formContext.formState.errors}\r\n {...formContext.register(\"numberOfPayments\", {\r\n required: \"Number of Payments is required.\",\r\n valueAsNumber: true,\r\n validate: {\r\n maxAllowed: (value) => {\r\n if (value > 1000) {\r\n return \"Number of Payments exceeds maximum allowed.\";\r\n }\r\n },\r\n mustBeOneOrMore: (value) => {\r\n if (value < 1) {\r\n return \"Number of Payments must one or more.\";\r\n }\r\n },\r\n },\r\n })}\r\n />\r\n </>\r\n ) : (\r\n <div className=\"form-input form-input-empty\"></div>\r\n )}\r\n </div>\r\n <h5>Every</h5>\r\n <div className=\"recurring-payments-section\">\r\n <FormTextField\r\n label=\"Frequency\"\r\n className=\"no-arrows\"\r\n type=\"number\"\r\n inputMode=\"numeric\"\r\n errors={formContext.formState.errors}\r\n {...formContext.register(\"intervalCount\", {\r\n required: \"Frequency is required.\",\r\n valueAsNumber: true,\r\n validate: {\r\n maxAllowed: (value) => {\r\n if (value > 1000) {\r\n return \"Frequency exceeds maximum allowed.\";\r\n }\r\n },\r\n mustBeOneOrMore: (value) => {\r\n if (value < 1) {\r\n return \"Frequency must be one or more.\";\r\n }\r\n },\r\n },\r\n })}\r\n />\r\n <Select\r\n label=\"Duration\"\r\n options={[\r\n { Text: \"Month(s)\", Value: \"3\" },\r\n { Text: \"Year(s)\", Value: \"4\" },\r\n ]}\r\n {...formContext.register(\"intervalId\", { valueAsNumber: true })}\r\n />\r\n </div>\r\n </>\r\n ) : null}\r\n </div>\r\n </>\r\n );\r\n};\r\n","import { SubmitPaymentHandler } from \"./SubmitPayment\";\r\nimport {\r\n ManagedInvoicePaymentModel,\r\n PaymentPageModel,\r\n PaymentPageResponseModel,\r\n} from \"#features/PaymentMethodForm/PaymentInfoModel\";\r\nimport { handleValidThrough } from \"#features/PaymentMethodForm/PaymentPageHelpers\";\r\nimport { ApiClient } from \"#utilities/ApiClient\";\r\nimport { getPageData } from \"#utilities/GetPageData\";\r\n\r\nexport const submitInvoicePayment: SubmitPaymentHandler = async (\r\n data,\r\n onSuccess,\r\n onError,\r\n setServerException\r\n) => {\r\n const pageData = getPageData<PaymentPageModel>();\r\n\r\n handleValidThrough(data);\r\n\r\n const body: ManagedInvoicePaymentModel = {\r\n id: pageData.ManagedInvoice.Id,\r\n paymentInformation: {\r\n savePaymentOption: data.savePaymentOption,\r\n payer: data.payer,\r\n emailAddress: data.emailaddress,\r\n tokenPublicId: data.tokenPublicId,\r\n creditCardInformation:\r\n !data.tokenPublicId && data.paymentMethod === \"CreditCard\"\r\n ? {\r\n accountHolder: data.cardAccountHolder,\r\n cardNumber: data.cardNumber,\r\n cvc: data.cvc,\r\n month: data.month,\r\n year: data.year,\r\n postalCode: data.postalCode,\r\n }\r\n : null,\r\n bankAccountInformation:\r\n !data.tokenPublicId && data.paymentMethod === \"Ach\"\r\n ? {\r\n accountHolder: data.bankAccountHolder,\r\n routingNumber: data.routingNumber,\r\n accountNumber: data.accountNumber,\r\n }\r\n : null,\r\n signedPfa:\r\n data.managedInvoicePaymentMethod === \"finance\" && data.premiumFinanceAgreement\r\n ? {\r\n ...data.premiumFinanceAgreement,\r\n dataToken: data.invoicePayments[0].dataToken,\r\n verification: data.invoicePayments[0].verification,\r\n }\r\n : undefined,\r\n enableFinancingAutoPay: data.enableFinancingAutoPay,\r\n },\r\n };\r\n\r\n try {\r\n const response = await ApiClient.post<PaymentPageResponseModel>(\"Invoice\", body);\r\n\r\n if (!response.Success) {\r\n onError(response);\r\n } else {\r\n onSuccess(response);\r\n }\r\n } catch (e) {\r\n onError();\r\n setServerException(true);\r\n }\r\n};\r\n","import { getPaidAmount } from \"#features/Invoices/invoiceHelpers\";\r\nimport {\r\n MakePaymentModel,\r\n PaymentPageFormValues,\r\n PaymentPageResponseModel,\r\n ScheduledPaymentsEndOption,\r\n} from \"#features/PaymentMethodForm/PaymentInfoModel\";\r\nimport { handleValidThrough, hasPaymentInfo } from \"#features/PaymentMethodForm/PaymentPageHelpers\";\r\nimport { ApiClient } from \"#utilities/ApiClient\";\r\n\r\nexport type SubmitPaymentHandler = (\r\n data: PaymentPageFormValues,\r\n onSuccess: (data: PaymentPageResponseModel) => void,\r\n onError: (data?: PaymentPageResponseModel) => void,\r\n setServerException: (value: boolean) => void\r\n) => Promise<void>;\r\n\r\nexport const submitPayment: SubmitPaymentHandler = async (\r\n data,\r\n onSuccess,\r\n onError,\r\n setServerException\r\n) => {\r\n try {\r\n if (hasPaymentInfo(data)) {\r\n data.tokenPublicId = null;\r\n }\r\n\r\n handleValidThrough(data);\r\n\r\n const {\r\n reCaptchaToken: reCaptchaResponse,\r\n reCaptchaV3Token: reCaptchaV3Response,\r\n transactionAttributes: transactionAttributeValues,\r\n invoicePayments,\r\n premiumFinanceAgreement,\r\n ...paymentModel\r\n } = data;\r\n\r\n const responseData: PaymentPageResponseModel = await ApiClient.post<\r\n PaymentPageResponseModel,\r\n MakePaymentModel\r\n >(\r\n \"Payments/MakePayment\",\r\n {\r\n // We can do this a lot cleaner once we stop using PaymentModel on the server\r\n paymentModel: {\r\n ...paymentModel,\r\n numberOfPayments:\r\n paymentModel.scheduledPaymentsEndOption === ScheduledPaymentsEndOption.NumberOfPayments\r\n ? paymentModel.numberOfPayments\r\n : null,\r\n endDate:\r\n paymentModel.scheduledPaymentsEndOption === ScheduledPaymentsEndOption.EndDate\r\n ? paymentModel.endDate\r\n : null,\r\n amount: getPaidAmount(data, true).toString(),\r\n fileModels: Array.from(paymentModel.fileModels.values()),\r\n premiumFinanceAgreementCompanyName: premiumFinanceAgreement?.companyName,\r\n premiumFinanceAgreementConsent: premiumFinanceAgreement?.consent,\r\n premiumFinanceAgreementEmail: premiumFinanceAgreement?.email,\r\n premiumFinanceAgreementName: premiumFinanceAgreement?.name,\r\n premiumFinanceAgreementPhone: premiumFinanceAgreement?.phone,\r\n quoteNumber: premiumFinanceAgreement?.quoteNumber,\r\n },\r\n transactionAttributeValues,\r\n invoicePayments,\r\n },\r\n {\r\n \"g-recaptcha-response\": reCaptchaResponse,\r\n \"g-recaptcha-v3-response\": reCaptchaV3Response,\r\n \"g-recaptcha-action\": \"submitPayment\",\r\n }\r\n );\r\n\r\n if (responseData.Success) {\r\n await onSuccess(responseData);\r\n } else {\r\n onError(responseData);\r\n }\r\n } catch (e) {\r\n setServerException(true);\r\n onError();\r\n }\r\n};\r\n","import { useEffect, useState } from \"react\";\r\n\r\n/**\r\n * Loads the google recaptcha script and provides a method to retrieve a token\r\n * @param recaptchaKey\r\n */\r\nexport const useReCaptcha = (recaptchaKey: string) => {\r\n const [reCaptchaLoaded, setReCaptchaLoaded] = useState(false);\r\n\r\n useEffect(() => {\r\n if (typeof window === \"undefined\" || reCaptchaLoaded) {\r\n return;\r\n }\r\n\r\n const script = document.createElement(\"script\");\r\n script.async = true;\r\n script.src = `https://www.google.com/recaptcha/api.js?render=${recaptchaKey}`;\r\n script.addEventListener(\"load\", () => {\r\n setReCaptchaLoaded(true);\r\n });\r\n\r\n document.body.appendChild(script);\r\n }, [reCaptchaLoaded, recaptchaKey]);\r\n\r\n const getToken = async (action: string): Promise<string> => {\r\n if (!reCaptchaLoaded) {\r\n return \"\";\r\n }\r\n\r\n if (typeof window === \"undefined\" || !window.grecaptcha) {\r\n setReCaptchaLoaded(false);\r\n return \"\";\r\n }\r\n\r\n const token = await window.grecaptcha.execute(recaptchaKey, { action: action });\r\n\r\n return token;\r\n };\r\n\r\n return { reCaptchaLoaded, getToken };\r\n};\r\n","import { flushSync } from \"react-dom\";\r\n\r\nexport const transitionViewIfSupported = (updateCb: UpdateCallback) => {\r\n if (document.startViewTransition) {\r\n document.startViewTransition(() => {\r\n flushSync(updateCb);\r\n });\r\n } else {\r\n updateCb();\r\n }\r\n};\r\n","import \"./css/PaymentPage.css\";\r\nimport { useEffect, useRef, useState } from \"react\";\r\nimport { Controller, FormProvider, useForm } from \"react-hook-form\";\r\nimport { useDebouncedCallback } from \"use-debounce\";\r\nimport { PageBannerAlert } from \"#components/Alert/PageBannerAlert\";\r\nimport { Collapsible } from \"#components/Collapsible/Collapsible\";\r\nimport { CollapsibleState } from \"#components/Collapsible/CollapsibleState\";\r\nimport { CurrencyField } from \"#components/CurrencyField/CurrencyField\";\r\nimport { validatePositiveCurrency } from \"#components/CurrencyField/currencyUtils\";\r\nimport { FileAttachments } from \"#components/FileAttachments/FileAttachments\";\r\nimport FormHeading from \"#components/FormHeading/FormHeading\";\r\nimport { Link } from \"#components/Link/Link\";\r\nimport { ErrorModal } from \"#components/Modal/ErrorModal\";\r\nimport { TextareaField } from \"#components/TextareaField/TextareaField\";\r\nimport TextField from \"#components/TextField/FormTextField\";\r\nimport { useToast } from \"#context/Toaster\";\r\nimport { AutoPayPaylessEnrollmentPage } from \"#features/AutoPayPaylessEnrollmentPage/AutoPayPaylessEnrollmentPage\";\r\nimport {\r\n createPaymentsFromQueryString,\r\n getPaidAmount,\r\n hasFinancedInvoices,\r\n validateInvoicePayments,\r\n} from \"#features/Invoices/invoiceHelpers\";\r\nimport { InvoicesContainer } from \"#features/Invoices/InvoicesContainer\";\r\nimport {\r\n InvoiceListModel,\r\n InvoiceModel,\r\n InvoicePayment,\r\n InvoiceStatus,\r\n} from \"#features/Invoices/Models/InvoiceTypes\";\r\nimport { ManagedInvoice } from \"#features/ManagedInvoice/ManagedInvoice\";\r\nimport { usePayerFees } from \"#features/PayerFees/usePayerFees\";\r\nimport PaymentInfo from \"#features/PaymentInfo/PaymentInfo\";\r\nimport { PaymentFlow } from \"#features/PaymentInfo/PaymentInfo.types\";\r\nimport { CustomFields } from \"#features/PaymentMethodForm/CustomFields\";\r\nimport {\r\n BaseModel,\r\n PaymentPageFormValues,\r\n PaymentPageModel,\r\n PaymentPageResponseModel,\r\n} from \"#features/PaymentMethodForm/PaymentInfoModel\";\r\nimport { prefillPaymentPage } from \"#features/PaymentMethodForm/PaymentPageHelpers\";\r\nimport { FinanceDetails } from \"#features/PremiumFinanceAgreement/FinanceDetails\";\r\nimport { RequestPremiumFinanceAgreementResponse } from \"#features/PremiumFinanceAgreement/PremiumFinanceAgreementModel\";\r\nimport { RecurringPaymentsForm } from \"#features/RecurringPaymentsForm/RecurringPaymentsForm\";\r\nimport { submitInvoicePayment } from \"#features/SubmitPayment/SubmitInvoicePayment\";\r\nimport { submitPayment } from \"#features/SubmitPayment/SubmitPayment\";\r\nimport { useOnFirstRender } from \"#hooks/useOnFirstRender\";\r\nimport { useReCaptcha } from \"#hooks/useReCaptcha\";\r\nimport { ApiClient, WithStatus } from \"#utilities/ApiClient\";\r\nimport { StandardEmailValidation } from \"#utilities/Email\";\r\nimport { parseSearch } from \"#utilities/QueryString\";\r\nimport { setIfTest } from \"#utilities/TestTools/StandardMethods\";\r\nimport { transitionViewIfSupported } from \"#utilities/ViewTransition\";\r\n\r\nconst debounceTimeout: number = setIfTest(1, 1000) as number;\r\n\r\ntype Props = {\r\n pageData: PaymentPageModel;\r\n setPageData: React.Dispatch<React.SetStateAction<PaymentPageModel>>;\r\n initialPageData: PaymentPageModel;\r\n showSignIn: (callback?: () => void) => void;\r\n};\r\n\r\nexport const PaymentPage = ({ initialPageData, pageData, setPageData, showSignIn }: Props) => {\r\n const [serverException, setServerException] = useState<boolean>(false);\r\n const [selectedTab, setSelectedTab] = useState<number>(0);\r\n const { clearToast, setErrorToast, setSuccessToast, setWarningToast } = useToast();\r\n const [invoicesLoading, setInvoicesLoading] = useState<boolean>(false);\r\n const [invoicesData, setInvoicesData] = useState<InvoiceListModel | undefined>(undefined);\r\n const [showAutoPayPaylessEnrollmentPage, setShowAutoPayPaylessEnrollmentPage] = useState(false);\r\n const { reCaptchaLoaded, getToken } = useReCaptcha(pageData.GoogleDataSiteClientKeyV3);\r\n\r\n const defaultFormValues = prefillPaymentPage(initialPageData);\r\n const formContext = useForm({\r\n defaultValues: defaultFormValues,\r\n });\r\n const {\r\n register,\r\n trigger,\r\n handleSubmit,\r\n setValue,\r\n getValues,\r\n clearErrors,\r\n watch,\r\n control,\r\n formState: { errors, touchedFields, dirtyFields, isSubmitted, isSubmitting },\r\n } = formContext;\r\n\r\n const invoicePayments = watch(\"invoicePayments\");\r\n\r\n useOnFirstRender(() => {\r\n // validate amount if pre-filled from query string\r\n if (defaultFormValues.amount) {\r\n trigger(\"amount\");\r\n }\r\n\r\n // we don't need to 'await' for this\r\n handleCustomFieldChange();\r\n });\r\n\r\n // determine if a transaction attribute value is clean\r\n // touched and dirty are ever so slightly different so both should be considered\r\n const isTransactionAttributeClean = (paramName: string) =>\r\n !(touchedFields?.[\"transactionAttributes\"]?.[paramName] ?? false) &&\r\n !(dirtyFields?.[\"transactionAttributes\"]?.[paramName] ?? false);\r\n\r\n const handleCustomFieldChange = async () => {\r\n if (!pageData.EnableInvoices) return;\r\n\r\n const isValid = await trigger(\"transactionAttributes\");\r\n if (isValid) {\r\n invoiceSearchController.current?.abort();\r\n loadInvoiceData();\r\n } else {\r\n // remove the errors on any 'clean' fields\r\n // if the user has submitted the form then leave all of the errors as is\r\n if (!isSubmitted) {\r\n pageData.TransactionAttributes.forEach((ta) => {\r\n if (isTransactionAttributeClean(ta.ParameterName)) {\r\n clearErrors(`transactionAttributes.${ta.ParameterName}`);\r\n }\r\n });\r\n }\r\n\r\n // no matter what - as soon as the form is invalid - clear the invoices\r\n setInvoicesData(undefined);\r\n setValue(\"invoicePayments\", []);\r\n }\r\n };\r\n\r\n // will fire with every key stroke as the user enters stuff into the custom fields\r\n // the debounce will make sure it only fires once - a second after the last change occurs\r\n const debouncedHandleCustomFieldChange = useDebouncedCallback(\r\n handleCustomFieldChange,\r\n debounceTimeout\r\n );\r\n\r\n // the AutoPaySubscriptionId value is used to determine if auto pay related\r\n // things should be visible. If autopay is cancelled then blank it out\r\n const autoPayCancel = async () => {\r\n setInvoicesData({ ...invoicesData, AutoPaySubscriptionId: undefined });\r\n };\r\n\r\n const invoiceSearchController = useRef<AbortController>(null);\r\n\r\n const loadInvoiceData = async (restorePayments?: Array<InvoicePayment>) => {\r\n if (pageData.ManagedInvoice) return;\r\n\r\n clearToast();\r\n setInvoicesData(undefined);\r\n setInvoicesLoading(true);\r\n setValue(\"invoicePayments\", []);\r\n\r\n try {\r\n invoiceSearchController.current = new AbortController();\r\n\r\n const responseData = await ApiClient.post<InvoiceListModel>(\r\n \"Invoices/InvoiceSearch\",\r\n {\r\n payer: getValues(\"payer\"),\r\n emailAddress: getValues(\"emailaddress\"),\r\n transactionAttributes: getValues(\"transactionAttributes\"),\r\n },\r\n null,\r\n invoiceSearchController.current?.signal\r\n );\r\n\r\n switch (responseData.Status) {\r\n case InvoiceStatus.AccountNotFound:\r\n responseData.Exception = \"No invoices were found.\";\r\n break;\r\n case InvoiceStatus.Error:\r\n responseData.Exception = \"Unable to retrieve invoices.\";\r\n break;\r\n case InvoiceStatus.Success:\r\n responseData.Exception = \"\";\r\n break;\r\n default:\r\n responseData.Exception = `Error. Unknown status: ${responseData.Status}`;\r\n break;\r\n }\r\n\r\n setInvoicesData(responseData);\r\n\r\n if (restorePayments) {\r\n setValue(\r\n \"invoicePayments\",\r\n // filter out any invoice payments for invoices that don't exist anymore\r\n restorePayments.filter((payment) =>\r\n responseData.Invoices.some((invoice) => invoice.Id === payment.id)\r\n )\r\n );\r\n } else {\r\n preFillPayments(responseData?.Invoices ?? []);\r\n }\r\n } catch (e) {\r\n if ((e as Error).name !== \"AbortError\") {\r\n const errorInvoiceModel = {\r\n Exception: \"An error has occurred. Please refresh and try again.\",\r\n Invoices: [],\r\n } as InvoiceListModel;\r\n\r\n if (((e as WithStatus<unknown>)?.httpStatusCode ?? -1) === 429) {\r\n errorInvoiceModel.Exception = \"An error has occurred. Please try again later.\";\r\n }\r\n\r\n setInvoicesData(errorInvoiceModel);\r\n } else {\r\n setInvoicesData(null);\r\n setInvoicesLoading(false);\r\n }\r\n } finally {\r\n setInvoicesLoading(false);\r\n delete invoiceSearchController.current;\r\n }\r\n };\r\n\r\n const preFillPayments = (invoices: InvoiceModel[]): void => {\r\n const payments = createPaymentsFromQueryString(invoices, parseSearch());\r\n if (payments.length > 0) {\r\n setValue(\"invoicePayments\", payments);\r\n }\r\n };\r\n\r\n const onSubmit = async (data: PaymentPageFormValues) => {\r\n if (\r\n !pageData.ManagedInvoice &&\r\n pageData.EnableInvoices &&\r\n validateInvoicePayments(invoicePayments) !== true\r\n ) {\r\n return;\r\n }\r\n\r\n clearToast();\r\n\r\n if (!pageData.ManagedInvoice) {\r\n data.reCaptchaV3Token = await getToken(\"submitPayment\");\r\n\r\n await submitPayment(data, onSuccess, onError, setServerException);\r\n } else {\r\n await submitInvoicePayment(data, onSuccess, onError, setServerException);\r\n }\r\n };\r\n\r\n const onSuccess = async (responseData: PaymentPageResponseModel) => {\r\n if (responseData.SuccessUrl?.length > 0) window.location.replace(responseData.SuccessUrl);\r\n else if (responseData.EnableScheduledPayments)\r\n window.location.replace(`${pageData.ApiBaseUrl}ScheduledPayments`);\r\n else\r\n window.location.replace(\r\n `${pageData.ApiBaseUrl}Receipts?id=${responseData.PublicId}&viewingMode=Confirmation`\r\n );\r\n // don't resolve so we show spinner until new page loads\r\n return new Promise(() => {});\r\n };\r\n\r\n const onError = async (responseData?: PaymentPageResponseModel) => {\r\n // things we always do on error\r\n setValue(\"reCaptchaToken\", \"\");\r\n window.grecaptcha.reset();\r\n setValue(\"cvc\", \"\");\r\n setValue(\"confirmAccountNumber\", \"\");\r\n\r\n // only if we have something meaningful from the server\r\n if (responseData) {\r\n if (responseData.DuplicateTransactionReceiptUrl) {\r\n setValue(\"bankAccountHolder\", \"\");\r\n setValue(\"accountNumber\", \"\");\r\n setValue(\"routingNumber\", \"\");\r\n setValue(\"cardAccountHolder\", \"\");\r\n setValue(\"cardNumber\", \"\");\r\n setValue(\"validThrough\", \"\");\r\n setValue(\"duplicateTransactionReceiptUrl\", responseData.DuplicateTransactionReceiptUrl);\r\n setWarningToast(\r\n <p>\r\n Your payment could not be completed because a{\" \"}\r\n <Link href={responseData.DuplicateTransactionReceiptUrl}>duplicate transaction</Link>{\" \"}\r\n was recently submitted. If you believe this message is in error, please re-enter the\r\n payment information and try again. Contact{\" \"}\r\n <Link href={`mailto:${pageData.PublicEmailAddress}`}>\r\n {pageData.PublicEmailAddress}\r\n </Link>{\" \"}\r\n with any questions.\r\n </p>\r\n );\r\n } else {\r\n setErrorToast(`Failed to make payment. ${responseData.ErrorMessage || \"\"}`);\r\n }\r\n\r\n if (responseData.CachedPaymentDataExpired) {\r\n setValue(\"premiumFinanceAgreement\", null);\r\n setFinancingCollapsible(CollapsibleState.open);\r\n setPaymentDetailsCollapsible(CollapsibleState.closed);\r\n }\r\n }\r\n };\r\n\r\n const deletePayerToken = async (publicId: string) => {\r\n try {\r\n clearToast();\r\n const data: BaseModel = await ApiClient.post(\"Payments/DeletePaymentMethod\", {\r\n tokenId: publicId,\r\n });\r\n if (data.Success) {\r\n const tokens = pageData.PayerTokenViewModels.filter((x) => x.PublicId != publicId);\r\n setPageData({ ...pageData, PayerTokenViewModels: tokens });\r\n setSuccessToast(\"Item successfully deleted.\");\r\n } else {\r\n setErrorToast(\"Failed to delete item.\");\r\n }\r\n } catch (e) {\r\n setErrorToast(\"Failed to delete item.\");\r\n }\r\n };\r\n\r\n const changeTab = (e: React.MouseEvent<HTMLButtonElement, MouseEvent>, changeTo: number) => {\r\n e.preventDefault();\r\n setSelectedTab(changeTo);\r\n window.scrollTo(0, 0);\r\n };\r\n\r\n useEffect(() => {\r\n register(\"premiumFinanceAgreement\", {\r\n validate: (premiumFinanceAgreement) => {\r\n if (\r\n invoicePayments.filter((x) => x.financedDownAmount != 0).length > 0 &&\r\n !premiumFinanceAgreement\r\n ) {\r\n setFinancingCollapsible(CollapsibleState.open);\r\n setPaymentDetailsCollapsible(CollapsibleState.closed);\r\n return \"Signing the Premium Finance Agreement is required.\";\r\n }\r\n\r\n return true;\r\n },\r\n });\r\n }, [invoicePayments, register]);\r\n\r\n const [financingCollapsible, setFinancingCollapsible] = useState(CollapsibleState.closed);\r\n const [paymentDetailsCollapsible, setPaymentDetailsCollapsible] = useState(CollapsibleState.open);\r\n const [previousFinancedCount, setPreviousFinancedCount] = useState(0);\r\n\r\n // Show the finance details and hide payment details if we clicked finance on any invoice\r\n useEffect(() => {\r\n const selectedInvoicesForFinancing = invoicePayments.filter((x) => x.financedDownAmount != 0);\r\n\r\n if (selectedInvoicesForFinancing.length !== previousFinancedCount) {\r\n setFinancingCollapsible(CollapsibleState.open);\r\n setPaymentDetailsCollapsible(CollapsibleState.closed);\r\n } else if (selectedInvoicesForFinancing.length === 0) {\r\n setFinancingCollapsible(CollapsibleState.closed);\r\n setPaymentDetailsCollapsible(CollapsibleState.open);\r\n }\r\n\r\n setPreviousFinancedCount(selectedInvoicesForFinancing.length);\r\n\r\n clearErrors(\"premiumFinanceAgreement\");\r\n }, [invoicePayments, previousFinancedCount, clearErrors]);\r\n\r\n const onContinueToPayment = () => {\r\n setFinancingCollapsible(CollapsibleState.closed);\r\n setPaymentDetailsCollapsible(CollapsibleState.open);\r\n };\r\n\r\n const onShowAutoPayPaylessEnrollmentPage = (display: boolean) => {\r\n transitionViewIfSupported(() => {\r\n setShowAutoPayPaylessEnrollmentPage(display);\r\n });\r\n };\r\n\r\n const formValues = getValues();\r\n const payerFees = usePayerFees(formValues, getPaidAmount(formValues, true));\r\n\r\n const anyInvoicesFinanced = hasFinancedInvoices(invoicePayments);\r\n\r\n const savePaymentOption = watch(\"savePaymentOption\");\r\n const enableScheduledPayments = watch(\"enableScheduledPayments\");\r\n\r\n useEffect(() => {\r\n if (!pageData.IsAuthenticated && savePaymentOption) {\r\n setValue(\"savePaymentOption\", false);\r\n showSignIn(() => {\r\n setValue(\"savePaymentOption\", true);\r\n });\r\n }\r\n\r\n if (!pageData.CanAccessScheduledPayments && enableScheduledPayments) {\r\n setValue(\"enableScheduledPayments\", false);\r\n showSignIn(() => {\r\n setValue(\"enableScheduledPayments\", true);\r\n });\r\n }\r\n\r\n if (enableScheduledPayments && anyInvoicesFinanced) {\r\n setValue(\"enableScheduledPayments\", false);\r\n }\r\n }, [\r\n savePaymentOption,\r\n enableScheduledPayments,\r\n pageData,\r\n setValue,\r\n showSignIn,\r\n anyInvoicesFinanced,\r\n ]);\r\n\r\n useEffect(() => {\r\n if (!initialPageData.IsAuthenticated && pageData.IsAuthenticated && invoicesData) {\r\n loadInvoiceData(invoicePayments);\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [pageData.IsAuthenticated]);\r\n\r\n const anyInvoicesFinancingEligible =\r\n invoicesData?.Invoices?.some((x) => x.IsFinancingEligible) ?? false;\r\n\r\n const managedInvoicePaymentMethod = watch(\"managedInvoicePaymentMethod\");\r\n\r\n const onManagedInvoicePayNow = () => {\r\n setValue(\"invoicePayments\", [\r\n {\r\n ...invoicePayments[0],\r\n financedDownAmount: 0,\r\n paidAmount: pageData.ManagedInvoice.Amount,\r\n },\r\n ]);\r\n setFinancingCollapsible(CollapsibleState.closed);\r\n setPaymentDetailsCollapsible(CollapsibleState.open);\r\n };\r\n\r\n const onManagedInvoiceFinance = () => {\r\n setValue(\"invoicePayments\", [\r\n {\r\n ...invoicePayments[0],\r\n financedDownAmount: Number(pageData.ManagedInvoice.QuickQuote.DownPayment),\r\n paidAmount: 0,\r\n },\r\n ]);\r\n setFinancingCollapsible(CollapsibleState.open);\r\n setPaymentDetailsCollapsible(CollapsibleState.closed);\r\n };\r\n\r\n const [pfaResponse, setPfaResponse] = useState<RequestPremiumFinanceAgreementResponse | null>(\r\n null\r\n );\r\n\r\n const enableFinancing =\r\n (pageData.EnableInvoices || pageData.ManagedInvoice) && pageData.EnableFinancing;\r\n\r\n const invoicePayerName = invoicesData?.PayerName ? `for ${invoicesData.PayerName}` : \"\";\r\n\r\n return (\r\n <div className=\"payment-page-root\">\r\n <PageBannerAlert pageData={pageData} />\r\n {showAutoPayPaylessEnrollmentPage ? (\r\n <AutoPayPaylessEnrollmentPage\r\n onShowAutoPayPaylessEnrollmentPage={onShowAutoPayPaylessEnrollmentPage}\r\n pageData={pageData}\r\n transactionAttributeValues={getValues(\"transactionAttributes\")}\r\n payerName={getValues(\"payer\")}\r\n emailAddress={getValues(\"emailaddress\")}\r\n deletePayerToken={deletePayerToken}\r\n payerFees={payerFees}\r\n invoicePayerName={invoicePayerName}\r\n autoPayEmailOffsetDays={invoicesData?.AutoPayEmailOffset}\r\n ></AutoPayPaylessEnrollmentPage>\r\n ) : (\r\n <FormProvider {...formContext}>\r\n <form onSubmit={handleSubmit(onSubmit)}>\r\n <div className=\"main-with-sidebar\">\r\n <div className={`left-column box ${selectedTab === 0 ? \"\" : \"not-\"}selected`}>\r\n <div role=\"tablist\">\r\n <button\r\n role=\"tab\"\r\n id=\"tab-control-0\"\r\n aria-selected={selectedTab === 0 ? \"true\" : \"false\"}\r\n aria-controls=\"make-payment-tab\"\r\n className=\"tab-select tab-zero fixed\"\r\n onClick={(e) => {\r\n changeTab(e, 0);\r\n }}\r\n >\r\n <FormHeading>\r\n Payer\r\n <br className=\"break-when-small\" /> Information\r\n </FormHeading>\r\n </button>\r\n </div>\r\n <div\r\n className=\"tab-body\"\r\n id=\"make-payment-tab\"\r\n aria-labelledby=\"tab-control-0\"\r\n role=\"tabpanel\"\r\n >\r\n <div className=\"grid\">\r\n <TextField\r\n label={pageData.PayerLabel || \"Payer Name\"}\r\n {...register(\"payer\", {\r\n required: `${pageData.PayerLabel || \"Payer name\"} is required.`,\r\n })}\r\n errors={errors}\r\n maxLength={150}\r\n />\r\n <TextField\r\n label=\"Email Address\"\r\n {...register(\"emailaddress\", StandardEmailValidation)}\r\n errors={errors}\r\n inputMode=\"email\"\r\n maxLength={150}\r\n />\r\n\r\n {!pageData.ManagedInvoice ? (\r\n <>\r\n {pageData.EnableInvoices && (\r\n <div className=\"invoice-heading\">\r\n <h3>View Invoices</h3>\r\n </div>\r\n )}\r\n\r\n {pageData.TransactionAttributes?.length > 0 && (\r\n <CustomFields\r\n transactionAttributes={pageData.TransactionAttributes}\r\n errors={errors}\r\n register={register}\r\n onChange={\r\n pageData.EnableInvoices ? debouncedHandleCustomFieldChange : null\r\n }\r\n />\r\n )}\r\n\r\n {pageData.EnableInvoices ? (\r\n <div style={{ gridColumn: \"1/-1\" }}>\r\n <InvoicesContainer\r\n busy={invoicesLoading}\r\n invoices={invoicesData}\r\n showAutoPay={pageData.ShowAutoPay}\r\n onAutoPayCancel={autoPayCancel}\r\n onShowAutoPayPaylessEnrollment={onShowAutoPayPaylessEnrollmentPage}\r\n anyInvoicesFinancingEligible={anyInvoicesFinancingEligible}\r\n hideInvoiceButtons={pageData.HidePayAllOptionOnPaymentPage}\r\n />\r\n </div>\r\n ) : (\r\n <Controller\r\n name=\"amount\"\r\n control={control}\r\n rules={{\r\n validate: (value) => {\r\n return !value\r\n ? \"Amount is required.\"\r\n : validatePositiveCurrency(value);\r\n },\r\n }}\r\n render={({ field }) => (\r\n <CurrencyField\r\n {...field}\r\n label=\"Amount\"\r\n triggerValidation={trigger}\r\n placeholder=\"0.00\"\r\n error={errors[\"amount\"]}\r\n />\r\n )}\r\n />\r\n )}\r\n </>\r\n ) : null}\r\n </div>\r\n\r\n {pageData.ManagedInvoice ? (\r\n <ManagedInvoice\r\n invoice={pageData.ManagedInvoice}\r\n onManagedInvoicePayNow={onManagedInvoicePayNow}\r\n onManagedInvoiceFinance={onManagedInvoiceFinance}\r\n pfaResponse={pfaResponse}\r\n />\r\n ) : null}\r\n\r\n {!pageData.ManagedInvoice ? (\r\n <>\r\n {pageData.ShowScheduledPayments && !anyInvoicesFinanced ? (\r\n <>\r\n <hr />\r\n <RecurringPaymentsForm />\r\n </>\r\n ) : null}\r\n <hr />\r\n <TextareaField\r\n label=\"Notes\"\r\n {...register(\"comments\", {\r\n required: pageData.RequirePaymentPageComments\r\n ? \"Notes are required.\"\r\n : false,\r\n })}\r\n placeholder={\r\n pageData.PageCommentPlaceHolder ||\r\n \"Please enter the agency id, policy number, quote number or invoice number\"\r\n }\r\n className=\"std-component-space\"\r\n errors={errors}\r\n />\r\n\r\n {pageData.EnableAttachments && <FileAttachments />}\r\n </>\r\n ) : null}\r\n\r\n <div>\r\n <button\r\n className=\"clickable button primary full-width hide-on-big fixed-bottom\"\r\n onClick={(e) => {\r\n changeTab(e, 1);\r\n }}\r\n >\r\n Continue\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div className={`right-column box ${selectedTab === 1 ? \"\" : \"not-\"}selected`}>\r\n <div role=\"tablist\">\r\n <button\r\n id=\"tab-control-1\"\r\n role=\"tab\"\r\n aria-selected={selectedTab === 1 ? \"true\" : \"false\"}\r\n aria-controls=\"payment-details-tab\"\r\n className={`tab-select tab-one fixed ${enableFinancing ? \"hide-on-big\" : \"\"}`}\r\n onClick={(e) => {\r\n changeTab(e, 1);\r\n }}\r\n >\r\n <FormHeading>\r\n Payment\r\n <br className=\"break-when-small\" /> Details\r\n </FormHeading>\r\n </button>\r\n </div>\r\n <div\r\n className=\"tab-body\"\r\n id=\"payment-details-tab\"\r\n aria-labelledby=\"tab-control-1\"\r\n role=\"tabpanel\"\r\n >\r\n {enableFinancing && (\r\n <FinanceDetails\r\n invoices={invoicesData}\r\n anyInvoicesFinanced={\r\n pageData.ManagedInvoice\r\n ? managedInvoicePaymentMethod === \"finance\"\r\n : invoicePayments.filter((x) => x.financedDownAmount != 0).length > 0\r\n }\r\n anyInvoicesFinancingEligible={\r\n pageData.ManagedInvoice\r\n ? pageData.ManagedInvoice.IsFinancingEligible\r\n : anyInvoicesFinancingEligible\r\n }\r\n collapsibleState={financingCollapsible}\r\n onCollapsibleStateChange={setFinancingCollapsible}\r\n onContinueToPayment={onContinueToPayment}\r\n pfaResponse={pfaResponse}\r\n setPfaResponse={setPfaResponse}\r\n />\r\n )}\r\n\r\n <Collapsible\r\n title=\"Payment Details\"\r\n state={enableFinancing ? paymentDetailsCollapsible : CollapsibleState.open}\r\n onStateChange={(state) => setPaymentDetailsCollapsible(state)}\r\n hideHeader={!enableFinancing}\r\n >\r\n <PaymentInfo\r\n acceptedPaymentMethods={pageData.AcceptedPaymentMethods}\r\n register={register}\r\n errors={errors}\r\n getValues={getValues}\r\n setValue={setValue}\r\n watch={watch}\r\n recaptchaKey={pageData.GoogleDataSiteClientKey}\r\n payerTokens={pageData.PayerTokenViewModels}\r\n deletePayerToken={deletePayerToken}\r\n achDisclaimer={pageData.AchDisclaimer}\r\n invoices={invoicesData}\r\n isSubmitting={isSubmitting}\r\n payerFees={payerFees}\r\n paymentFlow={PaymentFlow.Manual}\r\n recaptchaLoaded={reCaptchaLoaded}\r\n />\r\n </Collapsible>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n </FormProvider>\r\n )}\r\n <ErrorModal isOpen={serverException} title=\"\" className=\"modal-small\">\r\n <div role=\"alert\">\r\n Oops, there was an unexpected error. Before you try again, please contact{\" \"}\r\n <a href={`mailto:${pageData.PublicEmailAddress}`}>{pageData.PublicEmailAddress}</a> to see\r\n if your payment was successful.\r\n </div>\r\n </ErrorModal>\r\n </div>\r\n );\r\n};\r\n","import { useState } from \"react\";\r\nimport { PaymentPage } from \"./PaymentPage\";\r\nimport { PageBannerAlert } from \"#components/Alert/PageBannerAlert\";\r\nimport AppBar from \"#components/AppBar/AppBar\";\r\nimport FormHeading from \"#components/FormHeading/FormHeading\";\r\nimport { ErrorBoundary } from \"#components/Shared/ErrorBoundary\";\r\nimport { ToastProvider } from \"#context/Toaster\";\r\nimport {\r\n AuthPageRoute,\r\n AuthPageRouterContext,\r\n useAuthPageRouter,\r\n} from \"#features/AuthPages/AuthPageRouter\";\r\nimport { PaymentPageModel } from \"#features/PaymentMethodForm/PaymentInfoModel\";\r\nimport { cx } from \"#utilities/cx\";\r\nimport { isAppleMobile } from \"#utilities/Platform\";\r\n\r\ntype Props = {\r\n initialPageData: PaymentPageModel;\r\n};\r\n\r\nexport const PaymentPageRoot = ({ initialPageData }: Props) => {\r\n const [authPageModalCallback, setAuthPageModalCallback] = useState<(() => void) | null>(null);\r\n const [pageData, setPageData] = useState<PaymentPageModel>(initialPageData);\r\n const router = useAuthPageRouter({ useBrowserNavigation: false });\r\n\r\n const appleMobile = isAppleMobile();\r\n const hidePaymentPage = pageData.AcceptedPaymentMethods.length === 0;\r\n\r\n return (\r\n <ErrorBoundary>\r\n <ToastProvider>\r\n <AuthPageRouterContext.Provider value={router}>\r\n <AppBar\r\n pageData={pageData}\r\n setPageData={setPageData}\r\n authPageModal={router.route}\r\n setAuthPageModalRoute={router.navigate}\r\n authPageModalCallback={authPageModalCallback}\r\n />\r\n </AuthPageRouterContext.Provider>\r\n <main role=\"main\" className={cx(\"container-box\", appleMobile && \"platform-ios\")}>\r\n {hidePaymentPage ? (\r\n <>\r\n <PageBannerAlert pageData={pageData} />\r\n <FormHeading className=\"container-box flex-center\">\r\n No payment options are currently available for you. Please reach out directly to\r\n your insurance provider for further details.\r\n </FormHeading>\r\n </>\r\n ) : (\r\n <PaymentPage\r\n pageData={pageData}\r\n setPageData={setPageData}\r\n initialPageData={initialPageData}\r\n showSignIn={(callback) => {\r\n router.navigate(AuthPageRoute.SignIn);\r\n setAuthPageModalCallback(() => callback);\r\n }}\r\n />\r\n )}\r\n </main>\r\n </ToastProvider>\r\n </ErrorBoundary>\r\n );\r\n};\r\n","import \"../App.css\";\r\nimport \"../small.css\";\r\nimport { PaymentPageRoot } from \"./PaymentPageRoot\";\r\nimport { PaymentPageModel } from \"#features/PaymentMethodForm/PaymentInfoModel\";\r\nimport { pageSetup } from \"#utilities/AppUtilities\";\r\n\r\nasync function enableMocking() {\r\n if (process.env.NODE_ENV !== \"mock\") {\r\n return;\r\n }\r\n\r\n const { worker } = await import(\"../mock-browser\");\r\n\r\n // `worker.start()` returns a Promise that resolves\r\n // once the Service Worker is up and ready to intercept requests.\r\n return worker.start({\r\n serviceWorker: {\r\n // This is useful if your application follows\r\n // a strict directory structure.\r\n url: \"/EPayPolicy/mockServiceWorker.js\",\r\n },\r\n onUnhandledRequest(req, print) {\r\n if (req.url.includes(\"static\") || req.url.includes(\"hot-update\")) {\r\n return;\r\n }\r\n\r\n print.warning();\r\n },\r\n });\r\n}\r\n\r\nenableMocking().then(() => {\r\n const { root, pageData } = pageSetup<PaymentPageModel>();\r\n\r\n root.render(<PaymentPageRoot initialPageData={pageData} />);\r\n});\r\n"],"names":["c","u","i","r","f","l","v","m","g","p","w","s","x","h","y","F","n","A","t","e","d","CollapsibleState","Collapsible","className","title","subtitle","state","defaultState","onStateChange","children","label","hideHeader","disabled","identifier","useId","internalState","setInternalState","useState","currentState","setState","newValue","jsxs","jsx","Icon","currencyPattern","looksLikeCurrency","value","formatWithTwoDecimals","validateCurrency","fieldValue","credit","forceToNumber","validatePositiveCurrency","CurrencyField","React","labelHidden","error","tooltipContent","onChange","onBlur","onMount","name","triggerValidation","icon","props","ref","internalValue","setInternalValue","handleChange","onMountRef","useRef","useEffect","_a","handleBlur","event","intVal","InputWrapper","errorFormatter","defaultIcon","iconMap","FileExtension","filename","lastIndex","FileIcon","extension","iconName","maxUploadSize","FileUploadItem","fileItem","updateFileStatus","removeFile","xhrRef","percentComplete","setPercentComplete","status","setStatus","FileAttachmentStatus","errorMessage","setErrorMessage","deleteEnabled","setDeleteEnabled","isComplete","handleError","statusCode","errorMsg","handleProgressUpdate","handleComplete","response","onUploadcomplete","xhr","uploadFile","extention","getPageData","fileData","useOnFirstRender","handleUploadDelete","ApiClient","cx","IconButton","FileAttachments","maxFileUploadCount","formContext","useFormContext","clearToast","setErrorToast","useToast","dropZoneActive","setDropZoneActive","fileDropRoot","fileList","fileModelsError","handleFileUpload","files","updatedFileList","file","newFileToUpload","handleFileSelection","allFilesUploaded","stopBaseEventAction","showDropZone","hideDropZone","leavingTheNode","filesDropped","_b","InputError","key","TextareaField","forwardRef","errors","style","rows","onKeyUp","get","hasError","handleOnKeyUp","onKeyUpEvent","ta","BasicError","PaymentFlow","PaymentFlow2","hasEnteredPaymentDetails","dirtyFields","ReCaptcha","recaptchaKey","register","setValue","ReCAPTCHA","token","OkModal","isOpen","handleClose","handleOkClick","Modal","Button","AutoPayLearnMore","autoPayEmailOffsetDays","showAutopayModal","setShowAutopayModal","Fragment","ButtonVariants","TitleText","color","size","ToggleSwitch","AutoPayToggle","autopayEnabled","setAutopayEnabled","showModal","setShowModal","ConfirmationModal","propName","direction","ab","toSort","i1","i2","objectSorter","SortDirection","obj1","obj2","dataSorterWithDirection","v1","v2","dataSorter","dataType","result","IconMapping","InvoiceGridHeaderButton","displayName","columnName","currentSort","setSort","getIcon","setGridSort","newSort","IconPosition","InvoiceAttributeValues","item","md","getNodeName","node","isNode","getWindow","_node$ownerDocument","getDocumentElement","_ref","isElement","isHTMLElement","isShadowRoot","isOverflowElement","element","overflow","overflowX","overflowY","display","getComputedStyle","isTableElement","isContainingBlock","webkit","isWebKit","css","getContainingBlock","currentNode","getParentNode","isLastTraversableNode","getNodeScroll","getNearestOverflowAncestor","parentNode","getOverflowAncestors","list","traverseIframes","_node$ownerDocument2","scrollableAncestor","isBody","win","activeElement","doc","_activeElement","contains","parent","child","rootNode","next","isSafari","getDocument","sides","alignments","placements","acc","side","min","max","round","floor","createCoords","oppositeSideMap","oppositeAlignmentMap","clamp","start","end","evaluate","param","getSide","placement","getAlignment","getOppositeAxis","axis","getAxisLength","getSideAxis","getAlignmentAxis","getAlignmentSides","rects","rtl","alignment","alignmentAxis","length","mainAlignmentSide","getOppositePlacement","getOppositeAlignmentPlacement","expandPaddingObject","padding","getPaddingObject","rectToClientRect","rect","computeCoordsFromPlacement","reference","floating","sideAxis","alignLength","isVertical","commonX","commonY","commonAlign","coords","computePosition","config","strategy","middleware","platform","validMiddleware","statefulPlacement","middlewareData","resetCount","fn","nextX","nextY","data","reset","detectOverflow","options","_await$platform$isEle","elements","boundary","rootBoundary","elementContext","altBoundary","paddingObject","clippingClientRect","offsetParent","offsetScale","elementClientRect","arrow","arrowDimensions","isYAxis","minProp","maxProp","clientProp","endDiff","startDiff","arrowOffsetParent","clientSize","centerToReference","largestPossiblePadding","minPadding","maxPadding","min$1","center","offset","shouldAddOffset","alignmentOffset","getPlacementList","autoAlignment","allowedPlacements","autoPlacement","_middlewareData$autoP","_middlewareData$autoP2","_placementsThatFitOnE","crossAxis","detectOverflowOptions","placements$1","currentIndex","currentPlacement","alignmentSides","currentOverflows","allOverflows","nextPlacement","placementsSortedByMostSpace","a","b","resetPlacement","convertValueToCoords","mainAxisMulti","crossAxisMulti","rawValue","mainAxis","_middlewareData$offse","_middlewareData$arrow","diffCoords","shift","checkMainAxis","checkCrossAxis","limiter","mainAxisCoord","crossAxisCoord","minSide","maxSide","limitedCoords","getCssDimensions","width","height","hasOffset","offsetWidth","offsetHeight","shouldFallback","unwrapElement","getScale","domElement","$","noOffsets","getVisualOffsets","shouldAddVisualOffsets","isFixed","floatingOffsetParent","getBoundingClientRect","includeScale","isFixedStrategy","clientRect","scale","visualOffsets","offsetWin","currentWin","currentIFrame","iframeScale","iframeRect","left","top","topLayerSelectors","isTopLayer","selector","convertOffsetParentRelativeRectToViewportRelativeRect","documentElement","topLayer","scroll","offsets","isOffsetParentAnElement","offsetRect","getClientRects","getWindowScrollBarX","getDocumentRect","html","body","getViewportRect","visualViewport","visualViewportBased","getInnerBoundingClientRect","getClientRectFromClippingAncestor","clippingAncestor","hasFixedPositionAncestor","stopNode","getClippingElementAncestors","cache","cachedResult","el","currentContainingBlockComputedStyle","elementIsFixed","computedStyle","currentNodeIsContaining","ancestor","getClippingRect","clippingAncestors","firstClippingAncestor","clippingRect","accRect","getDimensions","getRectRelativeToOffsetParent","getTrueOffsetParent","polyfill","getOffsetParent","window","getElementRects","getOffsetParentFn","getDimensionsFn","isRTL","observeMove","onMove","io","timeoutId","root","cleanup","_io","refresh","skip","threshold","insetTop","insetRight","insetBottom","insetLeft","isFirstUpdate","handleObserve","entries","ratio","autoUpdate","update","ancestorScroll","ancestorResize","elementResize","layoutShift","animationFrame","referenceEl","ancestors","cleanupIo","reobserveFrame","resizeObserver","firstEntry","_resizeObserver","frameId","prevRefRect","frameLoop","nextRefRect","_resizeObserver2","autoPlacement$1","shift$1","arrow$1","mergedOptions","platformWithCache","computePosition$1","isRef","index","useLayoutEffect","deepEqual","keys","getDPR","roundByDPR","dpr","useLatestRef","React.useRef","useFloating","externalReference","externalFloating","transform","whileElementsMounted","open","setData","React.useState","latestMiddleware","setLatestMiddleware","_reference","_setReference","_floating","_setFloating","setReference","React.useCallback","referenceRef","setFloating","floatingRef","floatingEl","dataRef","hasWhileElementsMounted","whileElementsMountedRef","platformRef","fullData","isMountedRef","ReactDOM.flushSync","refs","React.useMemo","floatingStyles","initialStyles","candidateSelectors","candidateSelector","NoElement","matches","getRootNode","_element$getRootNode","isInert","lookUp","_node$getAttribute","inertAtt","inert","isContentEditable","_node$getAttribute2","attValue","getCandidates","includeContainer","filter","candidates","getCandidatesIteratively","elementsToCheck","assigned","content","nestedCandidates","validCandidate","shadowRoot","validShadowRoot","_nestedCandidates","hasTabIndex","getTabIndex","getSortOrderTabIndex","isScope","tabIndex","sortOrderedTabbables","isInput","isHiddenInput","isDetailsWithSummary","getCheckedRadio","nodes","form","isTabbableRadio","radioScope","queryRadios","radioSet","err","checked","isRadio","isNonTabbableRadio","isNodeAttached","_nodeRoot","nodeRoot","nodeRootHost","attached","_nodeRootHost","_nodeRootHost$ownerDo","_nodeRoot2","_nodeRootHost2","_nodeRootHost2$ownerD","isZeroArea","_node$getBoundingClie","isHidden","displayCheck","getShadowRoot","isDirectSummary","nodeUnderDetails","originalNode","parentElement","isDisabledFromFieldset","isNodeMatchingSelectorFocusable","isNodeMatchingSelectorTabbable","isValidShadowRootTabbable","shadowHostNode","sortByOrder","regularTabbables","orderedTabbables","candidateTabindex","sortable","tabbable","container","SafeReact","useInsertionEffect","useSafeInsertionEffect","useEffectEvent","callback","_len","args","_key","_extends","target","source","serverHandoffComplete","count","genId","useFloatingId","id","setId","React.useEffect","useReactId","FloatingArrow","React.forwardRef","tipRadius","strokeWidth","staticOffset","stroke","restStyle","rest","clipPathId","computedStrokeWidth","halfStrokeWidth","svgX","svgY","isCustomShape","isVerticalSide","yOffsetProp","xOffsetProp","arrowX","arrowY","dValue","rotation","React.createElement","createPubSub","map","_map$get","handler","listener","_map$get2","FloatingNodeContext","React.createContext","FloatingTreeContext","useFloatingParentNodeId","_React$useContext","React.useContext","useFloatingTree","createAttribute","getTabbableOptions","getTabbableIn","allTabbable","activeIndex","getNextTabbable","getPreviousTabbable","isOutsideEvent","containerElement","relatedTarget","disableFocusInside","enableFocusInside","tabindex","HIDDEN_STYLES","setActiveElementOnTab","FocusGuard","role","setRole","restProps","PortalContext","attr","useFloatingPortalNode","uniqueId","portalContext","usePortalContext","portalNode","setPortalNode","portalNodeRef","existingIdRoot","subRoot","idWrapper","FloatingPortal","preserveTabOrder","focusManagerState","setFocusManagerState","beforeOutsideRef","afterOutsideRef","beforeInsideRef","afterInsideRef","shouldRenderGuards","onFocus","_beforeInsideRef$curr","prevTabbable","createPortal","_afterInsideRef$curre","nextTabbable","_options$elements","unstable_onOpenChange","nodeId","_domReference","setDomReference","positionReference","_setPositionReference","domReference","domReferenceRef","position","useFloating$1","tree","nested","onOpenChange","reason","events","floatingId","setPositionReference","computedPositionReference","context","ArrowPaths","Tooltip","offsetBy","shiftBy","overridePlacement","referenceElement","arrowPath","arrowRef","useDebounceExceptTests","func","wait","useDebouncedCallback","debounceTimeout","useTooltip","showToolTip","setShowToolTip","buttonRef","centreOnRef","handleFocusAndClick","onClick","OverDueOrPaid","isOverDue","isPaid","navigateTo","paidOverDueOrNothing","paid","overDue","itemId","Select","required","formatNumber","minimumFractionDigits","formatCurrency","k","require$$0","require$$1","q","z","B","D","C","E","aa","ba","ca","da","ea","fa","ha","ia","ja","ka","la","ma","na","N","G","oa","H","I","J","K","pa","qa","ra","L","M","sa","ua","va","wa","xa","ya","za","O","P","Q","R","S","T","U","V","W","X","Y","Aa","Ba","Z","Ca","Da","reactDomTestUtils_production_min","testUtilsModule","wrapAnsi256","code","wrapAnsi16m","red","green","blue","assembleStyles","codes","styles","groupName","group","styleName","hex","colorString","character","integer","module","collections","printIteratorEntries","printIteratorValues","printListItems","printObjectProperties","getKeysOfEnumerableProperties","object","compareKeys","symbol","iterator","indentation","depth","printer","separator","current","indentationNext","val","AsymmetricMatcher","_collections","global","Symbol","asymmetricMatcher","SPACE","serialize","stringedValue","test","plugin","_default","ansiRegex","onlyFirst","pattern","ConvertAnsi","_ansiRegex","_interopRequireDefault","_ansiStyles","obj","toHumanReadableAnsi","text","match","DOMCollection","OBJECT_NAMES","ARRAY_REGEXP","testName","isNamedNodeMap","collection","attribute","escapeHTML_1","escapeHTML","str","markup","_escapeHTML","printProps","colors","printed","printChildren","printText","contentColor","printComment","comment","commentColor","printElement","type","printedProps","printedChildren","tagColor","printElementAsLeaf","DOMElement","_markup","ELEMENT_NODE","TEXT_NODE","COMMENT_NODE","FRAGMENT_NODE","ELEMENT_REGEXP","testHasAttribute","testNode","constructorName","nodeType","tagName","isCustomElement","_val$constructor","nodeIsText","nodeIsComment","nodeIsFragment","Immutable","IS_ITERABLE_SENTINEL","IS_LIST_SENTINEL","IS_KEYED_SENTINEL","IS_MAP_SENTINEL","IS_ORDERED_SENTINEL","IS_RECORD_SENTINEL","IS_SEQ_SENTINEL","IS_SET_SENTINEL","IS_STACK_SENTINEL","getImmutableName","printAsLeaf","LAZY","printImmutableEntries","getRecordEntries","printImmutableRecord","printImmutableSeq","printImmutableValues","reactIs_production_min","reactIsModule","ReactElement","ReactIs","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","cacheBabelInterop","cacheNodeInterop","newObj","hasPropertyDescriptor","desc","getChildren","arg","getType","functionName","getPropKeys","ReactTestComponent","testSymbol","build","default_1","DEFAULT_OPTIONS_1","format_1","format","plugins_1","_AsymmetricMatcher","require$$2","_ConvertAnsi","require$$3","_DOMCollection","require$$4","_DOMElement","require$$5","_Immutable","require$$6","_ReactElement","require$$7","_ReactTestComponent","require$$8","toString","toISOString","errorToString","regExpToString","getConstructorName","isWindow","SYMBOL_REGEXP","NEWLINE_REGEXP","PrettyFormatPluginError","message","stack","isToStringedArrayType","toStringed","printNumber","printBigInt","printFunction","printFunctionName","printSymbol","printError","printBasicValue","escapeRegex","escapeString","typeOf","printComplexValue","hasCalledToJSON","hitMaxDepth","isNewPlugin","printPlugin","valChild","findPlugin","plugins","basicResult","DEFAULT_THEME","DEFAULT_THEME_KEYS","DEFAULT_OPTIONS","validateOptions","getColorsHighlight","getColorsEmpty","getPrintFunctionName","getEscapeRegex","getEscapeString","getConfig","_options$printBasicPr","createIndent","indent","toStr","isCallable","toInteger","number","maxSafeInteger","toLength","len","arrayFrom","arrayLike","mapFn","items","kValue","_typeof","_classCallCheck","instance","Constructor","_defineProperties","descriptor","_toPropertyKey","_createClass","protoProps","staticProps","_defineProperty","_toPrimitive","input","hint","prim","res","SetLike","previousLength","callbackfn","_this","SetLike$1","getLocalName","_element$localName","localNameToRoleMappings","prohibitedAttributes","hasGlobalAriaAttributes","attributeName","_prohibitedAttributes","ignorePresentationalRole","implicitRole","getRole","explicitRole","getExplicitRole","getImplicitRole","mappedByTag","isHTMLTableCaptionElement","isHTMLInputElement","isHTMLOptGroupElement","isHTMLSelectElement","isHTMLTableElement","isHTMLTextAreaElement","safeWindow","defaultView","isHTMLFieldSetElement","isHTMLLegendElement","isHTMLSlotElement","isSVGElement","isSVGSVGElement","isSVGTitleElement","queryIdRefs","ids","hasAnyConcreteRoles","roles","asFlatString","getComputedStyleImplementation","isControl","hasAbstractRole","querySelectorAllSubtree","selectors","ArrayFrom","querySelectedOptions","listbox","isMarkedPresentational","isNativeHostLanguageTextAlternativeElement","allowsNameFromContent","isDescendantOfNativeHostLanguageTextAlternativeElement","getValueOfTextbox","getTextualContent","declaration","isLabelableElement","localName","findLabelableElement","labelableElement","childNode","descendantLabelableElement","getControlOfLabel","htmlFor","getLabels","labelsProperty","document","getSlotContents","slot","assignedNodes","computeTextAlternative","consultedNodes","_options$compute","compute","_options$computedStyl","computedStyleSupportsPseudoElements","_options$getComputedS","_options$hidden","hidden","computeMiscTextAlternative","accumulatedText","pseudoBefore","beforeContent","childNodes","pseudoAfter","afterContent","useAttribute","computeTooltipAttributeValue","computeElementTextAlternative","_children","_i","_child","_children2","_i2","_child2","nameFromAlt","nameFromLabel","nameFromValue","labels","_nameFromAlt","nameFromTitle","nameFromSubTree","labelAttributeNode","labelElements","skipToStep2E","ariaLabel","elementTextAlternative","selectedOptions","selectedOption","accumulatedText2F","tooltipAttributeValue","ownKeys","enumerableOnly","symbols","sym","_objectSpread","computeAccessibleDescription","description","prohibitsNaming","computeAccessibleName","iteratorProxy_1","iteratorProxy","values","iter","iterationDecorator_1","iterationDecorator","_iteratorProxy","ariaPropsMap_1","_iterationDecorator","_slicedToArray","arr","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","_arr","_n","_d","_s","_e","_createForOfIteratorHelper","o","allowArrayLike","it","_e2","normalCompletion","didErr","step","_e3","minLen","_arrayLikeToArray","arr2","properties","ariaPropsMap","thisArg","_iterator","_step","_step$value","tuple","_ref2","_ref3","_ref4","domMap_1","dom","domMap","commandRole_1","commandRole","compositeRole_1","compositeRole","inputRole_1","inputRole","landmarkRole_1","landmarkRole","rangeRole_1","rangeRole","roletypeRole_1","roletypeRole","sectionRole_1","sectionRole","sectionheadRole_1","sectionheadRole","selectRole_1","selectRole","structureRole_1","structureRole","widgetRole_1","widgetRole","windowRole_1","windowRole","ariaAbstractRoles_1","_commandRole","_compositeRole","_inputRole","_landmarkRole","_rangeRole","_roletypeRole","_sectionRole","_sectionheadRole","_selectRole","_structureRole","require$$9","_widgetRole","require$$10","_windowRole","require$$11","ariaAbstractRoles","alertRole_1","alertRole","alertdialogRole_1","alertdialogRole","applicationRole_1","applicationRole","articleRole_1","articleRole","bannerRole_1","bannerRole","blockquoteRole_1","blockquoteRole","buttonRole_1","buttonRole","captionRole_1","captionRole","cellRole_1","cellRole","checkboxRole_1","checkboxRole","codeRole_1","codeRole","columnheaderRole_1","columnheaderRole","comboboxRole_1","comboboxRole","complementaryRole_1","complementaryRole","contentinfoRole_1","contentinfoRole","definitionRole_1","definitionRole","deletionRole_1","deletionRole","dialogRole_1","dialogRole","directoryRole_1","directoryRole","documentRole_1","documentRole","emphasisRole_1","emphasisRole","feedRole_1","feedRole","figureRole_1","figureRole","formRole_1","formRole","genericRole_1","genericRole","gridRole_1","gridRole","gridcellRole_1","gridcellRole","groupRole_1","groupRole","headingRole_1","headingRole","imgRole_1","imgRole","insertionRole_1","insertionRole","linkRole_1","linkRole","listRole_1","listRole","listboxRole_1","listboxRole","listitemRole_1","listitemRole","logRole_1","logRole","mainRole_1","mainRole","markRole_1","markRole","marqueeRole_1","marqueeRole","mathRole_1","mathRole","menuRole_1","menuRole","menubarRole_1","menubarRole","menuitemRole_1","menuitemRole","menuitemcheckboxRole_1","menuitemcheckboxRole","menuitemradioRole_1","menuitemradioRole","meterRole_1","meterRole","navigationRole_1","navigationRole","noneRole_1","noneRole","noteRole_1","noteRole","optionRole_1","optionRole","paragraphRole_1","paragraphRole","presentationRole_1","presentationRole","progressbarRole_1","progressbarRole","radioRole_1","radioRole","radiogroupRole_1","radiogroupRole","regionRole_1","regionRole","rowRole_1","rowRole","rowgroupRole_1","rowgroupRole","rowheaderRole_1","rowheaderRole","scrollbarRole_1","scrollbarRole","searchRole_1","searchRole","searchboxRole_1","searchboxRole","separatorRole_1","separatorRole","sliderRole_1","sliderRole","spinbuttonRole_1","spinbuttonRole","statusRole_1","statusRole","strongRole_1","strongRole","subscriptRole_1","subscriptRole","superscriptRole_1","superscriptRole","switchRole_1","switchRole","tabRole_1","tabRole","tableRole_1","tableRole","tablistRole_1","tablistRole","tabpanelRole_1","tabpanelRole","termRole_1","termRole","textboxRole_1","textboxRole","timeRole_1","timeRole","timerRole_1","timerRole","toolbarRole_1","toolbarRole","tooltipRole_1","tooltipRole","treeRole_1","treeRole","treegridRole_1","treegridRole","treeitemRole_1","treeitemRole","ariaLiteralRoles_1","_alertRole","_alertdialogRole","_applicationRole","_articleRole","_bannerRole","_blockquoteRole","_buttonRole","_captionRole","_cellRole","_checkboxRole","_codeRole","_columnheaderRole","_comboboxRole","require$$12","_complementaryRole","require$$13","_contentinfoRole","require$$14","_definitionRole","require$$15","_deletionRole","require$$16","_dialogRole","require$$17","_directoryRole","require$$18","_documentRole","require$$19","_emphasisRole","require$$20","_feedRole","require$$21","_figureRole","require$$22","_formRole","require$$23","_genericRole","require$$24","_gridRole","require$$25","_gridcellRole","require$$26","_groupRole","require$$27","_headingRole","require$$28","_imgRole","require$$29","_insertionRole","require$$30","_linkRole","require$$31","_listRole","require$$32","_listboxRole","require$$33","_listitemRole","require$$34","_logRole","require$$35","_mainRole","require$$36","_markRole","require$$37","_marqueeRole","require$$38","_mathRole","require$$39","_menuRole","require$$40","_menubarRole","require$$41","_menuitemRole","require$$42","_menuitemcheckboxRole","require$$43","_menuitemradioRole","require$$44","_meterRole","require$$45","_navigationRole","require$$46","_noneRole","require$$47","_noteRole","require$$48","_optionRole","require$$49","_paragraphRole","require$$50","_presentationRole","require$$51","_progressbarRole","require$$52","_radioRole","require$$53","_radiogroupRole","require$$54","_regionRole","require$$55","_rowRole","require$$56","_rowgroupRole","require$$57","_rowheaderRole","require$$58","_scrollbarRole","require$$59","_searchRole","require$$60","_searchboxRole","require$$61","_separatorRole","require$$62","_sliderRole","require$$63","_spinbuttonRole","require$$64","_statusRole","require$$65","_strongRole","require$$66","_subscriptRole","require$$67","_superscriptRole","require$$68","_switchRole","require$$69","_tabRole","require$$70","_tableRole","require$$71","_tablistRole","require$$72","_tabpanelRole","require$$73","_termRole","require$$74","_textboxRole","require$$75","_timeRole","require$$76","_timerRole","require$$77","_toolbarRole","require$$78","_tooltipRole","require$$79","_treeRole","require$$80","_treegridRole","require$$81","_treeitemRole","require$$82","ariaLiteralRoles","docAbstractRole_1","docAbstractRole","docAcknowledgmentsRole_1","docAcknowledgmentsRole","docAfterwordRole_1","docAfterwordRole","docAppendixRole_1","docAppendixRole","docBacklinkRole_1","docBacklinkRole","docBiblioentryRole_1","docBiblioentryRole","docBibliographyRole_1","docBibliographyRole","docBibliorefRole_1","docBibliorefRole","docChapterRole_1","docChapterRole","docColophonRole_1","docColophonRole","docConclusionRole_1","docConclusionRole","docCoverRole_1","docCoverRole","docCreditRole_1","docCreditRole","docCreditsRole_1","docCreditsRole","docDedicationRole_1","docDedicationRole","docEndnoteRole_1","docEndnoteRole","docEndnotesRole_1","docEndnotesRole","docEpigraphRole_1","docEpigraphRole","docEpilogueRole_1","docEpilogueRole","docErrataRole_1","docErrataRole","docExampleRole_1","docExampleRole","docFootnoteRole_1","docFootnoteRole","docForewordRole_1","docForewordRole","docGlossaryRole_1","docGlossaryRole","docGlossrefRole_1","docGlossrefRole","docIndexRole_1","docIndexRole","docIntroductionRole_1","docIntroductionRole","docNoterefRole_1","docNoterefRole","docNoticeRole_1","docNoticeRole","docPagebreakRole_1","docPagebreakRole","docPagelistRole_1","docPagelistRole","docPartRole_1","docPartRole","docPrefaceRole_1","docPrefaceRole","docPrologueRole_1","docPrologueRole","docPullquoteRole_1","docPullquoteRole","docQnaRole_1","docQnaRole","docSubtitleRole_1","docSubtitleRole","docTipRole_1","docTipRole","docTocRole_1","docTocRole","ariaDpubRoles_1","_docAbstractRole","_docAcknowledgmentsRole","_docAfterwordRole","_docAppendixRole","_docBacklinkRole","_docBiblioentryRole","_docBibliographyRole","_docBibliorefRole","_docChapterRole","_docColophonRole","_docConclusionRole","_docCoverRole","_docCreditRole","_docCreditsRole","_docDedicationRole","_docEndnoteRole","_docEndnotesRole","_docEpigraphRole","_docEpilogueRole","_docErrataRole","_docExampleRole","_docFootnoteRole","_docForewordRole","_docGlossaryRole","_docGlossrefRole","_docIndexRole","_docIntroductionRole","_docNoterefRole","_docNoticeRole","_docPagebreakRole","_docPagelistRole","_docPartRole","_docPrefaceRole","_docPrologueRole","_docPullquoteRole","_docQnaRole","_docSubtitleRole","_docTipRole","_docTocRole","ariaDpubRoles","graphicsDocumentRole_1","graphicsDocumentRole","graphicsObjectRole_1","graphicsObjectRole","graphicsSymbolRole_1","graphicsSymbolRole","ariaGraphicsRoles_1","_graphicsDocumentRole","_graphicsObjectRole","_graphicsSymbolRole","ariaGraphicsRoles","rolesMap_1","_ariaAbstractRoles","_ariaLiteralRoles","_ariaDpubRoles","_ariaGraphicsRoles","roleDefinition","superClassIter","_iterator2","_step2","_loop","superClassName","superClassRoleTuple","superClassDefinition","_Object$keys","prop","rolesMap","_iterator3","_step3","_step3$value","_ref5","_ref6","_ref7","_ref8","has","dequal","foo","bar","ctor","lite","elementRoleMap_1","_lite","_rolesMap","elementRoles","concepts","relation","concept","elementRoleRelation","isUnique","elementRoleMap","roleElementMap_1","roleElement","relationConcepts","roleElementMap","lib","roles_1","roleElements_1","elementRoles_1","_ariaPropsMap","_domMap","_elementRoleMap","_roleElementMap","aria","roleElements","LZString","keyStrBase64","keyStrUriSafe","baseReverseDic","getBaseValue","alphabet","compressed","uncompressed","buf","TotalLen","current_value","bitsPerChar","getCharFromInt","context_dictionary","context_dictionaryToCreate","context_c","context_wc","context_w","context_enlargeIn","context_dictSize","context_numBits","context_data","context_data_val","context_data_position","ii","resetValue","getNextValue","dictionary","enlargeIn","dictSize","numBits","entry","bits","resb","maxpower","power","NodeTypeTextNode","printedChild","ELEMENT_NODE$1","TEXT_NODE$1","COMMENT_NODE$1","createDOMElementFilter","filterNode","_val$constructor2","chalk","readFileSync","codeFrameColumns","nodeRequire","getCodeFrame","frame","locationStart","locationEnd","frameLocation","frameLocationElements","line","column","rawFileContents","codeFrame","getUserCodeFrame","firstClientCodeFrame","jestFakeTimersAreEnabled","getWindowFromNode","checkContainerType","getTypeName","shouldHighlight","_process","_process$env","prettyFormat.plugins","filterCommentsAndDefaultIgnoreTagsTags","prettyDOM","maxLength","define_process_env_default","domTypeName","prettyFormatOptions","debugContent","prettyFormat.format","logDOM","userCodeFrame","cb","prettifiedDOM","runWithExpensiveErrorDiagnosticsDisabled","configure","newConfig","labelledNodeNames","getTextContent","getLabelContent","textContent","getRealLabels","_labels","isLabelable","_temp","ariaLabelledBy","labelsId","labelId","labellingElement","textToMatch","labelledFormControl","formControlElement","assertNotNullOrUndefined","matcher","fuzzyMatches","normalizer","normalizedText","matchRegExp","getDefaultNormalizer","trim","collapseWhitespace","makeNormalizer","getNodeText","elementRoleList","buildElementRoleList","isSubtreeInaccessible","isInaccessible","isSubtreeInaccessibleImpl","currentElement","getImplicitAriaRoles","elementRolesMap","makeElementSelector","attributes","constraints","getSelectorSpecificity","bySelectorSpecificity","leftSpecificity","rightSpecificity","typeTextIndex","getRoles","flattenDOM","rolesAcc","prettyRoles","includeDescription","delimiterBar","elementsString","nameString","domString","descriptionString","logRoles","_temp2","computeAriaSelected","checkBooleanAttribute","computeAriaBusy","computeAriaChecked","computeAriaPressed","computeAriaCurrent","_ref9","_checkBooleanAttribut","computeAriaExpanded","attributeValue","computeHeadingLevel","implicitHeadingLevels","computeAriaValueNow","valueNow","computeAriaValueMax","valueMax","computeAriaValueMin","valueMin","computeAriaValueText","valueText","normalize","escapeRegExp","string","getRegExpMatcher","makeSuggestion","queryName","variant","warning","queryOptions","queryArgs","queryMethod","canSuggest","currentMethod","requestedMethod","getSuggestedQuery","method","_element$getAttribute","_getImplicitAriaRoles","labelText","placeholderText","alt","testId","copyStackTrace","waitFor","timeout","showOriginalStackTrace","stackTraceError","interval","onTimeout","mutationObserverOptions","resolve","reject","lastError","intervalId","observer","finished","promiseStatus","overallTimeoutTimer","handleTimeout","usingJestFakeTimers","advanceTimersWrapper","checkCallback","checkRealTimersCallback","MutationObserver","onDone","resolvedValue","rejectedValue","waitForWrapper","getElementError","getMultipleElementsFoundError","queryAllByAttribute","exact","matchNormalizer","queryByAttribute","els","makeSingleQuery","allQuery","getMultipleError","elementStrings","getSuggestionError","suggestion","makeGetAllQuery","getMissingError","_len2","_key2","makeFindQuery","getter","waitForOptions","wrapSingleQueryWithSuggestion","query","queryAllByName","_len3","_key3","suggest","wrapAllByQueryWithSuggestion","_len4","_key4","uniqueSuggestionMessages","_getSuggestedQuery","buildQueries","queryAllBy","queryBy","getAllBy","getBy","getByWithSuggestions","getAllWithSuggestions","findAllBy","findBy","queryHelpers","queryAllLabels","queryAllLabelsByText","queryAllByLabelText","matchingLabelledElements","labelledElements","labelledElement","labelList","labelsValue","labelValue","labelsFiltered","getAllByLabelText","tagNames","getTagNameOfElementAssociatedWithLabelViaFor","getMultipleError$7","queryByLabelText","getByLabelText","findAllByLabelText","findByLabelText","getAllByLabelTextWithSuggestions","getByLabelTextWithSuggestions","queryAllByLabelTextWithSuggestions","queryAllByPlaceholderText","getMultipleError$6","getMissingError$6","queryAllByPlaceholderTextWithSuggestions","queryByPlaceholderText","getAllByPlaceholderText","getByPlaceholderText","findAllByPlaceholderText","findByPlaceholderText","queryAllByText","ignore","baseArray","getMultipleError$5","getMissingError$5","isNormalizedDifferent","isCustomSelector","queryAllByTextWithSuggestions","queryByText","getAllByText","getByText","findAllByText","findByText","queryAllByDisplayValue","option","optionNode","getMultipleError$4","getMissingError$4","queryAllByDisplayValueWithSuggestions","queryByDisplayValue","getAllByDisplayValue","getByDisplayValue","findAllByDisplayValue","findByDisplayValue","VALID_TAG_REGEXP","queryAllByAltText","getMultipleError$3","getMissingError$3","queryAllByAltTextWithSuggestions","queryByAltText","getAllByAltText","getByAltText","findAllByAltText","findByAltText","isSvgTitle","_node$parentElement","queryAllByTitle","getMultipleError$2","getMissingError$2","queryAllByTitleWithSuggestions","queryByTitle","getAllByTitle","getByTitle","findAllByTitle","findByTitle","queryAllByRole","queryFallbacks","selected","busy","pressed","level","expanded","_allRoles$get","_allRoles$get2","_allRoles$get3","_allRoles$get4","_allRoles$get5","_allRoles$get6","_allRoles$get7","_allRoles$get8","_allRoles$get9","_allRoles$get10","subtreeIsInaccessibleCache","cachedIsSubtreeInaccessible","makeRoleSelector","roleValue","roleAttributeToken","firstRoleAttributeToken","valueMatches","_computeAriaValueText","_roleElements$get","explicitRoleSelector","roleRelations","implicitRoleSelectors","getNameHint","nameHint","getMultipleError$1","getMissingError$1","_temp3","childElement","roleMessage","descriptionHint","queryAllByRoleWithSuggestions","queryByRole","getAllByRole","getByRole","findAllByRole","findByRole","getTestIdAttribute","queryAllByTestId","queryAllByTestIdWithSuggestions","queryByTestId","getAllByTestId","getByTestId","findAllByTestId","findByTestId","queries","getQueriesForElement","queries$1","initialValue","helpers","isRemoved","initialCheck","waitForElementToBeRemoved","timeoutError","getRemainingElements","eventMap","eventAliasMap","fireEvent","createEvent","eventName","init","EventType","defaultInit","eventInit","targetProperties","setNativeValue","EventConstructor","bubbles","cancelable","detail","otherInit","eventKey","dataTransferKey","dataTransferValue","valueSetter","prototype","prototypeValueSetter","aliasKey","unindent","encode","lzString","getPlaygroundUrl","debug","logTestingPlaygroundURL","playgroundUrl","screen","reactAct","React.act","DeprecatedReactTestUtils.act","getGlobalThis","setIsReactActEnvironment","isReactActEnvironment","getIsReactActEnvironment","withGlobalActEnvironment","actImplementation","previousActEnvironment","callbackNeedsToBeAwaited","actResult","thenable","returnValue","act","fireEvent$1","configure$1","mountedContainers","mountedRootEntries","previousIsReactActEnvironment","getMouseEventOptions_1","getMouseEventOptions","isMousePressEvent","BUTTONS_NAMES","BUTTON_NAMES","translateButtonNumber","from","_Object$entries$find","mapIn","mapOut","convertMouseButtons","property","clickCount","_init","isElementType_1","isElementType","tag","isClickableInput_1","isClickableInput","_isElementType","CLICKABLE_INPUT_TYPES","buildTimeValue_1","buildTimeValue","onlyDigitsValue","firstDigit","secondDigit","hours","validHours","minuteCharacters","parsedMinutes","validMinutes","selectionRange","getSelectionRange","hasSelectionSupport","setSelectionRange","selectionSupportType","InputSelection","_InputSelection","selection","range","newSelectionStart","newSelectionEnd","selectionStart","selectionEnd","isContentEditable_1","getValue_1","getValue","_isContentEditable","isValidDateValue_1","isValidDateValue","clone","isValidInputTimeValue_1","isValidInputTimeValue","timeValue","calculateNewValue_1","calculateNewValue","_selectionRange","_getValue2","_isValidDateValue","_isValidInputTimeValue","newEntry","_getValue","deleteContent","prologEnd","prolog","epilogStart","epilog","cursorPosition","isCursorAtEnd","isCursorAtStart","hasUnreliableEmptyValue_1","hasUnreliableEmptyValue","unreliableValueInputTypes","isEditable_1","isEditable","isEditableInput","editableInputTypes","getSpaceUntilMaxLength","maxLengthSupportedTypes","getSanitizedMaxLength","supportsMaxLength","isDisabled_1","isDisabled","getActiveElement_1","getActiveElement","_isDisabled","isLabelWithInternallyDisabledControl_1","isLabelWithInternallyDisabledControl","control","FOCUSABLE_SELECTOR","isFocusable_1","isFocusable","_isLabelWithInternallyDisabledControl","_selector","eventWrapper_1","eventWrapper","_dom","isVisible_1","isVisible","_helpers","_el","isDocument_1","isDocument","wait_1","time","hasPointerEvents_1","hasPointerEvents","pointerEvents","hasFormSubmit_1","hasFormSubmit","exports","_getMouseEventOptions","_isClickableInput","_buildTimeValue","_calculateNewValue","_cursorPosition","_hasUnreliableEmptyValue","_isEditable","_maxLength","_getActiveElement","_isFocusable","_eventWrapper","_isVisible","_isDocument","_wait","_hasPointerEvents","_hasFormSubmit","hover_1","hover","unhover","_utils","getParentElements","parentElements","skipPointerEventsCheck","blur_1","blur","focus_1","focus","click_1","click","dblClick","_hover","_blur","_focus","getPreviouslyFocusedElement","focusedElement","clickLabel","fireClick","clickBooleanElement","clickElement","previousElement","closestFocusable","findClosest","parentLabel","skipHover","mouseEventOptions","getNextKeyDef_1","getNextKeyDef","bracketDict","legacyModifiers","legacyKeyMap","_options$keyboardMap$","consumedLength","releasePrevious","releaseSelf","repeat","readNextDescriptor","def","_def$code","_def$key","mapLegacyKey","pos","startBracket","startBracketRepeated","readPrintableChar","readTag","assertDescriptor","_text$slice$match","_text$slice$match$","_text$slice$match2","releasePreviousModifier","repeatModifier","releaseSelfModifier","expectedEndBracket","endBracket","getErrorMessage","hasReleaseSelf","getEnumValue","_getEnumValue","expected","found","keydownBehavior","keyDef","newPos","carryValue_1","carryValue","fireChangeForInputTimeIfValid_1","fireChangeForInputTimeIfValid","prevValue","timeNewEntry","fireInputEvent_1","fireInputEvent","eventOverrides","applyNative","setSelectionRangeAfterInput","setSelectionRangeAfterInputHandler","initial","propValue","nativeDescriptor","_element$ownerDocumen","initV","_carryValue","_fireChangeForInputTimeIfValid","_fireInputEvent","_shared","_getValue$length","_getValue$length2","keDef","keypressBehavior","_keyDef$key","_state$carryValue","textToBeTyped","_keyDef$key2","_state$carryValue2","isValidToBeTyped","_keyDef$key3","_state$carryValue3","_newValue$match","_newValue$match2","oldValue","valueParts","_keyDef$key4","inputType","getEventProps","getKeyEventProps","getMouseEventProps","_keyDef$keyCode","functional","_getEventProps","modifierKeys","preKeydownBehavior","modKey","ctrlKeyDef","preKeyupBehavior","keyupBehavior","postKeyupBehavior","_options$keyboardMap$2","arrowKeys","controlKeys","characterKeys","functionalKeys","replaceBehavior","keyboardImplementation_1","keyboardImplementation","releaseAllKeys","_getNextKeyDef","_state$repeatKey","getCurrentElement","getActive","applyPlugins","keyup","unpreventedDefault","keydown","hasKeyPress","keypress","unprevented","pluginCollection","types","DOM_KEY_LOCATION","keyMap","_types","defaultKeyMap","specialCharMap_1","specialCharMap","keyboard","keyboardImplementationWrapper","_specialCharMap","_keyboardImplementation","_keyMap","_options$delay","promise","createKeyboardState","delay","autoModify","keyboardMap","typeImplementation_1","typeImplementation","_click","_keyboard","skipClick","skipAutoClose","initialSelectionStart","initialSelectionEnd","type_1","_typeImplementation","clear_1","clear","_type","_element$selectionSta","_element$selectionEnd","elementType","tab_1","tab","getNextElement","focusTrap","nextIndex","defaultIndex","_focusTrap$ownerDocum","_focusTrap","focusableElements","enabledElements","orderedElements","idx","tabIndexA","tabIndexB","diff","checkedRadio","prunedElements","prev","nextElement","shiftKeyInit","tabKeyInit","continueToTab","keyUpTarget","upload_1","upload","fileOrFiles","applyAccept","_input$files","isAcceptableFile","_input$files2","inputFiles","accept","wildcards","acceptToken","selectOptions_1","selectOptionsBase","select","valArray","allOptions","matchingOption","withPointerEvents","selectOption","selectOptions","deselectOptions","paste_1","paste","isSupportedElement","_clear","_tab","_upload","_selectOptions","_paste","setTestId","setIfTest","isTest","isNotTest","COMMENTS_PLACEHOLDERS","InvoiceItem","invoices","itemClass","iconClass","toggleSingle","isNotInvoiced","invoicePayments","invoicePaymentsArr","useFieldArray","invoicePaymentIdx","invoicePayment","baseUrl","showConfirmation","setShowConfirmation","payInvoice","finance","createInvoicePayment","amountInputRef","removeInvoicePayment","confirmPayInvoice","getCommentsPlaceholder","isCredit","getPayButtonText","getTogglerTitle","getCanFinanceInvoice","getIsFinancingCompatible","firstFinancedPayment","firstFinancedInvoice","invoiceIsFinanced","invoiceIsPaid","financeEligibility","financingCompatible","hasSignedPfa","Controller","field","fieldState","Link","notInvoicedId","allKey","InvoiceGrid","sort","setExpanded","inv","toggleAll","curStateIs","newState","iconClassName","itemClassName","headerIconTitle","normalizeString","looksLikeDate","normalizeDate","filterableValues","asLower","parsed","month","date","year","normalizeCurrency","asCurrency","MAX_DIGITS","defaults","Decimal","external","decimalError","invalidArgument","exponentOutOfRange","mathfloor","mathpow","isDecimal","ONE","BASE","LOG_BASE","MAX_SAFE_INTEGER","MAX_E","j","xdL","ydL","dp","divide","Ctor","getBase10Exponent","base","pr","wpr","ln","subtract","add","exp","sd","digitsToString","carry","rL","xd","yd","rm","checkInt32","sign","yIsInt","guard","yn","truncate","ws","indexOfLastWord","getZeroString","multiplyInteger","temp","compare","aL","bL","cmp","prod","prodL","qd","rem","remL","rem0","xi","xL","yd0","yL","yz","denominator","pow","sum","getLn10","zs","c0","numerator","x2","parseDecimal","rd","doRound","xdi","xe","xLTy","isExp","ps","Decimal$1","precisionAdd","maxInvoicesPaidAmount","filterAttributes","filterText","filterInvoices","alwaysInclude","invoice","hasFinancedInvoices","validateInvoicePayments","payments","summedAmount","calculateTotalInvoicePayments","calculateTotalDownPayments","getPaidAmount","formValues","includeFinanced","pageData","amount","createPaymentsFromQueryString","qsParsed","financeIds","payNowIds","invoiceId","payment","ni","existingPayment","notInvoicedInvoice","FinanceDisclaimer","Disclaimer","PaymentDisclaimer","paymentFlow","fee","enableScheduledPayments","getStandardDisclaimer","getAutoPayPayLessDisclaimer","getDisclaimerText","PaymentFormErrors","useForm","leftColumnHasErrors","ERROR_TEXT_CLASS","rightColumnHasErrors","setMobileError","hasTabs","useHasTabs","mobileError","amountTestId","totalAmountTestId","PaymentTypeHeader","total","nanToZero","formattedAmount","formatDateInput","dateParts","day","startDate","scheduledPaymentsEndOption","endDate","numberOfPayments","intervalCount","ScheduledPaymentsEndOption","creditCardsToIcons","PayerToken","isSelected","onSelect","onExpandClick","onDeleteClick","onSelectBlur","cardIconName","CardIcon","SavedPayerTokens","payerTokens","selectedValue","setSelectedValue","deletePayerToken","selectedItem","isExpanded","setIsExpanded","toDelete","setToDelete","showConfirm","setShowConfirm","doDelete","changeSelectedValue","pt","PaymentInfo","acceptedPaymentMethods","getValues","watch","isSubmitting","achDisclaimer","payerFees","showSavePaymentOption","recaptchaLoaded","selectedPaymentType","paidAmount","achTotal","creditCardTotal","isACH","payerTokenList","isPaymentDetailsEntered","onPaymentTypeChange","currentSelection","inCurrentList","changePaymentType","paymentType","anyInvoicesFinanced","showCvv","shouldShowAutoPay","PaymentInfoTabs","PaymentForms","Spinner","SpinnerType","IconSize","AutoPayPaylessEnrollmentPage","onShowAutoPayPaylessEnrollmentPage","transactionAttributeValues","payerName","emailAddress","invoicePayerName","selectedTab","setSelectedTab","defaultFormValues","prefillPaymentPage","handleSubmit","onSubmit","hasPaymentInfo","handleValidThrough","transactionAttributes","paymentModel","responseData","url","changeTab","changeTo","FormProvider","FormHeading","ButtonSize","TextField","StandardEmailValidation","getTransactionAttributeDisplayValue","AutoPayPaylessEnrollment","onShowAutoPayPaylessEnrollment","autoPayEnrollmentMessage","MAX_NUMBER_TO_DISPLAY","MobileInvoiceSort","invoiceSort","setInvoiceSort","shouldDisplay","useNoInvoiceColumns","getValueAndSelected","colName","dir","Divider","InvoiceHeaderControls","setFilterText","hideInvoiceButtons","clearAll","confirmPayAll","payAll","unpaidInvoices","FormTextField","InvoiceSummary","pfaIsSigned","anyInvoicesFinancingEligible","totalAmountPayNow","totalAmountFinanced","financingEnabled","PendingIcon","tooltipVisible","setTooltipVisible","AutoPayInfo","showCancelButton","autoPaySubscriptionId","onAutoPayCancel","setSuccessToast","cancelAutoPay","request","InvoicesContainer","showAutoPay","premiumFinanceAgreement","invoicesTouched","setInvoicesTouched","showAll","setShowAll","enableAutoPay","enableAutoPayPaylessEnrollment","sortInvoices","useCallback","setToDefault","realSort","paidInvoiceIds","paidInvoices","addUniqueObjects","array","newObjects","newObject","invoiceData","useMemo","notInvoiced","_c","hasInvoices","invoicesExist","_f","showAutopayPaylessEnrollment","truncatingInvoices","_g","_h","InvoiceStatus","Table","TableBody","TableData","TableRow","BreakdownSection","PremiumBreakdownModal","onClose","hasLineItems","hasTaxes","hasFees","noData","ManagedInvoice","onManagedInvoicePayNow","onManagedInvoiceFinance","pfaResponse","pfa","isSmall","useMediaQuery","isModalOpen","setModalOpen","dueDateField","isPfaSigned","openModal","closeModal","usePayerFees","achPayerFee","setAchPayerFee","creditCardPayerFee","setCreditCardPayerFee","calculatePayerFees","TransactionAttributeToFieldName","CustomFields","fieldName","toolTip","Image","TransactionAttributeType","FinanceAutopay","enableFinancingAutoPay","autoPayTermsModal","setAutoPayTermsModal","isValidPhoneNumber","PremiumFinanceAgreement","base64EncodedPdf","onAgree","onCancel","pdfElement","setPdfElement","downloadPfa","showDocument","base64str","contentType","byte","base64ToArrayBuffer","blob","base64Str","binaryString","binaryLen","bytes","ascii","CheckBox","FinanceDetails","collapsibleState","onCollapsibleStateChange","onContinueToPayment","setPfaResponse","pfaModal","setPfaModal","pfaLoading","setPfaLoading","pfaError","setPfaError","abortController","signedPfa","pfaForm","financePayments","loadPremiumFinanceAgreement","payer","emailaddress","invoiceAttributes","publicErrorMessage","onPfaAgree","pfaInvoice","onPfaCancel","SubTitle","DateInput","placeholder","RecurringPaymentsForm","endOption","isTooFarInFuture","years","futureDate","thirtyDaysAgo","today","submitInvoicePayment","onSuccess","onError","setServerException","submitPayment","reCaptchaResponse","reCaptchaV3Response","useReCaptcha","reCaptchaLoaded","setReCaptchaLoaded","script","action","transitionViewIfSupported","updateCb","flushSync","PaymentPage","initialPageData","setPageData","showSignIn","serverException","setWarningToast","invoicesLoading","setInvoicesLoading","invoicesData","setInvoicesData","showAutoPayPaylessEnrollmentPage","setShowAutoPayPaylessEnrollmentPage","getToken","trigger","clearErrors","touchedFields","isSubmitted","handleCustomFieldChange","isTransactionAttributeClean","paramName","invoiceSearchController","loadInvoiceData","debouncedHandleCustomFieldChange","autoPayCancel","restorePayments","preFillPayments","errorInvoiceModel","parseSearch","setFinancingCollapsible","setPaymentDetailsCollapsible","publicId","tokens","financingCollapsible","paymentDetailsCollapsible","previousFinancedCount","setPreviousFinancedCount","selectedInvoicesForFinancing","savePaymentOption","managedInvoicePaymentMethod","enableFinancing","PageBannerAlert","ErrorModal","PaymentPageRoot","authPageModalCallback","setAuthPageModalCallback","router","useAuthPageRouter","appleMobile","isAppleMobile","hidePaymentPage","ErrorBoundary","ToastProvider","AuthPageRouterContext","AppBar","AuthPageRoute","enableMocking","pageSetup"],"mappings":"orCAA4F,SAASA,GAAE,EAAEC,EAAED,EAAE,CAAC,IAAIE,EAAE,KAAK,EAAEC,EAAAA,OAAE,IAAI,EAAE,EAAEA,EAAC,OAAC,CAAC,EAAEC,EAAED,EAAAA,OAAE,IAAI,EAAEE,EAAEF,EAAC,OAAC,EAAE,EAAEG,EAAEH,SAAG,EAACI,EAAEJ,EAAAA,SAAI,EAAEA,EAA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EACA,UAAW,CACT,UAAW,aACX,YAAa,CACX,QAAS,GACT,WAAY,GACZ,SAAU,EACZ,CACF,EACA,SAAU,CACR,UAAW,aACX,YAAa,CACX,QAAS,GACT,WAAY,GACZ,SAAU,EACZ,CACF,EACA,UAAW,CACT,UAAW,aACX,YAAa,CACX,QAAS,GACT,WAAY,GACZ,SAAU,EACZ,CACF,EACA,QAAS,CACP,UAAW,aACX,YAAa,CACX,QAAS,GACT,WAAY,GACZ,SAAU,EACZ,CACF,EAEA,OAAQ,CACN,UAAW,QACX,YAAa,CACX,QAAS,GACT,WAAY,EACd,CACF,EAEA,YAAa,CACX,UAAW,aACX,YAAa,CACX,QAAS,GACT,WAAY,GACZ,SAAU,EACZ,CACF,EACA,SAAU,CACR,UAAW,aACX,YAAa,CACX,QAAS,GACT,WAAY,GACZ,SAAU,EACZ,CACF,EACA,UAAW,CACT,UAAW,aACX,YAAa,CACX,QAAS,GACT,WAAY,GACZ,SAAU,EACZ,CACF,EACA,WAAY,CACV,UAAW,aACX,YAAa,CACX,QAAS,GACT,WAAY,GACZ,SAAU,EACZ,CACF,EAEA,OAAQ,CACN,UAAW,UACX,YAAa,CACX,QAAS,GACT,WAAY,EACd,CACF,EACA,OAAQ,CACN,UAAW,UACX,YAAa,CACX,QAAS,GACT,WAAY,EACd,CACF,EAEA,MAAO,CACL,UAAW,aACX,YAAa,CACX,QAAS,GACT,WAAY,GACZ,SAAU,EACZ,CACF,EAEA,MAAO,CACL,UAAW,QACX,YAAa,CACX,QAAS,GACT,WAAY,EACd,CACF,EACA,QAAS,CACP,UAAW,QACX,YAAa,CACX,QAAS,GACT,WAAY,EACd,CACF,EACA,eAAgB,CACd,UAAW,QACX,YAAa,CACX,QAAS,GACT,WAAY,EACd,CACF,EACA,eAAgB,CACd,UAAW,QACX,YAAa,CACX,QAAS,GACT,WAAY,EACd,CACF,EACA,QAAS,CACP,UAAW,QACX,YAAa,CACX,QAAS,GACT,WAAY,EACd,CACF,EACA,UAAW,CACT,UAAW,QACX,YAAa,CACX,QAAS,GACT,WAAY,EACd,CACF,EACA,MAAO,CACL,UAAW,QACX,YAAa,CACX,QAAS,GACT,WAAY,EACd,CACF,EACA,WAAY,CACV,UAAW,QACX,YAAa,CACX,QAAS,GACT,WAAY,EACd,CACF,EACA,eAAgB,CACd,UAAW,QACX,YAAa,CACX,QAAS,GACT,WAAY,EACd,CACF,EACA,UAAW,CACT,UAAW,gBACX,YAAa,CACX,QAAS,GACT,WAAY,EACd,CACF,EACA,MAAO,CACL,UAAW,QACX,YAAa,CACX,QAAS,GACT,WAAY,EACd,CACF,EACA,KAAM,CACJ,UAAW,QACX,YAAa,CACX,QAAS,GACT,WAAY,EACd,CACF,EACA,QAAS,CACP,UAAW,QACX,YAAa,CACX,QAAS,GACT,WAAY,EACd,CACF,EACA,SAAU,CACR,UAAW,gBACX,YAAa,CACX,QAAS,GACT,WAAY,EACd,CACF,EACA,WAAY,CACV,UAAW,QACX,YAAa,CACX,QAAS,GACT,WAAY,EACd,CACF,EACA,OAAQ,CACN,UAAW,QACX,YAAa,CACX,QAAS,GACT,WAAY,EACd,CACF,EACA,QAAS,CACP,UAAW,QACX,YAAa,CACX,QAAS,GACT,WAAY,EACd,CACF,EACA,QAAS,CACP,UAAW,QACX,YAAa,CACX,QAAS,GACT,WAAY,EACd,CACF,EACA,QAAS,CACP,UAAW,QACX,YAAa,CACX,QAAS,GACT,WAAY,EACd,CACF,EACA,WAAY,CACV,UAAW,QACX,YAAa,CACX,QAAS,GACT,WAAY,EACd,CACF,EACA,aAAc,CACZ,UAAW,QACX,YAAa,CACX,QAAS,GACT,WAAY,EACd,CACF,EACA,QAAS,CACP,UAAW,QACX,YAAa,CACX,QAAS,GACT,WAAY,EACd,CACF,EAEA,KAAM,CAKJ,UAAW,QACX,YAAa,CACX,QAAS,GACT,WAAY,EACd,CACF,EACA,MAAO,CACL,UAAW,QACX,YAAa,CACX,QAAS,GACT,WAAY,EACd,CACF,EAEA,eAAgB,CACd,UAAW,iBACX,YAAa,CACX,QAAS,GACT,WAAY,EACd,CACF,EACA,aAAc,CACZ,UAAW,iBACX,YAAa,CACX,QAAS,GACT,WAAY,EACd,CACF,EACA,mBAAoB,CAClB,UAAW,iBACX,YAAa,CACX,QAAS,GACT,WAAY,EACd,CACF,EAEA,iBAAkB,CAChB,UAAW,kBACX,YAAa,CACX,QAAS,GACT,WAAY,EACd,CACF,EACA,cAAe,CACb,UAAW,kBACX,YAAa,CACX,QAAS,GACT,WAAY,EACd,CACF,EACA,cAAe,CACb,UAAW,kBACX,YAAa,CACX,QAAS,GACT,WAAY,EACd,CACF,EACA,gBAAiB,CACf,UAAW,kBACX,YAAa,CACX,QAAS,GACT,WAAY,EACd,CACF,EAEA,YAAa,CACX,UAAW,eACX,YAAa,CACX,QAAS,GACT,WAAY,GACZ,SAAU,EACZ,CACF,EACA,aAAc,CACZ,UAAW,eACX,YAAa,CACX,QAAS,GACT,WAAY,EACd,CACF,EACA,YAAa,CACX,UAAW,eACX,YAAa,CACX,QAAS,GACT,WAAY,GACZ,SAAU,EACZ,CACF,EACA,YAAa,CACX,UAAW,eACX,YAAa,CACX,QAAS,GACT,WAAY,GACZ,SAAU,EACZ,CACF,EACA,UAAW,CACT,UAAW,eACX,YAAa,CACX,QAAS,GACT,WAAY,GACZ,SAAU,EACZ,CACF,EACA,cAAe,CACb,UAAW,eACX,YAAa,CACX,QAAS,GACT,WAAY,GACZ,SAAU,EACZ,CACF,EACA,WAAY,CACV,UAAW,eACX,YAAa,CACX,QAAS,GACT,WAAY,GACZ,SAAU,EACZ,CACF,EACA,aAAc,CACZ,UAAW,eACX,YAAa,CACX,QAAS,GACT,WAAY,EACd,CACF,EACA,kBAAmB,CACjB,UAAW,eACX,YAAa,CACX,QAAS,GACT,WAAY,GACZ,SAAU,EACZ,CACF,EACA,mBAAoB,CAClB,UAAW,eACX,YAAa,CACX,QAAS,GACT,WAAY,GACZ,SAAU,EACZ,CACF,EAEA,SAAU,CACR,UAAW,gBACX,YAAa,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SAAA3S,EACA,YAAA6S,EACA,gBAAAD,EACA,WAAax1E,GAAa,CACjBo4E,EAAA,SAASS,GAAc,MAAM,EACpCV,EAAyB,IAAMn4E,CAAQ,CACzC,CAAA,CAAA,EAGN,CAAA,CACF,CAAA,CACF,CAAA,CAEJ,EC1DA,eAAe84E,IAAgB,CAuB/B,CAEAA,GAAc,EAAE,KAAK,IAAM,CACzB,KAAM,CAAE,KAAAhjF,EAAM,SAAA8sE,CAAS,EAAImW,GAA4B,EAEvDjjF,EAAK,OAAQnb,MAAAs9F,GAAgB,CAAA,gBAAiBrV,CAAU,CAAA,CAAE,CAC5D,CAAC","x_google_ignoreList":[0,22,23,24,25,26,27,28,29,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,273]}