From 4b932a4e78ee3a49d9db269429b13e59413b7026 Mon Sep 17 00:00:00 2001 From: Aaron Kable Date: Thu, 11 Jul 2024 19:31:01 +0800 Subject: [PATCH] node 20 on pub --- .github/workflows/publish.yml | 2 +- .../bs5/assets/index-CEhfgJZu.js.map | 2 +- .../{@libs-5gesxeNa.js => @libs-C96G7N1Z.js} | 50 +++++++++---------- ...-5gesxeNa.js.map => @libs-C96G7N1Z.js.map} | 2 +- .../char/assets/@tanstack-CKXw38Nu.js | 4 +- .../char/assets/@tanstack-CKXw38Nu.js.map | 2 +- .../{index-KauNpZ7M.js => index-BiVBOfzJ.js} | 4 +- ...-KauNpZ7M.js.map => index-BiVBOfzJ.js.map} | 2 +- corptools/static/corptools/char/manifest.json | 16 +++--- .../char/build/static/.vite/manifest.json | 16 +++--- .../{@libs-5gesxeNa.js => @libs-C96G7N1Z.js} | 50 +++++++++---------- ...-5gesxeNa.js.map => @libs-C96G7N1Z.js.map} | 2 +- .../build/static/assets/@tanstack-CKXw38Nu.js | 4 +- .../static/assets/@tanstack-CKXw38Nu.js.map | 2 +- .../{index-KauNpZ7M.js => index-BiVBOfzJ.js} | 4 +- ...-KauNpZ7M.js.map => index-BiVBOfzJ.js.map} | 2 +- frontend/char/build/static/index.html | 6 +-- .../build/static/assets/index-CEhfgJZu.js.map | 2 +- 18 files changed, 86 insertions(+), 86 deletions(-) rename corptools/static/corptools/char/assets/{@libs-5gesxeNa.js => @libs-C96G7N1Z.js} (50%) rename corptools/static/corptools/char/assets/{@libs-5gesxeNa.js.map => @libs-C96G7N1Z.js.map} (70%) rename frontend/char/build/static/assets/@tanstack-CigJseIo.js => corptools/static/corptools/char/assets/@tanstack-CKXw38Nu.js (99%) rename frontend/char/build/static/assets/@tanstack-CigJseIo.js.map => corptools/static/corptools/char/assets/@tanstack-CKXw38Nu.js.map (99%) rename corptools/static/corptools/char/assets/{index-KauNpZ7M.js => index-BiVBOfzJ.js} (99%) rename corptools/static/corptools/char/assets/{index-KauNpZ7M.js.map => index-BiVBOfzJ.js.map} (99%) rename frontend/char/build/static/assets/{@libs-5gesxeNa.js => @libs-C96G7N1Z.js} (50%) rename frontend/char/build/static/assets/{@libs-5gesxeNa.js.map => @libs-C96G7N1Z.js.map} (70%) rename corptools/static/corptools/char/assets/@tanstack-CigJseIo.js => frontend/char/build/static/assets/@tanstack-CKXw38Nu.js (99%) rename corptools/static/corptools/char/assets/@tanstack-CigJseIo.js.map => frontend/char/build/static/assets/@tanstack-CKXw38Nu.js.map (99%) rename frontend/char/build/static/assets/{index-KauNpZ7M.js => index-BiVBOfzJ.js} (99%) rename frontend/char/build/static/assets/{index-KauNpZ7M.js.map => index-BiVBOfzJ.js.map} (99%) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 73e379cb..9a8dcf6d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: "16" + node-version: "20" - run: npm install -g yarn diff --git a/corptools/static/corptools/bs5/assets/index-CEhfgJZu.js.map b/corptools/static/corptools/bs5/assets/index-CEhfgJZu.js.map index 7fff83f2..57cc495f 100644 --- a/corptools/static/corptools/bs5/assets/index-CEhfgJZu.js.map +++ b/corptools/static/corptools/bs5/assets/index-CEhfgJZu.js.map @@ -1 +1 @@ -{"version":3,"file":"index-CEhfgJZu.js","sources":["../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/react/jsx-runtime.js","../../../node_modules/axios/lib/helpers/bind.js","../../../node_modules/axios/lib/utils.js","../../../node_modules/axios/lib/core/AxiosError.js","../../../node_modules/axios/lib/helpers/null.js","../../../node_modules/axios/lib/helpers/toFormData.js","../../../node_modules/axios/lib/helpers/AxiosURLSearchParams.js","../../../node_modules/axios/lib/helpers/buildURL.js","../../../node_modules/axios/lib/core/InterceptorManager.js","../../../node_modules/axios/lib/defaults/transitional.js","../../../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js","../../../node_modules/axios/lib/platform/browser/classes/FormData.js","../../../node_modules/axios/lib/platform/browser/classes/Blob.js","../../../node_modules/axios/lib/platform/browser/index.js","../../../node_modules/axios/lib/platform/common/utils.js","../../../node_modules/axios/lib/platform/index.js","../../../node_modules/axios/lib/helpers/toURLEncodedForm.js","../../../node_modules/axios/lib/helpers/formDataToJSON.js","../../../node_modules/axios/lib/defaults/index.js","../../../node_modules/axios/lib/helpers/parseHeaders.js","../../../node_modules/axios/lib/core/AxiosHeaders.js","../../../node_modules/axios/lib/core/transformData.js","../../../node_modules/axios/lib/cancel/isCancel.js","../../../node_modules/axios/lib/cancel/CanceledError.js","../../../node_modules/axios/lib/core/settle.js","../../../node_modules/axios/lib/helpers/cookies.js","../../../node_modules/axios/lib/helpers/isAbsoluteURL.js","../../../node_modules/axios/lib/helpers/combineURLs.js","../../../node_modules/axios/lib/core/buildFullPath.js","../../../node_modules/axios/lib/helpers/isURLSameOrigin.js","../../../node_modules/axios/lib/helpers/parseProtocol.js","../../../node_modules/axios/lib/helpers/speedometer.js","../../../node_modules/axios/lib/adapters/xhr.js","../../../node_modules/axios/lib/adapters/adapters.js","../../../node_modules/axios/lib/core/dispatchRequest.js","../../../node_modules/axios/lib/core/mergeConfig.js","../../../node_modules/axios/lib/env/data.js","../../../node_modules/axios/lib/helpers/validator.js","../../../node_modules/axios/lib/core/Axios.js","../../../node_modules/axios/lib/cancel/CancelToken.js","../../../node_modules/axios/lib/helpers/spread.js","../../../node_modules/axios/lib/helpers/isAxiosError.js","../../../node_modules/axios/lib/helpers/HttpStatusCode.js","../../../node_modules/axios/lib/axios.js","../../../node_modules/js-cookie/dist/js.cookie.mjs","../../../src/api/character.tsx","../../../src/Components/Character/CharacterAssetLocationSelect.tsx","../../../src/Components/Tables/BaseTable/BaseTableStyles.tsx","../../../node_modules/classnames/index.js","../../../node_modules/invariant/browser.js","../../../node_modules/uncontrollable/lib/esm/utils.js","../../../node_modules/uncontrollable/lib/esm/hook.js","../../../node_modules/react-bootstrap/esm/ThemeProvider.js","../../../node_modules/react-bootstrap/node_modules/dom-helpers/esm/ownerDocument.js","../../../node_modules/react-bootstrap/node_modules/dom-helpers/esm/ownerWindow.js","../../../node_modules/react-bootstrap/node_modules/dom-helpers/esm/getComputedStyle.js","../../../node_modules/react-bootstrap/node_modules/dom-helpers/esm/hyphenate.js","../../../node_modules/react-bootstrap/node_modules/dom-helpers/esm/hyphenateStyle.js","../../../node_modules/react-bootstrap/node_modules/dom-helpers/esm/isTransform.js","../../../node_modules/react-bootstrap/node_modules/dom-helpers/esm/css.js","../../../node_modules/react-bootstrap/node_modules/react-transition-group/esm/config.js","../../../node_modules/react-bootstrap/node_modules/react-transition-group/esm/TransitionGroupContext.js","../../../node_modules/react-bootstrap/node_modules/react-transition-group/esm/utils/reflow.js","../../../node_modules/react-bootstrap/node_modules/react-transition-group/esm/Transition.js","../../../node_modules/react-bootstrap/node_modules/dom-helpers/esm/canUseDOM.js","../../../node_modules/react-bootstrap/node_modules/dom-helpers/esm/addEventListener.js","../../../node_modules/react-bootstrap/node_modules/dom-helpers/esm/removeEventListener.js","../../../node_modules/react-bootstrap/node_modules/dom-helpers/esm/listen.js","../../../node_modules/react-bootstrap/node_modules/dom-helpers/esm/triggerEvent.js","../../../node_modules/react-bootstrap/node_modules/dom-helpers/esm/transitionEnd.js","../../../node_modules/react-bootstrap/esm/transitionEndListener.js","../../../node_modules/react-bootstrap/esm/createChainedFunction.js","../../../node_modules/react-bootstrap/esm/triggerBrowserReflow.js","../../../node_modules/@restart/hooks/esm/useMergedRefs.js","../../../node_modules/react-bootstrap/esm/safeFindDOMNode.js","../../../node_modules/react-bootstrap/esm/TransitionWrapper.js","../../../node_modules/react-bootstrap/esm/Collapse.js","../../../node_modules/@restart/hooks/esm/useCommittedRef.js","../../../node_modules/@restart/hooks/esm/useEventCallback.js","../../../node_modules/react-bootstrap/esm/divWithClassName.js","../../../node_modules/@restart/hooks/esm/useCallbackRef.js","../../../node_modules/@restart/hooks/esm/useEventListener.js","../../../node_modules/@restart/hooks/esm/useMounted.js","../../../node_modules/@restart/hooks/esm/usePrevious.js","../../../node_modules/@restart/hooks/esm/useIsomorphicEffect.js","../../../node_modules/@restart/ui/esm/Button.js","../../../node_modules/@restart/ui/esm/Anchor.js","../../../node_modules/react-bootstrap/esm/Fade.js","../../../node_modules/react-bootstrap/esm/Badge.js","../../../node_modules/react-bootstrap/esm/Button.js","../../../node_modules/react-bootstrap/esm/ButtonGroup.js","../../../node_modules/react-bootstrap/esm/ButtonToolbar.js","../../../node_modules/react-bootstrap/esm/CardBody.js","../../../node_modules/react-bootstrap/esm/CardFooter.js","../../../node_modules/react-bootstrap/esm/CardHeaderContext.js","../../../node_modules/react-bootstrap/esm/CardHeader.js","../../../node_modules/react-bootstrap/esm/CardImg.js","../../../node_modules/react-bootstrap/esm/CardImgOverlay.js","../../../node_modules/react-bootstrap/esm/CardLink.js","../../../node_modules/react-bootstrap/esm/CardSubtitle.js","../../../node_modules/react-bootstrap/esm/CardText.js","../../../node_modules/react-bootstrap/esm/CardTitle.js","../../../node_modules/react-bootstrap/esm/Card.js","../../../node_modules/@restart/hooks/esm/useUpdatedRef.js","../../../node_modules/@restart/hooks/esm/useWillUnmount.js","../../../node_modules/@restart/hooks/esm/useTimeout.js","../../../node_modules/react-bootstrap/esm/ElementChildren.js","../../../node_modules/react-bootstrap/esm/Col.js","../../../node_modules/@restart/ui/node_modules/dom-helpers/esm/querySelectorAll.js","../../../node_modules/@restart/ui/node_modules/dom-helpers/esm/canUseDOM.js","../../../node_modules/@restart/ui/node_modules/dom-helpers/esm/addEventListener.js","../../../node_modules/@restart/ui/node_modules/uncontrollable/lib/esm/index.js","../../../node_modules/@restart/hooks/esm/useForceUpdate.js","../../../node_modules/@restart/ui/esm/DropdownContext.js","../../../node_modules/dequal/dist/index.mjs","../../../node_modules/@restart/hooks/esm/useSafeState.js","../../../node_modules/@popperjs/core/lib/enums.js","../../../node_modules/@popperjs/core/lib/utils/getBasePlacement.js","../../../node_modules/@popperjs/core/lib/dom-utils/getWindow.js","../../../node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","../../../node_modules/@popperjs/core/lib/utils/math.js","../../../node_modules/@popperjs/core/lib/utils/userAgent.js","../../../node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js","../../../node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js","../../../node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js","../../../node_modules/@popperjs/core/lib/dom-utils/contains.js","../../../node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","../../../node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js","../../../node_modules/@popperjs/core/lib/dom-utils/isTableElement.js","../../../node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js","../../../node_modules/@popperjs/core/lib/dom-utils/getParentNode.js","../../../node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js","../../../node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js","../../../node_modules/@popperjs/core/lib/utils/within.js","../../../node_modules/@popperjs/core/lib/utils/getFreshSideObject.js","../../../node_modules/@popperjs/core/lib/utils/mergePaddingObject.js","../../../node_modules/@popperjs/core/lib/utils/expandToHashMap.js","../../../node_modules/@popperjs/core/lib/modifiers/arrow.js","../../../node_modules/@popperjs/core/lib/utils/getVariation.js","../../../node_modules/@popperjs/core/lib/modifiers/computeStyles.js","../../../node_modules/@popperjs/core/lib/modifiers/eventListeners.js","../../../node_modules/@popperjs/core/lib/utils/getOppositePlacement.js","../../../node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js","../../../node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js","../../../node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js","../../../node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js","../../../node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js","../../../node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js","../../../node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js","../../../node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js","../../../node_modules/@popperjs/core/lib/utils/rectToClientRect.js","../../../node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js","../../../node_modules/@popperjs/core/lib/utils/computeOffsets.js","../../../node_modules/@popperjs/core/lib/utils/detectOverflow.js","../../../node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js","../../../node_modules/@popperjs/core/lib/modifiers/flip.js","../../../node_modules/@popperjs/core/lib/modifiers/hide.js","../../../node_modules/@popperjs/core/lib/modifiers/offset.js","../../../node_modules/@popperjs/core/lib/modifiers/popperOffsets.js","../../../node_modules/@popperjs/core/lib/utils/getAltAxis.js","../../../node_modules/@popperjs/core/lib/modifiers/preventOverflow.js","../../../node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js","../../../node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js","../../../node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js","../../../node_modules/@popperjs/core/lib/utils/orderModifiers.js","../../../node_modules/@popperjs/core/lib/utils/debounce.js","../../../node_modules/@popperjs/core/lib/utils/mergeByName.js","../../../node_modules/@popperjs/core/lib/createPopper.js","../../../node_modules/@restart/ui/esm/popper.js","../../../node_modules/@restart/ui/esm/usePopper.js","../../../node_modules/@restart/ui/node_modules/dom-helpers/esm/contains.js","../../../node_modules/@restart/ui/node_modules/dom-helpers/esm/removeEventListener.js","../../../node_modules/@restart/ui/node_modules/dom-helpers/esm/listen.js","../../../node_modules/@restart/ui/node_modules/dom-helpers/esm/ownerDocument.js","../../../node_modules/@restart/ui/node_modules/warning/warning.js","../../../node_modules/@restart/ui/esm/useClickOutside.js","../../../node_modules/@restart/ui/esm/mergeOptionsWithPopperConfig.js","../../../node_modules/@restart/ui/esm/DropdownMenu.js","../../../node_modules/@react-aria/ssr/dist/import.mjs","../../../node_modules/@restart/ui/esm/DropdownToggle.js","../../../node_modules/@restart/ui/esm/SelectableContext.js","../../../node_modules/@restart/ui/esm/NavContext.js","../../../node_modules/@restart/ui/esm/DataKey.js","../../../node_modules/@restart/ui/esm/DropdownItem.js","../../../node_modules/@restart/ui/esm/useWindow.js","../../../node_modules/@restart/ui/esm/Dropdown.js","../../../node_modules/react-bootstrap/esm/DropdownContext.js","../../../node_modules/react-bootstrap/esm/DropdownDivider.js","../../../node_modules/react-bootstrap/esm/DropdownHeader.js","../../../node_modules/react-bootstrap/esm/DropdownItem.js","../../../node_modules/react-bootstrap/esm/DropdownItemText.js","../../../node_modules/react-bootstrap/esm/InputGroupContext.js","../../../node_modules/react-bootstrap/esm/NavbarContext.js","../../../node_modules/react-bootstrap/esm/useWrappedRefWithWarning.js","../../../node_modules/react-bootstrap/esm/types.js","../../../node_modules/react-bootstrap/esm/DropdownMenu.js","../../../node_modules/react-bootstrap/esm/DropdownToggle.js","../../../node_modules/react-bootstrap/esm/Dropdown.js","../../../node_modules/react-bootstrap/esm/Image.js","../../../node_modules/react-bootstrap/esm/FigureImage.js","../../../node_modules/react-bootstrap/esm/FigureCaption.js","../../../node_modules/react-bootstrap/esm/Figure.js","../../../node_modules/react-bootstrap/esm/Feedback.js","../../../node_modules/react-bootstrap/esm/FormContext.js","../../../node_modules/react-bootstrap/esm/FormCheckInput.js","../../../node_modules/react-bootstrap/esm/FormCheckLabel.js","../../../node_modules/react-bootstrap/esm/FormCheck.js","../../../node_modules/react-bootstrap/esm/FormControl.js","../../../node_modules/react-bootstrap/esm/FormFloating.js","../../../node_modules/react-bootstrap/esm/FormGroup.js","../../../node_modules/react-bootstrap/esm/FormLabel.js","../../../node_modules/react-bootstrap/esm/FormRange.js","../../../node_modules/react-bootstrap/esm/FormSelect.js","../../../node_modules/react-bootstrap/esm/FormText.js","../../../node_modules/react-bootstrap/esm/Switch.js","../../../node_modules/react-bootstrap/esm/FloatingLabel.js","../../../node_modules/react-bootstrap/esm/Form.js","../../../node_modules/@restart/ui/esm/TabContext.js","../../../node_modules/@restart/ui/esm/NavItem.js","../../../node_modules/@restart/ui/esm/Nav.js","../../../node_modules/@restart/ui/esm/useWaitForDOMRef.js","../../../node_modules/@restart/ui/esm/NoopTransition.js","../../../node_modules/@restart/ui/esm/ImperativeTransition.js","../../../node_modules/@restart/ui/esm/utils.js","../../../node_modules/react-bootstrap/node_modules/dom-helpers/esm/hasClass.js","../../../node_modules/prop-types-extra/lib/utils/createChainableTypeChecker.js","../../../node_modules/prop-types-extra/lib/all.js","../../../node_modules/react-bootstrap/esm/NavItem.js","../../../node_modules/react-bootstrap/esm/NavLink.js","../../../node_modules/react-bootstrap/esm/Nav.js","../../../node_modules/react-bootstrap/esm/NavDropdown.js","../../../node_modules/@restart/ui/esm/useRootClose.js","../../../node_modules/@restart/ui/esm/Overlay.js","../../../node_modules/react-bootstrap/esm/PopoverHeader.js","../../../node_modules/react-bootstrap/esm/PopoverBody.js","../../../node_modules/react-bootstrap/esm/helpers.js","../../../node_modules/react-bootstrap/esm/getInitialPopperStyles.js","../../../node_modules/react-bootstrap/esm/Popover.js","../../../node_modules/react-bootstrap/esm/Tooltip.js","../../../node_modules/react-bootstrap/esm/useOverlayOffset.js","../../../node_modules/react-bootstrap/esm/Overlay.js","../../../node_modules/react-bootstrap/node_modules/dom-helpers/esm/contains.js","../../../node_modules/react-bootstrap/esm/OverlayTrigger.js","../../../node_modules/react-bootstrap/esm/Row.js","../../../node_modules/react-bootstrap/esm/Spinner.js","../../../node_modules/react-bootstrap/esm/SplitButton.js","../../../node_modules/react-bootstrap/esm/Table.js","../../../src/Components/Tables/BaseTable/BaseTableFilter.tsx","../../../node_modules/@tanstack/table-core/build/lib/index.mjs","../../../node_modules/@tanstack/react-table/build/lib/index.mjs","../../../node_modules/csv-stringify/dist/esm/sync.js","../../../src/Components/Tables/BaseTable/BaseTable.tsx","../../../src/Components/Character/CharacterAssetsTable.tsx","../../../src/Pages/Char/CharacterAssetsList.tsx","../../../src/Components/RefreshAccountButton.tsx","../../../node_modules/core-js/library/modules/_global.js","../../../node_modules/core-js/library/modules/_core.js","../../../node_modules/core-js/library/modules/_a-function.js","../../../node_modules/core-js/library/modules/_ctx.js","../../../node_modules/core-js/library/modules/_is-object.js","../../../node_modules/core-js/library/modules/_an-object.js","../../../node_modules/core-js/library/modules/_fails.js","../../../node_modules/core-js/library/modules/_descriptors.js","../../../node_modules/core-js/library/modules/_dom-create.js","../../../node_modules/core-js/library/modules/_ie8-dom-define.js","../../../node_modules/core-js/library/modules/_to-primitive.js","../../../node_modules/core-js/library/modules/_object-dp.js","../../../node_modules/core-js/library/modules/_property-desc.js","../../../node_modules/core-js/library/modules/_hide.js","../../../node_modules/core-js/library/modules/_has.js","../../../node_modules/core-js/library/modules/_export.js","../../../node_modules/core-js/library/modules/_cof.js","../../../node_modules/core-js/library/modules/_iobject.js","../../../node_modules/core-js/library/modules/_defined.js","../../../node_modules/core-js/library/modules/_to-iobject.js","../../../node_modules/core-js/library/modules/_to-integer.js","../../../node_modules/core-js/library/modules/_to-length.js","../../../node_modules/core-js/library/modules/_to-absolute-index.js","../../../node_modules/core-js/library/modules/_array-includes.js","../../../node_modules/core-js/library/modules/_shared.js","../../../node_modules/core-js/library/modules/_uid.js","../../../node_modules/core-js/library/modules/_shared-key.js","../../../node_modules/core-js/library/modules/_object-keys-internal.js","../../../node_modules/core-js/library/modules/_enum-bug-keys.js","../../../node_modules/core-js/library/modules/_object-keys.js","../../../node_modules/core-js/library/modules/_object-gops.js","../../../node_modules/core-js/library/modules/_object-pie.js","../../../node_modules/core-js/library/modules/_to-object.js","../../../node_modules/core-js/library/modules/_object-assign.js","../../../node_modules/core-js/library/modules/es6.object.assign.js","../../../node_modules/core-js/library/fn/object/assign.js","../../../node_modules/@babel/runtime-corejs2/helpers/esm/extends.js","../../../node_modules/core-js/library/modules/_object-dps.js","../../../node_modules/core-js/library/modules/_html.js","../../../node_modules/core-js/library/modules/_object-create.js","../../../node_modules/core-js/library/modules/es6.object.create.js","../../../node_modules/core-js/library/fn/object/create.js","../../../node_modules/core-js/library/modules/_object-gopd.js","../../../node_modules/core-js/library/modules/_set-proto.js","../../../node_modules/core-js/library/modules/es6.object.set-prototype-of.js","../../../node_modules/core-js/library/fn/object/set-prototype-of.js","../../../node_modules/@babel/runtime-corejs2/helpers/esm/setPrototypeOf.js","../../../node_modules/@babel/runtime-corejs2/helpers/esm/inheritsLoose.js","../../../node_modules/@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose.js","../../../node_modules/core-js/library/modules/_object-to-array.js","../../../node_modules/core-js/library/modules/es7.object.entries.js","../../../node_modules/core-js/library/fn/object/entries.js","../../../node_modules/@babel/runtime-corejs2/core-js/object/entries.js","../../../node_modules/@pvyparts/allianceauth-components/node_modules/react-bootstrap/es/utils/bootstrapUtils.js","../../../node_modules/@pvyparts/allianceauth-components/node_modules/react-bootstrap/es/Image.js","../../../node_modules/@pvyparts/allianceauth-components/dist/index.js","../../../src/Components/Character/CharacterHeader.tsx","../../../src/Components/CharacterMenu/CharMenu.tsx","../../../src/Components/CharacterMenu/CharacterMenuAsync.tsx","../../../src/Components/CharacterMenu/CharacterMenuRight.tsx","../../../src/Pages/Char/CharacterAudit.tsx","../../../src/Components/Cards/IconStatusCard.tsx","../../../src/assets/isk_128.png","../../../src/assets/omega_128.png","../../../src/assets/skillInjector_64.png","../../../src/assets/unknown_64.png","../../../src/Pages/Glance/Account.tsx","../../../src/api/corporation.tsx","../../../src/assets/asteroid_64.png","../../../src/assets/gas_64.png","../../../src/assets/ice_64.png","../../../src/assets/incursion_2_64.png","../../../src/assets/industry_128.png","../../../src/assets/market_128.png","../../../src/assets/missions_2_128.png","../../../src/assets/moonAsteroid_JackpotR32.png","../../../src/assets/npcbattleship_32.png","../../../src/assets/planet_128.png","../../../src/assets/triglavian_128.png","../../../src/Pages/Glance/Activities.tsx","../../../src/assets/battleCruiser_32.png","../../../src/assets/battleship_32.png","../../../src/assets/carrier_32.png","../../../src/assets/cruiser_32.png","../../../src/assets/destroyer_32.png","../../../src/assets/dreadnought_32.png","../../../src/assets/extractor_64.png","../../../src/assets/forceAuxiliary_32.png","../../../src/assets/freighter_32.png","../../../src/assets/frigate_32.png","../../../src/assets/industrialCommand_32.png","../../../src/assets/industrial_32.png","../../../src/assets/miningBarge_32.png","../../../src/assets/superCarrier_32.png","../../../src/assets/titan_32.png","../../../src/Pages/Glance/Assets.tsx","../../../src/assets/amarr_128.png","../../../src/assets/caldari_128.png","../../../src/assets/fw_64.png","../../../src/assets/gallente_128.png","../../../src/assets/minmatar128.png","../../../src/Pages/Glance/Factions.tsx","../../../src/Pages/Char/CharacterAtAGlance.tsx","../../../src/Pages/Char/CharacterOverview.tsx","../../../src/Components/EveImages/EveImages.tsx","../../../src/Components/Cards/PortraitCard.tsx","../../../src/Components/Character/CharacterPubDataPanels.tsx","../../../src/Pages/Char/CharacterPubData.tsx","../../../src/Components/Helpers/CollapseBlock.tsx","../../../node_modules/react-timeago/es6/dateParser.js","../../../node_modules/react-timeago/es6/defaultFormatter.js","../../../node_modules/react-timeago/es6/index.js","../../../src/Components/Character/CharacterStatusPanels.tsx","../../../src/Components/Character/CharacterStatusTable.tsx","../../../src/Pages/Char/CharacterStatus.tsx","../../../src/Pages/Glance/Corporation.tsx","../../../src/Pages/Corp/AtAGlance.tsx","../../../src/Components/CorporationMenu/CorpMenu.tsx","../../../src/Components/CorporationMenu/CorpMenuPortal.tsx","../../../src/Components/CorporationMenu/CorpAddToken.tsx","../../../src/Components/CorporationMenu/CorpMenuRight.tsx","../../../src/Pages/Corp/Audit.tsx","../../../node_modules/react-time-ago/modules/Time.js","../../../node_modules/react-time-ago/modules/helpers/locale.js","../../../node_modules/react-time-ago/modules/helpers/cache.js","../../../node_modules/react-time-ago/modules/helpers/getVerboseDateFormatter.js","../../../node_modules/react-time-ago/modules/helpers/date.js","../../../node_modules/react-time-ago/modules/helpers/getTimeAgo.js","../../../node_modules/performance-now/lib/performance-now.js","../../../node_modules/raf/index.js","../../../node_modules/react-time-ago/modules/helpers/binarySearch.js","../../../node_modules/react-time-ago/modules/Updater.js","../../../node_modules/react-time-ago/modules/useTimeAgo.js","../../../node_modules/react-time-ago/modules/PropTypes.js","../../../node_modules/react-time-ago/modules/ReactTimeAgo.js","../../../src/Components/Helpers/TimeTill.tsx","../../../src/Components/Corporation/Structures.tsx","../../../src/Pages/Corp/Structures.tsx","../../../src/App.tsx","../../../node_modules/react-dom/client.js","../../../src/main.tsx"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.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 f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","'use strict';\n\nexport default function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n","'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n}\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n }\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n}\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n}\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n}\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n}\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n}\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n}\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n}\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n}\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n }\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n}\n\nconst noop = () => {}\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n}\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz'\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n}\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0]\n }\n\n return str;\n}\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n }\n\n return visit(obj, 0);\n}\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nexport default {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype);\n\n utils.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\nexport default AxiosError;\n","// eslint-disable-next-line strict\nexport default null;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (PlatformFormData || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result = !(utils.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n","'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode);\n } : encode;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\nexport default AxiosURLSearchParams;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js';\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nexport default InterceptorManager;\n","'use strict';\n\nexport default {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n","'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n","'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n","'use strict'\n\nexport default typeof Blob !== 'undefined' ? Blob : null\n","import URLSearchParams from './classes/URLSearchParams.js'\nimport FormData from './classes/FormData.js'\nimport Blob from './classes/Blob.js'\n\nexport default {\n isBrowser: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n","const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nexport {\n hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv\n}\n","import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n ...utils,\n ...platform\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nexport default defaults;\n","'use strict';\n\nimport utils from './../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite)\n } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n","'use strict';\n\nimport utils from './../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n","'use strict';\n\nexport default function isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\nexport default CanceledError;\n","'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n","import utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils.isString(path) && cookie.push('path=' + path);\n\n utils.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n","'use strict';\n\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n","'use strict';\n\nimport utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n","'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n","'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nexport default speedometer;\n","'use strict';\n\nimport utils from './../utils.js';\nimport settle from './../core/settle.js';\nimport cookies from './../helpers/cookies.js';\nimport buildURL from './../helpers/buildURL.js';\nimport buildFullPath from '../core/buildFullPath.js';\nimport isURLSameOrigin from './../helpers/isURLSameOrigin.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport speedometer from '../helpers/speedometer.js';\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n}\n","import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport AxiosError from \"../core/AxiosError.js\";\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n}\n\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;\n\nexport default {\n getAdapter: (adapters) => {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n}\n","'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from \"../adapters/adapters.js\";\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from \"./AxiosHeaders.js\";\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders ? thing.toJSON() : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({caseless}, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n","export const VERSION = \"1.6.7\";","'use strict';\n\nimport {VERSION} from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nexport default {\n assertOptions,\n validators\n};\n","'use strict';\n\nimport utils from './../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy;\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n }\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nexport default Axios;\n","'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nexport default CancelToken;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n}\n","const HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nexport default HttpStatusCode;\n","'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport {VERSION} from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from \"./core/AxiosHeaders.js\";\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios(defaultConfig);\n const instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios\n","/*! js-cookie v3.0.5 | MIT */\n/* eslint-disable no-var */\nfunction assign (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n target[key] = source[key];\n }\n }\n return target\n}\n/* eslint-enable no-var */\n\n/* eslint-disable no-var */\nvar defaultConverter = {\n read: function (value) {\n if (value[0] === '\"') {\n value = value.slice(1, -1);\n }\n return value.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent)\n },\n write: function (value) {\n return encodeURIComponent(value).replace(\n /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,\n decodeURIComponent\n )\n }\n};\n/* eslint-enable no-var */\n\n/* eslint-disable no-var */\n\nfunction init (converter, defaultAttributes) {\n function set (name, value, attributes) {\n if (typeof document === 'undefined') {\n return\n }\n\n attributes = assign({}, defaultAttributes, attributes);\n\n if (typeof attributes.expires === 'number') {\n attributes.expires = new Date(Date.now() + attributes.expires * 864e5);\n }\n if (attributes.expires) {\n attributes.expires = attributes.expires.toUTCString();\n }\n\n name = encodeURIComponent(name)\n .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)\n .replace(/[()]/g, escape);\n\n var stringifiedAttributes = '';\n for (var attributeName in attributes) {\n if (!attributes[attributeName]) {\n continue\n }\n\n stringifiedAttributes += '; ' + attributeName;\n\n if (attributes[attributeName] === true) {\n continue\n }\n\n // Considers RFC 6265 section 5.2:\n // ...\n // 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n // character:\n // Consume the characters of the unparsed-attributes up to,\n // not including, the first %x3B (\";\") character.\n // ...\n stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n }\n\n return (document.cookie =\n name + '=' + converter.write(value, name) + stringifiedAttributes)\n }\n\n function get (name) {\n if (typeof document === 'undefined' || (arguments.length && !name)) {\n return\n }\n\n // To prevent the for loop in the first place assign an empty array\n // in case there are no cookies at all.\n var cookies = document.cookie ? document.cookie.split('; ') : [];\n var jar = {};\n for (var i = 0; i < cookies.length; i++) {\n var parts = cookies[i].split('=');\n var value = parts.slice(1).join('=');\n\n try {\n var found = decodeURIComponent(parts[0]);\n jar[found] = converter.read(value, found);\n\n if (name === found) {\n break\n }\n } catch (e) {}\n }\n\n return name ? jar[name] : jar\n }\n\n return Object.create(\n {\n set,\n get,\n remove: function (name, attributes) {\n set(\n name,\n '',\n assign({}, attributes, {\n expires: -1\n })\n );\n },\n withAttributes: function (attributes) {\n return init(this.converter, assign({}, this.attributes, attributes))\n },\n withConverter: function (converter) {\n return init(assign({}, this.converter, converter), this.attributes)\n }\n },\n {\n attributes: { value: Object.freeze(defaultAttributes) },\n converter: { value: Object.freeze(converter) }\n }\n )\n}\n\nvar api = init(defaultConverter, { path: '/' });\n/* eslint-enable no-var */\n\nexport { api as default };\n","import axios from \"axios\";\nimport Cookies from \"js-cookie\";\n\naxios.defaults.xsrfHeaderName = \"X-CSRFToken\";\n\nexport async function loadCharacterStatus(character_id: number) {\n const api = await axios.get(`/audit/api/account/${character_id}/status`);\n console.log(`got character status from api for '${character_id}'`);\n const headers = Array.from(\n new Set(\n api.data.characters.reduce((p: any, c: any) => {\n try {\n return p.concat(Object.keys(c.last_updates));\n } catch (err) {\n return p;\n }\n }, [])\n )\n );\n headers.sort();\n\n const data = {\n characters: api.data.characters,\n main: api.data.main,\n headers: headers,\n };\n return data;\n}\n\nexport async function loadPubData(character_id: number) {\n const api = await axios.get(`/audit/api/account/${character_id}/pubdata`);\n console.log(`get pubdata in api ${character_id}`);\n let data = {\n characters: api.data,\n };\n return data;\n}\n\nexport async function loadGlanceAssetData(character_id: number) {\n const api = await axios.get(`/audit/api/account/${character_id}/glance/assets`);\n console.log(`get glance/assets in api ${character_id}`);\n return api.data;\n}\n\nexport async function loadGlanceActivityData(character_id: number) {\n const api = await axios.get(`/audit/api/account/${character_id}/glance/activities`);\n console.log(`get glance/activities in api ${character_id}`);\n return api.data;\n}\n\nexport async function loadGlanceFactionData(character_id: number) {\n const api = await axios.get(`/audit/api/account/${character_id}/glance/faction`);\n console.log(`get glance/faction in api ${character_id}`);\n return api.data;\n}\n\nexport async function postAccountRefresh(character_id: number) {\n console.log(`sent account refresh ${character_id}`);\n const api = await axios.post(\n `/audit/api/account/refresh?character_id=${character_id}`,\n { character_id: character_id },\n { headers: { \"X-CSRFToken\": Cookies.get(\"csrftoken\") } }\n );\n return api.data;\n}\n\nexport async function loadAssetList(character_id: number, location_id: number) {\n const api = await axios.get(`/audit/api/account/${character_id}/asset/${location_id}/list`);\n console.log(`get asset list in api ${character_id} ${location_id}`);\n return api.data;\n}\n\nexport async function loadAssetLocations(character_id: number) {\n const api = await axios.get(`/audit/api/account/${character_id}/asset/locations`);\n console.log(`get asset locations in api ${character_id}`);\n return api.data;\n}\n\nexport async function loadNotifications(character_id: number) {\n const api = await axios.get(`/audit/api/account/${character_id}/notifications`);\n console.log(`get notifications in api ${character_id}`);\n return api.data;\n}\nexport async function loadWallet(character_id: number) {\n const api = await axios.get(`/audit/api/account/${character_id}/wallet`);\n console.log(`get wallet in api ${character_id}`);\n return api.data;\n}\n\nexport async function loadMarket(character_id: number) {\n const api = await axios.get(`/audit/api/account/${character_id}/market`);\n console.log(`get wallet in api ${character_id}`);\n return api.data;\n}\n\nexport async function loadWalletActivity(character_id: number) {\n const api = await axios.get(`/audit/api/account/${character_id}/wallet/activity`);\n console.log(`get wallet activity in api ${character_id}`);\n return api.data;\n}\n","import { loadAssetLocations } from \"../../api/character\";\nimport { useQuery } from \"react-query\";\nimport Select from \"react-select\";\n\nconst colourStyles = {\n option: (styles: any) => {\n return {\n ...styles,\n color: \"black\",\n };\n },\n};\n\nconst CharacterAssetLocationSelect = ({\n characterID,\n setLocation,\n}: {\n characterID: number;\n setLocation: any;\n}) => {\n const { isLoading, data } = useQuery(\n [\"asset_loc\", characterID],\n () => loadAssetLocations(characterID),\n { refetchOnWindowFocus: false }\n );\n\n return (\n setLocation(e.value)}\n />\n );\n};\n\nexport default CharacterAssetLocationSelect;\n","export const colourStyles = {\n option: (styles: any) => {\n return {\n ...styles,\n color: \"black\",\n };\n },\n};\n","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue(arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(null, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\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'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (process.env.NODE_ENV !== 'production') {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nmodule.exports = invariant;\n","import invariant from 'invariant';\n\nvar noop = function noop() {};\n\nfunction readOnlyPropType(handler, name) {\n return function (props, propName) {\n if (props[propName] !== undefined) {\n if (!props[handler]) {\n return new Error(\"You have provided a `\" + propName + \"` prop to `\" + name + \"` \" + (\"without an `\" + handler + \"` handler prop. This will render a read-only field. \") + (\"If the field should be mutable use `\" + defaultKey(propName) + \"`. \") + (\"Otherwise, set `\" + handler + \"`.\"));\n }\n }\n };\n}\n\nexport function uncontrolledPropTypes(controlledValues, displayName) {\n var propTypes = {};\n Object.keys(controlledValues).forEach(function (prop) {\n // add default propTypes for folks that use runtime checks\n propTypes[defaultKey(prop)] = noop;\n\n if (process.env.NODE_ENV !== 'production') {\n var handler = controlledValues[prop];\n !(typeof handler === 'string' && handler.trim().length) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Uncontrollable - [%s]: the prop `%s` needs a valid handler key name in order to make it uncontrollable', displayName, prop) : invariant(false) : void 0;\n propTypes[prop] = readOnlyPropType(handler, displayName);\n }\n });\n return propTypes;\n}\nexport function isProp(props, prop) {\n return props[prop] !== undefined;\n}\nexport function defaultKey(key) {\n return 'default' + key.charAt(0).toUpperCase() + key.substr(1);\n}\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\nexport function canAcceptRef(component) {\n return !!component && (typeof component !== 'function' || component.prototype && component.prototype.isReactComponent);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\n\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return typeof key === \"symbol\" ? key : String(key); }\n\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\nimport { useCallback, useRef, useState } from 'react';\nimport * as Utils from './utils';\n\nfunction useUncontrolledProp(propValue, defaultValue, handler) {\n var wasPropRef = useRef(propValue !== undefined);\n\n var _useState = useState(defaultValue),\n stateValue = _useState[0],\n setState = _useState[1];\n\n var isProp = propValue !== undefined;\n var wasProp = wasPropRef.current;\n wasPropRef.current = isProp;\n /**\n * If a prop switches from controlled to Uncontrolled\n * reset its value to the defaultValue\n */\n\n if (!isProp && wasProp && stateValue !== defaultValue) {\n setState(defaultValue);\n }\n\n return [isProp ? propValue : stateValue, useCallback(function (value) {\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\n if (handler) handler.apply(void 0, [value].concat(args));\n setState(value);\n }, [handler])];\n}\n\nexport { useUncontrolledProp };\nexport default function useUncontrolled(props, config) {\n return Object.keys(config).reduce(function (result, fieldName) {\n var _extends2;\n\n var _ref = result,\n defaultValue = _ref[Utils.defaultKey(fieldName)],\n propsValue = _ref[fieldName],\n rest = _objectWithoutPropertiesLoose(_ref, [Utils.defaultKey(fieldName), fieldName].map(_toPropertyKey));\n\n var handlerName = config[fieldName];\n\n var _useUncontrolledProp = useUncontrolledProp(propsValue, defaultValue, props[handlerName]),\n value = _useUncontrolledProp[0],\n handler = _useUncontrolledProp[1];\n\n return _extends({}, rest, (_extends2 = {}, _extends2[fieldName] = value, _extends2[handlerName] = handler, _extends2));\n }, props);\n}","\"use client\";\n\nimport * as React from 'react';\nimport { useContext, useMemo } from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const DEFAULT_BREAKPOINTS = ['xxl', 'xl', 'lg', 'md', 'sm', 'xs'];\nexport const DEFAULT_MIN_BREAKPOINT = 'xs';\nconst ThemeContext = /*#__PURE__*/React.createContext({\n prefixes: {},\n breakpoints: DEFAULT_BREAKPOINTS,\n minBreakpoint: DEFAULT_MIN_BREAKPOINT\n});\nconst {\n Consumer,\n Provider\n} = ThemeContext;\nfunction ThemeProvider({\n prefixes = {},\n breakpoints = DEFAULT_BREAKPOINTS,\n minBreakpoint = DEFAULT_MIN_BREAKPOINT,\n dir,\n children\n}) {\n const contextValue = useMemo(() => ({\n prefixes: {\n ...prefixes\n },\n breakpoints,\n minBreakpoint,\n dir\n }), [prefixes, breakpoints, minBreakpoint, dir]);\n return /*#__PURE__*/_jsx(Provider, {\n value: contextValue,\n children: children\n });\n}\nexport function useBootstrapPrefix(prefix, defaultPrefix) {\n const {\n prefixes\n } = useContext(ThemeContext);\n return prefix || prefixes[defaultPrefix] || defaultPrefix;\n}\nexport function useBootstrapBreakpoints() {\n const {\n breakpoints\n } = useContext(ThemeContext);\n return breakpoints;\n}\nexport function useBootstrapMinBreakpoint() {\n const {\n minBreakpoint\n } = useContext(ThemeContext);\n return minBreakpoint;\n}\nexport function useIsRTL() {\n const {\n dir\n } = useContext(ThemeContext);\n return dir === 'rtl';\n}\nfunction createBootstrapComponent(Component, opts) {\n if (typeof opts === 'string') opts = {\n prefix: opts\n };\n const isClassy = Component.prototype && Component.prototype.isReactComponent;\n // If it's a functional component make sure we don't break it with a ref\n const {\n prefix,\n forwardRefAs = isClassy ? 'ref' : 'innerRef'\n } = opts;\n const Wrapped = /*#__PURE__*/React.forwardRef(({\n ...props\n }, ref) => {\n props[forwardRefAs] = ref;\n const bsPrefix = useBootstrapPrefix(props.bsPrefix, prefix);\n return /*#__PURE__*/_jsx(Component, {\n ...props,\n bsPrefix: bsPrefix\n });\n });\n Wrapped.displayName = `Bootstrap(${Component.displayName || Component.name})`;\n return Wrapped;\n}\nexport { createBootstrapComponent, Consumer as ThemeConsumer };\nexport default ThemeProvider;","/**\n * Returns the owner document of a given element.\n * \n * @param node the element\n */\nexport default function ownerDocument(node) {\n return node && node.ownerDocument || document;\n}","import ownerDocument from './ownerDocument';\n/**\n * Returns the owner window of a given element.\n * \n * @param node the element\n */\n\nexport default function ownerWindow(node) {\n var doc = ownerDocument(node);\n return doc && doc.defaultView || window;\n}","import ownerWindow from './ownerWindow';\n/**\n * Returns one or all computed style properties of an element.\n * \n * @param node the element\n * @param psuedoElement the style property\n */\n\nexport default function getComputedStyle(node, psuedoElement) {\n return ownerWindow(node).getComputedStyle(node, psuedoElement);\n}","var rUpper = /([A-Z])/g;\nexport default function hyphenate(string) {\n return string.replace(rUpper, '-$1').toLowerCase();\n}","/**\n * Copyright 2013-2014, Facebook, Inc.\n * All rights reserved.\n * https://github.com/facebook/react/blob/2aeb8a2a6beb00617a4217f7f8284924fa2ad819/src/vendor/core/hyphenateStyleName.js\n */\nimport hyphenate from './hyphenate';\nvar msPattern = /^ms-/;\nexport default function hyphenateStyleName(string) {\n return hyphenate(string).replace(msPattern, '-ms-');\n}","var supportedTransforms = /^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;\nexport default function isTransform(value) {\n return !!(value && supportedTransforms.test(value));\n}","import getComputedStyle from './getComputedStyle';\nimport hyphenate from './hyphenateStyle';\nimport isTransform from './isTransform';\n\nfunction style(node, property) {\n var css = '';\n var transforms = '';\n\n if (typeof property === 'string') {\n return node.style.getPropertyValue(hyphenate(property)) || getComputedStyle(node).getPropertyValue(hyphenate(property));\n }\n\n Object.keys(property).forEach(function (key) {\n var value = property[key];\n\n if (!value && value !== 0) {\n node.style.removeProperty(hyphenate(key));\n } else if (isTransform(key)) {\n transforms += key + \"(\" + value + \") \";\n } else {\n css += hyphenate(key) + \": \" + value + \";\";\n }\n });\n\n if (transforms) {\n css += \"transform: \" + transforms + \";\";\n }\n\n node.style.cssText += \";\" + css;\n}\n\nexport default style;","export default {\n disabled: false\n};","import React from 'react';\nexport default React.createContext(null);","export var forceReflow = function forceReflow(node) {\n return node.scrollTop;\n};","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport config from './config';\nimport { timeoutsShape } from './utils/PropTypes';\nimport TransitionGroupContext from './TransitionGroupContext';\nimport { forceReflow } from './utils/reflow';\nexport var UNMOUNTED = 'unmounted';\nexport var EXITED = 'exited';\nexport var ENTERING = 'entering';\nexport var ENTERED = 'entered';\nexport var EXITING = 'exiting';\n/**\n * The Transition component lets you describe a transition from one component\n * state to another _over time_ with a simple declarative API. Most commonly\n * it's used to animate the mounting and unmounting of a component, but can also\n * be used to describe in-place transition states as well.\n *\n * ---\n *\n * **Note**: `Transition` is a platform-agnostic base component. If you're using\n * transitions in CSS, you'll probably want to use\n * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)\n * instead. It inherits all the features of `Transition`, but contains\n * additional features necessary to play nice with CSS transitions (hence the\n * name of the component).\n *\n * ---\n *\n * By default the `Transition` component does not alter the behavior of the\n * component it renders, it only tracks \"enter\" and \"exit\" states for the\n * components. It's up to you to give meaning and effect to those states. For\n * example we can add styles to a component when it enters or exits:\n *\n * ```jsx\n * import { Transition } from 'react-transition-group';\n *\n * const duration = 300;\n *\n * const defaultStyle = {\n * transition: `opacity ${duration}ms ease-in-out`,\n * opacity: 0,\n * }\n *\n * const transitionStyles = {\n * entering: { opacity: 1 },\n * entered: { opacity: 1 },\n * exiting: { opacity: 0 },\n * exited: { opacity: 0 },\n * };\n *\n * const Fade = ({ in: inProp }) => (\n * \n * {state => (\n *
\n * I'm a fade Transition!\n *
\n * )}\n *
\n * );\n * ```\n *\n * There are 4 main states a Transition can be in:\n * - `'entering'`\n * - `'entered'`\n * - `'exiting'`\n * - `'exited'`\n *\n * Transition state is toggled via the `in` prop. When `true` the component\n * begins the \"Enter\" stage. During this stage, the component will shift from\n * its current transition state, to `'entering'` for the duration of the\n * transition and then to the `'entered'` stage once it's complete. Let's take\n * the following example (we'll use the\n * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):\n *\n * ```jsx\n * function App() {\n * const [inProp, setInProp] = useState(false);\n * return (\n *
\n * \n * {state => (\n * // ...\n * )}\n * \n * \n *
\n * );\n * }\n * ```\n *\n * When the button is clicked the component will shift to the `'entering'` state\n * and stay there for 500ms (the value of `timeout`) before it finally switches\n * to `'entered'`.\n *\n * When `in` is `false` the same thing happens except the state moves from\n * `'exiting'` to `'exited'`.\n */\n\nvar Transition = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Transition, _React$Component);\n\n function Transition(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n var parentGroup = context; // In the context of a TransitionGroup all enters are really appears\n\n var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;\n var initialStatus;\n _this.appearStatus = null;\n\n if (props.in) {\n if (appear) {\n initialStatus = EXITED;\n _this.appearStatus = ENTERING;\n } else {\n initialStatus = ENTERED;\n }\n } else {\n if (props.unmountOnExit || props.mountOnEnter) {\n initialStatus = UNMOUNTED;\n } else {\n initialStatus = EXITED;\n }\n }\n\n _this.state = {\n status: initialStatus\n };\n _this.nextCallback = null;\n return _this;\n }\n\n Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n var nextIn = _ref.in;\n\n if (nextIn && prevState.status === UNMOUNTED) {\n return {\n status: EXITED\n };\n }\n\n return null;\n } // getSnapshotBeforeUpdate(prevProps) {\n // let nextStatus = null\n // if (prevProps !== this.props) {\n // const { status } = this.state\n // if (this.props.in) {\n // if (status !== ENTERING && status !== ENTERED) {\n // nextStatus = ENTERING\n // }\n // } else {\n // if (status === ENTERING || status === ENTERED) {\n // nextStatus = EXITING\n // }\n // }\n // }\n // return { nextStatus }\n // }\n ;\n\n var _proto = Transition.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.updateStatus(true, this.appearStatus);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var nextStatus = null;\n\n if (prevProps !== this.props) {\n var status = this.state.status;\n\n if (this.props.in) {\n if (status !== ENTERING && status !== ENTERED) {\n nextStatus = ENTERING;\n }\n } else {\n if (status === ENTERING || status === ENTERED) {\n nextStatus = EXITING;\n }\n }\n }\n\n this.updateStatus(false, nextStatus);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.cancelNextCallback();\n };\n\n _proto.getTimeouts = function getTimeouts() {\n var timeout = this.props.timeout;\n var exit, enter, appear;\n exit = enter = appear = timeout;\n\n if (timeout != null && typeof timeout !== 'number') {\n exit = timeout.exit;\n enter = timeout.enter; // TODO: remove fallback for next major\n\n appear = timeout.appear !== undefined ? timeout.appear : enter;\n }\n\n return {\n exit: exit,\n enter: enter,\n appear: appear\n };\n };\n\n _proto.updateStatus = function updateStatus(mounting, nextStatus) {\n if (mounting === void 0) {\n mounting = false;\n }\n\n if (nextStatus !== null) {\n // nextStatus will always be ENTERING or EXITING.\n this.cancelNextCallback();\n\n if (nextStatus === ENTERING) {\n if (this.props.unmountOnExit || this.props.mountOnEnter) {\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this); // https://github.com/reactjs/react-transition-group/pull/749\n // With unmountOnExit or mountOnEnter, the enter animation should happen at the transition between `exited` and `entering`.\n // To make the animation happen, we have to separate each rendering and avoid being processed as batched.\n\n if (node) forceReflow(node);\n }\n\n this.performEnter(mounting);\n } else {\n this.performExit();\n }\n } else if (this.props.unmountOnExit && this.state.status === EXITED) {\n this.setState({\n status: UNMOUNTED\n });\n }\n };\n\n _proto.performEnter = function performEnter(mounting) {\n var _this2 = this;\n\n var enter = this.props.enter;\n var appearing = this.context ? this.context.isMounting : mounting;\n\n var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM.findDOMNode(this), appearing],\n maybeNode = _ref2[0],\n maybeAppearing = _ref2[1];\n\n var timeouts = this.getTimeouts();\n var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED\n // if we are mounting and running this it means appear _must_ be set\n\n if (!mounting && !enter || config.disabled) {\n this.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode);\n });\n return;\n }\n\n this.props.onEnter(maybeNode, maybeAppearing);\n this.safeSetState({\n status: ENTERING\n }, function () {\n _this2.props.onEntering(maybeNode, maybeAppearing);\n\n _this2.onTransitionEnd(enterTimeout, function () {\n _this2.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode, maybeAppearing);\n });\n });\n });\n };\n\n _proto.performExit = function performExit() {\n var _this3 = this;\n\n var exit = this.props.exit;\n var timeouts = this.getTimeouts();\n var maybeNode = this.props.nodeRef ? undefined : ReactDOM.findDOMNode(this); // no exit animation skip right to EXITED\n\n if (!exit || config.disabled) {\n this.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n return;\n }\n\n this.props.onExit(maybeNode);\n this.safeSetState({\n status: EXITING\n }, function () {\n _this3.props.onExiting(maybeNode);\n\n _this3.onTransitionEnd(timeouts.exit, function () {\n _this3.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n });\n });\n };\n\n _proto.cancelNextCallback = function cancelNextCallback() {\n if (this.nextCallback !== null) {\n this.nextCallback.cancel();\n this.nextCallback = null;\n }\n };\n\n _proto.safeSetState = function safeSetState(nextState, callback) {\n // This shouldn't be necessary, but there are weird race conditions with\n // setState callbacks and unmounting in testing, so always make sure that\n // we can cancel any pending setState callbacks after we unmount.\n callback = this.setNextCallback(callback);\n this.setState(nextState, callback);\n };\n\n _proto.setNextCallback = function setNextCallback(callback) {\n var _this4 = this;\n\n var active = true;\n\n this.nextCallback = function (event) {\n if (active) {\n active = false;\n _this4.nextCallback = null;\n callback(event);\n }\n };\n\n this.nextCallback.cancel = function () {\n active = false;\n };\n\n return this.nextCallback;\n };\n\n _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {\n this.setNextCallback(handler);\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this);\n var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;\n\n if (!node || doesNotHaveTimeoutOrListener) {\n setTimeout(this.nextCallback, 0);\n return;\n }\n\n if (this.props.addEndListener) {\n var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback],\n maybeNode = _ref3[0],\n maybeNextCallback = _ref3[1];\n\n this.props.addEndListener(maybeNode, maybeNextCallback);\n }\n\n if (timeout != null) {\n setTimeout(this.nextCallback, timeout);\n }\n };\n\n _proto.render = function render() {\n var status = this.state.status;\n\n if (status === UNMOUNTED) {\n return null;\n }\n\n var _this$props = this.props,\n children = _this$props.children,\n _in = _this$props.in,\n _mountOnEnter = _this$props.mountOnEnter,\n _unmountOnExit = _this$props.unmountOnExit,\n _appear = _this$props.appear,\n _enter = _this$props.enter,\n _exit = _this$props.exit,\n _timeout = _this$props.timeout,\n _addEndListener = _this$props.addEndListener,\n _onEnter = _this$props.onEnter,\n _onEntering = _this$props.onEntering,\n _onEntered = _this$props.onEntered,\n _onExit = _this$props.onExit,\n _onExiting = _this$props.onExiting,\n _onExited = _this$props.onExited,\n _nodeRef = _this$props.nodeRef,\n childProps = _objectWithoutPropertiesLoose(_this$props, [\"children\", \"in\", \"mountOnEnter\", \"unmountOnExit\", \"appear\", \"enter\", \"exit\", \"timeout\", \"addEndListener\", \"onEnter\", \"onEntering\", \"onEntered\", \"onExit\", \"onExiting\", \"onExited\", \"nodeRef\"]);\n\n return (\n /*#__PURE__*/\n // allows for nested Transitions\n React.createElement(TransitionGroupContext.Provider, {\n value: null\n }, typeof children === 'function' ? children(status, childProps) : React.cloneElement(React.Children.only(children), childProps))\n );\n };\n\n return Transition;\n}(React.Component);\n\nTransition.contextType = TransitionGroupContext;\nTransition.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * A React reference to DOM element that need to transition:\n * https://stackoverflow.com/a/51127130/4671932\n *\n * - When `nodeRef` prop is used, `node` is not passed to callback functions\n * (e.g. `onEnter`) because user already has direct access to the node.\n * - When changing `key` prop of `Transition` in a `TransitionGroup` a new\n * `nodeRef` need to be provided to `Transition` with changed `key` prop\n * (see\n * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).\n */\n nodeRef: PropTypes.shape({\n current: typeof Element === 'undefined' ? PropTypes.any : function (propValue, key, componentName, location, propFullName, secret) {\n var value = propValue[key];\n return PropTypes.instanceOf(value && 'ownerDocument' in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);\n }\n }),\n\n /**\n * A `function` child can be used instead of a React element. This function is\n * called with the current transition status (`'entering'`, `'entered'`,\n * `'exiting'`, `'exited'`), which can be used to apply context\n * specific props to a component.\n *\n * ```jsx\n * \n * {state => (\n * \n * )}\n * \n * ```\n */\n children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,\n\n /**\n * Show the component; triggers the enter or exit states\n */\n in: PropTypes.bool,\n\n /**\n * By default the child component is mounted immediately along with\n * the parent `Transition` component. If you want to \"lazy mount\" the component on the\n * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay\n * mounted, even on \"exited\", unless you also specify `unmountOnExit`.\n */\n mountOnEnter: PropTypes.bool,\n\n /**\n * By default the child component stays mounted after it reaches the `'exited'` state.\n * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.\n */\n unmountOnExit: PropTypes.bool,\n\n /**\n * By default the child component does not perform the enter transition when\n * it first mounts, regardless of the value of `in`. If you want this\n * behavior, set both `appear` and `in` to `true`.\n *\n * > **Note**: there are no special appear states like `appearing`/`appeared`, this prop\n * > only adds an additional enter transition. However, in the\n * > `` component that first enter transition does result in\n * > additional `.appear-*` classes, that way you can choose to style it\n * > differently.\n */\n appear: PropTypes.bool,\n\n /**\n * Enable or disable enter transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * Enable or disable exit transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * The duration of the transition, in milliseconds.\n * Required unless `addEndListener` is provided.\n *\n * You may specify a single timeout for all transitions:\n *\n * ```jsx\n * timeout={500}\n * ```\n *\n * or individually:\n *\n * ```jsx\n * timeout={{\n * appear: 500,\n * enter: 300,\n * exit: 500,\n * }}\n * ```\n *\n * - `appear` defaults to the value of `enter`\n * - `enter` defaults to `0`\n * - `exit` defaults to `0`\n *\n * @type {number | { enter?: number, exit?: number, appear?: number }}\n */\n timeout: function timeout(props) {\n var pt = timeoutsShape;\n if (!props.addEndListener) pt = pt.isRequired;\n\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\n return pt.apply(void 0, [props].concat(args));\n },\n\n /**\n * Add a custom transition end trigger. Called with the transitioning\n * DOM node and a `done` callback. Allows for more fine grained transition end\n * logic. Timeouts are still used as a fallback if provided.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * ```jsx\n * addEndListener={(node, done) => {\n * // use the css transitionend event to mark the finish of a transition\n * node.addEventListener('transitionend', done, false);\n * }}\n * ```\n */\n addEndListener: PropTypes.func,\n\n /**\n * Callback fired before the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEnter: PropTypes.func,\n\n /**\n * Callback fired after the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * Callback fired after the \"entered\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEntered: PropTypes.func,\n\n /**\n * Callback fired before the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExit: PropTypes.func,\n\n /**\n * Callback fired after the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExiting: PropTypes.func,\n\n /**\n * Callback fired after the \"exited\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExited: PropTypes.func\n} : {}; // Name the function so it is clearer in the documentation\n\nfunction noop() {}\n\nTransition.defaultProps = {\n in: false,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false,\n enter: true,\n exit: true,\n onEnter: noop,\n onEntering: noop,\n onEntered: noop,\n onExit: noop,\n onExiting: noop,\n onExited: noop\n};\nTransition.UNMOUNTED = UNMOUNTED;\nTransition.EXITED = EXITED;\nTransition.ENTERING = ENTERING;\nTransition.ENTERED = ENTERED;\nTransition.EXITING = EXITING;\nexport default Transition;","export default !!(typeof window !== 'undefined' && window.document && window.document.createElement);","/* eslint-disable no-return-assign */\nimport canUseDOM from './canUseDOM';\nexport var optionsSupported = false;\nexport var onceSupported = false;\n\ntry {\n var options = {\n get passive() {\n return optionsSupported = true;\n },\n\n get once() {\n // eslint-disable-next-line no-multi-assign\n return onceSupported = optionsSupported = true;\n }\n\n };\n\n if (canUseDOM) {\n window.addEventListener('test', options, options);\n window.removeEventListener('test', options, true);\n }\n} catch (e) {\n /* */\n}\n\n/**\n * An `addEventListener` ponyfill, supports the `once` option\n * \n * @param node the element\n * @param eventName the event name\n * @param handle the handler\n * @param options event options\n */\nfunction addEventListener(node, eventName, handler, options) {\n if (options && typeof options !== 'boolean' && !onceSupported) {\n var once = options.once,\n capture = options.capture;\n var wrappedHandler = handler;\n\n if (!onceSupported && once) {\n wrappedHandler = handler.__once || function onceHandler(event) {\n this.removeEventListener(eventName, onceHandler, capture);\n handler.call(this, event);\n };\n\n handler.__once = wrappedHandler;\n }\n\n node.addEventListener(eventName, wrappedHandler, optionsSupported ? options : capture);\n }\n\n node.addEventListener(eventName, handler, options);\n}\n\nexport default addEventListener;","/**\n * A `removeEventListener` ponyfill\n * \n * @param node the element\n * @param eventName the event name\n * @param handle the handler\n * @param options event options\n */\nfunction removeEventListener(node, eventName, handler, options) {\n var capture = options && typeof options !== 'boolean' ? options.capture : options;\n node.removeEventListener(eventName, handler, capture);\n\n if (handler.__once) {\n node.removeEventListener(eventName, handler.__once, capture);\n }\n}\n\nexport default removeEventListener;","import addEventListener from './addEventListener';\nimport removeEventListener from './removeEventListener';\n\nfunction listen(node, eventName, handler, options) {\n addEventListener(node, eventName, handler, options);\n return function () {\n removeEventListener(node, eventName, handler, options);\n };\n}\n\nexport default listen;","/**\n * Triggers an event on a given element.\n * \n * @param node the element\n * @param eventName the event name to trigger\n * @param bubbles whether the event should bubble up\n * @param cancelable whether the event should be cancelable\n */\nexport default function triggerEvent(node, eventName, bubbles, cancelable) {\n if (bubbles === void 0) {\n bubbles = false;\n }\n\n if (cancelable === void 0) {\n cancelable = true;\n }\n\n if (node) {\n var event = document.createEvent('HTMLEvents');\n event.initEvent(eventName, bubbles, cancelable);\n node.dispatchEvent(event);\n }\n}","import css from './css';\nimport listen from './listen';\nimport triggerEvent from './triggerEvent';\n\nfunction parseDuration(node) {\n var str = css(node, 'transitionDuration') || '';\n var mult = str.indexOf('ms') === -1 ? 1000 : 1;\n return parseFloat(str) * mult;\n}\n\nfunction emulateTransitionEnd(element, duration, padding) {\n if (padding === void 0) {\n padding = 5;\n }\n\n var called = false;\n var handle = setTimeout(function () {\n if (!called) triggerEvent(element, 'transitionend', true);\n }, duration + padding);\n var remove = listen(element, 'transitionend', function () {\n called = true;\n }, {\n once: true\n });\n return function () {\n clearTimeout(handle);\n remove();\n };\n}\n\nexport default function transitionEnd(element, handler, duration, padding) {\n if (duration == null) duration = parseDuration(element) || 0;\n var removeEmulate = emulateTransitionEnd(element, duration, padding);\n var remove = listen(element, 'transitionend', handler);\n return function () {\n removeEmulate();\n remove();\n };\n}","import css from 'dom-helpers/css';\nimport transitionEnd from 'dom-helpers/transitionEnd';\nfunction parseDuration(node, property) {\n const str = css(node, property) || '';\n const mult = str.indexOf('ms') === -1 ? 1000 : 1;\n return parseFloat(str) * mult;\n}\nexport default function transitionEndListener(element, handler) {\n const duration = parseDuration(element, 'transitionDuration');\n const delay = parseDuration(element, 'transitionDelay');\n const remove = transitionEnd(element, e => {\n if (e.target === element) {\n remove();\n handler(e);\n }\n }, duration + delay);\n}","/**\n * Safe chained function\n *\n * Will only create a new function if needed,\n * otherwise will pass back existing functions or null.\n *\n * @param {function} functions to chain\n * @returns {function|null}\n */\nfunction createChainedFunction(...funcs) {\n return funcs.filter(f => f != null).reduce((acc, f) => {\n if (typeof f !== 'function') {\n throw new Error('Invalid Argument Type, must only provide functions, undefined, or null.');\n }\n if (acc === null) return f;\n return function chainedFunction(...args) {\n // @ts-ignore\n acc.apply(this, args);\n // @ts-ignore\n f.apply(this, args);\n };\n }, null);\n}\nexport default createChainedFunction;","// reading a dimension prop will cause the browser to recalculate,\n// which will let our animations work\nexport default function triggerBrowserReflow(node) {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n node.offsetHeight;\n}","import { useMemo } from 'react';\nconst toFnRef = ref => !ref || typeof ref === 'function' ? ref : value => {\n ref.current = value;\n};\nexport function mergeRefs(refA, refB) {\n const a = toFnRef(refA);\n const b = toFnRef(refB);\n return value => {\n if (a) a(value);\n if (b) b(value);\n };\n}\n\n/**\n * Create and returns a single callback ref composed from two other Refs.\n *\n * ```tsx\n * const Button = React.forwardRef((props, ref) => {\n * const [element, attachRef] = useCallbackRef();\n * const mergedRef = useMergedRefs(ref, attachRef);\n *\n * return \n * ```\n */\nexport default function useForceUpdate() {\n // The toggling state value is designed to defeat React optimizations for skipping\n // updates when they are strictly equal to the last state value\n const [, dispatch] = useReducer(state => !state, false);\n return dispatch;\n}","import * as React from 'react';\nconst DropdownContext = /*#__PURE__*/React.createContext(null);\nexport default DropdownContext;","var has = Object.prototype.hasOwnProperty;\n\nfunction find(iter, tar, key) {\n\tfor (key of iter.keys()) {\n\t\tif (dequal(key, tar)) return key;\n\t}\n}\n\nexport function dequal(foo, bar) {\n\tvar ctor, len, tmp;\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 === Set) {\n\t\t\tif (foo.size !== bar.size) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tfor (len of foo) {\n\t\t\t\ttmp = len;\n\t\t\t\tif (tmp && typeof tmp === 'object') {\n\t\t\t\t\ttmp = find(bar, tmp);\n\t\t\t\t\tif (!tmp) return false;\n\t\t\t\t}\n\t\t\t\tif (!bar.has(tmp)) return false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\tif (ctor === Map) {\n\t\t\tif (foo.size !== bar.size) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tfor (len of foo) {\n\t\t\t\ttmp = len[0];\n\t\t\t\tif (tmp && typeof tmp === 'object') {\n\t\t\t\t\ttmp = find(bar, tmp);\n\t\t\t\t\tif (!tmp) return false;\n\t\t\t\t}\n\t\t\t\tif (!dequal(len[1], bar.get(tmp))) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\tif (ctor === ArrayBuffer) {\n\t\t\tfoo = new Uint8Array(foo);\n\t\t\tbar = new Uint8Array(bar);\n\t\t} else if (ctor === DataView) {\n\t\t\tif ((len=foo.byteLength) === bar.byteLength) {\n\t\t\t\twhile (len-- && foo.getInt8(len) === bar.getInt8(len));\n\t\t\t}\n\t\t\treturn len === -1;\n\t\t}\n\n\t\tif (ArrayBuffer.isView(foo)) {\n\t\t\tif ((len=foo.byteLength) === bar.byteLength) {\n\t\t\t\twhile (len-- && 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","import { useCallback } from 'react';\nimport useMounted from './useMounted';\n\n/**\n * `useSafeState` takes the return value of a `useState` hook and wraps the\n * setter to prevent updates onces the component has unmounted. Can used\n * with `useMergeState` and `useStateAsync` as well\n *\n * @param state The return value of a useStateHook\n *\n * ```ts\n * const [show, setShow] = useSafeState(useState(true));\n * ```\n */\n\nfunction useSafeState(state) {\n const isMounted = useMounted();\n return [state[0], useCallback(nextState => {\n if (!isMounted()) return;\n return state[1](nextState);\n }, [isMounted, state[1]])];\n}\nexport default useSafeState;","export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];","import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}","export default function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n}","import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };","export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;","export default function getUAString() {\n var uaData = navigator.userAgentData;\n\n if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {\n return uaData.brands.map(function (item) {\n return item.brand + \"/\" + item.version;\n }).join(' ');\n }\n\n return navigator.userAgent;\n}","import getUAString from \"../utils/userAgent.js\";\nexport default function isLayoutViewport() {\n return !/^((?!chrome|android).)*safari/i.test(getUAString());\n}","import { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport { round } from \"../utils/math.js\";\nimport getWindow from \"./getWindow.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getBoundingClientRect(element, includeScale, isFixedStrategy) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n\n var clientRect = element.getBoundingClientRect();\n var scaleX = 1;\n var scaleY = 1;\n\n if (includeScale && isHTMLElement(element)) {\n scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n }\n\n var _ref = isElement(element) ? getWindow(element) : window,\n visualViewport = _ref.visualViewport;\n\n var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n var width = clientRect.width / scaleX;\n var height = clientRect.height / scaleY;\n return {\n width: width,\n height: height,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x,\n x: x,\n y: y\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}","export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getUAString from \"../utils/userAgent.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}","export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","export default function getVariation(placement) {\n return placement.split('-')[1];\n}","import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref, win) {\n var x = _ref.x,\n y = _ref.y;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets,\n isFixed = _ref2.isFixed;\n var _offsets$x = offsets.x,\n x = _offsets$x === void 0 ? 0 : _offsets$x,\n _offsets$y = offsets.y,\n y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref3.x;\n y = _ref3.y;\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom;\n var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n offsetParent[heightProp];\n y -= offsetY - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right;\n var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n offsetParent[widthProp];\n x -= offsetX - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n x: x,\n y: y\n }, getWindow(popper)) : {\n x: x,\n y: y\n };\n\n x = _ref4.x;\n y = _ref4.y;\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n var state = _ref5.state,\n options = _ref5.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration,\n isFixed: state.options.strategy === 'fixed'\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};","var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}","var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on \n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getViewportRect(element, strategy) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0;\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n var layoutViewport = isLayoutViewport();\n\n if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}","export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element, strategy) {\n var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent, strategy) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary, strategy) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent, 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 }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}","import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$strategy = _options.strategy,\n strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n mainAxis: tetherOffsetValue,\n altAxis: tetherOffsetValue\n } : Object.assign({\n mainAxis: 0,\n altAxis: 0\n }, tetherOffsetValue);\n var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var _offsetModifierState$;\n\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = offset + overflow[mainSide];\n var max = offset - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = offset + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _offsetModifierState$2;\n\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _len = altAxis === 'y' ? 'height' : 'width';\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};","export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = round(rect.width) / element.offsetWidth || 1;\n var scaleY = round(rect.height) / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}","export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}","export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n });\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref) {\n var name = _ref.name,\n _ref$options = _ref.options,\n options = _ref$options === void 0 ? {} : _ref$options,\n effect = _ref.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","import arrow from '@popperjs/core/lib/modifiers/arrow';\nimport computeStyles from '@popperjs/core/lib/modifiers/computeStyles';\nimport eventListeners from '@popperjs/core/lib/modifiers/eventListeners';\nimport flip from '@popperjs/core/lib/modifiers/flip';\nimport hide from '@popperjs/core/lib/modifiers/hide';\nimport offset from '@popperjs/core/lib/modifiers/offset';\nimport popperOffsets from '@popperjs/core/lib/modifiers/popperOffsets';\nimport preventOverflow from '@popperjs/core/lib/modifiers/preventOverflow';\nimport { placements } from '@popperjs/core/lib/enums';\nimport { popperGenerator } from '@popperjs/core/lib/popper-base';\n\n// For the common JS build we will turn this file into a bundle with no imports.\n// This is b/c the Popper lib is all esm files, and would break in a common js only environment\nexport const createPopper = popperGenerator({\n defaultModifiers: [hide, popperOffsets, computeStyles, eventListeners, offset, flip, preventOverflow, arrow]\n});\nexport { placements };","const _excluded = [\"enabled\", \"placement\", \"strategy\", \"modifiers\"];\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { dequal } from 'dequal';\nimport useSafeState from '@restart/hooks/useSafeState';\nimport { createPopper } from './popper';\nconst disabledApplyStylesModifier = {\n name: 'applyStyles',\n enabled: false,\n phase: 'afterWrite',\n fn: () => undefined\n};\n\n// until docjs supports type exports...\n\nconst ariaDescribedByModifier = {\n name: 'ariaDescribedBy',\n enabled: true,\n phase: 'afterWrite',\n effect: ({\n state\n }) => () => {\n const {\n reference,\n popper\n } = state.elements;\n if ('removeAttribute' in reference) {\n const ids = (reference.getAttribute('aria-describedby') || '').split(',').filter(id => id.trim() !== popper.id);\n if (!ids.length) reference.removeAttribute('aria-describedby');else reference.setAttribute('aria-describedby', ids.join(','));\n }\n },\n fn: ({\n state\n }) => {\n var _popper$getAttribute;\n const {\n popper,\n reference\n } = state.elements;\n const role = (_popper$getAttribute = popper.getAttribute('role')) == null ? void 0 : _popper$getAttribute.toLowerCase();\n if (popper.id && role === 'tooltip' && 'setAttribute' in reference) {\n const ids = reference.getAttribute('aria-describedby');\n if (ids && ids.split(',').indexOf(popper.id) !== -1) {\n return;\n }\n reference.setAttribute('aria-describedby', ids ? `${ids},${popper.id}` : popper.id);\n }\n }\n};\nconst EMPTY_MODIFIERS = [];\n/**\n * Position an element relative some reference element using Popper.js\n *\n * @param referenceElement\n * @param popperElement\n * @param {object} options\n * @param {object=} options.modifiers Popper.js modifiers\n * @param {boolean=} options.enabled toggle the popper functionality on/off\n * @param {string=} options.placement The popper element placement relative to the reference element\n * @param {string=} options.strategy the positioning strategy\n * @param {function=} options.onCreate called when the popper is created\n * @param {function=} options.onUpdate called when the popper is updated\n *\n * @returns {UsePopperState} The popper state\n */\nfunction usePopper(referenceElement, popperElement, _ref = {}) {\n let {\n enabled = true,\n placement = 'bottom',\n strategy = 'absolute',\n modifiers = EMPTY_MODIFIERS\n } = _ref,\n config = _objectWithoutPropertiesLoose(_ref, _excluded);\n const prevModifiers = useRef(modifiers);\n const popperInstanceRef = useRef();\n const update = useCallback(() => {\n var _popperInstanceRef$cu;\n (_popperInstanceRef$cu = popperInstanceRef.current) == null ? void 0 : _popperInstanceRef$cu.update();\n }, []);\n const forceUpdate = useCallback(() => {\n var _popperInstanceRef$cu2;\n (_popperInstanceRef$cu2 = popperInstanceRef.current) == null ? void 0 : _popperInstanceRef$cu2.forceUpdate();\n }, []);\n const [popperState, setState] = useSafeState(useState({\n placement,\n update,\n forceUpdate,\n attributes: {},\n styles: {\n popper: {},\n arrow: {}\n }\n }));\n const updateModifier = useMemo(() => ({\n name: 'updateStateModifier',\n enabled: true,\n phase: 'write',\n requires: ['computeStyles'],\n fn: ({\n state\n }) => {\n const styles = {};\n const attributes = {};\n Object.keys(state.elements).forEach(element => {\n styles[element] = state.styles[element];\n attributes[element] = state.attributes[element];\n });\n setState({\n state,\n styles,\n attributes,\n update,\n forceUpdate,\n placement: state.placement\n });\n }\n }), [update, forceUpdate, setState]);\n const nextModifiers = useMemo(() => {\n if (!dequal(prevModifiers.current, modifiers)) {\n prevModifiers.current = modifiers;\n }\n return prevModifiers.current;\n }, [modifiers]);\n useEffect(() => {\n if (!popperInstanceRef.current || !enabled) return;\n popperInstanceRef.current.setOptions({\n placement,\n strategy,\n modifiers: [...nextModifiers, updateModifier, disabledApplyStylesModifier]\n });\n }, [strategy, placement, updateModifier, enabled, nextModifiers]);\n useEffect(() => {\n if (!enabled || referenceElement == null || popperElement == null) {\n return undefined;\n }\n popperInstanceRef.current = createPopper(referenceElement, popperElement, Object.assign({}, config, {\n placement,\n strategy,\n modifiers: [...nextModifiers, ariaDescribedByModifier, updateModifier]\n }));\n return () => {\n if (popperInstanceRef.current != null) {\n popperInstanceRef.current.destroy();\n popperInstanceRef.current = undefined;\n setState(s => Object.assign({}, s, {\n attributes: {},\n styles: {\n popper: {}\n }\n }));\n }\n };\n // This is only run once to _create_ the popper\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [enabled, referenceElement, popperElement]);\n return popperState;\n}\nexport default usePopper;","/* eslint-disable no-bitwise, no-cond-assign */\n\n/**\n * Checks if an element contains another given element.\n * \n * @param context the context element\n * @param node the element to check\n */\nexport default function contains(context, node) {\n // HTML DOM and SVG DOM may have different support levels,\n // so we need to check on context instead of a document root element.\n if (context.contains) return context.contains(node);\n if (context.compareDocumentPosition) return context === node || !!(context.compareDocumentPosition(node) & 16);\n}","/**\n * A `removeEventListener` ponyfill\n * \n * @param node the element\n * @param eventName the event name\n * @param handle the handler\n * @param options event options\n */\nfunction removeEventListener(node, eventName, handler, options) {\n var capture = options && typeof options !== 'boolean' ? options.capture : options;\n node.removeEventListener(eventName, handler, capture);\n\n if (handler.__once) {\n node.removeEventListener(eventName, handler.__once, capture);\n }\n}\n\nexport default removeEventListener;","import addEventListener from './addEventListener';\nimport removeEventListener from './removeEventListener';\n\nfunction listen(node, eventName, handler, options) {\n addEventListener(node, eventName, handler, options);\n return function () {\n removeEventListener(node, eventName, handler, options);\n };\n}\n\nexport default listen;","/**\n * Returns the owner document of a given element.\n * \n * @param node the element\n */\nexport default function ownerDocument(node) {\n return node && node.ownerDocument || document;\n}","/**\n * Copyright (c) 2014-present, Facebook, Inc.\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'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nvar warning = function() {};\n\nif (__DEV__) {\n var printWarning = function printWarning(format, args) {\n var len = arguments.length;\n args = new Array(len > 1 ? len - 1 : 0);\n for (var key = 1; key < len; key++) {\n args[key - 1] = arguments[key];\n }\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n }\n\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n if (!condition) {\n printWarning.apply(null, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;\n","import contains from 'dom-helpers/contains';\nimport listen from 'dom-helpers/listen';\nimport ownerDocument from 'dom-helpers/ownerDocument';\nimport { useCallback, useEffect, useRef } from 'react';\nimport useEventCallback from '@restart/hooks/useEventCallback';\nimport warning from 'warning';\nconst noop = () => {};\nfunction isLeftClickEvent(event) {\n return event.button === 0;\n}\nfunction isModifiedEvent(event) {\n return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n}\nexport const getRefTarget = ref => ref && ('current' in ref ? ref.current : ref);\nconst InitialTriggerEvents = {\n click: 'mousedown',\n mouseup: 'mousedown',\n pointerup: 'pointerdown'\n};\n\n/**\n * The `useClickOutside` hook registers your callback on the document that fires\n * when a pointer event is registered outside of the provided ref or element.\n *\n * @param {Ref| HTMLElement} ref The element boundary\n * @param {function} onClickOutside\n * @param {object=} options\n * @param {boolean=} options.disabled\n * @param {string=} options.clickTrigger The DOM event name (click, mousedown, etc) to attach listeners on\n */\nfunction useClickOutside(ref, onClickOutside = noop, {\n disabled,\n clickTrigger = 'click'\n} = {}) {\n const preventMouseClickOutsideRef = useRef(false);\n const waitingForTrigger = useRef(false);\n const handleMouseCapture = useCallback(e => {\n const currentTarget = getRefTarget(ref);\n warning(!!currentTarget, 'ClickOutside captured a close event but does not have a ref to compare it to. ' + 'useClickOutside(), should be passed a ref that resolves to a DOM node');\n preventMouseClickOutsideRef.current = !currentTarget || isModifiedEvent(e) || !isLeftClickEvent(e) || !!contains(currentTarget, e.target) || waitingForTrigger.current;\n waitingForTrigger.current = false;\n }, [ref]);\n const handleInitialMouse = useEventCallback(e => {\n const currentTarget = getRefTarget(ref);\n if (currentTarget && contains(currentTarget, e.target)) {\n waitingForTrigger.current = true;\n }\n });\n const handleMouse = useEventCallback(e => {\n if (!preventMouseClickOutsideRef.current) {\n onClickOutside(e);\n }\n });\n useEffect(() => {\n var _ownerWindow$event, _ownerWindow$parent;\n if (disabled || ref == null) return undefined;\n const doc = ownerDocument(getRefTarget(ref));\n const ownerWindow = doc.defaultView || window;\n\n // Store the current event to avoid triggering handlers immediately\n // For things rendered in an iframe, the event might originate on the parent window\n // so we should fall back to that global event if the local one doesn't exist\n // https://github.com/facebook/react/issues/20074\n let currentEvent = (_ownerWindow$event = ownerWindow.event) != null ? _ownerWindow$event : (_ownerWindow$parent = ownerWindow.parent) == null ? void 0 : _ownerWindow$parent.event;\n let removeInitialTriggerListener = null;\n if (InitialTriggerEvents[clickTrigger]) {\n removeInitialTriggerListener = listen(doc, InitialTriggerEvents[clickTrigger], handleInitialMouse, true);\n }\n\n // Use capture for this listener so it fires before React's listener, to\n // avoid false positives in the contains() check below if the target DOM\n // element is removed in the React mouse callback.\n const removeMouseCaptureListener = listen(doc, clickTrigger, handleMouseCapture, true);\n const removeMouseListener = listen(doc, clickTrigger, e => {\n // skip if this event is the same as the one running when we added the handlers\n if (e === currentEvent) {\n currentEvent = undefined;\n return;\n }\n handleMouse(e);\n });\n let mobileSafariHackListeners = [];\n if ('ontouchstart' in doc.documentElement) {\n mobileSafariHackListeners = [].slice.call(doc.body.children).map(el => listen(el, 'mousemove', noop));\n }\n return () => {\n removeInitialTriggerListener == null ? void 0 : removeInitialTriggerListener();\n removeMouseCaptureListener();\n removeMouseListener();\n mobileSafariHackListeners.forEach(remove => remove());\n };\n }, [ref, disabled, clickTrigger, handleMouseCapture, handleInitialMouse, handleMouse]);\n}\nexport default useClickOutside;","export function toModifierMap(modifiers) {\n const result = {};\n if (!Array.isArray(modifiers)) {\n return modifiers || result;\n }\n\n // eslint-disable-next-line no-unused-expressions\n modifiers == null ? void 0 : modifiers.forEach(m => {\n result[m.name] = m;\n });\n return result;\n}\nexport function toModifierArray(map = {}) {\n if (Array.isArray(map)) return map;\n return Object.keys(map).map(k => {\n map[k].name = k;\n return map[k];\n });\n}\nexport default function mergeOptionsWithPopperConfig({\n enabled,\n enableEvents,\n placement,\n flip,\n offset,\n fixed,\n containerPadding,\n arrowElement,\n popperConfig = {}\n}) {\n var _modifiers$eventListe, _modifiers$preventOve, _modifiers$preventOve2, _modifiers$offset, _modifiers$arrow;\n const modifiers = toModifierMap(popperConfig.modifiers);\n return Object.assign({}, popperConfig, {\n placement,\n enabled,\n strategy: fixed ? 'fixed' : popperConfig.strategy,\n modifiers: toModifierArray(Object.assign({}, modifiers, {\n eventListeners: {\n enabled: enableEvents,\n options: (_modifiers$eventListe = modifiers.eventListeners) == null ? void 0 : _modifiers$eventListe.options\n },\n preventOverflow: Object.assign({}, modifiers.preventOverflow, {\n options: containerPadding ? Object.assign({\n padding: containerPadding\n }, (_modifiers$preventOve = modifiers.preventOverflow) == null ? void 0 : _modifiers$preventOve.options) : (_modifiers$preventOve2 = modifiers.preventOverflow) == null ? void 0 : _modifiers$preventOve2.options\n }),\n offset: {\n options: Object.assign({\n offset\n }, (_modifiers$offset = modifiers.offset) == null ? void 0 : _modifiers$offset.options)\n },\n arrow: Object.assign({}, modifiers.arrow, {\n enabled: !!arrowElement,\n options: Object.assign({}, (_modifiers$arrow = modifiers.arrow) == null ? void 0 : _modifiers$arrow.options, {\n element: arrowElement\n })\n }),\n flip: Object.assign({\n enabled: !!flip\n }, modifiers.flip)\n }))\n });\n}","const _excluded = [\"children\"];\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport { useContext, useRef } from 'react';\nimport * as React from 'react';\nimport useCallbackRef from '@restart/hooks/useCallbackRef';\nimport DropdownContext from './DropdownContext';\nimport usePopper from './usePopper';\nimport useClickOutside from './useClickOutside';\nimport mergeOptionsWithPopperConfig from './mergeOptionsWithPopperConfig';\nimport { Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst noop = () => {};\n\n/**\n * @memberOf Dropdown\n * @param {object} options\n * @param {boolean} options.flip Automatically adjust the menu `drop` position based on viewport edge detection\n * @param {[number, number]} options.offset Define an offset distance between the Menu and the Toggle\n * @param {boolean} options.show Display the menu manually, ignored in the context of a `Dropdown`\n * @param {boolean} options.usePopper opt in/out of using PopperJS to position menus. When disabled you must position it yourself.\n * @param {string} options.rootCloseEvent The pointer event to listen for when determining \"clicks outside\" the menu for triggering a close.\n * @param {object} options.popperConfig Options passed to the [`usePopper`](/api/usePopper) hook.\n */\nexport function useDropdownMenu(options = {}) {\n const context = useContext(DropdownContext);\n const [arrowElement, attachArrowRef] = useCallbackRef();\n const hasShownRef = useRef(false);\n const {\n flip,\n offset,\n rootCloseEvent,\n fixed = false,\n placement: placementOverride,\n popperConfig = {},\n enableEventListeners = true,\n usePopper: shouldUsePopper = !!context\n } = options;\n const show = (context == null ? void 0 : context.show) == null ? !!options.show : context.show;\n if (show && !hasShownRef.current) {\n hasShownRef.current = true;\n }\n const handleClose = e => {\n context == null ? void 0 : context.toggle(false, e);\n };\n const {\n placement,\n setMenu,\n menuElement,\n toggleElement\n } = context || {};\n const popper = usePopper(toggleElement, menuElement, mergeOptionsWithPopperConfig({\n placement: placementOverride || placement || 'bottom-start',\n enabled: shouldUsePopper,\n enableEvents: enableEventListeners == null ? show : enableEventListeners,\n offset,\n flip,\n fixed,\n arrowElement,\n popperConfig\n }));\n const menuProps = Object.assign({\n ref: setMenu || noop,\n 'aria-labelledby': toggleElement == null ? void 0 : toggleElement.id\n }, popper.attributes.popper, {\n style: popper.styles.popper\n });\n const metadata = {\n show,\n placement,\n hasShown: hasShownRef.current,\n toggle: context == null ? void 0 : context.toggle,\n popper: shouldUsePopper ? popper : null,\n arrowProps: shouldUsePopper ? Object.assign({\n ref: attachArrowRef\n }, popper.attributes.arrow, {\n style: popper.styles.arrow\n }) : {}\n };\n useClickOutside(menuElement, handleClose, {\n clickTrigger: rootCloseEvent,\n disabled: !show\n });\n return [menuProps, metadata];\n}\nconst defaultProps = {\n usePopper: true\n};\n/**\n * Also exported as `` from `Dropdown`.\n *\n * @displayName DropdownMenu\n * @memberOf Dropdown\n */\nfunction DropdownMenu(_ref) {\n let {\n children\n } = _ref,\n options = _objectWithoutPropertiesLoose(_ref, _excluded);\n const [props, meta] = useDropdownMenu(options);\n return /*#__PURE__*/_jsx(_Fragment, {\n children: children(props, meta)\n });\n}\nDropdownMenu.displayName = 'DropdownMenu';\nDropdownMenu.defaultProps = defaultProps;\n\n/** @component */\nexport default DropdownMenu;","import $73SJx$react, {useContext as $73SJx$useContext, useState as $73SJx$useState, useMemo as $73SJx$useMemo, useLayoutEffect as $73SJx$useLayoutEffect, useRef as $73SJx$useRef} from \"react\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ /*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ // We must avoid a circular dependency with @react-aria/utils, and this useLayoutEffect is\n// guarded by a check that it only runs on the client side.\n// eslint-disable-next-line rulesdir/useLayoutEffectRule\n\n// Default context value to use in case there is no SSRProvider. This is fine for\n// client-only apps. In order to support multiple copies of React Aria potentially\n// being on the page at once, the prefix is set to a random number. SSRProvider\n// will reset this to zero for consistency between server and client, so in the\n// SSR case multiple copies of React Aria is not supported.\nconst $b5e257d569688ac6$var$defaultContext = {\n prefix: String(Math.round(Math.random() * 10000000000)),\n current: 0\n};\nconst $b5e257d569688ac6$var$SSRContext = /*#__PURE__*/ (0, $73SJx$react).createContext($b5e257d569688ac6$var$defaultContext);\nconst $b5e257d569688ac6$var$IsSSRContext = /*#__PURE__*/ (0, $73SJx$react).createContext(false);\n// This is only used in React < 18.\nfunction $b5e257d569688ac6$var$LegacySSRProvider(props) {\n let cur = (0, $73SJx$useContext)($b5e257d569688ac6$var$SSRContext);\n let counter = $b5e257d569688ac6$var$useCounter(cur === $b5e257d569688ac6$var$defaultContext);\n let [isSSR, setIsSSR] = (0, $73SJx$useState)(true);\n let value = (0, $73SJx$useMemo)(()=>({\n // If this is the first SSRProvider, start with an empty string prefix, otherwise\n // append and increment the counter.\n prefix: cur === $b5e257d569688ac6$var$defaultContext ? \"\" : `${cur.prefix}-${counter}`,\n current: 0\n }), [\n cur,\n counter\n ]);\n // If on the client, and the component was initially server rendered,\n // then schedule a layout effect to update the component after hydration.\n if (typeof document !== \"undefined\") // This if statement technically breaks the rules of hooks, but is safe\n // because the condition never changes after mounting.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n (0, $73SJx$useLayoutEffect)(()=>{\n setIsSSR(false);\n }, []);\n return /*#__PURE__*/ (0, $73SJx$react).createElement($b5e257d569688ac6$var$SSRContext.Provider, {\n value: value\n }, /*#__PURE__*/ (0, $73SJx$react).createElement($b5e257d569688ac6$var$IsSSRContext.Provider, {\n value: isSSR\n }, props.children));\n}\nlet $b5e257d569688ac6$var$warnedAboutSSRProvider = false;\nfunction $b5e257d569688ac6$export$9f8ac96af4b1b2ae(props) {\n if (typeof (0, $73SJx$react)[\"useId\"] === \"function\") {\n if (process.env.NODE_ENV !== \"test\" && !$b5e257d569688ac6$var$warnedAboutSSRProvider) {\n console.warn(\"In React 18, SSRProvider is not necessary and is a noop. You can remove it from your app.\");\n $b5e257d569688ac6$var$warnedAboutSSRProvider = true;\n }\n return /*#__PURE__*/ (0, $73SJx$react).createElement((0, $73SJx$react).Fragment, null, props.children);\n }\n return /*#__PURE__*/ (0, $73SJx$react).createElement($b5e257d569688ac6$var$LegacySSRProvider, props);\n}\nlet $b5e257d569688ac6$var$canUseDOM = Boolean(typeof window !== \"undefined\" && window.document && window.document.createElement);\nlet $b5e257d569688ac6$var$componentIds = new WeakMap();\nfunction $b5e257d569688ac6$var$useCounter(isDisabled = false) {\n let ctx = (0, $73SJx$useContext)($b5e257d569688ac6$var$SSRContext);\n let ref = (0, $73SJx$useRef)(null);\n // eslint-disable-next-line rulesdir/pure-render\n if (ref.current === null && !isDisabled) {\n var _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner, _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n // In strict mode, React renders components twice, and the ref will be reset to null on the second render.\n // This means our id counter will be incremented twice instead of once. This is a problem because on the\n // server, components are only rendered once and so ids generated on the server won't match the client.\n // In React 18, useId was introduced to solve this, but it is not available in older versions. So to solve this\n // we need to use some React internals to access the underlying Fiber instance, which is stable between renders.\n // This is exposed as ReactCurrentOwner in development, which is all we need since StrictMode only runs in development.\n // To ensure that we only increment the global counter once, we store the starting id for this component in\n // a weak map associated with the Fiber. On the second render, we reset the global counter to this value.\n // Since React runs the second render immediately after the first, this is safe.\n // @ts-ignore\n let currentOwner = (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = (0, $73SJx$react).__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED === void 0 ? void 0 : (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner = _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner === void 0 ? void 0 : _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner.current;\n if (currentOwner) {\n let prevComponentValue = $b5e257d569688ac6$var$componentIds.get(currentOwner);\n if (prevComponentValue == null) // On the first render, and first call to useId, store the id and state in our weak map.\n $b5e257d569688ac6$var$componentIds.set(currentOwner, {\n id: ctx.current,\n state: currentOwner.memoizedState\n });\n else if (currentOwner.memoizedState !== prevComponentValue.state) {\n // On the second render, the memoizedState gets reset by React.\n // Reset the counter, and remove from the weak map so we don't\n // do this for subsequent useId calls.\n ctx.current = prevComponentValue.id;\n $b5e257d569688ac6$var$componentIds.delete(currentOwner);\n }\n }\n // eslint-disable-next-line rulesdir/pure-render\n ref.current = ++ctx.current;\n }\n // eslint-disable-next-line rulesdir/pure-render\n return ref.current;\n}\nfunction $b5e257d569688ac6$var$useLegacySSRSafeId(defaultId) {\n let ctx = (0, $73SJx$useContext)($b5e257d569688ac6$var$SSRContext);\n // If we are rendering in a non-DOM environment, and there's no SSRProvider,\n // provide a warning to hint to the developer to add one.\n if (ctx === $b5e257d569688ac6$var$defaultContext && !$b5e257d569688ac6$var$canUseDOM) console.warn(\"When server rendering, you must wrap your application in an to ensure consistent ids are generated between the client and server.\");\n let counter = $b5e257d569688ac6$var$useCounter(!!defaultId);\n let prefix = ctx === $b5e257d569688ac6$var$defaultContext && process.env.NODE_ENV === \"test\" ? \"react-aria\" : `react-aria${ctx.prefix}`;\n return defaultId || `${prefix}-${counter}`;\n}\nfunction $b5e257d569688ac6$var$useModernSSRSafeId(defaultId) {\n // @ts-ignore\n let id = (0, $73SJx$react).useId();\n let [didSSR] = (0, $73SJx$useState)($b5e257d569688ac6$export$535bd6ca7f90a273());\n let prefix = didSSR || process.env.NODE_ENV === \"test\" ? \"react-aria\" : `react-aria${$b5e257d569688ac6$var$defaultContext.prefix}`;\n return defaultId || `${prefix}-${id}`;\n}\nconst $b5e257d569688ac6$export$619500959fc48b26 = typeof (0, $73SJx$react)[\"useId\"] === \"function\" ? $b5e257d569688ac6$var$useModernSSRSafeId : $b5e257d569688ac6$var$useLegacySSRSafeId;\nfunction $b5e257d569688ac6$var$getSnapshot() {\n return false;\n}\nfunction $b5e257d569688ac6$var$getServerSnapshot() {\n return true;\n}\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction $b5e257d569688ac6$var$subscribe(onStoreChange) {\n // noop\n return ()=>{};\n}\nfunction $b5e257d569688ac6$export$535bd6ca7f90a273() {\n // In React 18, we can use useSyncExternalStore to detect if we're server rendering or hydrating.\n if (typeof (0, $73SJx$react)[\"useSyncExternalStore\"] === \"function\") return (0, $73SJx$react)[\"useSyncExternalStore\"]($b5e257d569688ac6$var$subscribe, $b5e257d569688ac6$var$getSnapshot, $b5e257d569688ac6$var$getServerSnapshot);\n // eslint-disable-next-line react-hooks/rules-of-hooks\n return (0, $73SJx$useContext)($b5e257d569688ac6$var$IsSSRContext);\n}\n\n\n\n\nexport {$b5e257d569688ac6$export$9f8ac96af4b1b2ae as SSRProvider, $b5e257d569688ac6$export$619500959fc48b26 as useSSRSafeId, $b5e257d569688ac6$export$535bd6ca7f90a273 as useIsSSR};\n//# sourceMappingURL=module.js.map\n","import { useContext, useCallback } from 'react';\nimport * as React from 'react';\nimport { useSSRSafeId } from './ssr';\nimport DropdownContext from './DropdownContext';\nimport { Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const isRoleMenu = el => {\n var _el$getAttribute;\n return ((_el$getAttribute = el.getAttribute('role')) == null ? void 0 : _el$getAttribute.toLowerCase()) === 'menu';\n};\nconst noop = () => {};\n\n/**\n * Wires up Dropdown toggle functionality, returning a set a props to attach\n * to the element that functions as the dropdown toggle (generally a button).\n *\n * @memberOf Dropdown\n */\nexport function useDropdownToggle() {\n const id = useSSRSafeId();\n const {\n show = false,\n toggle = noop,\n setToggle,\n menuElement\n } = useContext(DropdownContext) || {};\n const handleClick = useCallback(e => {\n toggle(!show, e);\n }, [show, toggle]);\n const props = {\n id,\n ref: setToggle || noop,\n onClick: handleClick,\n 'aria-expanded': !!show\n };\n\n // This is maybe better down in an effect, but\n // the component is going to update anyway when the menu element\n // is set so might return new props.\n if (menuElement && isRoleMenu(menuElement)) {\n props['aria-haspopup'] = true;\n }\n return [props, {\n show,\n toggle\n }];\n}\n/**\n * Also exported as `` from `Dropdown`.\n *\n * @displayName DropdownToggle\n * @memberOf Dropdown\n */\nfunction DropdownToggle({\n children\n}) {\n const [props, meta] = useDropdownToggle();\n return /*#__PURE__*/_jsx(_Fragment, {\n children: children(props, meta)\n });\n}\nDropdownToggle.displayName = 'DropdownToggle';\n\n/** @component */\nexport default DropdownToggle;","import * as React from 'react';\nconst SelectableContext = /*#__PURE__*/React.createContext(null);\nexport const makeEventKey = (eventKey, href = null) => {\n if (eventKey != null) return String(eventKey);\n return href || null;\n};\nexport default SelectableContext;","import * as React from 'react';\nconst NavContext = /*#__PURE__*/React.createContext(null);\nNavContext.displayName = 'NavContext';\nexport default NavContext;","export const ATTRIBUTE_PREFIX = `data-rr-ui-`;\nexport const PROPERTY_PREFIX = `rrUi`;\nexport function dataAttr(property) {\n return `${ATTRIBUTE_PREFIX}${property}`;\n}\nexport function dataProp(property) {\n return `${PROPERTY_PREFIX}${property}`;\n}","const _excluded = [\"eventKey\", \"disabled\", \"onClick\", \"active\", \"as\"];\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport * as React from 'react';\nimport { useContext } from 'react';\nimport useEventCallback from '@restart/hooks/useEventCallback';\nimport SelectableContext, { makeEventKey } from './SelectableContext';\nimport NavContext from './NavContext';\nimport Button from './Button';\nimport { dataAttr } from './DataKey';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Create a dropdown item. Returns a set of props for the dropdown item component\n * including an `onClick` handler that prevents selection when the item is disabled\n */\nexport function useDropdownItem({\n key,\n href,\n active,\n disabled,\n onClick\n}) {\n const onSelectCtx = useContext(SelectableContext);\n const navContext = useContext(NavContext);\n const {\n activeKey\n } = navContext || {};\n const eventKey = makeEventKey(key, href);\n const isActive = active == null && key != null ? makeEventKey(activeKey) === eventKey : active;\n const handleClick = useEventCallback(event => {\n if (disabled) return;\n onClick == null ? void 0 : onClick(event);\n if (onSelectCtx && !event.isPropagationStopped()) {\n onSelectCtx(eventKey, event);\n }\n });\n return [{\n onClick: handleClick,\n 'aria-disabled': disabled || undefined,\n 'aria-selected': isActive,\n [dataAttr('dropdown-item')]: ''\n }, {\n isActive\n }];\n}\nconst DropdownItem = /*#__PURE__*/React.forwardRef((_ref, ref) => {\n let {\n eventKey,\n disabled,\n onClick,\n active,\n as: Component = Button\n } = _ref,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n const [dropdownItemProps] = useDropdownItem({\n key: eventKey,\n href: props.href,\n disabled,\n onClick,\n active\n });\n return /*#__PURE__*/_jsx(Component, Object.assign({}, props, {\n ref: ref\n }, dropdownItemProps));\n});\nDropdownItem.displayName = 'DropdownItem';\nexport default DropdownItem;","import { createContext, useContext } from 'react';\nimport canUseDOM from 'dom-helpers/canUseDOM';\nconst Context = /*#__PURE__*/createContext(canUseDOM ? window : undefined);\nexport const WindowProvider = Context.Provider;\n\n/**\n * The document \"window\" placed in React context. Helpful for determining\n * SSR context, or when rendering into an iframe.\n *\n * @returns the current window\n */\nexport default function useWindow() {\n return useContext(Context);\n}","import qsa from 'dom-helpers/querySelectorAll';\nimport addEventListener from 'dom-helpers/addEventListener';\nimport { useCallback, useRef, useEffect, useMemo, useContext } from 'react';\nimport * as React from 'react';\nimport { useUncontrolledProp } from 'uncontrollable';\nimport usePrevious from '@restart/hooks/usePrevious';\nimport useForceUpdate from '@restart/hooks/useForceUpdate';\nimport useEventListener from '@restart/hooks/useEventListener';\nimport useEventCallback from '@restart/hooks/useEventCallback';\nimport DropdownContext from './DropdownContext';\nimport DropdownMenu from './DropdownMenu';\nimport DropdownToggle, { isRoleMenu } from './DropdownToggle';\nimport DropdownItem from './DropdownItem';\nimport SelectableContext from './SelectableContext';\nimport { dataAttr } from './DataKey';\nimport useWindow from './useWindow';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction useRefWithUpdate() {\n const forceUpdate = useForceUpdate();\n const ref = useRef(null);\n const attachRef = useCallback(element => {\n ref.current = element;\n // ensure that a menu set triggers an update for consumers\n forceUpdate();\n }, [forceUpdate]);\n return [ref, attachRef];\n}\n\n/**\n * @displayName Dropdown\n * @public\n */\nfunction Dropdown({\n defaultShow,\n show: rawShow,\n onSelect,\n onToggle: rawOnToggle,\n itemSelector = `* [${dataAttr('dropdown-item')}]`,\n focusFirstItemOnShow,\n placement = 'bottom-start',\n children\n}) {\n const window = useWindow();\n const [show, onToggle] = useUncontrolledProp(rawShow, defaultShow, rawOnToggle);\n\n // We use normal refs instead of useCallbackRef in order to populate the\n // the value as quickly as possible, otherwise the effect to focus the element\n // may run before the state value is set\n const [menuRef, setMenu] = useRefWithUpdate();\n const menuElement = menuRef.current;\n const [toggleRef, setToggle] = useRefWithUpdate();\n const toggleElement = toggleRef.current;\n const lastShow = usePrevious(show);\n const lastSourceEvent = useRef(null);\n const focusInDropdown = useRef(false);\n const onSelectCtx = useContext(SelectableContext);\n const toggle = useCallback((nextShow, event, source = event == null ? void 0 : event.type) => {\n onToggle(nextShow, {\n originalEvent: event,\n source\n });\n }, [onToggle]);\n const handleSelect = useEventCallback((key, event) => {\n onSelect == null ? void 0 : onSelect(key, event);\n toggle(false, event, 'select');\n if (!event.isPropagationStopped()) {\n onSelectCtx == null ? void 0 : onSelectCtx(key, event);\n }\n });\n const context = useMemo(() => ({\n toggle,\n placement,\n show,\n menuElement,\n toggleElement,\n setMenu,\n setToggle\n }), [toggle, placement, show, menuElement, toggleElement, setMenu, setToggle]);\n if (menuElement && lastShow && !show) {\n focusInDropdown.current = menuElement.contains(menuElement.ownerDocument.activeElement);\n }\n const focusToggle = useEventCallback(() => {\n if (toggleElement && toggleElement.focus) {\n toggleElement.focus();\n }\n });\n const maybeFocusFirst = useEventCallback(() => {\n const type = lastSourceEvent.current;\n let focusType = focusFirstItemOnShow;\n if (focusType == null) {\n focusType = menuRef.current && isRoleMenu(menuRef.current) ? 'keyboard' : false;\n }\n if (focusType === false || focusType === 'keyboard' && !/^key.+$/.test(type)) {\n return;\n }\n const first = qsa(menuRef.current, itemSelector)[0];\n if (first && first.focus) first.focus();\n });\n useEffect(() => {\n if (show) maybeFocusFirst();else if (focusInDropdown.current) {\n focusInDropdown.current = false;\n focusToggle();\n }\n // only `show` should be changing\n }, [show, focusInDropdown, focusToggle, maybeFocusFirst]);\n useEffect(() => {\n lastSourceEvent.current = null;\n });\n const getNextFocusedChild = (current, offset) => {\n if (!menuRef.current) return null;\n const items = qsa(menuRef.current, itemSelector);\n let index = items.indexOf(current) + offset;\n index = Math.max(0, Math.min(index, items.length));\n return items[index];\n };\n useEventListener(useCallback(() => window.document, [window]), 'keydown', event => {\n var _menuRef$current, _toggleRef$current;\n const {\n key\n } = event;\n const target = event.target;\n const fromMenu = (_menuRef$current = menuRef.current) == null ? void 0 : _menuRef$current.contains(target);\n const fromToggle = (_toggleRef$current = toggleRef.current) == null ? void 0 : _toggleRef$current.contains(target);\n\n // Second only to https://github.com/twbs/bootstrap/blob/8cfbf6933b8a0146ac3fbc369f19e520bd1ebdac/js/src/dropdown.js#L400\n // in inscrutability\n const isInput = /input|textarea/i.test(target.tagName);\n if (isInput && (key === ' ' || key !== 'Escape' && fromMenu || key === 'Escape' && target.type === 'search')) {\n return;\n }\n if (!fromMenu && !fromToggle) {\n return;\n }\n if (key === 'Tab' && (!menuRef.current || !show)) {\n return;\n }\n lastSourceEvent.current = event.type;\n const meta = {\n originalEvent: event,\n source: event.type\n };\n switch (key) {\n case 'ArrowUp':\n {\n const next = getNextFocusedChild(target, -1);\n if (next && next.focus) next.focus();\n event.preventDefault();\n return;\n }\n case 'ArrowDown':\n event.preventDefault();\n if (!show) {\n onToggle(true, meta);\n } else {\n const next = getNextFocusedChild(target, 1);\n if (next && next.focus) next.focus();\n }\n return;\n case 'Tab':\n // on keydown the target is the element being tabbed FROM, we need that\n // to know if this event is relevant to this dropdown (e.g. in this menu).\n // On `keyup` the target is the element being tagged TO which we use to check\n // if focus has left the menu\n addEventListener(target.ownerDocument, 'keyup', e => {\n var _menuRef$current2;\n if (e.key === 'Tab' && !e.target || !((_menuRef$current2 = menuRef.current) != null && _menuRef$current2.contains(e.target))) {\n onToggle(false, meta);\n }\n }, {\n once: true\n });\n break;\n case 'Escape':\n if (key === 'Escape') {\n event.preventDefault();\n event.stopPropagation();\n }\n onToggle(false, meta);\n break;\n default:\n }\n });\n return /*#__PURE__*/_jsx(SelectableContext.Provider, {\n value: handleSelect,\n children: /*#__PURE__*/_jsx(DropdownContext.Provider, {\n value: context,\n children: children\n })\n });\n}\nDropdown.displayName = 'Dropdown';\nDropdown.Menu = DropdownMenu;\nDropdown.Toggle = DropdownToggle;\nDropdown.Item = DropdownItem;\nexport default Dropdown;","\"use client\";\n\nimport * as React from 'react';\nconst DropdownContext = /*#__PURE__*/React.createContext({});\nDropdownContext.displayName = 'DropdownContext';\nexport default DropdownContext;","\"use client\";\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst DropdownDivider = /*#__PURE__*/React.forwardRef(({\n className,\n bsPrefix,\n as: Component = 'hr',\n role = 'separator',\n ...props\n}, ref) => {\n bsPrefix = useBootstrapPrefix(bsPrefix, 'dropdown-divider');\n return /*#__PURE__*/_jsx(Component, {\n ref: ref,\n className: classNames(className, bsPrefix),\n role: role,\n ...props\n });\n});\nDropdownDivider.displayName = 'DropdownDivider';\nexport default DropdownDivider;","\"use client\";\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst DropdownHeader = /*#__PURE__*/React.forwardRef(({\n className,\n bsPrefix,\n as: Component = 'div',\n role = 'heading',\n ...props\n}, ref) => {\n bsPrefix = useBootstrapPrefix(bsPrefix, 'dropdown-header');\n return /*#__PURE__*/_jsx(Component, {\n ref: ref,\n className: classNames(className, bsPrefix),\n role: role,\n ...props\n });\n});\nDropdownHeader.displayName = 'DropdownHeader';\nexport default DropdownHeader;","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useDropdownItem } from '@restart/ui/DropdownItem';\nimport Anchor from '@restart/ui/Anchor';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst DropdownItem = /*#__PURE__*/React.forwardRef(({\n bsPrefix,\n className,\n eventKey,\n disabled = false,\n onClick,\n active,\n as: Component = Anchor,\n ...props\n}, ref) => {\n const prefix = useBootstrapPrefix(bsPrefix, 'dropdown-item');\n const [dropdownItemProps, meta] = useDropdownItem({\n key: eventKey,\n href: props.href,\n disabled,\n onClick,\n active\n });\n return /*#__PURE__*/_jsx(Component, {\n ...props,\n ...dropdownItemProps,\n ref: ref,\n className: classNames(className, prefix, meta.isActive && 'active', disabled && 'disabled')\n });\n});\nDropdownItem.displayName = 'DropdownItem';\nexport default DropdownItem;","\"use client\";\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst DropdownItemText = /*#__PURE__*/React.forwardRef(({\n className,\n bsPrefix,\n as: Component = 'span',\n ...props\n}, ref) => {\n bsPrefix = useBootstrapPrefix(bsPrefix, 'dropdown-item-text');\n return /*#__PURE__*/_jsx(Component, {\n ref: ref,\n className: classNames(className, bsPrefix),\n ...props\n });\n});\nDropdownItemText.displayName = 'DropdownItemText';\nexport default DropdownItemText;","\"use client\";\n\nimport * as React from 'react';\nconst context = /*#__PURE__*/React.createContext(null);\ncontext.displayName = 'InputGroupContext';\nexport default context;","\"use client\";\n\nimport * as React from 'react';\n\n// TODO: check\n\nconst context = /*#__PURE__*/React.createContext(null);\ncontext.displayName = 'NavbarContext';\nexport default context;","import invariant from 'invariant';\nimport { useCallback } from 'react';\nimport useMergedRefs from '@restart/hooks/useMergedRefs';\nexport default function useWrappedRefWithWarning(ref, componentName) {\n // @ts-ignore\n if (!(process.env.NODE_ENV !== \"production\")) return ref;\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const warningRef = useCallback(refValue => {\n !(refValue == null || !refValue.isReactComponent) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `${componentName} injected a ref to a provided \\`as\\` component that resolved to a component instance instead of a DOM element. ` + 'Use `React.forwardRef` to provide the injected ref to the class component as a prop in order to pass it directly to a DOM element') : invariant(false) : void 0;\n }, [componentName]);\n // eslint-disable-next-line react-hooks/rules-of-hooks\n return useMergedRefs(warningRef, ref);\n}","import PropTypes from 'prop-types';\nconst alignDirection = PropTypes.oneOf(['start', 'end']);\nexport const alignPropType = PropTypes.oneOfType([alignDirection, PropTypes.shape({\n sm: alignDirection\n}), PropTypes.shape({\n md: alignDirection\n}), PropTypes.shape({\n lg: alignDirection\n}), PropTypes.shape({\n xl: alignDirection\n}), PropTypes.shape({\n xxl: alignDirection\n}), PropTypes.object]);","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useContext } from 'react';\nimport { useDropdownMenu } from '@restart/ui/DropdownMenu';\nimport useIsomorphicEffect from '@restart/hooks/useIsomorphicEffect';\nimport useMergedRefs from '@restart/hooks/useMergedRefs';\nimport warning from 'warning';\nimport DropdownContext from './DropdownContext';\nimport InputGroupContext from './InputGroupContext';\nimport NavbarContext from './NavbarContext';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport useWrappedRefWithWarning from './useWrappedRefWithWarning';\nimport { alignPropType } from './types';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function getDropdownMenuPlacement(alignEnd, dropDirection, isRTL) {\n const topStart = isRTL ? 'top-end' : 'top-start';\n const topEnd = isRTL ? 'top-start' : 'top-end';\n const bottomStart = isRTL ? 'bottom-end' : 'bottom-start';\n const bottomEnd = isRTL ? 'bottom-start' : 'bottom-end';\n const leftStart = isRTL ? 'right-start' : 'left-start';\n const leftEnd = isRTL ? 'right-end' : 'left-end';\n const rightStart = isRTL ? 'left-start' : 'right-start';\n const rightEnd = isRTL ? 'left-end' : 'right-end';\n let placement = alignEnd ? bottomEnd : bottomStart;\n if (dropDirection === 'up') placement = alignEnd ? topEnd : topStart;else if (dropDirection === 'end') placement = alignEnd ? rightEnd : rightStart;else if (dropDirection === 'start') placement = alignEnd ? leftEnd : leftStart;else if (dropDirection === 'down-centered') placement = 'bottom';else if (dropDirection === 'up-centered') placement = 'top';\n return placement;\n}\nconst DropdownMenu = /*#__PURE__*/React.forwardRef(({\n bsPrefix,\n className,\n align,\n rootCloseEvent,\n flip = true,\n show: showProps,\n renderOnMount,\n // Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\n as: Component = 'div',\n popperConfig,\n variant,\n ...props\n}, ref) => {\n let alignEnd = false;\n const isNavbar = useContext(NavbarContext);\n const prefix = useBootstrapPrefix(bsPrefix, 'dropdown-menu');\n const {\n align: contextAlign,\n drop,\n isRTL\n } = useContext(DropdownContext);\n align = align || contextAlign;\n const isInputGroup = useContext(InputGroupContext);\n const alignClasses = [];\n if (align) {\n if (typeof align === 'object') {\n const keys = Object.keys(align);\n process.env.NODE_ENV !== \"production\" ? warning(keys.length === 1, 'There should only be 1 breakpoint when passing an object to `align`') : void 0;\n if (keys.length) {\n const brkPoint = keys[0];\n const direction = align[brkPoint];\n\n // .dropdown-menu-end is required for responsively aligning\n // left in addition to align left classes.\n alignEnd = direction === 'start';\n alignClasses.push(`${prefix}-${brkPoint}-${direction}`);\n }\n } else if (align === 'end') {\n alignEnd = true;\n }\n }\n const placement = getDropdownMenuPlacement(alignEnd, drop, isRTL);\n const [menuProps, {\n hasShown,\n popper,\n show,\n toggle\n }] = useDropdownMenu({\n flip,\n rootCloseEvent,\n show: showProps,\n usePopper: !isNavbar && alignClasses.length === 0,\n offset: [0, 2],\n popperConfig,\n placement\n });\n menuProps.ref = useMergedRefs(useWrappedRefWithWarning(ref, 'DropdownMenu'), menuProps.ref);\n useIsomorphicEffect(() => {\n // Popper's initial position for the menu is incorrect when\n // renderOnMount=true. Need to call update() to correct it.\n if (show) popper == null ? void 0 : popper.update();\n }, [show]);\n if (!hasShown && !renderOnMount && !isInputGroup) return null;\n\n // For custom components provide additional, non-DOM, props;\n if (typeof Component !== 'string') {\n menuProps.show = show;\n menuProps.close = () => toggle == null ? void 0 : toggle(false);\n menuProps.align = align;\n }\n let style = props.style;\n if (popper != null && popper.placement) {\n // we don't need the default popper style,\n // menus are display: none when not shown.\n style = {\n ...props.style,\n ...menuProps.style\n };\n props['x-placement'] = popper.placement;\n }\n return /*#__PURE__*/_jsx(Component, {\n ...props,\n ...menuProps,\n style: style\n // Bootstrap css requires this data attrib to style responsive menus.\n ,\n ...((alignClasses.length || isNavbar) && {\n 'data-bs-popper': 'static'\n }),\n className: classNames(className, prefix, show && 'show', alignEnd && `${prefix}-end`, variant && `${prefix}-${variant}`, ...alignClasses)\n });\n});\nDropdownMenu.displayName = 'DropdownMenu';\nexport default DropdownMenu;","\"use client\";\n\nimport useMergedRefs from '@restart/hooks/useMergedRefs';\nimport DropdownContext from '@restart/ui/DropdownContext';\nimport { useDropdownToggle } from '@restart/ui/DropdownToggle';\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useContext } from 'react';\nimport Button from './Button';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport useWrappedRefWithWarning from './useWrappedRefWithWarning';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst DropdownToggle = /*#__PURE__*/React.forwardRef(({\n bsPrefix,\n split,\n className,\n childBsPrefix,\n // Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\n as: Component = Button,\n ...props\n}, ref) => {\n const prefix = useBootstrapPrefix(bsPrefix, 'dropdown-toggle');\n const dropdownContext = useContext(DropdownContext);\n if (childBsPrefix !== undefined) {\n props.bsPrefix = childBsPrefix;\n }\n const [toggleProps] = useDropdownToggle();\n toggleProps.ref = useMergedRefs(toggleProps.ref, useWrappedRefWithWarning(ref, 'DropdownToggle'));\n\n // This intentionally forwards size and variant (if set) to the\n // underlying component, to allow it to render size and style variants.\n return /*#__PURE__*/_jsx(Component, {\n className: classNames(className, prefix, split && `${prefix}-split`, (dropdownContext == null ? void 0 : dropdownContext.show) && 'show'),\n ...toggleProps,\n ...props\n });\n});\nDropdownToggle.displayName = 'DropdownToggle';\nexport default DropdownToggle;","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useContext, useMemo } from 'react';\nimport BaseDropdown from '@restart/ui/Dropdown';\nimport { useUncontrolled } from 'uncontrollable';\nimport useEventCallback from '@restart/hooks/useEventCallback';\nimport DropdownContext from './DropdownContext';\nimport DropdownDivider from './DropdownDivider';\nimport DropdownHeader from './DropdownHeader';\nimport DropdownItem from './DropdownItem';\nimport DropdownItemText from './DropdownItemText';\nimport DropdownMenu, { getDropdownMenuPlacement } from './DropdownMenu';\nimport DropdownToggle from './DropdownToggle';\nimport InputGroupContext from './InputGroupContext';\nimport { useBootstrapPrefix, useIsRTL } from './ThemeProvider';\nimport { alignPropType } from './types';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst Dropdown = /*#__PURE__*/React.forwardRef((pProps, ref) => {\n const {\n bsPrefix,\n drop = 'down',\n show,\n className,\n align = 'start',\n onSelect,\n onToggle,\n focusFirstItemOnShow,\n // Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\n as: Component = 'div',\n navbar: _4,\n autoClose = true,\n ...props\n } = useUncontrolled(pProps, {\n show: 'onToggle'\n });\n const isInputGroup = useContext(InputGroupContext);\n const prefix = useBootstrapPrefix(bsPrefix, 'dropdown');\n const isRTL = useIsRTL();\n const isClosingPermitted = source => {\n // autoClose=false only permits close on button click\n if (autoClose === false) return source === 'click';\n\n // autoClose=inside doesn't permit close on rootClose\n if (autoClose === 'inside') return source !== 'rootClose';\n\n // autoClose=outside doesn't permit close on select\n if (autoClose === 'outside') return source !== 'select';\n return true;\n };\n const handleToggle = useEventCallback((nextShow, meta) => {\n var _meta$originalEvent, _meta$originalEvent$t;\n /** Checking if target of event is ToggleButton,\n * if it is then nullify mousedown event\n */\n const isToggleButton = (_meta$originalEvent = meta.originalEvent) == null ? void 0 : (_meta$originalEvent$t = _meta$originalEvent.target) == null ? void 0 : _meta$originalEvent$t.classList.contains('dropdown-toggle');\n if (isToggleButton && meta.source === 'mousedown') {\n return;\n }\n if (meta.originalEvent.currentTarget === document && (meta.source !== 'keydown' || meta.originalEvent.key === 'Escape')) meta.source = 'rootClose';\n if (isClosingPermitted(meta.source)) onToggle == null ? void 0 : onToggle(nextShow, meta);\n });\n const alignEnd = align === 'end';\n const placement = getDropdownMenuPlacement(alignEnd, drop, isRTL);\n const contextValue = useMemo(() => ({\n align,\n drop,\n isRTL\n }), [align, drop, isRTL]);\n const directionClasses = {\n down: prefix,\n 'down-centered': `${prefix}-center`,\n up: 'dropup',\n 'up-centered': 'dropup-center dropup',\n end: 'dropend',\n start: 'dropstart'\n };\n return /*#__PURE__*/_jsx(DropdownContext.Provider, {\n value: contextValue,\n children: /*#__PURE__*/_jsx(BaseDropdown, {\n placement: placement,\n show: show,\n onSelect: onSelect,\n onToggle: handleToggle,\n focusFirstItemOnShow: focusFirstItemOnShow,\n itemSelector: `.${prefix}-item:not(.disabled):not(:disabled)`,\n children: isInputGroup ? props.children : /*#__PURE__*/_jsx(Component, {\n ...props,\n ref: ref,\n className: classNames(className, show && 'show', directionClasses[drop])\n })\n })\n });\n});\nDropdown.displayName = 'Dropdown';\nexport default Object.assign(Dropdown, {\n Toggle: DropdownToggle,\n Menu: DropdownMenu,\n Item: DropdownItem,\n ItemText: DropdownItemText,\n Divider: DropdownDivider,\n Header: DropdownHeader\n});","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const propTypes = {\n /**\n * @default 'img'\n */\n bsPrefix: PropTypes.string,\n /**\n * Sets image as fluid image.\n */\n fluid: PropTypes.bool,\n /**\n * Sets image shape as rounded.\n */\n rounded: PropTypes.bool,\n /**\n * Sets image shape as circle.\n */\n roundedCircle: PropTypes.bool,\n /**\n * Sets image shape as thumbnail.\n */\n thumbnail: PropTypes.bool\n};\nconst Image = /*#__PURE__*/React.forwardRef(({\n bsPrefix,\n className,\n fluid = false,\n rounded = false,\n roundedCircle = false,\n thumbnail = false,\n ...props\n}, ref) => {\n bsPrefix = useBootstrapPrefix(bsPrefix, 'img');\n return /*#__PURE__*/_jsx(\"img\", {\n // eslint-disable-line jsx-a11y/alt-text\n ref: ref,\n ...props,\n className: classNames(className, fluid && `${bsPrefix}-fluid`, rounded && `rounded`, roundedCircle && `rounded-circle`, thumbnail && `${bsPrefix}-thumbnail`)\n });\n});\nImage.displayName = 'Image';\nexport default Image;","import classNames from 'classnames';\nimport * as React from 'react';\nimport Image, { propTypes as imagePropTypes } from './Image';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst FigureImage = /*#__PURE__*/React.forwardRef(({\n className,\n fluid = true,\n ...props\n}, ref) => /*#__PURE__*/_jsx(Image, {\n ref: ref,\n ...props,\n fluid: fluid,\n className: classNames(className, 'figure-img')\n}));\nFigureImage.displayName = 'FigureImage';\nFigureImage.propTypes = imagePropTypes;\nexport default FigureImage;","\"use client\";\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst FigureCaption = /*#__PURE__*/React.forwardRef(({\n className,\n bsPrefix,\n as: Component = 'figcaption',\n ...props\n}, ref) => {\n bsPrefix = useBootstrapPrefix(bsPrefix, 'figure-caption');\n return /*#__PURE__*/_jsx(Component, {\n ref: ref,\n className: classNames(className, bsPrefix),\n ...props\n });\n});\nFigureCaption.displayName = 'FigureCaption';\nexport default FigureCaption;","\"use client\";\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport FigureImage from './FigureImage';\nimport FigureCaption from './FigureCaption';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst Figure = /*#__PURE__*/React.forwardRef(({\n className,\n bsPrefix,\n as: Component = 'figure',\n ...props\n}, ref) => {\n bsPrefix = useBootstrapPrefix(bsPrefix, 'figure');\n return /*#__PURE__*/_jsx(Component, {\n ref: ref,\n className: classNames(className, bsPrefix),\n ...props\n });\n});\nFigure.displayName = 'Figure';\nexport default Object.assign(Figure, {\n Image: FigureImage,\n Caption: FigureCaption\n});","import classNames from 'classnames';\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst propTypes = {\n /**\n * Specify whether the feedback is for valid or invalid fields\n *\n * @type {('valid'|'invalid')}\n */\n type: PropTypes.string,\n /** Display feedback as a tooltip. */\n tooltip: PropTypes.bool,\n as: PropTypes.elementType\n};\nconst Feedback = /*#__PURE__*/React.forwardRef(\n// Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\n({\n as: Component = 'div',\n className,\n type = 'valid',\n tooltip = false,\n ...props\n}, ref) => /*#__PURE__*/_jsx(Component, {\n ...props,\n ref: ref,\n className: classNames(className, `${type}-${tooltip ? 'tooltip' : 'feedback'}`)\n}));\nFeedback.displayName = 'Feedback';\nFeedback.propTypes = propTypes;\nexport default Feedback;","\"use client\";\n\nimport * as React from 'react';\n\n// TODO\n\nconst FormContext = /*#__PURE__*/React.createContext({});\nexport default FormContext;","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useContext } from 'react';\nimport FormContext from './FormContext';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst FormCheckInput = /*#__PURE__*/React.forwardRef(({\n id,\n bsPrefix,\n className,\n type = 'checkbox',\n isValid = false,\n isInvalid = false,\n // Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\n as: Component = 'input',\n ...props\n}, ref) => {\n const {\n controlId\n } = useContext(FormContext);\n bsPrefix = useBootstrapPrefix(bsPrefix, 'form-check-input');\n return /*#__PURE__*/_jsx(Component, {\n ...props,\n ref: ref,\n type: type,\n id: id || controlId,\n className: classNames(className, bsPrefix, isValid && 'is-valid', isInvalid && 'is-invalid')\n });\n});\nFormCheckInput.displayName = 'FormCheckInput';\nexport default FormCheckInput;","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useContext } from 'react';\nimport FormContext from './FormContext';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst FormCheckLabel = /*#__PURE__*/React.forwardRef(({\n bsPrefix,\n className,\n htmlFor,\n ...props\n}, ref) => {\n const {\n controlId\n } = useContext(FormContext);\n bsPrefix = useBootstrapPrefix(bsPrefix, 'form-check-label');\n return /*#__PURE__*/_jsx(\"label\", {\n ...props,\n ref: ref,\n htmlFor: htmlFor || controlId,\n className: classNames(className, bsPrefix)\n });\n});\nFormCheckLabel.displayName = 'FormCheckLabel';\nexport default FormCheckLabel;","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useContext, useMemo } from 'react';\nimport Feedback from './Feedback';\nimport FormCheckInput from './FormCheckInput';\nimport FormCheckLabel from './FormCheckLabel';\nimport FormContext from './FormContext';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { hasChildOfType } from './ElementChildren';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst FormCheck = /*#__PURE__*/React.forwardRef(({\n id,\n bsPrefix,\n bsSwitchPrefix,\n inline = false,\n reverse = false,\n disabled = false,\n isValid = false,\n isInvalid = false,\n feedbackTooltip = false,\n feedback,\n feedbackType,\n className,\n style,\n title = '',\n type = 'checkbox',\n label,\n children,\n // Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\n as = 'input',\n ...props\n}, ref) => {\n bsPrefix = useBootstrapPrefix(bsPrefix, 'form-check');\n bsSwitchPrefix = useBootstrapPrefix(bsSwitchPrefix, 'form-switch');\n const {\n controlId\n } = useContext(FormContext);\n const innerFormContext = useMemo(() => ({\n controlId: id || controlId\n }), [controlId, id]);\n const hasLabel = !children && label != null && label !== false || hasChildOfType(children, FormCheckLabel);\n const input = /*#__PURE__*/_jsx(FormCheckInput, {\n ...props,\n type: type === 'switch' ? 'checkbox' : type,\n ref: ref,\n isValid: isValid,\n isInvalid: isInvalid,\n disabled: disabled,\n as: as\n });\n return /*#__PURE__*/_jsx(FormContext.Provider, {\n value: innerFormContext,\n children: /*#__PURE__*/_jsx(\"div\", {\n style: style,\n className: classNames(className, hasLabel && bsPrefix, inline && `${bsPrefix}-inline`, reverse && `${bsPrefix}-reverse`, type === 'switch' && bsSwitchPrefix),\n children: children || /*#__PURE__*/_jsxs(_Fragment, {\n children: [input, hasLabel && /*#__PURE__*/_jsx(FormCheckLabel, {\n title: title,\n children: label\n }), feedback && /*#__PURE__*/_jsx(Feedback, {\n type: feedbackType,\n tooltip: feedbackTooltip,\n children: feedback\n })]\n })\n })\n });\n});\nFormCheck.displayName = 'FormCheck';\nexport default Object.assign(FormCheck, {\n Input: FormCheckInput,\n Label: FormCheckLabel\n});","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useContext } from 'react';\nimport warning from 'warning';\nimport Feedback from './Feedback';\nimport FormContext from './FormContext';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst FormControl = /*#__PURE__*/React.forwardRef(({\n bsPrefix,\n type,\n size,\n htmlSize,\n id,\n className,\n isValid = false,\n isInvalid = false,\n plaintext,\n readOnly,\n // Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\n as: Component = 'input',\n ...props\n}, ref) => {\n const {\n controlId\n } = useContext(FormContext);\n bsPrefix = useBootstrapPrefix(bsPrefix, 'form-control');\n process.env.NODE_ENV !== \"production\" ? warning(controlId == null || !id, '`controlId` is ignored on `` when `id` is specified.') : void 0;\n return /*#__PURE__*/_jsx(Component, {\n ...props,\n type: type,\n size: htmlSize,\n ref: ref,\n readOnly: readOnly,\n id: id || controlId,\n className: classNames(className, plaintext ? `${bsPrefix}-plaintext` : bsPrefix, size && `${bsPrefix}-${size}`, type === 'color' && `${bsPrefix}-color`, isValid && 'is-valid', isInvalid && 'is-invalid')\n });\n});\nFormControl.displayName = 'FormControl';\nexport default Object.assign(FormControl, {\n Feedback\n});","\"use client\";\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst FormFloating = /*#__PURE__*/React.forwardRef(({\n className,\n bsPrefix,\n as: Component = 'div',\n ...props\n}, ref) => {\n bsPrefix = useBootstrapPrefix(bsPrefix, 'form-floating');\n return /*#__PURE__*/_jsx(Component, {\n ref: ref,\n className: classNames(className, bsPrefix),\n ...props\n });\n});\nFormFloating.displayName = 'FormFloating';\nexport default FormFloating;","import * as React from 'react';\nimport { useMemo } from 'react';\nimport FormContext from './FormContext';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst FormGroup = /*#__PURE__*/React.forwardRef(({\n controlId,\n // Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\n as: Component = 'div',\n ...props\n}, ref) => {\n const context = useMemo(() => ({\n controlId\n }), [controlId]);\n return /*#__PURE__*/_jsx(FormContext.Provider, {\n value: context,\n children: /*#__PURE__*/_jsx(Component, {\n ...props,\n ref: ref\n })\n });\n});\nFormGroup.displayName = 'FormGroup';\nexport default FormGroup;","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useContext } from 'react';\nimport warning from 'warning';\nimport Col from './Col';\nimport FormContext from './FormContext';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst FormLabel = /*#__PURE__*/React.forwardRef(({\n // Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\n as: Component = 'label',\n bsPrefix,\n column = false,\n visuallyHidden = false,\n className,\n htmlFor,\n ...props\n}, ref) => {\n const {\n controlId\n } = useContext(FormContext);\n bsPrefix = useBootstrapPrefix(bsPrefix, 'form-label');\n let columnClass = 'col-form-label';\n if (typeof column === 'string') columnClass = `${columnClass} ${columnClass}-${column}`;\n const classes = classNames(className, bsPrefix, visuallyHidden && 'visually-hidden', column && columnClass);\n process.env.NODE_ENV !== \"production\" ? warning(controlId == null || !htmlFor, '`controlId` is ignored on `` when `htmlFor` is specified.') : void 0;\n htmlFor = htmlFor || controlId;\n if (column) return /*#__PURE__*/_jsx(Col, {\n ref: ref,\n as: \"label\",\n className: classes,\n htmlFor: htmlFor,\n ...props\n });\n return (\n /*#__PURE__*/\n // eslint-disable-next-line jsx-a11y/label-has-for, jsx-a11y/label-has-associated-control\n _jsx(Component, {\n ref: ref,\n className: classes,\n htmlFor: htmlFor,\n ...props\n })\n );\n});\nFormLabel.displayName = 'FormLabel';\nexport default FormLabel;","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useContext } from 'react';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport FormContext from './FormContext';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst FormRange = /*#__PURE__*/React.forwardRef(({\n bsPrefix,\n className,\n id,\n ...props\n}, ref) => {\n const {\n controlId\n } = useContext(FormContext);\n bsPrefix = useBootstrapPrefix(bsPrefix, 'form-range');\n return /*#__PURE__*/_jsx(\"input\", {\n ...props,\n type: \"range\",\n ref: ref,\n className: classNames(className, bsPrefix),\n id: id || controlId\n });\n});\nFormRange.displayName = 'FormRange';\nexport default FormRange;","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useContext } from 'react';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport FormContext from './FormContext';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst FormSelect = /*#__PURE__*/React.forwardRef(({\n bsPrefix,\n size,\n htmlSize,\n className,\n isValid = false,\n isInvalid = false,\n id,\n ...props\n}, ref) => {\n const {\n controlId\n } = useContext(FormContext);\n bsPrefix = useBootstrapPrefix(bsPrefix, 'form-select');\n return /*#__PURE__*/_jsx(\"select\", {\n ...props,\n size: htmlSize,\n ref: ref,\n className: classNames(className, bsPrefix, size && `${bsPrefix}-${size}`, isValid && `is-valid`, isInvalid && `is-invalid`),\n id: id || controlId\n });\n});\nFormSelect.displayName = 'FormSelect';\nexport default FormSelect;","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst FormText = /*#__PURE__*/React.forwardRef(\n// Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\n({\n bsPrefix,\n className,\n as: Component = 'small',\n muted,\n ...props\n}, ref) => {\n bsPrefix = useBootstrapPrefix(bsPrefix, 'form-text');\n return /*#__PURE__*/_jsx(Component, {\n ...props,\n ref: ref,\n className: classNames(className, bsPrefix, muted && 'text-muted')\n });\n});\nFormText.displayName = 'FormText';\nexport default FormText;","import * as React from 'react';\nimport FormCheck from './FormCheck';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst Switch = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/_jsx(FormCheck, {\n ...props,\n ref: ref,\n type: \"switch\"\n}));\nSwitch.displayName = 'Switch';\nexport default Object.assign(Switch, {\n Input: FormCheck.Input,\n Label: FormCheck.Label\n});","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport FormGroup from './FormGroup';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst FloatingLabel = /*#__PURE__*/React.forwardRef(({\n bsPrefix,\n className,\n children,\n controlId,\n label,\n ...props\n}, ref) => {\n bsPrefix = useBootstrapPrefix(bsPrefix, 'form-floating');\n return /*#__PURE__*/_jsxs(FormGroup, {\n ref: ref,\n className: classNames(className, bsPrefix),\n controlId: controlId,\n ...props,\n children: [children, /*#__PURE__*/_jsx(\"label\", {\n htmlFor: controlId,\n children: label\n })]\n });\n});\nFloatingLabel.displayName = 'FloatingLabel';\nexport default FloatingLabel;","import classNames from 'classnames';\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\nimport FormCheck from './FormCheck';\nimport FormControl from './FormControl';\nimport FormFloating from './FormFloating';\nimport FormGroup from './FormGroup';\nimport FormLabel from './FormLabel';\nimport FormRange from './FormRange';\nimport FormSelect from './FormSelect';\nimport FormText from './FormText';\nimport Switch from './Switch';\nimport FloatingLabel from './FloatingLabel';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst propTypes = {\n /**\n * The Form `ref` will be forwarded to the underlying element,\n * which means, unless it's rendered `as` a composite component,\n * it will be a DOM node, when resolved.\n *\n * @type {ReactRef}\n * @alias ref\n */\n _ref: PropTypes.any,\n /**\n * Mark a form as having been validated. Setting it to `true` will\n * toggle any validation styles on the forms elements.\n */\n validated: PropTypes.bool,\n as: PropTypes.elementType\n};\nconst Form = /*#__PURE__*/React.forwardRef(({\n className,\n validated,\n // Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\n as: Component = 'form',\n ...props\n}, ref) => /*#__PURE__*/_jsx(Component, {\n ...props,\n ref: ref,\n className: classNames(className, validated && 'was-validated')\n}));\nForm.displayName = 'Form';\nForm.propTypes = propTypes;\nexport default Object.assign(Form, {\n Group: FormGroup,\n Control: FormControl,\n Floating: FormFloating,\n Check: FormCheck,\n Switch,\n Label: FormLabel,\n Text: FormText,\n Range: FormRange,\n Select: FormSelect,\n FloatingLabel\n});","import * as React from 'react';\nconst TabContext = /*#__PURE__*/React.createContext(null);\nexport default TabContext;","const _excluded = [\"as\", \"active\", \"eventKey\"];\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport * as React from 'react';\nimport { useContext } from 'react';\nimport useEventCallback from '@restart/hooks/useEventCallback';\nimport NavContext from './NavContext';\nimport SelectableContext, { makeEventKey } from './SelectableContext';\nimport Button from './Button';\nimport { dataAttr } from './DataKey';\nimport TabContext from './TabContext';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function useNavItem({\n key,\n onClick,\n active,\n id,\n role,\n disabled\n}) {\n const parentOnSelect = useContext(SelectableContext);\n const navContext = useContext(NavContext);\n const tabContext = useContext(TabContext);\n let isActive = active;\n const props = {\n role\n };\n if (navContext) {\n if (!role && navContext.role === 'tablist') props.role = 'tab';\n const contextControllerId = navContext.getControllerId(key != null ? key : null);\n const contextControlledId = navContext.getControlledId(key != null ? key : null);\n\n // @ts-ignore\n props[dataAttr('event-key')] = key;\n props.id = contextControllerId || id;\n isActive = active == null && key != null ? navContext.activeKey === key : active;\n\n /**\n * Simplified scenario for `mountOnEnter`.\n *\n * While it would make sense to keep 'aria-controls' for tabs that have been mounted at least\n * once, it would also complicate the code quite a bit, for very little gain.\n * The following implementation is probably good enough.\n *\n * @see https://github.com/react-restart/ui/pull/40#issuecomment-1009971561\n */\n if (isActive || !(tabContext != null && tabContext.unmountOnExit) && !(tabContext != null && tabContext.mountOnEnter)) props['aria-controls'] = contextControlledId;\n }\n if (props.role === 'tab') {\n props['aria-selected'] = isActive;\n if (!isActive) {\n props.tabIndex = -1;\n }\n if (disabled) {\n props.tabIndex = -1;\n props['aria-disabled'] = true;\n }\n }\n props.onClick = useEventCallback(e => {\n if (disabled) return;\n onClick == null ? void 0 : onClick(e);\n if (key == null) {\n return;\n }\n if (parentOnSelect && !e.isPropagationStopped()) {\n parentOnSelect(key, e);\n }\n });\n return [props, {\n isActive\n }];\n}\nconst NavItem = /*#__PURE__*/React.forwardRef((_ref, ref) => {\n let {\n as: Component = Button,\n active,\n eventKey\n } = _ref,\n options = _objectWithoutPropertiesLoose(_ref, _excluded);\n const [props, meta] = useNavItem(Object.assign({\n key: makeEventKey(eventKey, options.href),\n active\n }, options));\n\n // @ts-ignore\n props[dataAttr('active')] = meta.isActive;\n return /*#__PURE__*/_jsx(Component, Object.assign({}, options, props, {\n ref: ref\n }));\n});\nNavItem.displayName = 'NavItem';\nexport default NavItem;","const _excluded = [\"as\", \"onSelect\", \"activeKey\", \"role\", \"onKeyDown\"];\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport qsa from 'dom-helpers/querySelectorAll';\nimport * as React from 'react';\nimport { useContext, useEffect, useRef } from 'react';\nimport useForceUpdate from '@restart/hooks/useForceUpdate';\nimport useMergedRefs from '@restart/hooks/useMergedRefs';\nimport NavContext from './NavContext';\nimport SelectableContext, { makeEventKey } from './SelectableContext';\nimport TabContext from './TabContext';\nimport { dataAttr, dataProp } from './DataKey';\nimport NavItem from './NavItem';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst noop = () => {};\nconst EVENT_KEY_ATTR = dataAttr('event-key');\nconst Nav = /*#__PURE__*/React.forwardRef((_ref, ref) => {\n let {\n // Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\n as: Component = 'div',\n onSelect,\n activeKey,\n role,\n onKeyDown\n } = _ref,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n // A ref and forceUpdate for refocus, b/c we only want to trigger when needed\n // and don't want to reset the set in the effect\n const forceUpdate = useForceUpdate();\n const needsRefocusRef = useRef(false);\n const parentOnSelect = useContext(SelectableContext);\n const tabContext = useContext(TabContext);\n let getControlledId, getControllerId;\n if (tabContext) {\n role = role || 'tablist';\n activeKey = tabContext.activeKey;\n // TODO: do we need to duplicate these?\n getControlledId = tabContext.getControlledId;\n getControllerId = tabContext.getControllerId;\n }\n const listNode = useRef(null);\n const getNextActiveTab = offset => {\n const currentListNode = listNode.current;\n if (!currentListNode) return null;\n const items = qsa(currentListNode, `[${EVENT_KEY_ATTR}]:not([aria-disabled=true])`);\n const activeChild = currentListNode.querySelector('[aria-selected=true]');\n if (!activeChild || activeChild !== document.activeElement) return null;\n const index = items.indexOf(activeChild);\n if (index === -1) return null;\n let nextIndex = index + offset;\n if (nextIndex >= items.length) nextIndex = 0;\n if (nextIndex < 0) nextIndex = items.length - 1;\n return items[nextIndex];\n };\n const handleSelect = (key, event) => {\n if (key == null) return;\n onSelect == null ? void 0 : onSelect(key, event);\n parentOnSelect == null ? void 0 : parentOnSelect(key, event);\n };\n const handleKeyDown = event => {\n onKeyDown == null ? void 0 : onKeyDown(event);\n if (!tabContext) {\n return;\n }\n let nextActiveChild;\n switch (event.key) {\n case 'ArrowLeft':\n case 'ArrowUp':\n nextActiveChild = getNextActiveTab(-1);\n break;\n case 'ArrowRight':\n case 'ArrowDown':\n nextActiveChild = getNextActiveTab(1);\n break;\n default:\n return;\n }\n if (!nextActiveChild) return;\n event.preventDefault();\n handleSelect(nextActiveChild.dataset[dataProp('EventKey')] || null, event);\n needsRefocusRef.current = true;\n forceUpdate();\n };\n useEffect(() => {\n if (listNode.current && needsRefocusRef.current) {\n const activeChild = listNode.current.querySelector(`[${EVENT_KEY_ATTR}][aria-selected=true]`);\n activeChild == null ? void 0 : activeChild.focus();\n }\n needsRefocusRef.current = false;\n });\n const mergedRef = useMergedRefs(ref, listNode);\n return /*#__PURE__*/_jsx(SelectableContext.Provider, {\n value: handleSelect,\n children: /*#__PURE__*/_jsx(NavContext.Provider, {\n value: {\n role,\n // used by NavLink to determine it's role\n activeKey: makeEventKey(activeKey),\n getControlledId: getControlledId || noop,\n getControllerId: getControllerId || noop\n },\n children: /*#__PURE__*/_jsx(Component, Object.assign({}, props, {\n onKeyDown: handleKeyDown,\n ref: mergedRef,\n role: role\n }))\n })\n });\n});\nNav.displayName = 'Nav';\nexport default Object.assign(Nav, {\n Item: NavItem\n});","import ownerDocument from 'dom-helpers/ownerDocument';\nimport canUseDOM from 'dom-helpers/canUseDOM';\nimport { useState, useEffect } from 'react';\nimport useWindow from './useWindow';\nexport const resolveContainerRef = (ref, document) => {\n if (!canUseDOM) return null;\n if (ref == null) return (document || ownerDocument()).body;\n if (typeof ref === 'function') ref = ref();\n if (ref && 'current' in ref) ref = ref.current;\n if (ref && ('nodeType' in ref || ref.getBoundingClientRect)) return ref;\n return null;\n};\nexport default function useWaitForDOMRef(ref, onResolved) {\n const window = useWindow();\n const [resolvedRef, setRef] = useState(() => resolveContainerRef(ref, window == null ? void 0 : window.document));\n if (!resolvedRef) {\n const earlyRef = resolveContainerRef(ref);\n if (earlyRef) setRef(earlyRef);\n }\n useEffect(() => {\n if (onResolved && resolvedRef) {\n onResolved(resolvedRef);\n }\n }, [onResolved, resolvedRef]);\n useEffect(() => {\n const nextRef = resolveContainerRef(ref);\n if (nextRef !== resolvedRef) {\n setRef(nextRef);\n }\n }, [ref, resolvedRef]);\n return resolvedRef;\n}","import useEventCallback from '@restart/hooks/useEventCallback';\nimport useMergedRefs from '@restart/hooks/useMergedRefs';\nimport { cloneElement, useEffect, useRef } from 'react';\nfunction NoopTransition({\n children,\n in: inProp,\n onExited,\n mountOnEnter,\n unmountOnExit\n}) {\n const ref = useRef(null);\n const hasEnteredRef = useRef(inProp);\n const handleExited = useEventCallback(onExited);\n useEffect(() => {\n if (inProp) hasEnteredRef.current = true;else {\n handleExited(ref.current);\n }\n }, [inProp, handleExited]);\n const combinedRef = useMergedRefs(ref, children.ref);\n const child = /*#__PURE__*/cloneElement(children, {\n ref: combinedRef\n });\n if (inProp) return child;\n if (unmountOnExit) {\n return null;\n }\n if (!hasEnteredRef.current && mountOnEnter) {\n return null;\n }\n return child;\n}\nexport default NoopTransition;","import useMergedRefs from '@restart/hooks/useMergedRefs';\nimport useEventCallback from '@restart/hooks/useEventCallback';\nimport useIsomorphicEffect from '@restart/hooks/useIsomorphicEffect';\nimport React, { useRef, cloneElement, useState } from 'react';\nimport NoopTransition from './NoopTransition';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function useTransition({\n in: inProp,\n onTransition\n}) {\n const ref = useRef(null);\n const isInitialRef = useRef(true);\n const handleTransition = useEventCallback(onTransition);\n useIsomorphicEffect(() => {\n if (!ref.current) {\n return undefined;\n }\n let stale = false;\n handleTransition({\n in: inProp,\n element: ref.current,\n initial: isInitialRef.current,\n isStale: () => stale\n });\n return () => {\n stale = true;\n };\n }, [inProp, handleTransition]);\n useIsomorphicEffect(() => {\n isInitialRef.current = false;\n // this is for strict mode\n return () => {\n isInitialRef.current = true;\n };\n }, []);\n return ref;\n}\n/**\n * Adapts an imperative transition function to a subset of the RTG `` component API.\n *\n * ImperativeTransition does not support mounting options or `appear` at the moment, meaning\n * that it always acts like: `mountOnEnter={true} unmountOnExit={true} appear={true}`\n */\nexport default function ImperativeTransition({\n children,\n in: inProp,\n onExited,\n onEntered,\n transition\n}) {\n const [exited, setExited] = useState(!inProp);\n\n // TODO: I think this needs to be in an effect\n if (inProp && exited) {\n setExited(false);\n }\n const ref = useTransition({\n in: !!inProp,\n onTransition: options => {\n const onFinish = () => {\n if (options.isStale()) return;\n if (options.in) {\n onEntered == null ? void 0 : onEntered(options.element, options.initial);\n } else {\n setExited(true);\n onExited == null ? void 0 : onExited(options.element);\n }\n };\n Promise.resolve(transition(options)).then(onFinish, error => {\n if (!options.in) setExited(true);\n throw error;\n });\n }\n });\n const combinedRef = useMergedRefs(ref, children.ref);\n return exited && !inProp ? null : /*#__PURE__*/cloneElement(children, {\n ref: combinedRef\n });\n}\nexport function renderTransition(Component, runTransition, props) {\n if (Component) {\n return /*#__PURE__*/_jsx(Component, Object.assign({}, props));\n }\n if (runTransition) {\n return /*#__PURE__*/_jsx(ImperativeTransition, Object.assign({}, props, {\n transition: runTransition\n }));\n }\n return /*#__PURE__*/_jsx(NoopTransition, Object.assign({}, props));\n}","/* eslint-disable import/prefer-default-export */\nexport function isEscKey(e) {\n return e.code === 'Escape' || e.keyCode === 27;\n}","/**\n * Checks if a given element has a CSS class.\n * \n * @param element the element\n * @param className the CSS class name\n */\nexport default function hasClass(element, className) {\n if (element.classList) return !!className && element.classList.contains(className);\n return (\" \" + (element.className.baseVal || element.className) + \" \").indexOf(\" \" + className + \" \") !== -1;\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createChainableTypeChecker;\n/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n// Mostly taken from ReactPropTypes.\n\nfunction createChainableTypeChecker(validate) {\n function checkType(isRequired, props, propName, componentName, location, propFullName) {\n var componentNameSafe = componentName || '<>';\n var propFullNameSafe = propFullName || propName;\n\n if (props[propName] == null) {\n if (isRequired) {\n return new Error('Required ' + location + ' `' + propFullNameSafe + '` was not specified ' + ('in `' + componentNameSafe + '`.'));\n }\n\n return null;\n }\n\n for (var _len = arguments.length, args = Array(_len > 6 ? _len - 6 : 0), _key = 6; _key < _len; _key++) {\n args[_key - 6] = arguments[_key];\n }\n\n return validate.apply(undefined, [props, propName, componentNameSafe, location, propFullNameSafe].concat(args));\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n}\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = all;\n\nvar _createChainableTypeChecker = require('./utils/createChainableTypeChecker');\n\nvar _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction all() {\n for (var _len = arguments.length, validators = Array(_len), _key = 0; _key < _len; _key++) {\n validators[_key] = arguments[_key];\n }\n\n function allPropTypes() {\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n var error = null;\n\n validators.forEach(function (validator) {\n if (error != null) {\n return;\n }\n\n var result = validator.apply(undefined, args);\n if (result != null) {\n error = result;\n }\n });\n\n return error;\n }\n\n return (0, _createChainableTypeChecker2.default)(allPropTypes);\n}\nmodule.exports = exports['default'];","\"use client\";\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst NavItem = /*#__PURE__*/React.forwardRef(({\n className,\n bsPrefix,\n as: Component = 'div',\n ...props\n}, ref) => {\n bsPrefix = useBootstrapPrefix(bsPrefix, 'nav-item');\n return /*#__PURE__*/_jsx(Component, {\n ref: ref,\n className: classNames(className, bsPrefix),\n ...props\n });\n});\nNavItem.displayName = 'NavItem';\nexport default NavItem;","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport Anchor from '@restart/ui/Anchor';\nimport { useNavItem } from '@restart/ui/NavItem';\nimport { makeEventKey } from '@restart/ui/SelectableContext';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst NavLink = /*#__PURE__*/React.forwardRef(({\n bsPrefix,\n className,\n as: Component = Anchor,\n active,\n eventKey,\n disabled = false,\n ...props\n}, ref) => {\n bsPrefix = useBootstrapPrefix(bsPrefix, 'nav-link');\n const [navItemProps, meta] = useNavItem({\n key: makeEventKey(eventKey, props.href),\n active,\n disabled,\n ...props\n });\n return /*#__PURE__*/_jsx(Component, {\n ...props,\n ...navItemProps,\n ref: ref,\n disabled: disabled,\n className: classNames(className, bsPrefix, disabled && 'disabled', meta.isActive && 'active')\n });\n});\nNavLink.displayName = 'NavLink';\nexport default NavLink;","\"use client\";\n\nimport classNames from 'classnames';\nimport all from 'prop-types-extra/lib/all';\nimport * as React from 'react';\nimport { useContext } from 'react';\nimport { useUncontrolled } from 'uncontrollable';\nimport BaseNav from '@restart/ui/Nav';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport NavbarContext from './NavbarContext';\nimport CardHeaderContext from './CardHeaderContext';\nimport NavItem from './NavItem';\nimport NavLink from './NavLink';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst Nav = /*#__PURE__*/React.forwardRef((uncontrolledProps, ref) => {\n const {\n as = 'div',\n bsPrefix: initialBsPrefix,\n variant,\n fill = false,\n justify = false,\n navbar,\n navbarScroll,\n className,\n activeKey,\n ...props\n } = useUncontrolled(uncontrolledProps, {\n activeKey: 'onSelect'\n });\n const bsPrefix = useBootstrapPrefix(initialBsPrefix, 'nav');\n let navbarBsPrefix;\n let cardHeaderBsPrefix;\n let isNavbar = false;\n const navbarContext = useContext(NavbarContext);\n const cardHeaderContext = useContext(CardHeaderContext);\n if (navbarContext) {\n navbarBsPrefix = navbarContext.bsPrefix;\n isNavbar = navbar == null ? true : navbar;\n } else if (cardHeaderContext) {\n ({\n cardHeaderBsPrefix\n } = cardHeaderContext);\n }\n return /*#__PURE__*/_jsx(BaseNav, {\n as: as,\n ref: ref,\n activeKey: activeKey,\n className: classNames(className, {\n [bsPrefix]: !isNavbar,\n [`${navbarBsPrefix}-nav`]: isNavbar,\n [`${navbarBsPrefix}-nav-scroll`]: isNavbar && navbarScroll,\n [`${cardHeaderBsPrefix}-${variant}`]: !!cardHeaderBsPrefix,\n [`${bsPrefix}-${variant}`]: !!variant,\n [`${bsPrefix}-fill`]: fill,\n [`${bsPrefix}-justified`]: justify\n }),\n ...props\n });\n});\nNav.displayName = 'Nav';\nexport default Object.assign(Nav, {\n Item: NavItem,\n Link: NavLink\n});","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport Dropdown from './Dropdown';\nimport NavLink from './NavLink';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst NavDropdown = /*#__PURE__*/React.forwardRef(({\n id,\n title,\n children,\n bsPrefix,\n className,\n rootCloseEvent,\n menuRole,\n disabled,\n active,\n renderMenuOnMount,\n menuVariant,\n ...props\n}, ref) => {\n /* NavItem has no additional logic, it's purely presentational. Can set nav item class here to support \"as\" */\n const navItemPrefix = useBootstrapPrefix(undefined, 'nav-item');\n return /*#__PURE__*/_jsxs(Dropdown, {\n ref: ref,\n ...props,\n className: classNames(className, navItemPrefix),\n children: [/*#__PURE__*/_jsx(Dropdown.Toggle, {\n id: id,\n eventKey: null,\n active: active,\n disabled: disabled,\n childBsPrefix: bsPrefix,\n as: NavLink,\n children: title\n }), /*#__PURE__*/_jsx(Dropdown.Menu, {\n role: menuRole,\n renderOnMount: renderMenuOnMount,\n rootCloseEvent: rootCloseEvent,\n variant: menuVariant,\n children: children\n })]\n });\n});\nNavDropdown.displayName = 'NavDropdown';\nexport default Object.assign(NavDropdown, {\n Item: Dropdown.Item,\n ItemText: Dropdown.ItemText,\n Divider: Dropdown.Divider,\n Header: Dropdown.Header\n});","import listen from 'dom-helpers/listen';\nimport ownerDocument from 'dom-helpers/ownerDocument';\nimport { useEffect } from 'react';\nimport useEventCallback from '@restart/hooks/useEventCallback';\nimport useClickOutside, { getRefTarget } from './useClickOutside';\nimport { isEscKey } from './utils';\nconst noop = () => {};\n/**\n * The `useRootClose` hook registers your callback on the document\n * when rendered. Powers the `` component. This is used achieve modal\n * style behavior where your callback is triggered when the user tries to\n * interact with the rest of the document or hits the `esc` key.\n *\n * @param {Ref| HTMLElement} ref The element boundary\n * @param {function} onRootClose\n * @param {object=} options\n * @param {boolean=} options.disabled\n * @param {string=} options.clickTrigger The DOM event name (click, mousedown, etc) to attach listeners on\n */\nfunction useRootClose(ref, onRootClose, {\n disabled,\n clickTrigger\n} = {}) {\n const onClose = onRootClose || noop;\n useClickOutside(ref, onClose, {\n disabled,\n clickTrigger\n });\n const handleKeyUp = useEventCallback(e => {\n if (isEscKey(e)) {\n onClose(e);\n }\n });\n useEffect(() => {\n if (disabled || ref == null) return undefined;\n const doc = ownerDocument(getRefTarget(ref));\n\n // Store the current event to avoid triggering handlers immediately\n // https://github.com/facebook/react/issues/20074\n let currentEvent = (doc.defaultView || window).event;\n const removeKeyupListener = listen(doc, 'keyup', e => {\n // skip if this event is the same as the one running when we added the handlers\n if (e === currentEvent) {\n currentEvent = undefined;\n return;\n }\n handleKeyUp(e);\n });\n return () => {\n removeKeyupListener();\n };\n }, [ref, disabled, handleKeyUp]);\n}\nexport default useRootClose;","import * as React from 'react';\nimport ReactDOM from 'react-dom';\nimport useCallbackRef from '@restart/hooks/useCallbackRef';\nimport useMergedRefs from '@restart/hooks/useMergedRefs';\nimport { useState } from 'react';\nimport usePopper from './usePopper';\nimport useRootClose from './useRootClose';\nimport useWaitForDOMRef from './useWaitForDOMRef';\nimport mergeOptionsWithPopperConfig from './mergeOptionsWithPopperConfig';\nimport { renderTransition } from './ImperativeTransition';\n/**\n * Built on top of `Popper.js`, the overlay component is\n * great for custom tooltip overlays.\n */\nconst Overlay = /*#__PURE__*/React.forwardRef((props, outerRef) => {\n const {\n flip,\n offset,\n placement,\n containerPadding,\n popperConfig = {},\n transition: Transition,\n runTransition\n } = props;\n const [rootElement, attachRef] = useCallbackRef();\n const [arrowElement, attachArrowRef] = useCallbackRef();\n const mergedRef = useMergedRefs(attachRef, outerRef);\n const container = useWaitForDOMRef(props.container);\n const target = useWaitForDOMRef(props.target);\n const [exited, setExited] = useState(!props.show);\n const popper = usePopper(target, rootElement, mergeOptionsWithPopperConfig({\n placement,\n enableEvents: !!props.show,\n containerPadding: containerPadding || 5,\n flip,\n offset,\n arrowElement,\n popperConfig\n }));\n\n // TODO: I think this needs to be in an effect\n if (props.show && exited) {\n setExited(false);\n }\n const handleHidden = (...args) => {\n setExited(true);\n if (props.onExited) {\n props.onExited(...args);\n }\n };\n\n // Don't un-render the overlay while it's transitioning out.\n const mountOverlay = props.show || !exited;\n useRootClose(rootElement, props.onHide, {\n disabled: !props.rootClose || props.rootCloseDisabled,\n clickTrigger: props.rootCloseEvent\n });\n if (!mountOverlay) {\n // Don't bother showing anything if we don't have to.\n return null;\n }\n const {\n onExit,\n onExiting,\n onEnter,\n onEntering,\n onEntered\n } = props;\n let child = props.children(Object.assign({}, popper.attributes.popper, {\n style: popper.styles.popper,\n ref: mergedRef\n }), {\n popper,\n placement,\n show: !!props.show,\n arrowProps: Object.assign({}, popper.attributes.arrow, {\n style: popper.styles.arrow,\n ref: attachArrowRef\n })\n });\n child = renderTransition(Transition, runTransition, {\n in: !!props.show,\n appear: true,\n mountOnEnter: true,\n unmountOnExit: true,\n children: child,\n onExit,\n onExiting,\n onExited: handleHidden,\n onEnter,\n onEntering,\n onEntered\n });\n return container ? /*#__PURE__*/ReactDOM.createPortal(child, container) : null;\n});\nOverlay.displayName = 'Overlay';\nexport default Overlay;","\"use client\";\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst PopoverHeader = /*#__PURE__*/React.forwardRef(({\n className,\n bsPrefix,\n as: Component = 'div',\n ...props\n}, ref) => {\n bsPrefix = useBootstrapPrefix(bsPrefix, 'popover-header');\n return /*#__PURE__*/_jsx(Component, {\n ref: ref,\n className: classNames(className, bsPrefix),\n ...props\n });\n});\nPopoverHeader.displayName = 'PopoverHeader';\nexport default PopoverHeader;","\"use client\";\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst PopoverBody = /*#__PURE__*/React.forwardRef(({\n className,\n bsPrefix,\n as: Component = 'div',\n ...props\n}, ref) => {\n bsPrefix = useBootstrapPrefix(bsPrefix, 'popover-body');\n return /*#__PURE__*/_jsx(Component, {\n ref: ref,\n className: classNames(className, bsPrefix),\n ...props\n });\n});\nPopoverBody.displayName = 'PopoverBody';\nexport default PopoverBody;","import * as React from 'react';\nexport class BsPrefixComponent extends React.Component {}\n\n// Need to use this instead of typeof Component to get proper type checking.\n\nexport function getOverlayDirection(placement, isRTL) {\n let bsDirection = placement;\n if (placement === 'left') {\n bsDirection = isRTL ? 'end' : 'start';\n } else if (placement === 'right') {\n bsDirection = isRTL ? 'start' : 'end';\n }\n return bsDirection;\n}","export default function getInitialPopperStyles(position = 'absolute') {\n return {\n position,\n top: '0',\n left: '0',\n opacity: '0',\n pointerEvents: 'none'\n };\n}","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useBootstrapPrefix, useIsRTL } from './ThemeProvider';\nimport PopoverHeader from './PopoverHeader';\nimport PopoverBody from './PopoverBody';\nimport { getOverlayDirection } from './helpers';\nimport getInitialPopperStyles from './getInitialPopperStyles';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst Popover = /*#__PURE__*/React.forwardRef(({\n bsPrefix,\n placement = 'right',\n className,\n style,\n children,\n body,\n arrowProps,\n hasDoneInitialMeasure,\n popper,\n show,\n ...props\n}, ref) => {\n const decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'popover');\n const isRTL = useIsRTL();\n const [primaryPlacement] = (placement == null ? void 0 : placement.split('-')) || [];\n const bsDirection = getOverlayDirection(primaryPlacement, isRTL);\n let computedStyle = style;\n if (show && !hasDoneInitialMeasure) {\n computedStyle = {\n ...style,\n ...getInitialPopperStyles(popper == null ? void 0 : popper.strategy)\n };\n }\n return /*#__PURE__*/_jsxs(\"div\", {\n ref: ref,\n role: \"tooltip\",\n style: computedStyle,\n \"x-placement\": primaryPlacement,\n className: classNames(className, decoratedBsPrefix, primaryPlacement && `bs-popover-${bsDirection}`),\n ...props,\n children: [/*#__PURE__*/_jsx(\"div\", {\n className: \"popover-arrow\",\n ...arrowProps\n }), body ? /*#__PURE__*/_jsx(PopoverBody, {\n children: children\n }) : children]\n });\n});\nexport default Object.assign(Popover, {\n Header: PopoverHeader,\n Body: PopoverBody,\n // Default popover offset.\n // https://github.com/twbs/bootstrap/blob/5c32767e0e0dbac2d934bcdee03719a65d3f1187/js/src/popover.js#L28\n POPPER_OFFSET: [0, 8]\n});","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useBootstrapPrefix, useIsRTL } from './ThemeProvider';\nimport { getOverlayDirection } from './helpers';\nimport getInitialPopperStyles from './getInitialPopperStyles';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst Tooltip = /*#__PURE__*/React.forwardRef(({\n bsPrefix,\n placement = 'right',\n className,\n style,\n children,\n arrowProps,\n hasDoneInitialMeasure,\n popper,\n show,\n ...props\n}, ref) => {\n bsPrefix = useBootstrapPrefix(bsPrefix, 'tooltip');\n const isRTL = useIsRTL();\n const [primaryPlacement] = (placement == null ? void 0 : placement.split('-')) || [];\n const bsDirection = getOverlayDirection(primaryPlacement, isRTL);\n let computedStyle = style;\n if (show && !hasDoneInitialMeasure) {\n computedStyle = {\n ...style,\n ...getInitialPopperStyles(popper == null ? void 0 : popper.strategy)\n };\n }\n return /*#__PURE__*/_jsxs(\"div\", {\n ref: ref,\n style: computedStyle,\n role: \"tooltip\",\n \"x-placement\": primaryPlacement,\n className: classNames(className, bsPrefix, `bs-tooltip-${bsDirection}`),\n ...props,\n children: [/*#__PURE__*/_jsx(\"div\", {\n className: \"tooltip-arrow\",\n ...arrowProps\n }), /*#__PURE__*/_jsx(\"div\", {\n className: `${bsPrefix}-inner`,\n children: children\n })]\n });\n});\nTooltip.displayName = 'Tooltip';\nexport default Object.assign(Tooltip, {\n // Default tooltip offset.\n // https://github.com/twbs/bootstrap/blob/beca2a6c7f6bc88b6449339fc76edcda832c59e5/js/src/tooltip.js#L65\n TOOLTIP_OFFSET: [0, 6]\n});","\"use client\";\n\nimport { useMemo, useRef } from 'react';\nimport hasClass from 'dom-helpers/hasClass';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport Popover from './Popover';\nimport Tooltip from './Tooltip';\n\n// This is meant for internal use.\n// This applies a custom offset to the overlay if it's a popover or tooltip.\nexport default function useOverlayOffset(customOffset) {\n const overlayRef = useRef(null);\n const popoverClass = useBootstrapPrefix(undefined, 'popover');\n const tooltipClass = useBootstrapPrefix(undefined, 'tooltip');\n const offset = useMemo(() => ({\n name: 'offset',\n options: {\n offset: () => {\n if (customOffset) {\n return customOffset;\n }\n if (overlayRef.current) {\n if (hasClass(overlayRef.current, popoverClass)) {\n return Popover.POPPER_OFFSET;\n }\n if (hasClass(overlayRef.current, tooltipClass)) {\n return Tooltip.TOOLTIP_OFFSET;\n }\n }\n return [0, 0];\n }\n }\n }), [customOffset, popoverClass, tooltipClass]);\n return [overlayRef, [offset]];\n}","\"use client\";\n\nimport * as React from 'react';\nimport { useEffect, useRef, useState } from 'react';\nimport classNames from 'classnames';\nimport BaseOverlay from '@restart/ui/Overlay';\nimport useEventCallback from '@restart/hooks/useEventCallback';\nimport useIsomorphicEffect from '@restart/hooks/useIsomorphicEffect';\nimport useMergedRefs from '@restart/hooks/useMergedRefs';\nimport useOverlayOffset from './useOverlayOffset';\nimport Fade from './Fade';\nimport safeFindDOMNode from './safeFindDOMNode';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction wrapRefs(props, arrowProps) {\n const {\n ref\n } = props;\n const {\n ref: aRef\n } = arrowProps;\n props.ref = ref.__wrapped || (ref.__wrapped = r => ref(safeFindDOMNode(r)));\n arrowProps.ref = aRef.__wrapped || (aRef.__wrapped = r => aRef(safeFindDOMNode(r)));\n}\nconst Overlay = /*#__PURE__*/React.forwardRef(({\n children: overlay,\n transition = Fade,\n popperConfig = {},\n rootClose = false,\n placement = 'top',\n show: outerShow = false,\n ...outerProps\n}, outerRef) => {\n const popperRef = useRef({});\n const [firstRenderedState, setFirstRenderedState] = useState(null);\n const [ref, modifiers] = useOverlayOffset(outerProps.offset);\n const mergedRef = useMergedRefs(outerRef, ref);\n const actualTransition = transition === true ? Fade : transition || undefined;\n const handleFirstUpdate = useEventCallback(state => {\n setFirstRenderedState(state);\n popperConfig == null ? void 0 : popperConfig.onFirstUpdate == null ? void 0 : popperConfig.onFirstUpdate(state);\n });\n useIsomorphicEffect(() => {\n if (firstRenderedState && outerProps.target) {\n // Must wait for target element to resolve before updating popper.\n popperRef.current.scheduleUpdate == null ? void 0 : popperRef.current.scheduleUpdate();\n }\n }, [firstRenderedState, outerProps.target]);\n useEffect(() => {\n if (!outerShow) {\n setFirstRenderedState(null);\n }\n }, [outerShow]);\n return /*#__PURE__*/_jsx(BaseOverlay, {\n ...outerProps,\n ref: mergedRef,\n popperConfig: {\n ...popperConfig,\n modifiers: modifiers.concat(popperConfig.modifiers || []),\n onFirstUpdate: handleFirstUpdate\n },\n transition: actualTransition,\n rootClose: rootClose,\n placement: placement,\n show: outerShow,\n children: (overlayProps, {\n arrowProps,\n popper: popperObj,\n show\n }) => {\n var _popperObj$state, _popperObj$state$modi;\n wrapRefs(overlayProps, arrowProps);\n // Need to get placement from popper object, handling case when overlay is flipped using 'flip' prop\n const updatedPlacement = popperObj == null ? void 0 : popperObj.placement;\n const popper = Object.assign(popperRef.current, {\n state: popperObj == null ? void 0 : popperObj.state,\n scheduleUpdate: popperObj == null ? void 0 : popperObj.update,\n placement: updatedPlacement,\n outOfBoundaries: (popperObj == null ? void 0 : (_popperObj$state = popperObj.state) == null ? void 0 : (_popperObj$state$modi = _popperObj$state.modifiersData.hide) == null ? void 0 : _popperObj$state$modi.isReferenceHidden) || false,\n strategy: popperConfig.strategy\n });\n const hasDoneInitialMeasure = !!firstRenderedState;\n if (typeof overlay === 'function') return overlay({\n ...overlayProps,\n placement: updatedPlacement,\n show,\n ...(!transition && show && {\n className: 'show'\n }),\n popper,\n arrowProps,\n hasDoneInitialMeasure\n });\n return /*#__PURE__*/React.cloneElement(overlay, {\n ...overlayProps,\n placement: updatedPlacement,\n arrowProps,\n popper,\n hasDoneInitialMeasure,\n className: classNames(overlay.props.className, !transition && show && 'show'),\n style: {\n ...overlay.props.style,\n ...overlayProps.style\n }\n });\n }\n });\n});\nOverlay.displayName = 'Overlay';\nexport default Overlay;","/* eslint-disable no-bitwise, no-cond-assign */\n\n/**\n * Checks if an element contains another given element.\n * \n * @param context the context element\n * @param node the element to check\n */\nexport default function contains(context, node) {\n // HTML DOM and SVG DOM may have different support levels,\n // so we need to check on context instead of a document root element.\n if (context.contains) return context.contains(node);\n if (context.compareDocumentPosition) return context === node || !!(context.compareDocumentPosition(node) & 16);\n}","\"use client\";\n\nimport contains from 'dom-helpers/contains';\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\nimport { cloneElement, useCallback, useRef } from 'react';\nimport useTimeout from '@restart/hooks/useTimeout';\nimport warning from 'warning';\nimport { useUncontrolledProp } from 'uncontrollable';\nimport useMergedRefs from '@restart/hooks/useMergedRefs';\nimport Overlay from './Overlay';\nimport safeFindDOMNode from './safeFindDOMNode';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction normalizeDelay(delay) {\n return delay && typeof delay === 'object' ? delay : {\n show: delay,\n hide: delay\n };\n}\n\n// Simple implementation of mouseEnter and mouseLeave.\n// React's built version is broken: https://github.com/facebook/react/issues/4251\n// for cases when the trigger is disabled and mouseOut/Over can cause flicker\n// moving from one child element to another.\nfunction handleMouseOverOut(\n// eslint-disable-next-line @typescript-eslint/no-shadow\nhandler, args, relatedNative) {\n const [e] = args;\n const target = e.currentTarget;\n const related = e.relatedTarget || e.nativeEvent[relatedNative];\n if ((!related || related !== target) && !contains(target, related)) {\n handler(...args);\n }\n}\nconst triggerType = PropTypes.oneOf(['click', 'hover', 'focus']);\nconst OverlayTrigger = ({\n trigger = ['hover', 'focus'],\n overlay,\n children,\n popperConfig = {},\n show: propsShow,\n defaultShow = false,\n onToggle,\n delay: propsDelay,\n placement,\n flip = placement && placement.indexOf('auto') !== -1,\n ...props\n}) => {\n const triggerNodeRef = useRef(null);\n const mergedRef = useMergedRefs(triggerNodeRef, children.ref);\n const timeout = useTimeout();\n const hoverStateRef = useRef('');\n const [show, setShow] = useUncontrolledProp(propsShow, defaultShow, onToggle);\n const delay = normalizeDelay(propsDelay);\n const {\n onFocus,\n onBlur,\n onClick\n } = typeof children !== 'function' ? React.Children.only(children).props : {};\n const attachRef = r => {\n mergedRef(safeFindDOMNode(r));\n };\n const handleShow = useCallback(() => {\n timeout.clear();\n hoverStateRef.current = 'show';\n if (!delay.show) {\n setShow(true);\n return;\n }\n timeout.set(() => {\n if (hoverStateRef.current === 'show') setShow(true);\n }, delay.show);\n }, [delay.show, setShow, timeout]);\n const handleHide = useCallback(() => {\n timeout.clear();\n hoverStateRef.current = 'hide';\n if (!delay.hide) {\n setShow(false);\n return;\n }\n timeout.set(() => {\n if (hoverStateRef.current === 'hide') setShow(false);\n }, delay.hide);\n }, [delay.hide, setShow, timeout]);\n const handleFocus = useCallback((...args) => {\n handleShow();\n onFocus == null ? void 0 : onFocus(...args);\n }, [handleShow, onFocus]);\n const handleBlur = useCallback((...args) => {\n handleHide();\n onBlur == null ? void 0 : onBlur(...args);\n }, [handleHide, onBlur]);\n const handleClick = useCallback((...args) => {\n setShow(!show);\n onClick == null ? void 0 : onClick(...args);\n }, [onClick, setShow, show]);\n const handleMouseOver = useCallback((...args) => {\n handleMouseOverOut(handleShow, args, 'fromElement');\n }, [handleShow]);\n const handleMouseOut = useCallback((...args) => {\n handleMouseOverOut(handleHide, args, 'toElement');\n }, [handleHide]);\n const triggers = trigger == null ? [] : [].concat(trigger);\n const triggerProps = {\n ref: attachRef\n };\n if (triggers.indexOf('click') !== -1) {\n triggerProps.onClick = handleClick;\n }\n if (triggers.indexOf('focus') !== -1) {\n triggerProps.onFocus = handleFocus;\n triggerProps.onBlur = handleBlur;\n }\n if (triggers.indexOf('hover') !== -1) {\n process.env.NODE_ENV !== \"production\" ? warning(triggers.length > 1, '[react-bootstrap] Specifying only the `\"hover\"` trigger limits the visibility of the overlay to just mouse users. Consider also including the `\"focus\"` trigger so that touch and keyboard only users can see the overlay as well.') : void 0;\n triggerProps.onMouseOver = handleMouseOver;\n triggerProps.onMouseOut = handleMouseOut;\n }\n return /*#__PURE__*/_jsxs(_Fragment, {\n children: [typeof children === 'function' ? children(triggerProps) : /*#__PURE__*/cloneElement(children, triggerProps), /*#__PURE__*/_jsx(Overlay, {\n ...props,\n show: show,\n onHide: handleHide,\n flip: flip,\n placement: placement,\n popperConfig: popperConfig,\n target: triggerNodeRef.current,\n children: overlay\n })]\n });\n};\nexport default OverlayTrigger;","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useBootstrapPrefix, useBootstrapBreakpoints, useBootstrapMinBreakpoint } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst Row = /*#__PURE__*/React.forwardRef(({\n bsPrefix,\n className,\n // Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\n as: Component = 'div',\n ...props\n}, ref) => {\n const decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'row');\n const breakpoints = useBootstrapBreakpoints();\n const minBreakpoint = useBootstrapMinBreakpoint();\n const sizePrefix = `${decoratedBsPrefix}-cols`;\n const classes = [];\n breakpoints.forEach(brkPoint => {\n const propValue = props[brkPoint];\n delete props[brkPoint];\n let cols;\n if (propValue != null && typeof propValue === 'object') {\n ({\n cols\n } = propValue);\n } else {\n cols = propValue;\n }\n const infix = brkPoint !== minBreakpoint ? `-${brkPoint}` : '';\n if (cols != null) classes.push(`${sizePrefix}${infix}-${cols}`);\n });\n return /*#__PURE__*/_jsx(Component, {\n ref: ref,\n ...props,\n className: classNames(className, decoratedBsPrefix, ...classes)\n });\n});\nRow.displayName = 'Row';\nexport default Row;","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst Spinner = /*#__PURE__*/React.forwardRef(({\n bsPrefix,\n variant,\n animation = 'border',\n size,\n // Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\n as: Component = 'div',\n className,\n ...props\n}, ref) => {\n bsPrefix = useBootstrapPrefix(bsPrefix, 'spinner');\n const bsSpinnerPrefix = `${bsPrefix}-${animation}`;\n return /*#__PURE__*/_jsx(Component, {\n ref: ref,\n ...props,\n className: classNames(className, bsSpinnerPrefix, size && `${bsSpinnerPrefix}-${size}`, variant && `text-${variant}`)\n });\n});\nSpinner.displayName = 'Spinner';\nexport default Spinner;","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport Button from './Button';\nimport ButtonGroup from './ButtonGroup';\nimport Dropdown from './Dropdown';\nimport { alignPropType } from './types';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst propTypes = {\n /**\n * An html id attribute for the Toggle button, necessary for assistive technologies, such as screen readers.\n * @type {string}\n * @required\n */\n id: PropTypes.string,\n /**\n * Accessible label for the toggle; the value of `title` if not specified.\n */\n toggleLabel: PropTypes.string,\n /** An `href` passed to the non-toggle Button */\n href: PropTypes.string,\n /** An anchor `target` passed to the non-toggle Button */\n target: PropTypes.string,\n /** An `onClick` handler passed to the non-toggle Button */\n onClick: PropTypes.func,\n /** The content of the non-toggle Button. */\n title: PropTypes.node.isRequired,\n /** A `type` passed to the non-toggle Button */\n type: PropTypes.string,\n /** Disables both Buttons */\n disabled: PropTypes.bool,\n /**\n * Aligns the dropdown menu.\n *\n * _see [DropdownMenu](#dropdown-menu-props) for more details_\n *\n * @type {\"start\"|\"end\"|{ sm: \"start\"|\"end\" }|{ md: \"start\"|\"end\" }|{ lg: \"start\"|\"end\" }|{ xl: \"start\"|\"end\"}|{ xxl: \"start\"|\"end\"} }\n */\n align: alignPropType,\n /** An ARIA accessible role applied to the Menu component. When set to 'menu', The dropdown */\n menuRole: PropTypes.string,\n /** Whether to render the dropdown menu in the DOM before the first time it is shown */\n renderMenuOnMount: PropTypes.bool,\n /**\n * Which event when fired outside the component will cause it to be closed.\n *\n * _see [DropdownMenu](#dropdown-menu-props) for more details_\n */\n rootCloseEvent: PropTypes.string,\n /**\n * Allow Dropdown to flip in case of an overlapping on the reference element. For more information refer to\n * Popper.js's flip [docs](https://popper.js.org/docs/v2/modifiers/flip/).\n *\n */\n flip: PropTypes.bool,\n /** @ignore */\n bsPrefix: PropTypes.string,\n /** @ignore */\n variant: PropTypes.string,\n /** @ignore */\n size: PropTypes.string\n};\n\n/**\n * A convenience component for simple or general use split button dropdowns. Renders a\n * `ButtonGroup` containing a `Button` and a `Button` toggle for the `Dropdown`. All `children`\n * are passed directly to the default `Dropdown.Menu`. This component accepts all of [`Dropdown`'s\n * props](#dropdown-props).\n *\n * _All unknown props are passed through to the `Dropdown` component._\n * The Button `variant`, `size` and `bsPrefix` props are passed to the button and toggle,\n * and menu-related props are passed to the `Dropdown.Menu`\n */\nconst SplitButton = /*#__PURE__*/React.forwardRef(({\n id,\n bsPrefix,\n size,\n variant,\n title,\n type = 'button',\n toggleLabel = 'Toggle dropdown',\n children,\n onClick,\n href,\n target,\n menuRole,\n renderMenuOnMount,\n rootCloseEvent,\n flip,\n ...props\n}, ref) => /*#__PURE__*/_jsxs(Dropdown, {\n ref: ref,\n ...props,\n as: ButtonGroup,\n children: [/*#__PURE__*/_jsx(Button, {\n size: size,\n variant: variant,\n disabled: props.disabled,\n bsPrefix: bsPrefix,\n href: href,\n target: target,\n onClick: onClick,\n type: type,\n children: title\n }), /*#__PURE__*/_jsx(Dropdown.Toggle, {\n split: true,\n id: id,\n size: size,\n variant: variant,\n disabled: props.disabled,\n childBsPrefix: bsPrefix,\n children: /*#__PURE__*/_jsx(\"span\", {\n className: \"visually-hidden\",\n children: toggleLabel\n })\n }), /*#__PURE__*/_jsx(Dropdown.Menu, {\n role: menuRole,\n renderOnMount: renderMenuOnMount,\n rootCloseEvent: rootCloseEvent,\n flip: flip,\n children: children\n })]\n}));\nSplitButton.propTypes = propTypes;\nSplitButton.displayName = 'SplitButton';\nexport default SplitButton;","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst Table = /*#__PURE__*/React.forwardRef(({\n bsPrefix,\n className,\n striped,\n bordered,\n borderless,\n hover,\n size,\n variant,\n responsive,\n ...props\n}, ref) => {\n const decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'table');\n const classes = classNames(className, decoratedBsPrefix, variant && `${decoratedBsPrefix}-${variant}`, size && `${decoratedBsPrefix}-${size}`, striped && `${decoratedBsPrefix}-${typeof striped === 'string' ? `striped-${striped}` : 'striped'}`, bordered && `${decoratedBsPrefix}-bordered`, borderless && `${decoratedBsPrefix}-borderless`, hover && `${decoratedBsPrefix}-hover`);\n const table = /*#__PURE__*/_jsx(\"table\", {\n ...props,\n className: classes,\n ref: ref\n });\n if (responsive) {\n let responsiveClass = `${decoratedBsPrefix}-responsive`;\n if (typeof responsive === 'string') {\n responsiveClass = `${responsiveClass}-${responsive}`;\n }\n return /*#__PURE__*/_jsx(\"div\", {\n className: responsiveClass,\n children: table\n });\n }\n return table;\n});\nexport default Table;","import { colourStyles } from \"./BaseTableStyles\";\nimport { Column, Table as ReactTable, Row } from \"@tanstack/react-table\";\nimport { Form, OverlayTrigger, Popover } from \"react-bootstrap\";\nimport Select from \"react-select\";\n\nconst isHTML = RegExp.prototype.test.bind(/(<([^>]+)>)/i);\n\nexport const NameObjectArrayFilterFn = (row: Row, columnId: string, filterValue: any) => {\n const data: any = row.getValue(columnId);\n const _svrs = data.reduce((o: string, r: any) => (o += `|${r.name}`), \"\");\n return _svrs.toLowerCase().includes(filterValue.toLowerCase());\n};\n\nexport const NumberFilter = ({ column }: { column: Column }) => {\n const columnFilterValue = column.getFilterValue();\n const fromToNumber = columnFilterValue as [string, string];\n\n const popoverNumber = (\n \n \n column.setFilterValue((old: [number, number]) => [e.target.value, old?.[1]])\n }\n placeholder={`Min`}\n className=\"form-control\"\n />\n

to

\n \n column.setFilterValue((old: [number, number]) => [old?.[0], e.target.value])\n }\n placeholder={`Max`}\n className=\"form-control\"\n />\n
\n );\n\n return (\n \n \n \n );\n};\n\nexport const BoolFilter = ({ column }: { column: Column }) => {\n const options = [\n { value: true, label: \"Pass\" },\n { value: false, label: \"Fail\" },\n ];\n\n return (\n {\n column.setFilterValue(newValue ? newValue.value : \"\");\n }}\n onInputChange={(value, action) => {\n if (action.action === \"input-change\") {\n column.setFilterValue(value);\n }\n }}\n placeholder={`Search...`}\n className=\"\"\n options={options}\n />\n );\n};\n\nexport const TextFilter = ({ column }: { column: Column }) => {\n return (\n {\n column.setFilterValue(event.target.value ? event.target.value : \"\");\n }}\n />\n );\n};\n\nexport const SelectFilter = ({ column }: { column: Column }) => {\n const sortedUniqueValues = Array.from(column.getFacetedUniqueValues().keys()).sort();\n const selectOptions = sortedUniqueValues\n .slice(0, 50)\n .reduce((previousValue: Array, currentValue: any) => {\n previousValue.push({ value: currentValue, label: currentValue });\n return previousValue;\n }, []);\n\n const isObjectorHTML =\n isHTML(sortedUniqueValues?.[0]) || typeof sortedUniqueValues?.[0] === \"object\";\n return (\n {\n column.setFilterValue(newValue ? newValue.value : \"\");\n }}\n onInputChange={(value, action) => {\n if (action.action === \"input-change\") {\n column.setFilterValue(value);\n }\n }}\n placeholder={`Search...`}\n className=\"\"\n options={selectOptions}\n components={isObjectorHTML ? { Menu: () => <>, IndicatorsContainer: () => <> } : {}}\n />\n );\n};\nexport const Filter = ({ column, table }: { column: Column; table: ReactTable }) => {\n const firstValue: any = table.getPreFilteredRowModel().flatRows[0]?.getValue(column.id);\n\n if (typeof firstValue === \"number\") {\n return ;\n } else if (typeof firstValue === \"boolean\") {\n return ;\n } else if (typeof firstValue === \"object\") {\n return ;\n } else {\n return ;\n }\n};\n\nexport default Filter;\n","/**\n * table-core\n *\n * Copyright (c) TanStack\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\n// Is this type a tuple?\n\n// If this type is a tuple, what indices are allowed?\n\n///\n\nfunction functionalUpdate(updater, input) {\n return typeof updater === 'function' ? updater(input) : updater;\n}\nfunction noop() {\n //\n}\nfunction makeStateUpdater(key, instance) {\n return updater => {\n instance.setState(old => {\n return {\n ...old,\n [key]: functionalUpdate(updater, old[key])\n };\n });\n };\n}\nfunction isFunction(d) {\n return d instanceof Function;\n}\nfunction isNumberArray(d) {\n return Array.isArray(d) && d.every(val => typeof val === 'number');\n}\nfunction flattenBy(arr, getChildren) {\n const flat = [];\n const recurse = subArr => {\n subArr.forEach(item => {\n flat.push(item);\n const children = getChildren(item);\n if (children != null && children.length) {\n recurse(children);\n }\n });\n };\n recurse(arr);\n return flat;\n}\nfunction memo(getDeps, fn, opts) {\n let deps = [];\n let result;\n return depArgs => {\n let depTime;\n if (opts.key && opts.debug) depTime = Date.now();\n const newDeps = getDeps(depArgs);\n const depsChanged = newDeps.length !== deps.length || newDeps.some((dep, index) => deps[index] !== dep);\n if (!depsChanged) {\n return result;\n }\n deps = newDeps;\n let resultTime;\n if (opts.key && opts.debug) resultTime = Date.now();\n result = fn(...newDeps);\n opts == null || opts.onChange == null || opts.onChange(result);\n if (opts.key && opts.debug) {\n if (opts != null && opts.debug()) {\n const depEndTime = Math.round((Date.now() - depTime) * 100) / 100;\n const resultEndTime = Math.round((Date.now() - resultTime) * 100) / 100;\n const resultFpsPercentage = resultEndTime / 16;\n const pad = (str, num) => {\n str = String(str);\n while (str.length < num) {\n str = ' ' + str;\n }\n return str;\n };\n console.info(`%c⏱ ${pad(resultEndTime, 5)} /${pad(depEndTime, 5)} ms`, `\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0, Math.min(120 - 120 * resultFpsPercentage, 120))}deg 100% 31%);`, opts == null ? void 0 : opts.key);\n }\n }\n return result;\n };\n}\nfunction getMemoOptions(tableOptions, debugLevel, key, onChange) {\n return {\n debug: () => {\n var _tableOptions$debugAl;\n return (_tableOptions$debugAl = tableOptions == null ? void 0 : tableOptions.debugAll) != null ? _tableOptions$debugAl : tableOptions[debugLevel];\n },\n key: process.env.NODE_ENV === 'development' && key,\n onChange\n };\n}\n\nfunction createColumn(table, columnDef, depth, parent) {\n var _ref, _resolvedColumnDef$id;\n const defaultColumn = table._getDefaultColumnDef();\n const resolvedColumnDef = {\n ...defaultColumn,\n ...columnDef\n };\n const accessorKey = resolvedColumnDef.accessorKey;\n let id = (_ref = (_resolvedColumnDef$id = resolvedColumnDef.id) != null ? _resolvedColumnDef$id : accessorKey ? accessorKey.replace('.', '_') : undefined) != null ? _ref : typeof resolvedColumnDef.header === 'string' ? resolvedColumnDef.header : undefined;\n let accessorFn;\n if (resolvedColumnDef.accessorFn) {\n accessorFn = resolvedColumnDef.accessorFn;\n } else if (accessorKey) {\n // Support deep accessor keys\n if (accessorKey.includes('.')) {\n accessorFn = originalRow => {\n let result = originalRow;\n for (const key of accessorKey.split('.')) {\n var _result;\n result = (_result = result) == null ? void 0 : _result[key];\n if (process.env.NODE_ENV !== 'production' && result === undefined) {\n console.warn(`\"${key}\" in deeply nested key \"${accessorKey}\" returned undefined.`);\n }\n }\n return result;\n };\n } else {\n accessorFn = originalRow => originalRow[resolvedColumnDef.accessorKey];\n }\n }\n if (!id) {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error(resolvedColumnDef.accessorFn ? `Columns require an id when using an accessorFn` : `Columns require an id when using a non-string header`);\n }\n throw new Error();\n }\n let column = {\n id: `${String(id)}`,\n accessorFn,\n parent: parent,\n depth,\n columnDef: resolvedColumnDef,\n columns: [],\n getFlatColumns: memo(() => [true], () => {\n var _column$columns;\n return [column, ...((_column$columns = column.columns) == null ? void 0 : _column$columns.flatMap(d => d.getFlatColumns()))];\n }, getMemoOptions(table.options, 'debugColumns', 'column.getFlatColumns')),\n getLeafColumns: memo(() => [table._getOrderColumnsFn()], orderColumns => {\n var _column$columns2;\n if ((_column$columns2 = column.columns) != null && _column$columns2.length) {\n let leafColumns = column.columns.flatMap(column => column.getLeafColumns());\n return orderColumns(leafColumns);\n }\n return [column];\n }, getMemoOptions(table.options, 'debugColumns', 'column.getLeafColumns'))\n };\n for (const feature of table._features) {\n feature.createColumn == null || feature.createColumn(column, table);\n }\n\n // Yes, we have to convert table to uknown, because we know more than the compiler here.\n return column;\n}\n\nconst debug = 'debugHeaders';\n//\n\nfunction createHeader(table, column, options) {\n var _options$id;\n const id = (_options$id = options.id) != null ? _options$id : column.id;\n let header = {\n id,\n column,\n index: options.index,\n isPlaceholder: !!options.isPlaceholder,\n placeholderId: options.placeholderId,\n depth: options.depth,\n subHeaders: [],\n colSpan: 0,\n rowSpan: 0,\n headerGroup: null,\n getLeafHeaders: () => {\n const leafHeaders = [];\n const recurseHeader = h => {\n if (h.subHeaders && h.subHeaders.length) {\n h.subHeaders.map(recurseHeader);\n }\n leafHeaders.push(h);\n };\n recurseHeader(header);\n return leafHeaders;\n },\n getContext: () => ({\n table,\n header: header,\n column\n })\n };\n table._features.forEach(feature => {\n feature.createHeader == null || feature.createHeader(header, table);\n });\n return header;\n}\nconst Headers = {\n createTable: table => {\n // Header Groups\n\n table.getHeaderGroups = memo(() => [table.getAllColumns(), table.getVisibleLeafColumns(), table.getState().columnPinning.left, table.getState().columnPinning.right], (allColumns, leafColumns, left, right) => {\n var _left$map$filter, _right$map$filter;\n const leftColumns = (_left$map$filter = left == null ? void 0 : left.map(columnId => leafColumns.find(d => d.id === columnId)).filter(Boolean)) != null ? _left$map$filter : [];\n const rightColumns = (_right$map$filter = right == null ? void 0 : right.map(columnId => leafColumns.find(d => d.id === columnId)).filter(Boolean)) != null ? _right$map$filter : [];\n const centerColumns = leafColumns.filter(column => !(left != null && left.includes(column.id)) && !(right != null && right.includes(column.id)));\n const headerGroups = buildHeaderGroups(allColumns, [...leftColumns, ...centerColumns, ...rightColumns], table);\n return headerGroups;\n }, getMemoOptions(table.options, debug, 'getHeaderGroups'));\n table.getCenterHeaderGroups = memo(() => [table.getAllColumns(), table.getVisibleLeafColumns(), table.getState().columnPinning.left, table.getState().columnPinning.right], (allColumns, leafColumns, left, right) => {\n leafColumns = leafColumns.filter(column => !(left != null && left.includes(column.id)) && !(right != null && right.includes(column.id)));\n return buildHeaderGroups(allColumns, leafColumns, table, 'center');\n }, getMemoOptions(table.options, debug, 'getCenterHeaderGroups'));\n table.getLeftHeaderGroups = memo(() => [table.getAllColumns(), table.getVisibleLeafColumns(), table.getState().columnPinning.left], (allColumns, leafColumns, left) => {\n var _left$map$filter2;\n const orderedLeafColumns = (_left$map$filter2 = left == null ? void 0 : left.map(columnId => leafColumns.find(d => d.id === columnId)).filter(Boolean)) != null ? _left$map$filter2 : [];\n return buildHeaderGroups(allColumns, orderedLeafColumns, table, 'left');\n }, getMemoOptions(table.options, debug, 'getLeftHeaderGroups'));\n table.getRightHeaderGroups = memo(() => [table.getAllColumns(), table.getVisibleLeafColumns(), table.getState().columnPinning.right], (allColumns, leafColumns, right) => {\n var _right$map$filter2;\n const orderedLeafColumns = (_right$map$filter2 = right == null ? void 0 : right.map(columnId => leafColumns.find(d => d.id === columnId)).filter(Boolean)) != null ? _right$map$filter2 : [];\n return buildHeaderGroups(allColumns, orderedLeafColumns, table, 'right');\n }, getMemoOptions(table.options, debug, 'getRightHeaderGroups'));\n\n // Footer Groups\n\n table.getFooterGroups = memo(() => [table.getHeaderGroups()], headerGroups => {\n return [...headerGroups].reverse();\n }, getMemoOptions(table.options, debug, 'getFooterGroups'));\n table.getLeftFooterGroups = memo(() => [table.getLeftHeaderGroups()], headerGroups => {\n return [...headerGroups].reverse();\n }, getMemoOptions(table.options, debug, 'getLeftFooterGroups'));\n table.getCenterFooterGroups = memo(() => [table.getCenterHeaderGroups()], headerGroups => {\n return [...headerGroups].reverse();\n }, getMemoOptions(table.options, debug, 'getCenterFooterGroups'));\n table.getRightFooterGroups = memo(() => [table.getRightHeaderGroups()], headerGroups => {\n return [...headerGroups].reverse();\n }, getMemoOptions(table.options, debug, 'getRightFooterGroups'));\n\n // Flat Headers\n\n table.getFlatHeaders = memo(() => [table.getHeaderGroups()], headerGroups => {\n return headerGroups.map(headerGroup => {\n return headerGroup.headers;\n }).flat();\n }, getMemoOptions(table.options, debug, 'getFlatHeaders'));\n table.getLeftFlatHeaders = memo(() => [table.getLeftHeaderGroups()], left => {\n return left.map(headerGroup => {\n return headerGroup.headers;\n }).flat();\n }, getMemoOptions(table.options, debug, 'getLeftFlatHeaders'));\n table.getCenterFlatHeaders = memo(() => [table.getCenterHeaderGroups()], left => {\n return left.map(headerGroup => {\n return headerGroup.headers;\n }).flat();\n }, getMemoOptions(table.options, debug, 'getCenterFlatHeaders'));\n table.getRightFlatHeaders = memo(() => [table.getRightHeaderGroups()], left => {\n return left.map(headerGroup => {\n return headerGroup.headers;\n }).flat();\n }, getMemoOptions(table.options, debug, 'getRightFlatHeaders'));\n\n // Leaf Headers\n\n table.getCenterLeafHeaders = memo(() => [table.getCenterFlatHeaders()], flatHeaders => {\n return flatHeaders.filter(header => {\n var _header$subHeaders;\n return !((_header$subHeaders = header.subHeaders) != null && _header$subHeaders.length);\n });\n }, getMemoOptions(table.options, debug, 'getCenterLeafHeaders'));\n table.getLeftLeafHeaders = memo(() => [table.getLeftFlatHeaders()], flatHeaders => {\n return flatHeaders.filter(header => {\n var _header$subHeaders2;\n return !((_header$subHeaders2 = header.subHeaders) != null && _header$subHeaders2.length);\n });\n }, getMemoOptions(table.options, debug, 'getLeftLeafHeaders'));\n table.getRightLeafHeaders = memo(() => [table.getRightFlatHeaders()], flatHeaders => {\n return flatHeaders.filter(header => {\n var _header$subHeaders3;\n return !((_header$subHeaders3 = header.subHeaders) != null && _header$subHeaders3.length);\n });\n }, getMemoOptions(table.options, debug, 'getRightLeafHeaders'));\n table.getLeafHeaders = memo(() => [table.getLeftHeaderGroups(), table.getCenterHeaderGroups(), table.getRightHeaderGroups()], (left, center, right) => {\n var _left$0$headers, _left$, _center$0$headers, _center$, _right$0$headers, _right$;\n return [...((_left$0$headers = (_left$ = left[0]) == null ? void 0 : _left$.headers) != null ? _left$0$headers : []), ...((_center$0$headers = (_center$ = center[0]) == null ? void 0 : _center$.headers) != null ? _center$0$headers : []), ...((_right$0$headers = (_right$ = right[0]) == null ? void 0 : _right$.headers) != null ? _right$0$headers : [])].map(header => {\n return header.getLeafHeaders();\n }).flat();\n }, getMemoOptions(table.options, debug, 'getLeafHeaders'));\n }\n};\nfunction buildHeaderGroups(allColumns, columnsToGroup, table, headerFamily) {\n var _headerGroups$0$heade, _headerGroups$;\n // Find the max depth of the columns:\n // build the leaf column row\n // build each buffer row going up\n // placeholder for non-existent level\n // real column for existing level\n\n let maxDepth = 0;\n const findMaxDepth = function (columns, depth) {\n if (depth === void 0) {\n depth = 1;\n }\n maxDepth = Math.max(maxDepth, depth);\n columns.filter(column => column.getIsVisible()).forEach(column => {\n var _column$columns;\n if ((_column$columns = column.columns) != null && _column$columns.length) {\n findMaxDepth(column.columns, depth + 1);\n }\n }, 0);\n };\n findMaxDepth(allColumns);\n let headerGroups = [];\n const createHeaderGroup = (headersToGroup, depth) => {\n // The header group we are creating\n const headerGroup = {\n depth,\n id: [headerFamily, `${depth}`].filter(Boolean).join('_'),\n headers: []\n };\n\n // The parent columns we're going to scan next\n const pendingParentHeaders = [];\n\n // Scan each column for parents\n headersToGroup.forEach(headerToGroup => {\n // What is the latest (last) parent column?\n\n const latestPendingParentHeader = [...pendingParentHeaders].reverse()[0];\n const isLeafHeader = headerToGroup.column.depth === headerGroup.depth;\n let column;\n let isPlaceholder = false;\n if (isLeafHeader && headerToGroup.column.parent) {\n // The parent header is new\n column = headerToGroup.column.parent;\n } else {\n // The parent header is repeated\n column = headerToGroup.column;\n isPlaceholder = true;\n }\n if (latestPendingParentHeader && (latestPendingParentHeader == null ? void 0 : latestPendingParentHeader.column) === column) {\n // This column is repeated. Add it as a sub header to the next batch\n latestPendingParentHeader.subHeaders.push(headerToGroup);\n } else {\n // This is a new header. Let's create it\n const header = createHeader(table, column, {\n id: [headerFamily, depth, column.id, headerToGroup == null ? void 0 : headerToGroup.id].filter(Boolean).join('_'),\n isPlaceholder,\n placeholderId: isPlaceholder ? `${pendingParentHeaders.filter(d => d.column === column).length}` : undefined,\n depth,\n index: pendingParentHeaders.length\n });\n\n // Add the headerToGroup as a subHeader of the new header\n header.subHeaders.push(headerToGroup);\n // Add the new header to the pendingParentHeaders to get grouped\n // in the next batch\n pendingParentHeaders.push(header);\n }\n headerGroup.headers.push(headerToGroup);\n headerToGroup.headerGroup = headerGroup;\n });\n headerGroups.push(headerGroup);\n if (depth > 0) {\n createHeaderGroup(pendingParentHeaders, depth - 1);\n }\n };\n const bottomHeaders = columnsToGroup.map((column, index) => createHeader(table, column, {\n depth: maxDepth,\n index\n }));\n createHeaderGroup(bottomHeaders, maxDepth - 1);\n headerGroups.reverse();\n\n // headerGroups = headerGroups.filter(headerGroup => {\n // return !headerGroup.headers.every(header => header.isPlaceholder)\n // })\n\n const recurseHeadersForSpans = headers => {\n const filteredHeaders = headers.filter(header => header.column.getIsVisible());\n return filteredHeaders.map(header => {\n let colSpan = 0;\n let rowSpan = 0;\n let childRowSpans = [0];\n if (header.subHeaders && header.subHeaders.length) {\n childRowSpans = [];\n recurseHeadersForSpans(header.subHeaders).forEach(_ref => {\n let {\n colSpan: childColSpan,\n rowSpan: childRowSpan\n } = _ref;\n colSpan += childColSpan;\n childRowSpans.push(childRowSpan);\n });\n } else {\n colSpan = 1;\n }\n const minChildRowSpan = Math.min(...childRowSpans);\n rowSpan = rowSpan + minChildRowSpan;\n header.colSpan = colSpan;\n header.rowSpan = rowSpan;\n return {\n colSpan,\n rowSpan\n };\n });\n };\n recurseHeadersForSpans((_headerGroups$0$heade = (_headerGroups$ = headerGroups[0]) == null ? void 0 : _headerGroups$.headers) != null ? _headerGroups$0$heade : []);\n return headerGroups;\n}\n\n//\n\n//\n\nconst defaultColumnSizing = {\n size: 150,\n minSize: 20,\n maxSize: Number.MAX_SAFE_INTEGER\n};\nconst getDefaultColumnSizingInfoState = () => ({\n startOffset: null,\n startSize: null,\n deltaOffset: null,\n deltaPercentage: null,\n isResizingColumn: false,\n columnSizingStart: []\n});\nconst ColumnSizing = {\n getDefaultColumnDef: () => {\n return defaultColumnSizing;\n },\n getInitialState: state => {\n return {\n columnSizing: {},\n columnSizingInfo: getDefaultColumnSizingInfoState(),\n ...state\n };\n },\n getDefaultOptions: table => {\n return {\n columnResizeMode: 'onEnd',\n columnResizeDirection: 'ltr',\n onColumnSizingChange: makeStateUpdater('columnSizing', table),\n onColumnSizingInfoChange: makeStateUpdater('columnSizingInfo', table)\n };\n },\n createColumn: (column, table) => {\n column.getSize = () => {\n var _column$columnDef$min, _ref, _column$columnDef$max;\n const columnSize = table.getState().columnSizing[column.id];\n return Math.min(Math.max((_column$columnDef$min = column.columnDef.minSize) != null ? _column$columnDef$min : defaultColumnSizing.minSize, (_ref = columnSize != null ? columnSize : column.columnDef.size) != null ? _ref : defaultColumnSizing.size), (_column$columnDef$max = column.columnDef.maxSize) != null ? _column$columnDef$max : defaultColumnSizing.maxSize);\n };\n column.getStart = memo(position => [position, _getVisibleLeafColumns(table, position), table.getState().columnSizing], (position, columns) => columns.slice(0, column.getIndex(position)).reduce((sum, column) => sum + column.getSize(), 0), getMemoOptions(table.options, 'debugColumns', 'getStart'));\n column.getAfter = memo(position => [position, _getVisibleLeafColumns(table, position), table.getState().columnSizing], (position, columns) => columns.slice(column.getIndex(position) + 1).reduce((sum, column) => sum + column.getSize(), 0), getMemoOptions(table.options, 'debugColumns', 'getAfter'));\n column.resetSize = () => {\n table.setColumnSizing(_ref2 => {\n let {\n [column.id]: _,\n ...rest\n } = _ref2;\n return rest;\n });\n };\n column.getCanResize = () => {\n var _column$columnDef$ena, _table$options$enable;\n return ((_column$columnDef$ena = column.columnDef.enableResizing) != null ? _column$columnDef$ena : true) && ((_table$options$enable = table.options.enableColumnResizing) != null ? _table$options$enable : true);\n };\n column.getIsResizing = () => {\n return table.getState().columnSizingInfo.isResizingColumn === column.id;\n };\n },\n createHeader: (header, table) => {\n header.getSize = () => {\n let sum = 0;\n const recurse = header => {\n if (header.subHeaders.length) {\n header.subHeaders.forEach(recurse);\n } else {\n var _header$column$getSiz;\n sum += (_header$column$getSiz = header.column.getSize()) != null ? _header$column$getSiz : 0;\n }\n };\n recurse(header);\n return sum;\n };\n header.getStart = () => {\n if (header.index > 0) {\n const prevSiblingHeader = header.headerGroup.headers[header.index - 1];\n return prevSiblingHeader.getStart() + prevSiblingHeader.getSize();\n }\n return 0;\n };\n header.getResizeHandler = _contextDocument => {\n const column = table.getColumn(header.column.id);\n const canResize = column == null ? void 0 : column.getCanResize();\n return e => {\n if (!column || !canResize) {\n return;\n }\n e.persist == null || e.persist();\n if (isTouchStartEvent(e)) {\n // lets not respond to multiple touches (e.g. 2 or 3 fingers)\n if (e.touches && e.touches.length > 1) {\n return;\n }\n }\n const startSize = header.getSize();\n const columnSizingStart = header ? header.getLeafHeaders().map(d => [d.column.id, d.column.getSize()]) : [[column.id, column.getSize()]];\n const clientX = isTouchStartEvent(e) ? Math.round(e.touches[0].clientX) : e.clientX;\n const newColumnSizing = {};\n const updateOffset = (eventType, clientXPos) => {\n if (typeof clientXPos !== 'number') {\n return;\n }\n table.setColumnSizingInfo(old => {\n var _old$startOffset, _old$startSize;\n const deltaDirection = table.options.columnResizeDirection === 'rtl' ? -1 : 1;\n const deltaOffset = (clientXPos - ((_old$startOffset = old == null ? void 0 : old.startOffset) != null ? _old$startOffset : 0)) * deltaDirection;\n const deltaPercentage = Math.max(deltaOffset / ((_old$startSize = old == null ? void 0 : old.startSize) != null ? _old$startSize : 0), -0.999999);\n old.columnSizingStart.forEach(_ref3 => {\n let [columnId, headerSize] = _ref3;\n newColumnSizing[columnId] = Math.round(Math.max(headerSize + headerSize * deltaPercentage, 0) * 100) / 100;\n });\n return {\n ...old,\n deltaOffset,\n deltaPercentage\n };\n });\n if (table.options.columnResizeMode === 'onChange' || eventType === 'end') {\n table.setColumnSizing(old => ({\n ...old,\n ...newColumnSizing\n }));\n }\n };\n const onMove = clientXPos => updateOffset('move', clientXPos);\n const onEnd = clientXPos => {\n updateOffset('end', clientXPos);\n table.setColumnSizingInfo(old => ({\n ...old,\n isResizingColumn: false,\n startOffset: null,\n startSize: null,\n deltaOffset: null,\n deltaPercentage: null,\n columnSizingStart: []\n }));\n };\n const contextDocument = _contextDocument || typeof document !== 'undefined' ? document : null;\n const mouseEvents = {\n moveHandler: e => onMove(e.clientX),\n upHandler: e => {\n contextDocument == null || contextDocument.removeEventListener('mousemove', mouseEvents.moveHandler);\n contextDocument == null || contextDocument.removeEventListener('mouseup', mouseEvents.upHandler);\n onEnd(e.clientX);\n }\n };\n const touchEvents = {\n moveHandler: e => {\n if (e.cancelable) {\n e.preventDefault();\n e.stopPropagation();\n }\n onMove(e.touches[0].clientX);\n return false;\n },\n upHandler: e => {\n var _e$touches$;\n contextDocument == null || contextDocument.removeEventListener('touchmove', touchEvents.moveHandler);\n contextDocument == null || contextDocument.removeEventListener('touchend', touchEvents.upHandler);\n if (e.cancelable) {\n e.preventDefault();\n e.stopPropagation();\n }\n onEnd((_e$touches$ = e.touches[0]) == null ? void 0 : _e$touches$.clientX);\n }\n };\n const passiveIfSupported = passiveEventSupported() ? {\n passive: false\n } : false;\n if (isTouchStartEvent(e)) {\n contextDocument == null || contextDocument.addEventListener('touchmove', touchEvents.moveHandler, passiveIfSupported);\n contextDocument == null || contextDocument.addEventListener('touchend', touchEvents.upHandler, passiveIfSupported);\n } else {\n contextDocument == null || contextDocument.addEventListener('mousemove', mouseEvents.moveHandler, passiveIfSupported);\n contextDocument == null || contextDocument.addEventListener('mouseup', mouseEvents.upHandler, passiveIfSupported);\n }\n table.setColumnSizingInfo(old => ({\n ...old,\n startOffset: clientX,\n startSize,\n deltaOffset: 0,\n deltaPercentage: 0,\n columnSizingStart,\n isResizingColumn: column.id\n }));\n };\n };\n },\n createTable: table => {\n table.setColumnSizing = updater => table.options.onColumnSizingChange == null ? void 0 : table.options.onColumnSizingChange(updater);\n table.setColumnSizingInfo = updater => table.options.onColumnSizingInfoChange == null ? void 0 : table.options.onColumnSizingInfoChange(updater);\n table.resetColumnSizing = defaultState => {\n var _table$initialState$c;\n table.setColumnSizing(defaultState ? {} : (_table$initialState$c = table.initialState.columnSizing) != null ? _table$initialState$c : {});\n };\n table.resetHeaderSizeInfo = defaultState => {\n var _table$initialState$c2;\n table.setColumnSizingInfo(defaultState ? getDefaultColumnSizingInfoState() : (_table$initialState$c2 = table.initialState.columnSizingInfo) != null ? _table$initialState$c2 : getDefaultColumnSizingInfoState());\n };\n table.getTotalSize = () => {\n var _table$getHeaderGroup, _table$getHeaderGroup2;\n return (_table$getHeaderGroup = (_table$getHeaderGroup2 = table.getHeaderGroups()[0]) == null ? void 0 : _table$getHeaderGroup2.headers.reduce((sum, header) => {\n return sum + header.getSize();\n }, 0)) != null ? _table$getHeaderGroup : 0;\n };\n table.getLeftTotalSize = () => {\n var _table$getLeftHeaderG, _table$getLeftHeaderG2;\n return (_table$getLeftHeaderG = (_table$getLeftHeaderG2 = table.getLeftHeaderGroups()[0]) == null ? void 0 : _table$getLeftHeaderG2.headers.reduce((sum, header) => {\n return sum + header.getSize();\n }, 0)) != null ? _table$getLeftHeaderG : 0;\n };\n table.getCenterTotalSize = () => {\n var _table$getCenterHeade, _table$getCenterHeade2;\n return (_table$getCenterHeade = (_table$getCenterHeade2 = table.getCenterHeaderGroups()[0]) == null ? void 0 : _table$getCenterHeade2.headers.reduce((sum, header) => {\n return sum + header.getSize();\n }, 0)) != null ? _table$getCenterHeade : 0;\n };\n table.getRightTotalSize = () => {\n var _table$getRightHeader, _table$getRightHeader2;\n return (_table$getRightHeader = (_table$getRightHeader2 = table.getRightHeaderGroups()[0]) == null ? void 0 : _table$getRightHeader2.headers.reduce((sum, header) => {\n return sum + header.getSize();\n }, 0)) != null ? _table$getRightHeader : 0;\n };\n }\n};\nlet passiveSupported = null;\nfunction passiveEventSupported() {\n if (typeof passiveSupported === 'boolean') return passiveSupported;\n let supported = false;\n try {\n const options = {\n get passive() {\n supported = true;\n return false;\n }\n };\n const noop = () => {};\n window.addEventListener('test', noop, options);\n window.removeEventListener('test', noop);\n } catch (err) {\n supported = false;\n }\n passiveSupported = supported;\n return passiveSupported;\n}\nfunction isTouchStartEvent(e) {\n return e.type === 'touchstart';\n}\n\n//\n\nconst Expanding = {\n getInitialState: state => {\n return {\n expanded: {},\n ...state\n };\n },\n getDefaultOptions: table => {\n return {\n onExpandedChange: makeStateUpdater('expanded', table),\n paginateExpandedRows: true\n };\n },\n createTable: table => {\n let registered = false;\n let queued = false;\n table._autoResetExpanded = () => {\n var _ref, _table$options$autoRe;\n if (!registered) {\n table._queue(() => {\n registered = true;\n });\n return;\n }\n if ((_ref = (_table$options$autoRe = table.options.autoResetAll) != null ? _table$options$autoRe : table.options.autoResetExpanded) != null ? _ref : !table.options.manualExpanding) {\n if (queued) return;\n queued = true;\n table._queue(() => {\n table.resetExpanded();\n queued = false;\n });\n }\n };\n table.setExpanded = updater => table.options.onExpandedChange == null ? void 0 : table.options.onExpandedChange(updater);\n table.toggleAllRowsExpanded = expanded => {\n if (expanded != null ? expanded : !table.getIsAllRowsExpanded()) {\n table.setExpanded(true);\n } else {\n table.setExpanded({});\n }\n };\n table.resetExpanded = defaultState => {\n var _table$initialState$e, _table$initialState;\n table.setExpanded(defaultState ? {} : (_table$initialState$e = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.expanded) != null ? _table$initialState$e : {});\n };\n table.getCanSomeRowsExpand = () => {\n return table.getPrePaginationRowModel().flatRows.some(row => row.getCanExpand());\n };\n table.getToggleAllRowsExpandedHandler = () => {\n return e => {\n e.persist == null || e.persist();\n table.toggleAllRowsExpanded();\n };\n };\n table.getIsSomeRowsExpanded = () => {\n const expanded = table.getState().expanded;\n return expanded === true || Object.values(expanded).some(Boolean);\n };\n table.getIsAllRowsExpanded = () => {\n const expanded = table.getState().expanded;\n\n // If expanded is true, save some cycles and return true\n if (typeof expanded === 'boolean') {\n return expanded === true;\n }\n if (!Object.keys(expanded).length) {\n return false;\n }\n\n // If any row is not expanded, return false\n if (table.getRowModel().flatRows.some(row => !row.getIsExpanded())) {\n return false;\n }\n\n // They must all be expanded :shrug:\n return true;\n };\n table.getExpandedDepth = () => {\n let maxDepth = 0;\n const rowIds = table.getState().expanded === true ? Object.keys(table.getRowModel().rowsById) : Object.keys(table.getState().expanded);\n rowIds.forEach(id => {\n const splitId = id.split('.');\n maxDepth = Math.max(maxDepth, splitId.length);\n });\n return maxDepth;\n };\n table.getPreExpandedRowModel = () => table.getSortedRowModel();\n table.getExpandedRowModel = () => {\n if (!table._getExpandedRowModel && table.options.getExpandedRowModel) {\n table._getExpandedRowModel = table.options.getExpandedRowModel(table);\n }\n if (table.options.manualExpanding || !table._getExpandedRowModel) {\n return table.getPreExpandedRowModel();\n }\n return table._getExpandedRowModel();\n };\n },\n createRow: (row, table) => {\n row.toggleExpanded = expanded => {\n table.setExpanded(old => {\n var _expanded;\n const exists = old === true ? true : !!(old != null && old[row.id]);\n let oldExpanded = {};\n if (old === true) {\n Object.keys(table.getRowModel().rowsById).forEach(rowId => {\n oldExpanded[rowId] = true;\n });\n } else {\n oldExpanded = old;\n }\n expanded = (_expanded = expanded) != null ? _expanded : !exists;\n if (!exists && expanded) {\n return {\n ...oldExpanded,\n [row.id]: true\n };\n }\n if (exists && !expanded) {\n const {\n [row.id]: _,\n ...rest\n } = oldExpanded;\n return rest;\n }\n return old;\n });\n };\n row.getIsExpanded = () => {\n var _table$options$getIsR;\n const expanded = table.getState().expanded;\n return !!((_table$options$getIsR = table.options.getIsRowExpanded == null ? void 0 : table.options.getIsRowExpanded(row)) != null ? _table$options$getIsR : expanded === true || (expanded == null ? void 0 : expanded[row.id]));\n };\n row.getCanExpand = () => {\n var _table$options$getRow, _table$options$enable, _row$subRows;\n return (_table$options$getRow = table.options.getRowCanExpand == null ? void 0 : table.options.getRowCanExpand(row)) != null ? _table$options$getRow : ((_table$options$enable = table.options.enableExpanding) != null ? _table$options$enable : true) && !!((_row$subRows = row.subRows) != null && _row$subRows.length);\n };\n row.getIsAllParentsExpanded = () => {\n let isFullyExpanded = true;\n let currentRow = row;\n while (isFullyExpanded && currentRow.parentId) {\n currentRow = table.getRow(currentRow.parentId, true);\n isFullyExpanded = currentRow.getIsExpanded();\n }\n return isFullyExpanded;\n };\n row.getToggleExpandedHandler = () => {\n const canExpand = row.getCanExpand();\n return () => {\n if (!canExpand) return;\n row.toggleExpanded();\n };\n };\n }\n};\n\nconst includesString = (row, columnId, filterValue) => {\n var _row$getValue;\n const search = filterValue.toLowerCase();\n return Boolean((_row$getValue = row.getValue(columnId)) == null || (_row$getValue = _row$getValue.toString()) == null || (_row$getValue = _row$getValue.toLowerCase()) == null ? void 0 : _row$getValue.includes(search));\n};\nincludesString.autoRemove = val => testFalsey(val);\nconst includesStringSensitive = (row, columnId, filterValue) => {\n var _row$getValue2;\n return Boolean((_row$getValue2 = row.getValue(columnId)) == null || (_row$getValue2 = _row$getValue2.toString()) == null ? void 0 : _row$getValue2.includes(filterValue));\n};\nincludesStringSensitive.autoRemove = val => testFalsey(val);\nconst equalsString = (row, columnId, filterValue) => {\n var _row$getValue3;\n return ((_row$getValue3 = row.getValue(columnId)) == null || (_row$getValue3 = _row$getValue3.toString()) == null ? void 0 : _row$getValue3.toLowerCase()) === (filterValue == null ? void 0 : filterValue.toLowerCase());\n};\nequalsString.autoRemove = val => testFalsey(val);\nconst arrIncludes = (row, columnId, filterValue) => {\n var _row$getValue4;\n return (_row$getValue4 = row.getValue(columnId)) == null ? void 0 : _row$getValue4.includes(filterValue);\n};\narrIncludes.autoRemove = val => testFalsey(val) || !(val != null && val.length);\nconst arrIncludesAll = (row, columnId, filterValue) => {\n return !filterValue.some(val => {\n var _row$getValue5;\n return !((_row$getValue5 = row.getValue(columnId)) != null && _row$getValue5.includes(val));\n });\n};\narrIncludesAll.autoRemove = val => testFalsey(val) || !(val != null && val.length);\nconst arrIncludesSome = (row, columnId, filterValue) => {\n return filterValue.some(val => {\n var _row$getValue6;\n return (_row$getValue6 = row.getValue(columnId)) == null ? void 0 : _row$getValue6.includes(val);\n });\n};\narrIncludesSome.autoRemove = val => testFalsey(val) || !(val != null && val.length);\nconst equals = (row, columnId, filterValue) => {\n return row.getValue(columnId) === filterValue;\n};\nequals.autoRemove = val => testFalsey(val);\nconst weakEquals = (row, columnId, filterValue) => {\n return row.getValue(columnId) == filterValue;\n};\nweakEquals.autoRemove = val => testFalsey(val);\nconst inNumberRange = (row, columnId, filterValue) => {\n let [min, max] = filterValue;\n const rowValue = row.getValue(columnId);\n return rowValue >= min && rowValue <= max;\n};\ninNumberRange.resolveFilterValue = val => {\n let [unsafeMin, unsafeMax] = val;\n let parsedMin = typeof unsafeMin !== 'number' ? parseFloat(unsafeMin) : unsafeMin;\n let parsedMax = typeof unsafeMax !== 'number' ? parseFloat(unsafeMax) : unsafeMax;\n let min = unsafeMin === null || Number.isNaN(parsedMin) ? -Infinity : parsedMin;\n let max = unsafeMax === null || Number.isNaN(parsedMax) ? Infinity : parsedMax;\n if (min > max) {\n const temp = min;\n min = max;\n max = temp;\n }\n return [min, max];\n};\ninNumberRange.autoRemove = val => testFalsey(val) || testFalsey(val[0]) && testFalsey(val[1]);\n\n// Export\n\nconst filterFns = {\n includesString,\n includesStringSensitive,\n equalsString,\n arrIncludes,\n arrIncludesAll,\n arrIncludesSome,\n equals,\n weakEquals,\n inNumberRange\n};\n// Utils\n\nfunction testFalsey(val) {\n return val === undefined || val === null || val === '';\n}\n\n//\n\nconst Filters = {\n getDefaultColumnDef: () => {\n return {\n filterFn: 'auto'\n };\n },\n getInitialState: state => {\n return {\n columnFilters: [],\n globalFilter: undefined,\n // filtersProgress: 1,\n // facetProgress: {},\n ...state\n };\n },\n getDefaultOptions: table => {\n return {\n onColumnFiltersChange: makeStateUpdater('columnFilters', table),\n onGlobalFilterChange: makeStateUpdater('globalFilter', table),\n filterFromLeafRows: false,\n maxLeafRowFilterDepth: 100,\n globalFilterFn: 'auto',\n getColumnCanGlobalFilter: column => {\n var _table$getCoreRowMode;\n const value = (_table$getCoreRowMode = table.getCoreRowModel().flatRows[0]) == null || (_table$getCoreRowMode = _table$getCoreRowMode._getAllCellsByColumnId()[column.id]) == null ? void 0 : _table$getCoreRowMode.getValue();\n return typeof value === 'string' || typeof value === 'number';\n }\n };\n },\n createColumn: (column, table) => {\n column.getAutoFilterFn = () => {\n const firstRow = table.getCoreRowModel().flatRows[0];\n const value = firstRow == null ? void 0 : firstRow.getValue(column.id);\n if (typeof value === 'string') {\n return filterFns.includesString;\n }\n if (typeof value === 'number') {\n return filterFns.inNumberRange;\n }\n if (typeof value === 'boolean') {\n return filterFns.equals;\n }\n if (value !== null && typeof value === 'object') {\n return filterFns.equals;\n }\n if (Array.isArray(value)) {\n return filterFns.arrIncludes;\n }\n return filterFns.weakEquals;\n };\n column.getFilterFn = () => {\n var _table$options$filter, _table$options$filter2;\n return isFunction(column.columnDef.filterFn) ? column.columnDef.filterFn : column.columnDef.filterFn === 'auto' ? column.getAutoFilterFn() : // @ts-ignore\n (_table$options$filter = (_table$options$filter2 = table.options.filterFns) == null ? void 0 : _table$options$filter2[column.columnDef.filterFn]) != null ? _table$options$filter : filterFns[column.columnDef.filterFn];\n };\n column.getCanFilter = () => {\n var _column$columnDef$ena, _table$options$enable, _table$options$enable2;\n return ((_column$columnDef$ena = column.columnDef.enableColumnFilter) != null ? _column$columnDef$ena : true) && ((_table$options$enable = table.options.enableColumnFilters) != null ? _table$options$enable : true) && ((_table$options$enable2 = table.options.enableFilters) != null ? _table$options$enable2 : true) && !!column.accessorFn;\n };\n column.getCanGlobalFilter = () => {\n var _column$columnDef$ena2, _table$options$enable3, _table$options$enable4, _table$options$getCol;\n return ((_column$columnDef$ena2 = column.columnDef.enableGlobalFilter) != null ? _column$columnDef$ena2 : true) && ((_table$options$enable3 = table.options.enableGlobalFilter) != null ? _table$options$enable3 : true) && ((_table$options$enable4 = table.options.enableFilters) != null ? _table$options$enable4 : true) && ((_table$options$getCol = table.options.getColumnCanGlobalFilter == null ? void 0 : table.options.getColumnCanGlobalFilter(column)) != null ? _table$options$getCol : true) && !!column.accessorFn;\n };\n column.getIsFiltered = () => column.getFilterIndex() > -1;\n column.getFilterValue = () => {\n var _table$getState$colum;\n return (_table$getState$colum = table.getState().columnFilters) == null || (_table$getState$colum = _table$getState$colum.find(d => d.id === column.id)) == null ? void 0 : _table$getState$colum.value;\n };\n column.getFilterIndex = () => {\n var _table$getState$colum2, _table$getState$colum3;\n return (_table$getState$colum2 = (_table$getState$colum3 = table.getState().columnFilters) == null ? void 0 : _table$getState$colum3.findIndex(d => d.id === column.id)) != null ? _table$getState$colum2 : -1;\n };\n column.setFilterValue = value => {\n table.setColumnFilters(old => {\n const filterFn = column.getFilterFn();\n const previousfilter = old == null ? void 0 : old.find(d => d.id === column.id);\n const newFilter = functionalUpdate(value, previousfilter ? previousfilter.value : undefined);\n\n //\n if (shouldAutoRemoveFilter(filterFn, newFilter, column)) {\n var _old$filter;\n return (_old$filter = old == null ? void 0 : old.filter(d => d.id !== column.id)) != null ? _old$filter : [];\n }\n const newFilterObj = {\n id: column.id,\n value: newFilter\n };\n if (previousfilter) {\n var _old$map;\n return (_old$map = old == null ? void 0 : old.map(d => {\n if (d.id === column.id) {\n return newFilterObj;\n }\n return d;\n })) != null ? _old$map : [];\n }\n if (old != null && old.length) {\n return [...old, newFilterObj];\n }\n return [newFilterObj];\n });\n };\n column._getFacetedRowModel = table.options.getFacetedRowModel && table.options.getFacetedRowModel(table, column.id);\n column.getFacetedRowModel = () => {\n if (!column._getFacetedRowModel) {\n return table.getPreFilteredRowModel();\n }\n return column._getFacetedRowModel();\n };\n column._getFacetedUniqueValues = table.options.getFacetedUniqueValues && table.options.getFacetedUniqueValues(table, column.id);\n column.getFacetedUniqueValues = () => {\n if (!column._getFacetedUniqueValues) {\n return new Map();\n }\n return column._getFacetedUniqueValues();\n };\n column._getFacetedMinMaxValues = table.options.getFacetedMinMaxValues && table.options.getFacetedMinMaxValues(table, column.id);\n column.getFacetedMinMaxValues = () => {\n if (!column._getFacetedMinMaxValues) {\n return undefined;\n }\n return column._getFacetedMinMaxValues();\n };\n // () => [column.getFacetedRowModel()],\n // facetedRowModel => getRowModelMinMaxValues(facetedRowModel, column.id),\n },\n createRow: (row, table) => {\n row.columnFilters = {};\n row.columnFiltersMeta = {};\n },\n createTable: table => {\n table.getGlobalAutoFilterFn = () => {\n return filterFns.includesString;\n };\n table.getGlobalFilterFn = () => {\n var _table$options$filter3, _table$options$filter4;\n const {\n globalFilterFn: globalFilterFn\n } = table.options;\n return isFunction(globalFilterFn) ? globalFilterFn : globalFilterFn === 'auto' ? table.getGlobalAutoFilterFn() : // @ts-ignore\n (_table$options$filter3 = (_table$options$filter4 = table.options.filterFns) == null ? void 0 : _table$options$filter4[globalFilterFn]) != null ? _table$options$filter3 : filterFns[globalFilterFn];\n };\n table.setColumnFilters = updater => {\n const leafColumns = table.getAllLeafColumns();\n const updateFn = old => {\n var _functionalUpdate;\n return (_functionalUpdate = functionalUpdate(updater, old)) == null ? void 0 : _functionalUpdate.filter(filter => {\n const column = leafColumns.find(d => d.id === filter.id);\n if (column) {\n const filterFn = column.getFilterFn();\n if (shouldAutoRemoveFilter(filterFn, filter.value, column)) {\n return false;\n }\n }\n return true;\n });\n };\n table.options.onColumnFiltersChange == null || table.options.onColumnFiltersChange(updateFn);\n };\n table.setGlobalFilter = updater => {\n table.options.onGlobalFilterChange == null || table.options.onGlobalFilterChange(updater);\n };\n table.resetGlobalFilter = defaultState => {\n table.setGlobalFilter(defaultState ? undefined : table.initialState.globalFilter);\n };\n table.resetColumnFilters = defaultState => {\n var _table$initialState$c, _table$initialState;\n table.setColumnFilters(defaultState ? [] : (_table$initialState$c = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.columnFilters) != null ? _table$initialState$c : []);\n };\n table.getPreFilteredRowModel = () => table.getCoreRowModel();\n table.getFilteredRowModel = () => {\n if (!table._getFilteredRowModel && table.options.getFilteredRowModel) {\n table._getFilteredRowModel = table.options.getFilteredRowModel(table);\n }\n if (table.options.manualFiltering || !table._getFilteredRowModel) {\n return table.getPreFilteredRowModel();\n }\n return table._getFilteredRowModel();\n };\n table._getGlobalFacetedRowModel = table.options.getFacetedRowModel && table.options.getFacetedRowModel(table, '__global__');\n table.getGlobalFacetedRowModel = () => {\n if (table.options.manualFiltering || !table._getGlobalFacetedRowModel) {\n return table.getPreFilteredRowModel();\n }\n return table._getGlobalFacetedRowModel();\n };\n table._getGlobalFacetedUniqueValues = table.options.getFacetedUniqueValues && table.options.getFacetedUniqueValues(table, '__global__');\n table.getGlobalFacetedUniqueValues = () => {\n if (!table._getGlobalFacetedUniqueValues) {\n return new Map();\n }\n return table._getGlobalFacetedUniqueValues();\n };\n table._getGlobalFacetedMinMaxValues = table.options.getFacetedMinMaxValues && table.options.getFacetedMinMaxValues(table, '__global__');\n table.getGlobalFacetedMinMaxValues = () => {\n if (!table._getGlobalFacetedMinMaxValues) {\n return;\n }\n return table._getGlobalFacetedMinMaxValues();\n };\n }\n};\nfunction shouldAutoRemoveFilter(filterFn, value, column) {\n return (filterFn && filterFn.autoRemove ? filterFn.autoRemove(value, column) : false) || typeof value === 'undefined' || typeof value === 'string' && !value;\n}\n\nconst sum = (columnId, _leafRows, childRows) => {\n // It's faster to just add the aggregations together instead of\n // process leaf nodes individually\n return childRows.reduce((sum, next) => {\n const nextValue = next.getValue(columnId);\n return sum + (typeof nextValue === 'number' ? nextValue : 0);\n }, 0);\n};\nconst min = (columnId, _leafRows, childRows) => {\n let min;\n childRows.forEach(row => {\n const value = row.getValue(columnId);\n if (value != null && (min > value || min === undefined && value >= value)) {\n min = value;\n }\n });\n return min;\n};\nconst max = (columnId, _leafRows, childRows) => {\n let max;\n childRows.forEach(row => {\n const value = row.getValue(columnId);\n if (value != null && (max < value || max === undefined && value >= value)) {\n max = value;\n }\n });\n return max;\n};\nconst extent = (columnId, _leafRows, childRows) => {\n let min;\n let max;\n childRows.forEach(row => {\n const value = row.getValue(columnId);\n if (value != null) {\n if (min === undefined) {\n if (value >= value) min = max = value;\n } else {\n if (min > value) min = value;\n if (max < value) max = value;\n }\n }\n });\n return [min, max];\n};\nconst mean = (columnId, leafRows) => {\n let count = 0;\n let sum = 0;\n leafRows.forEach(row => {\n let value = row.getValue(columnId);\n if (value != null && (value = +value) >= value) {\n ++count, sum += value;\n }\n });\n if (count) return sum / count;\n return;\n};\nconst median = (columnId, leafRows) => {\n if (!leafRows.length) {\n return;\n }\n const values = leafRows.map(row => row.getValue(columnId));\n if (!isNumberArray(values)) {\n return;\n }\n if (values.length === 1) {\n return values[0];\n }\n const mid = Math.floor(values.length / 2);\n const nums = values.sort((a, b) => a - b);\n return values.length % 2 !== 0 ? nums[mid] : (nums[mid - 1] + nums[mid]) / 2;\n};\nconst unique = (columnId, leafRows) => {\n return Array.from(new Set(leafRows.map(d => d.getValue(columnId))).values());\n};\nconst uniqueCount = (columnId, leafRows) => {\n return new Set(leafRows.map(d => d.getValue(columnId))).size;\n};\nconst count = (_columnId, leafRows) => {\n return leafRows.length;\n};\nconst aggregationFns = {\n sum,\n min,\n max,\n extent,\n mean,\n median,\n unique,\n uniqueCount,\n count\n};\n\n//\n\nconst Grouping = {\n getDefaultColumnDef: () => {\n return {\n aggregatedCell: props => {\n var _toString, _props$getValue;\n return (_toString = (_props$getValue = props.getValue()) == null || _props$getValue.toString == null ? void 0 : _props$getValue.toString()) != null ? _toString : null;\n },\n aggregationFn: 'auto'\n };\n },\n getInitialState: state => {\n return {\n grouping: [],\n ...state\n };\n },\n getDefaultOptions: table => {\n return {\n onGroupingChange: makeStateUpdater('grouping', table),\n groupedColumnMode: 'reorder'\n };\n },\n createColumn: (column, table) => {\n column.toggleGrouping = () => {\n table.setGrouping(old => {\n // Find any existing grouping for this column\n if (old != null && old.includes(column.id)) {\n return old.filter(d => d !== column.id);\n }\n return [...(old != null ? old : []), column.id];\n });\n };\n column.getCanGroup = () => {\n var _ref, _ref2, _ref3, _column$columnDef$ena;\n return (_ref = (_ref2 = (_ref3 = (_column$columnDef$ena = column.columnDef.enableGrouping) != null ? _column$columnDef$ena : true) != null ? _ref3 : table.options.enableGrouping) != null ? _ref2 : true) != null ? _ref : !!column.accessorFn;\n };\n column.getIsGrouped = () => {\n var _table$getState$group;\n return (_table$getState$group = table.getState().grouping) == null ? void 0 : _table$getState$group.includes(column.id);\n };\n column.getGroupedIndex = () => {\n var _table$getState$group2;\n return (_table$getState$group2 = table.getState().grouping) == null ? void 0 : _table$getState$group2.indexOf(column.id);\n };\n column.getToggleGroupingHandler = () => {\n const canGroup = column.getCanGroup();\n return () => {\n if (!canGroup) return;\n column.toggleGrouping();\n };\n };\n column.getAutoAggregationFn = () => {\n const firstRow = table.getCoreRowModel().flatRows[0];\n const value = firstRow == null ? void 0 : firstRow.getValue(column.id);\n if (typeof value === 'number') {\n return aggregationFns.sum;\n }\n if (Object.prototype.toString.call(value) === '[object Date]') {\n return aggregationFns.extent;\n }\n };\n column.getAggregationFn = () => {\n var _table$options$aggreg, _table$options$aggreg2;\n if (!column) {\n throw new Error();\n }\n return isFunction(column.columnDef.aggregationFn) ? column.columnDef.aggregationFn : column.columnDef.aggregationFn === 'auto' ? column.getAutoAggregationFn() : (_table$options$aggreg = (_table$options$aggreg2 = table.options.aggregationFns) == null ? void 0 : _table$options$aggreg2[column.columnDef.aggregationFn]) != null ? _table$options$aggreg : aggregationFns[column.columnDef.aggregationFn];\n };\n },\n createTable: table => {\n table.setGrouping = updater => table.options.onGroupingChange == null ? void 0 : table.options.onGroupingChange(updater);\n table.resetGrouping = defaultState => {\n var _table$initialState$g, _table$initialState;\n table.setGrouping(defaultState ? [] : (_table$initialState$g = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.grouping) != null ? _table$initialState$g : []);\n };\n table.getPreGroupedRowModel = () => table.getFilteredRowModel();\n table.getGroupedRowModel = () => {\n if (!table._getGroupedRowModel && table.options.getGroupedRowModel) {\n table._getGroupedRowModel = table.options.getGroupedRowModel(table);\n }\n if (table.options.manualGrouping || !table._getGroupedRowModel) {\n return table.getPreGroupedRowModel();\n }\n return table._getGroupedRowModel();\n };\n },\n createRow: (row, table) => {\n row.getIsGrouped = () => !!row.groupingColumnId;\n row.getGroupingValue = columnId => {\n if (row._groupingValuesCache.hasOwnProperty(columnId)) {\n return row._groupingValuesCache[columnId];\n }\n const column = table.getColumn(columnId);\n if (!(column != null && column.columnDef.getGroupingValue)) {\n return row.getValue(columnId);\n }\n row._groupingValuesCache[columnId] = column.columnDef.getGroupingValue(row.original);\n return row._groupingValuesCache[columnId];\n };\n row._groupingValuesCache = {};\n },\n createCell: (cell, column, row, table) => {\n cell.getIsGrouped = () => column.getIsGrouped() && column.id === row.groupingColumnId;\n cell.getIsPlaceholder = () => !cell.getIsGrouped() && column.getIsGrouped();\n cell.getIsAggregated = () => {\n var _row$subRows;\n return !cell.getIsGrouped() && !cell.getIsPlaceholder() && !!((_row$subRows = row.subRows) != null && _row$subRows.length);\n };\n }\n};\nfunction orderColumns(leafColumns, grouping, groupedColumnMode) {\n if (!(grouping != null && grouping.length) || !groupedColumnMode) {\n return leafColumns;\n }\n const nonGroupingColumns = leafColumns.filter(col => !grouping.includes(col.id));\n if (groupedColumnMode === 'remove') {\n return nonGroupingColumns;\n }\n const groupingColumns = grouping.map(g => leafColumns.find(col => col.id === g)).filter(Boolean);\n return [...groupingColumns, ...nonGroupingColumns];\n}\n\n//\n\nconst Ordering = {\n getInitialState: state => {\n return {\n columnOrder: [],\n ...state\n };\n },\n getDefaultOptions: table => {\n return {\n onColumnOrderChange: makeStateUpdater('columnOrder', table)\n };\n },\n createColumn: (column, table) => {\n column.getIndex = memo(position => [_getVisibleLeafColumns(table, position)], columns => columns.findIndex(d => d.id === column.id), getMemoOptions(table.options, 'debugColumns', 'getIndex'));\n column.getIsFirstColumn = position => {\n var _columns$;\n const columns = _getVisibleLeafColumns(table, position);\n return ((_columns$ = columns[0]) == null ? void 0 : _columns$.id) === column.id;\n };\n column.getIsLastColumn = position => {\n var _columns;\n const columns = _getVisibleLeafColumns(table, position);\n return ((_columns = columns[columns.length - 1]) == null ? void 0 : _columns.id) === column.id;\n };\n },\n createTable: table => {\n table.setColumnOrder = updater => table.options.onColumnOrderChange == null ? void 0 : table.options.onColumnOrderChange(updater);\n table.resetColumnOrder = defaultState => {\n var _table$initialState$c;\n table.setColumnOrder(defaultState ? [] : (_table$initialState$c = table.initialState.columnOrder) != null ? _table$initialState$c : []);\n };\n table._getOrderColumnsFn = memo(() => [table.getState().columnOrder, table.getState().grouping, table.options.groupedColumnMode], (columnOrder, grouping, groupedColumnMode) => columns => {\n // Sort grouped columns to the start of the column list\n // before the headers are built\n let orderedColumns = [];\n\n // If there is no order, return the normal columns\n if (!(columnOrder != null && columnOrder.length)) {\n orderedColumns = columns;\n } else {\n const columnOrderCopy = [...columnOrder];\n\n // If there is an order, make a copy of the columns\n const columnsCopy = [...columns];\n\n // And make a new ordered array of the columns\n\n // Loop over the columns and place them in order into the new array\n while (columnsCopy.length && columnOrderCopy.length) {\n const targetColumnId = columnOrderCopy.shift();\n const foundIndex = columnsCopy.findIndex(d => d.id === targetColumnId);\n if (foundIndex > -1) {\n orderedColumns.push(columnsCopy.splice(foundIndex, 1)[0]);\n }\n }\n\n // If there are any columns left, add them to the end\n orderedColumns = [...orderedColumns, ...columnsCopy];\n }\n return orderColumns(orderedColumns, grouping, groupedColumnMode);\n }, getMemoOptions(table.options, 'debugTable', '_getOrderColumnsFn'));\n }\n};\n\n//\n\nconst defaultPageIndex = 0;\nconst defaultPageSize = 10;\nconst getDefaultPaginationState = () => ({\n pageIndex: defaultPageIndex,\n pageSize: defaultPageSize\n});\nconst Pagination = {\n getInitialState: state => {\n return {\n ...state,\n pagination: {\n ...getDefaultPaginationState(),\n ...(state == null ? void 0 : state.pagination)\n }\n };\n },\n getDefaultOptions: table => {\n return {\n onPaginationChange: makeStateUpdater('pagination', table)\n };\n },\n createTable: table => {\n let registered = false;\n let queued = false;\n table._autoResetPageIndex = () => {\n var _ref, _table$options$autoRe;\n if (!registered) {\n table._queue(() => {\n registered = true;\n });\n return;\n }\n if ((_ref = (_table$options$autoRe = table.options.autoResetAll) != null ? _table$options$autoRe : table.options.autoResetPageIndex) != null ? _ref : !table.options.manualPagination) {\n if (queued) return;\n queued = true;\n table._queue(() => {\n table.resetPageIndex();\n queued = false;\n });\n }\n };\n table.setPagination = updater => {\n const safeUpdater = old => {\n let newState = functionalUpdate(updater, old);\n return newState;\n };\n return table.options.onPaginationChange == null ? void 0 : table.options.onPaginationChange(safeUpdater);\n };\n table.resetPagination = defaultState => {\n var _table$initialState$p;\n table.setPagination(defaultState ? getDefaultPaginationState() : (_table$initialState$p = table.initialState.pagination) != null ? _table$initialState$p : getDefaultPaginationState());\n };\n table.setPageIndex = updater => {\n table.setPagination(old => {\n let pageIndex = functionalUpdate(updater, old.pageIndex);\n const maxPageIndex = typeof table.options.pageCount === 'undefined' || table.options.pageCount === -1 ? Number.MAX_SAFE_INTEGER : table.options.pageCount - 1;\n pageIndex = Math.max(0, Math.min(pageIndex, maxPageIndex));\n return {\n ...old,\n pageIndex\n };\n });\n };\n table.resetPageIndex = defaultState => {\n var _table$initialState$p2, _table$initialState;\n table.setPageIndex(defaultState ? defaultPageIndex : (_table$initialState$p2 = (_table$initialState = table.initialState) == null || (_table$initialState = _table$initialState.pagination) == null ? void 0 : _table$initialState.pageIndex) != null ? _table$initialState$p2 : defaultPageIndex);\n };\n table.resetPageSize = defaultState => {\n var _table$initialState$p3, _table$initialState2;\n table.setPageSize(defaultState ? defaultPageSize : (_table$initialState$p3 = (_table$initialState2 = table.initialState) == null || (_table$initialState2 = _table$initialState2.pagination) == null ? void 0 : _table$initialState2.pageSize) != null ? _table$initialState$p3 : defaultPageSize);\n };\n table.setPageSize = updater => {\n table.setPagination(old => {\n const pageSize = Math.max(1, functionalUpdate(updater, old.pageSize));\n const topRowIndex = old.pageSize * old.pageIndex;\n const pageIndex = Math.floor(topRowIndex / pageSize);\n return {\n ...old,\n pageIndex,\n pageSize\n };\n });\n };\n table.setPageCount = updater => table.setPagination(old => {\n var _table$options$pageCo;\n let newPageCount = functionalUpdate(updater, (_table$options$pageCo = table.options.pageCount) != null ? _table$options$pageCo : -1);\n if (typeof newPageCount === 'number') {\n newPageCount = Math.max(-1, newPageCount);\n }\n return {\n ...old,\n pageCount: newPageCount\n };\n });\n table.getPageOptions = memo(() => [table.getPageCount()], pageCount => {\n let pageOptions = [];\n if (pageCount && pageCount > 0) {\n pageOptions = [...new Array(pageCount)].fill(null).map((_, i) => i);\n }\n return pageOptions;\n }, getMemoOptions(table.options, 'debugTable', 'getPageOptions'));\n table.getCanPreviousPage = () => table.getState().pagination.pageIndex > 0;\n table.getCanNextPage = () => {\n const {\n pageIndex\n } = table.getState().pagination;\n const pageCount = table.getPageCount();\n if (pageCount === -1) {\n return true;\n }\n if (pageCount === 0) {\n return false;\n }\n return pageIndex < pageCount - 1;\n };\n table.previousPage = () => {\n return table.setPageIndex(old => old - 1);\n };\n table.nextPage = () => {\n return table.setPageIndex(old => {\n return old + 1;\n });\n };\n table.getPrePaginationRowModel = () => table.getExpandedRowModel();\n table.getPaginationRowModel = () => {\n if (!table._getPaginationRowModel && table.options.getPaginationRowModel) {\n table._getPaginationRowModel = table.options.getPaginationRowModel(table);\n }\n if (table.options.manualPagination || !table._getPaginationRowModel) {\n return table.getPrePaginationRowModel();\n }\n return table._getPaginationRowModel();\n };\n table.getPageCount = () => {\n var _table$options$pageCo2;\n return (_table$options$pageCo2 = table.options.pageCount) != null ? _table$options$pageCo2 : Math.ceil(table.getPrePaginationRowModel().rows.length / table.getState().pagination.pageSize);\n };\n }\n};\n\n//\n\nconst getDefaultColumnPinningState = () => ({\n left: [],\n right: []\n});\nconst getDefaultRowPinningState = () => ({\n top: [],\n bottom: []\n});\nconst Pinning = {\n getInitialState: state => {\n return {\n columnPinning: getDefaultColumnPinningState(),\n rowPinning: getDefaultRowPinningState(),\n ...state\n };\n },\n getDefaultOptions: table => {\n return {\n onColumnPinningChange: makeStateUpdater('columnPinning', table),\n onRowPinningChange: makeStateUpdater('rowPinning', table)\n };\n },\n createColumn: (column, table) => {\n column.pin = position => {\n const columnIds = column.getLeafColumns().map(d => d.id).filter(Boolean);\n table.setColumnPinning(old => {\n var _old$left3, _old$right3;\n if (position === 'right') {\n var _old$left, _old$right;\n return {\n left: ((_old$left = old == null ? void 0 : old.left) != null ? _old$left : []).filter(d => !(columnIds != null && columnIds.includes(d))),\n right: [...((_old$right = old == null ? void 0 : old.right) != null ? _old$right : []).filter(d => !(columnIds != null && columnIds.includes(d))), ...columnIds]\n };\n }\n if (position === 'left') {\n var _old$left2, _old$right2;\n return {\n left: [...((_old$left2 = old == null ? void 0 : old.left) != null ? _old$left2 : []).filter(d => !(columnIds != null && columnIds.includes(d))), ...columnIds],\n right: ((_old$right2 = old == null ? void 0 : old.right) != null ? _old$right2 : []).filter(d => !(columnIds != null && columnIds.includes(d)))\n };\n }\n return {\n left: ((_old$left3 = old == null ? void 0 : old.left) != null ? _old$left3 : []).filter(d => !(columnIds != null && columnIds.includes(d))),\n right: ((_old$right3 = old == null ? void 0 : old.right) != null ? _old$right3 : []).filter(d => !(columnIds != null && columnIds.includes(d)))\n };\n });\n };\n column.getCanPin = () => {\n const leafColumns = column.getLeafColumns();\n return leafColumns.some(d => {\n var _d$columnDef$enablePi, _ref, _table$options$enable;\n return ((_d$columnDef$enablePi = d.columnDef.enablePinning) != null ? _d$columnDef$enablePi : true) && ((_ref = (_table$options$enable = table.options.enableColumnPinning) != null ? _table$options$enable : table.options.enablePinning) != null ? _ref : true);\n });\n };\n column.getIsPinned = () => {\n const leafColumnIds = column.getLeafColumns().map(d => d.id);\n const {\n left,\n right\n } = table.getState().columnPinning;\n const isLeft = leafColumnIds.some(d => left == null ? void 0 : left.includes(d));\n const isRight = leafColumnIds.some(d => right == null ? void 0 : right.includes(d));\n return isLeft ? 'left' : isRight ? 'right' : false;\n };\n column.getPinnedIndex = () => {\n var _table$getState$colum, _table$getState$colum2;\n const position = column.getIsPinned();\n return position ? (_table$getState$colum = (_table$getState$colum2 = table.getState().columnPinning) == null || (_table$getState$colum2 = _table$getState$colum2[position]) == null ? void 0 : _table$getState$colum2.indexOf(column.id)) != null ? _table$getState$colum : -1 : 0;\n };\n },\n createRow: (row, table) => {\n row.pin = (position, includeLeafRows, includeParentRows) => {\n const leafRowIds = includeLeafRows ? row.getLeafRows().map(_ref2 => {\n let {\n id\n } = _ref2;\n return id;\n }) : [];\n const parentRowIds = includeParentRows ? row.getParentRows().map(_ref3 => {\n let {\n id\n } = _ref3;\n return id;\n }) : [];\n const rowIds = new Set([...parentRowIds, row.id, ...leafRowIds]);\n table.setRowPinning(old => {\n var _old$top3, _old$bottom3;\n if (position === 'bottom') {\n var _old$top, _old$bottom;\n return {\n top: ((_old$top = old == null ? void 0 : old.top) != null ? _old$top : []).filter(d => !(rowIds != null && rowIds.has(d))),\n bottom: [...((_old$bottom = old == null ? void 0 : old.bottom) != null ? _old$bottom : []).filter(d => !(rowIds != null && rowIds.has(d))), ...Array.from(rowIds)]\n };\n }\n if (position === 'top') {\n var _old$top2, _old$bottom2;\n return {\n top: [...((_old$top2 = old == null ? void 0 : old.top) != null ? _old$top2 : []).filter(d => !(rowIds != null && rowIds.has(d))), ...Array.from(rowIds)],\n bottom: ((_old$bottom2 = old == null ? void 0 : old.bottom) != null ? _old$bottom2 : []).filter(d => !(rowIds != null && rowIds.has(d)))\n };\n }\n return {\n top: ((_old$top3 = old == null ? void 0 : old.top) != null ? _old$top3 : []).filter(d => !(rowIds != null && rowIds.has(d))),\n bottom: ((_old$bottom3 = old == null ? void 0 : old.bottom) != null ? _old$bottom3 : []).filter(d => !(rowIds != null && rowIds.has(d)))\n };\n });\n };\n row.getCanPin = () => {\n var _ref4;\n const {\n enableRowPinning,\n enablePinning\n } = table.options;\n if (typeof enableRowPinning === 'function') {\n return enableRowPinning(row);\n }\n return (_ref4 = enableRowPinning != null ? enableRowPinning : enablePinning) != null ? _ref4 : true;\n };\n row.getIsPinned = () => {\n const rowIds = [row.id];\n const {\n top,\n bottom\n } = table.getState().rowPinning;\n const isTop = rowIds.some(d => top == null ? void 0 : top.includes(d));\n const isBottom = rowIds.some(d => bottom == null ? void 0 : bottom.includes(d));\n return isTop ? 'top' : isBottom ? 'bottom' : false;\n };\n row.getPinnedIndex = () => {\n var _table$_getPinnedRows, _visiblePinnedRowIds$;\n const position = row.getIsPinned();\n if (!position) return -1;\n const visiblePinnedRowIds = (_table$_getPinnedRows = table._getPinnedRows(position)) == null ? void 0 : _table$_getPinnedRows.map(_ref5 => {\n let {\n id\n } = _ref5;\n return id;\n });\n return (_visiblePinnedRowIds$ = visiblePinnedRowIds == null ? void 0 : visiblePinnedRowIds.indexOf(row.id)) != null ? _visiblePinnedRowIds$ : -1;\n };\n row.getCenterVisibleCells = memo(() => [row._getAllVisibleCells(), table.getState().columnPinning.left, table.getState().columnPinning.right], (allCells, left, right) => {\n const leftAndRight = [...(left != null ? left : []), ...(right != null ? right : [])];\n return allCells.filter(d => !leftAndRight.includes(d.column.id));\n }, getMemoOptions(table.options, 'debugRows', 'getCenterVisibleCells'));\n row.getLeftVisibleCells = memo(() => [row._getAllVisibleCells(), table.getState().columnPinning.left,,], (allCells, left) => {\n const cells = (left != null ? left : []).map(columnId => allCells.find(cell => cell.column.id === columnId)).filter(Boolean).map(d => ({\n ...d,\n position: 'left'\n }));\n return cells;\n }, getMemoOptions(table.options, 'debugRows', 'getLeftVisibleCells'));\n row.getRightVisibleCells = memo(() => [row._getAllVisibleCells(), table.getState().columnPinning.right], (allCells, right) => {\n const cells = (right != null ? right : []).map(columnId => allCells.find(cell => cell.column.id === columnId)).filter(Boolean).map(d => ({\n ...d,\n position: 'right'\n }));\n return cells;\n }, getMemoOptions(table.options, 'debugRows', 'getRightVisibleCells'));\n },\n createTable: table => {\n table.setColumnPinning = updater => table.options.onColumnPinningChange == null ? void 0 : table.options.onColumnPinningChange(updater);\n table.resetColumnPinning = defaultState => {\n var _table$initialState$c, _table$initialState;\n return table.setColumnPinning(defaultState ? getDefaultColumnPinningState() : (_table$initialState$c = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.columnPinning) != null ? _table$initialState$c : getDefaultColumnPinningState());\n };\n table.getIsSomeColumnsPinned = position => {\n var _pinningState$positio;\n const pinningState = table.getState().columnPinning;\n if (!position) {\n var _pinningState$left, _pinningState$right;\n return Boolean(((_pinningState$left = pinningState.left) == null ? void 0 : _pinningState$left.length) || ((_pinningState$right = pinningState.right) == null ? void 0 : _pinningState$right.length));\n }\n return Boolean((_pinningState$positio = pinningState[position]) == null ? void 0 : _pinningState$positio.length);\n };\n table.getLeftLeafColumns = memo(() => [table.getAllLeafColumns(), table.getState().columnPinning.left], (allColumns, left) => {\n return (left != null ? left : []).map(columnId => allColumns.find(column => column.id === columnId)).filter(Boolean);\n }, getMemoOptions(table.options, 'debugColumns', 'getLeftLeafColumns'));\n table.getRightLeafColumns = memo(() => [table.getAllLeafColumns(), table.getState().columnPinning.right], (allColumns, right) => {\n return (right != null ? right : []).map(columnId => allColumns.find(column => column.id === columnId)).filter(Boolean);\n }, getMemoOptions(table.options, 'debugColumns', 'getRightLeafColumns'));\n table.getCenterLeafColumns = memo(() => [table.getAllLeafColumns(), table.getState().columnPinning.left, table.getState().columnPinning.right], (allColumns, left, right) => {\n const leftAndRight = [...(left != null ? left : []), ...(right != null ? right : [])];\n return allColumns.filter(d => !leftAndRight.includes(d.id));\n }, getMemoOptions(table.options, 'debugColumns', 'getCenterLeafColumns'));\n table.setRowPinning = updater => table.options.onRowPinningChange == null ? void 0 : table.options.onRowPinningChange(updater);\n table.resetRowPinning = defaultState => {\n var _table$initialState$r, _table$initialState2;\n return table.setRowPinning(defaultState ? getDefaultRowPinningState() : (_table$initialState$r = (_table$initialState2 = table.initialState) == null ? void 0 : _table$initialState2.rowPinning) != null ? _table$initialState$r : getDefaultRowPinningState());\n };\n table.getIsSomeRowsPinned = position => {\n var _pinningState$positio2;\n const pinningState = table.getState().rowPinning;\n if (!position) {\n var _pinningState$top, _pinningState$bottom;\n return Boolean(((_pinningState$top = pinningState.top) == null ? void 0 : _pinningState$top.length) || ((_pinningState$bottom = pinningState.bottom) == null ? void 0 : _pinningState$bottom.length));\n }\n return Boolean((_pinningState$positio2 = pinningState[position]) == null ? void 0 : _pinningState$positio2.length);\n };\n table._getPinnedRows = memo(position => [table.getRowModel().rows, table.getState().rowPinning[position], position], (visibleRows, pinnedRowIds, position) => {\n var _table$options$keepPi;\n const rows = ((_table$options$keepPi = table.options.keepPinnedRows) != null ? _table$options$keepPi : true) ?\n //get all rows that are pinned even if they would not be otherwise visible\n //account for expanded parent rows, but not pagination or filtering\n (pinnedRowIds != null ? pinnedRowIds : []).map(rowId => {\n const row = table.getRow(rowId, true);\n return row.getIsAllParentsExpanded() ? row : null;\n }) :\n //else get only visible rows that are pinned\n (pinnedRowIds != null ? pinnedRowIds : []).map(rowId => visibleRows.find(row => row.id === rowId));\n return rows.filter(Boolean).map(d => ({\n ...d,\n position\n }));\n }, getMemoOptions(table.options, 'debugRows', '_getPinnedRows'));\n table.getTopRows = () => table._getPinnedRows('top');\n table.getBottomRows = () => table._getPinnedRows('bottom');\n table.getCenterRows = memo(() => [table.getRowModel().rows, table.getState().rowPinning.top, table.getState().rowPinning.bottom], (allRows, top, bottom) => {\n const topAndBottom = new Set([...(top != null ? top : []), ...(bottom != null ? bottom : [])]);\n return allRows.filter(d => !topAndBottom.has(d.id));\n }, getMemoOptions(table.options, 'debugRows', 'getCenterRows'));\n }\n};\n\n//\n\nconst RowSelection = {\n getInitialState: state => {\n return {\n rowSelection: {},\n ...state\n };\n },\n getDefaultOptions: table => {\n return {\n onRowSelectionChange: makeStateUpdater('rowSelection', table),\n enableRowSelection: true,\n enableMultiRowSelection: true,\n enableSubRowSelection: true\n // enableGroupingRowSelection: false,\n // isAdditiveSelectEvent: (e: unknown) => !!e.metaKey,\n // isInclusiveSelectEvent: (e: unknown) => !!e.shiftKey,\n };\n },\n createTable: table => {\n table.setRowSelection = updater => table.options.onRowSelectionChange == null ? void 0 : table.options.onRowSelectionChange(updater);\n table.resetRowSelection = defaultState => {\n var _table$initialState$r;\n return table.setRowSelection(defaultState ? {} : (_table$initialState$r = table.initialState.rowSelection) != null ? _table$initialState$r : {});\n };\n table.toggleAllRowsSelected = value => {\n table.setRowSelection(old => {\n value = typeof value !== 'undefined' ? value : !table.getIsAllRowsSelected();\n const rowSelection = {\n ...old\n };\n const preGroupedFlatRows = table.getPreGroupedRowModel().flatRows;\n\n // We don't use `mutateRowIsSelected` here for performance reasons.\n // All of the rows are flat already, so it wouldn't be worth it\n if (value) {\n preGroupedFlatRows.forEach(row => {\n if (!row.getCanSelect()) {\n return;\n }\n rowSelection[row.id] = true;\n });\n } else {\n preGroupedFlatRows.forEach(row => {\n delete rowSelection[row.id];\n });\n }\n return rowSelection;\n });\n };\n table.toggleAllPageRowsSelected = value => table.setRowSelection(old => {\n const resolvedValue = typeof value !== 'undefined' ? value : !table.getIsAllPageRowsSelected();\n const rowSelection = {\n ...old\n };\n table.getRowModel().rows.forEach(row => {\n mutateRowIsSelected(rowSelection, row.id, resolvedValue, true, table);\n });\n return rowSelection;\n });\n\n // addRowSelectionRange: rowId => {\n // const {\n // rows,\n // rowsById,\n // options: { selectGroupingRows, selectSubRows },\n // } = table\n\n // const findSelectedRow = (rows: Row[]) => {\n // let found\n // rows.find(d => {\n // if (d.getIsSelected()) {\n // found = d\n // return true\n // }\n // const subFound = findSelectedRow(d.subRows || [])\n // if (subFound) {\n // found = subFound\n // return true\n // }\n // return false\n // })\n // return found\n // }\n\n // const firstRow = findSelectedRow(rows) || rows[0]\n // const lastRow = rowsById[rowId]\n\n // let include = false\n // const selectedRowIds = {}\n\n // const addRow = (row: Row) => {\n // mutateRowIsSelected(selectedRowIds, row.id, true, {\n // rowsById,\n // selectGroupingRows: selectGroupingRows!,\n // selectSubRows: selectSubRows!,\n // })\n // }\n\n // table.rows.forEach(row => {\n // const isFirstRow = row.id === firstRow.id\n // const isLastRow = row.id === lastRow.id\n\n // if (isFirstRow || isLastRow) {\n // if (!include) {\n // include = true\n // } else if (include) {\n // addRow(row)\n // include = false\n // }\n // }\n\n // if (include) {\n // addRow(row)\n // }\n // })\n\n // table.setRowSelection(selectedRowIds)\n // },\n table.getPreSelectedRowModel = () => table.getCoreRowModel();\n table.getSelectedRowModel = memo(() => [table.getState().rowSelection, table.getCoreRowModel()], (rowSelection, rowModel) => {\n if (!Object.keys(rowSelection).length) {\n return {\n rows: [],\n flatRows: [],\n rowsById: {}\n };\n }\n return selectRowsFn(table, rowModel);\n }, getMemoOptions(table.options, 'debugTable', 'getSelectedRowModel'));\n table.getFilteredSelectedRowModel = memo(() => [table.getState().rowSelection, table.getFilteredRowModel()], (rowSelection, rowModel) => {\n if (!Object.keys(rowSelection).length) {\n return {\n rows: [],\n flatRows: [],\n rowsById: {}\n };\n }\n return selectRowsFn(table, rowModel);\n }, getMemoOptions(table.options, 'debugTable', 'getFilteredSelectedRowModel'));\n table.getGroupedSelectedRowModel = memo(() => [table.getState().rowSelection, table.getSortedRowModel()], (rowSelection, rowModel) => {\n if (!Object.keys(rowSelection).length) {\n return {\n rows: [],\n flatRows: [],\n rowsById: {}\n };\n }\n return selectRowsFn(table, rowModel);\n }, getMemoOptions(table.options, 'debugTable', 'getGroupedSelectedRowModel'));\n\n ///\n\n // getGroupingRowCanSelect: rowId => {\n // const row = table.getRow(rowId)\n\n // if (!row) {\n // throw new Error()\n // }\n\n // if (typeof table.options.enableGroupingRowSelection === 'function') {\n // return table.options.enableGroupingRowSelection(row)\n // }\n\n // return table.options.enableGroupingRowSelection ?? false\n // },\n\n table.getIsAllRowsSelected = () => {\n const preGroupedFlatRows = table.getFilteredRowModel().flatRows;\n const {\n rowSelection\n } = table.getState();\n let isAllRowsSelected = Boolean(preGroupedFlatRows.length && Object.keys(rowSelection).length);\n if (isAllRowsSelected) {\n if (preGroupedFlatRows.some(row => row.getCanSelect() && !rowSelection[row.id])) {\n isAllRowsSelected = false;\n }\n }\n return isAllRowsSelected;\n };\n table.getIsAllPageRowsSelected = () => {\n const paginationFlatRows = table.getPaginationRowModel().flatRows.filter(row => row.getCanSelect());\n const {\n rowSelection\n } = table.getState();\n let isAllPageRowsSelected = !!paginationFlatRows.length;\n if (isAllPageRowsSelected && paginationFlatRows.some(row => !rowSelection[row.id])) {\n isAllPageRowsSelected = false;\n }\n return isAllPageRowsSelected;\n };\n table.getIsSomeRowsSelected = () => {\n var _table$getState$rowSe;\n const totalSelected = Object.keys((_table$getState$rowSe = table.getState().rowSelection) != null ? _table$getState$rowSe : {}).length;\n return totalSelected > 0 && totalSelected < table.getFilteredRowModel().flatRows.length;\n };\n table.getIsSomePageRowsSelected = () => {\n const paginationFlatRows = table.getPaginationRowModel().flatRows;\n return table.getIsAllPageRowsSelected() ? false : paginationFlatRows.filter(row => row.getCanSelect()).some(d => d.getIsSelected() || d.getIsSomeSelected());\n };\n table.getToggleAllRowsSelectedHandler = () => {\n return e => {\n table.toggleAllRowsSelected(e.target.checked);\n };\n };\n table.getToggleAllPageRowsSelectedHandler = () => {\n return e => {\n table.toggleAllPageRowsSelected(e.target.checked);\n };\n };\n },\n createRow: (row, table) => {\n row.toggleSelected = (value, opts) => {\n const isSelected = row.getIsSelected();\n table.setRowSelection(old => {\n var _opts$selectChildren;\n value = typeof value !== 'undefined' ? value : !isSelected;\n if (row.getCanSelect() && isSelected === value) {\n return old;\n }\n const selectedRowIds = {\n ...old\n };\n mutateRowIsSelected(selectedRowIds, row.id, value, (_opts$selectChildren = opts == null ? void 0 : opts.selectChildren) != null ? _opts$selectChildren : true, table);\n return selectedRowIds;\n });\n };\n row.getIsSelected = () => {\n const {\n rowSelection\n } = table.getState();\n return isRowSelected(row, rowSelection);\n };\n row.getIsSomeSelected = () => {\n const {\n rowSelection\n } = table.getState();\n return isSubRowSelected(row, rowSelection) === 'some';\n };\n row.getIsAllSubRowsSelected = () => {\n const {\n rowSelection\n } = table.getState();\n return isSubRowSelected(row, rowSelection) === 'all';\n };\n row.getCanSelect = () => {\n var _table$options$enable;\n if (typeof table.options.enableRowSelection === 'function') {\n return table.options.enableRowSelection(row);\n }\n return (_table$options$enable = table.options.enableRowSelection) != null ? _table$options$enable : true;\n };\n row.getCanSelectSubRows = () => {\n var _table$options$enable2;\n if (typeof table.options.enableSubRowSelection === 'function') {\n return table.options.enableSubRowSelection(row);\n }\n return (_table$options$enable2 = table.options.enableSubRowSelection) != null ? _table$options$enable2 : true;\n };\n row.getCanMultiSelect = () => {\n var _table$options$enable3;\n if (typeof table.options.enableMultiRowSelection === 'function') {\n return table.options.enableMultiRowSelection(row);\n }\n return (_table$options$enable3 = table.options.enableMultiRowSelection) != null ? _table$options$enable3 : true;\n };\n row.getToggleSelectedHandler = () => {\n const canSelect = row.getCanSelect();\n return e => {\n var _target;\n if (!canSelect) return;\n row.toggleSelected((_target = e.target) == null ? void 0 : _target.checked);\n };\n };\n }\n};\nconst mutateRowIsSelected = (selectedRowIds, id, value, includeChildren, table) => {\n var _row$subRows;\n const row = table.getRow(id, true);\n\n // const isGrouped = row.getIsGrouped()\n\n // if ( // TODO: enforce grouping row selection rules\n // !isGrouped ||\n // (isGrouped && table.options.enableGroupingRowSelection)\n // ) {\n if (value) {\n if (!row.getCanMultiSelect()) {\n Object.keys(selectedRowIds).forEach(key => delete selectedRowIds[key]);\n }\n if (row.getCanSelect()) {\n selectedRowIds[id] = true;\n }\n } else {\n delete selectedRowIds[id];\n }\n // }\n\n if (includeChildren && (_row$subRows = row.subRows) != null && _row$subRows.length && row.getCanSelectSubRows()) {\n row.subRows.forEach(row => mutateRowIsSelected(selectedRowIds, row.id, value, includeChildren, table));\n }\n};\nfunction selectRowsFn(table, rowModel) {\n const rowSelection = table.getState().rowSelection;\n const newSelectedFlatRows = [];\n const newSelectedRowsById = {};\n\n // Filters top level and nested rows\n const recurseRows = function (rows, depth) {\n return rows.map(row => {\n var _row$subRows2;\n const isSelected = isRowSelected(row, rowSelection);\n if (isSelected) {\n newSelectedFlatRows.push(row);\n newSelectedRowsById[row.id] = row;\n }\n if ((_row$subRows2 = row.subRows) != null && _row$subRows2.length) {\n row = {\n ...row,\n subRows: recurseRows(row.subRows)\n };\n }\n if (isSelected) {\n return row;\n }\n }).filter(Boolean);\n };\n return {\n rows: recurseRows(rowModel.rows),\n flatRows: newSelectedFlatRows,\n rowsById: newSelectedRowsById\n };\n}\nfunction isRowSelected(row, selection) {\n var _selection$row$id;\n return (_selection$row$id = selection[row.id]) != null ? _selection$row$id : false;\n}\nfunction isSubRowSelected(row, selection, table) {\n var _row$subRows3;\n if (!((_row$subRows3 = row.subRows) != null && _row$subRows3.length)) return false;\n let allChildrenSelected = true;\n let someSelected = false;\n row.subRows.forEach(subRow => {\n // Bail out early if we know both of these\n if (someSelected && !allChildrenSelected) {\n return;\n }\n if (subRow.getCanSelect()) {\n if (isRowSelected(subRow, selection)) {\n someSelected = true;\n } else {\n allChildrenSelected = false;\n }\n }\n\n // Check row selection of nested subrows\n if (subRow.subRows && subRow.subRows.length) {\n const subRowChildrenSelected = isSubRowSelected(subRow, selection);\n if (subRowChildrenSelected === 'all') {\n someSelected = true;\n } else if (subRowChildrenSelected === 'some') {\n someSelected = true;\n allChildrenSelected = false;\n } else {\n allChildrenSelected = false;\n }\n }\n });\n return allChildrenSelected ? 'all' : someSelected ? 'some' : false;\n}\n\nconst reSplitAlphaNumeric = /([0-9]+)/gm;\nconst alphanumeric = (rowA, rowB, columnId) => {\n return compareAlphanumeric(toString(rowA.getValue(columnId)).toLowerCase(), toString(rowB.getValue(columnId)).toLowerCase());\n};\nconst alphanumericCaseSensitive = (rowA, rowB, columnId) => {\n return compareAlphanumeric(toString(rowA.getValue(columnId)), toString(rowB.getValue(columnId)));\n};\n\n// The text filter is more basic (less numeric support)\n// but is much faster\nconst text = (rowA, rowB, columnId) => {\n return compareBasic(toString(rowA.getValue(columnId)).toLowerCase(), toString(rowB.getValue(columnId)).toLowerCase());\n};\n\n// The text filter is more basic (less numeric support)\n// but is much faster\nconst textCaseSensitive = (rowA, rowB, columnId) => {\n return compareBasic(toString(rowA.getValue(columnId)), toString(rowB.getValue(columnId)));\n};\nconst datetime = (rowA, rowB, columnId) => {\n const a = rowA.getValue(columnId);\n const b = rowB.getValue(columnId);\n\n // Can handle nullish values\n // Use > and < because == (and ===) doesn't work with\n // Date objects (would require calling getTime()).\n return a > b ? 1 : a < b ? -1 : 0;\n};\nconst basic = (rowA, rowB, columnId) => {\n return compareBasic(rowA.getValue(columnId), rowB.getValue(columnId));\n};\n\n// Utils\n\nfunction compareBasic(a, b) {\n return a === b ? 0 : a > b ? 1 : -1;\n}\nfunction toString(a) {\n if (typeof a === 'number') {\n if (isNaN(a) || a === Infinity || a === -Infinity) {\n return '';\n }\n return String(a);\n }\n if (typeof a === 'string') {\n return a;\n }\n return '';\n}\n\n// Mixed sorting is slow, but very inclusive of many edge cases.\n// It handles numbers, mixed alphanumeric combinations, and even\n// null, undefined, and Infinity\nfunction compareAlphanumeric(aStr, bStr) {\n // Split on number groups, but keep the delimiter\n // Then remove falsey split values\n const a = aStr.split(reSplitAlphaNumeric).filter(Boolean);\n const b = bStr.split(reSplitAlphaNumeric).filter(Boolean);\n\n // While\n while (a.length && b.length) {\n const aa = a.shift();\n const bb = b.shift();\n const an = parseInt(aa, 10);\n const bn = parseInt(bb, 10);\n const combo = [an, bn].sort();\n\n // Both are string\n if (isNaN(combo[0])) {\n if (aa > bb) {\n return 1;\n }\n if (bb > aa) {\n return -1;\n }\n continue;\n }\n\n // One is a string, one is a number\n if (isNaN(combo[1])) {\n return isNaN(an) ? -1 : 1;\n }\n\n // Both are numbers\n if (an > bn) {\n return 1;\n }\n if (bn > an) {\n return -1;\n }\n }\n return a.length - b.length;\n}\n\n// Exports\n\nconst sortingFns = {\n alphanumeric,\n alphanumericCaseSensitive,\n text,\n textCaseSensitive,\n datetime,\n basic\n};\n\n//\n\nconst Sorting = {\n getInitialState: state => {\n return {\n sorting: [],\n ...state\n };\n },\n getDefaultColumnDef: () => {\n return {\n sortingFn: 'auto',\n sortUndefined: 1\n };\n },\n getDefaultOptions: table => {\n return {\n onSortingChange: makeStateUpdater('sorting', table),\n isMultiSortEvent: e => {\n return e.shiftKey;\n }\n };\n },\n createColumn: (column, table) => {\n column.getAutoSortingFn = () => {\n const firstRows = table.getFilteredRowModel().flatRows.slice(10);\n let isString = false;\n for (const row of firstRows) {\n const value = row == null ? void 0 : row.getValue(column.id);\n if (Object.prototype.toString.call(value) === '[object Date]') {\n return sortingFns.datetime;\n }\n if (typeof value === 'string') {\n isString = true;\n if (value.split(reSplitAlphaNumeric).length > 1) {\n return sortingFns.alphanumeric;\n }\n }\n }\n if (isString) {\n return sortingFns.text;\n }\n return sortingFns.basic;\n };\n column.getAutoSortDir = () => {\n const firstRow = table.getFilteredRowModel().flatRows[0];\n const value = firstRow == null ? void 0 : firstRow.getValue(column.id);\n if (typeof value === 'string') {\n return 'asc';\n }\n return 'desc';\n };\n column.getSortingFn = () => {\n var _table$options$sortin, _table$options$sortin2;\n if (!column) {\n throw new Error();\n }\n return isFunction(column.columnDef.sortingFn) ? column.columnDef.sortingFn : column.columnDef.sortingFn === 'auto' ? column.getAutoSortingFn() : (_table$options$sortin = (_table$options$sortin2 = table.options.sortingFns) == null ? void 0 : _table$options$sortin2[column.columnDef.sortingFn]) != null ? _table$options$sortin : sortingFns[column.columnDef.sortingFn];\n };\n column.toggleSorting = (desc, multi) => {\n // if (column.columns.length) {\n // column.columns.forEach((c, i) => {\n // if (c.id) {\n // table.toggleColumnSorting(c.id, undefined, multi || !!i)\n // }\n // })\n // return\n // }\n\n // this needs to be outside of table.setSorting to be in sync with rerender\n const nextSortingOrder = column.getNextSortingOrder();\n const hasManualValue = typeof desc !== 'undefined' && desc !== null;\n table.setSorting(old => {\n // Find any existing sorting for this column\n const existingSorting = old == null ? void 0 : old.find(d => d.id === column.id);\n const existingIndex = old == null ? void 0 : old.findIndex(d => d.id === column.id);\n let newSorting = [];\n\n // What should we do with this sort action?\n let sortAction;\n let nextDesc = hasManualValue ? desc : nextSortingOrder === 'desc';\n\n // Multi-mode\n if (old != null && old.length && column.getCanMultiSort() && multi) {\n if (existingSorting) {\n sortAction = 'toggle';\n } else {\n sortAction = 'add';\n }\n } else {\n // Normal mode\n if (old != null && old.length && existingIndex !== old.length - 1) {\n sortAction = 'replace';\n } else if (existingSorting) {\n sortAction = 'toggle';\n } else {\n sortAction = 'replace';\n }\n }\n\n // Handle toggle states that will remove the sorting\n if (sortAction === 'toggle') {\n // If we are \"actually\" toggling (not a manual set value), should we remove the sorting?\n if (!hasManualValue) {\n // Is our intention to remove?\n if (!nextSortingOrder) {\n sortAction = 'remove';\n }\n }\n }\n if (sortAction === 'add') {\n var _table$options$maxMul;\n newSorting = [...old, {\n id: column.id,\n desc: nextDesc\n }];\n // Take latest n columns\n newSorting.splice(0, newSorting.length - ((_table$options$maxMul = table.options.maxMultiSortColCount) != null ? _table$options$maxMul : Number.MAX_SAFE_INTEGER));\n } else if (sortAction === 'toggle') {\n // This flips (or sets) the\n newSorting = old.map(d => {\n if (d.id === column.id) {\n return {\n ...d,\n desc: nextDesc\n };\n }\n return d;\n });\n } else if (sortAction === 'remove') {\n newSorting = old.filter(d => d.id !== column.id);\n } else {\n newSorting = [{\n id: column.id,\n desc: nextDesc\n }];\n }\n return newSorting;\n });\n };\n column.getFirstSortDir = () => {\n var _ref, _column$columnDef$sor;\n const sortDescFirst = (_ref = (_column$columnDef$sor = column.columnDef.sortDescFirst) != null ? _column$columnDef$sor : table.options.sortDescFirst) != null ? _ref : column.getAutoSortDir() === 'desc';\n return sortDescFirst ? 'desc' : 'asc';\n };\n column.getNextSortingOrder = multi => {\n var _table$options$enable, _table$options$enable2;\n const firstSortDirection = column.getFirstSortDir();\n const isSorted = column.getIsSorted();\n if (!isSorted) {\n return firstSortDirection;\n }\n if (isSorted !== firstSortDirection && ((_table$options$enable = table.options.enableSortingRemoval) != null ? _table$options$enable : true) && (\n // If enableSortRemove, enable in general\n multi ? (_table$options$enable2 = table.options.enableMultiRemove) != null ? _table$options$enable2 : true : true) // If multi, don't allow if enableMultiRemove))\n ) {\n return false;\n }\n return isSorted === 'desc' ? 'asc' : 'desc';\n };\n column.getCanSort = () => {\n var _column$columnDef$ena, _table$options$enable3;\n return ((_column$columnDef$ena = column.columnDef.enableSorting) != null ? _column$columnDef$ena : true) && ((_table$options$enable3 = table.options.enableSorting) != null ? _table$options$enable3 : true) && !!column.accessorFn;\n };\n column.getCanMultiSort = () => {\n var _ref2, _column$columnDef$ena2;\n return (_ref2 = (_column$columnDef$ena2 = column.columnDef.enableMultiSort) != null ? _column$columnDef$ena2 : table.options.enableMultiSort) != null ? _ref2 : !!column.accessorFn;\n };\n column.getIsSorted = () => {\n var _table$getState$sorti;\n const columnSort = (_table$getState$sorti = table.getState().sorting) == null ? void 0 : _table$getState$sorti.find(d => d.id === column.id);\n return !columnSort ? false : columnSort.desc ? 'desc' : 'asc';\n };\n column.getSortIndex = () => {\n var _table$getState$sorti2, _table$getState$sorti3;\n return (_table$getState$sorti2 = (_table$getState$sorti3 = table.getState().sorting) == null ? void 0 : _table$getState$sorti3.findIndex(d => d.id === column.id)) != null ? _table$getState$sorti2 : -1;\n };\n column.clearSorting = () => {\n //clear sorting for just 1 column\n table.setSorting(old => old != null && old.length ? old.filter(d => d.id !== column.id) : []);\n };\n column.getToggleSortingHandler = () => {\n const canSort = column.getCanSort();\n return e => {\n if (!canSort) return;\n e.persist == null || e.persist();\n column.toggleSorting == null || column.toggleSorting(undefined, column.getCanMultiSort() ? table.options.isMultiSortEvent == null ? void 0 : table.options.isMultiSortEvent(e) : false);\n };\n };\n },\n createTable: table => {\n table.setSorting = updater => table.options.onSortingChange == null ? void 0 : table.options.onSortingChange(updater);\n table.resetSorting = defaultState => {\n var _table$initialState$s, _table$initialState;\n table.setSorting(defaultState ? [] : (_table$initialState$s = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.sorting) != null ? _table$initialState$s : []);\n };\n table.getPreSortedRowModel = () => table.getGroupedRowModel();\n table.getSortedRowModel = () => {\n if (!table._getSortedRowModel && table.options.getSortedRowModel) {\n table._getSortedRowModel = table.options.getSortedRowModel(table);\n }\n if (table.options.manualSorting || !table._getSortedRowModel) {\n return table.getPreSortedRowModel();\n }\n return table._getSortedRowModel();\n };\n }\n};\n\n//\n\nconst Visibility = {\n getInitialState: state => {\n return {\n columnVisibility: {},\n ...state\n };\n },\n getDefaultOptions: table => {\n return {\n onColumnVisibilityChange: makeStateUpdater('columnVisibility', table)\n };\n },\n createColumn: (column, table) => {\n column.toggleVisibility = value => {\n if (column.getCanHide()) {\n table.setColumnVisibility(old => ({\n ...old,\n [column.id]: value != null ? value : !column.getIsVisible()\n }));\n }\n };\n column.getIsVisible = () => {\n var _table$getState$colum, _table$getState$colum2;\n return (_table$getState$colum = (_table$getState$colum2 = table.getState().columnVisibility) == null ? void 0 : _table$getState$colum2[column.id]) != null ? _table$getState$colum : true;\n };\n column.getCanHide = () => {\n var _column$columnDef$ena, _table$options$enable;\n return ((_column$columnDef$ena = column.columnDef.enableHiding) != null ? _column$columnDef$ena : true) && ((_table$options$enable = table.options.enableHiding) != null ? _table$options$enable : true);\n };\n column.getToggleVisibilityHandler = () => {\n return e => {\n column.toggleVisibility == null || column.toggleVisibility(e.target.checked);\n };\n };\n },\n createRow: (row, table) => {\n row._getAllVisibleCells = memo(() => [row.getAllCells(), table.getState().columnVisibility], cells => {\n return cells.filter(cell => cell.column.getIsVisible());\n }, getMemoOptions(table.options, 'debugRows', '_getAllVisibleCells'));\n row.getVisibleCells = memo(() => [row.getLeftVisibleCells(), row.getCenterVisibleCells(), row.getRightVisibleCells()], (left, center, right) => [...left, ...center, ...right], getMemoOptions(table.options, 'debugRows', 'getVisibleCells'));\n },\n createTable: table => {\n const makeVisibleColumnsMethod = (key, getColumns) => {\n return memo(() => [getColumns(), getColumns().filter(d => d.getIsVisible()).map(d => d.id).join('_')], columns => {\n return columns.filter(d => d.getIsVisible == null ? void 0 : d.getIsVisible());\n }, getMemoOptions(table.options, 'debugColumns', key));\n };\n table.getVisibleFlatColumns = makeVisibleColumnsMethod('getVisibleFlatColumns', () => table.getAllFlatColumns());\n table.getVisibleLeafColumns = makeVisibleColumnsMethod('getVisibleLeafColumns', () => table.getAllLeafColumns());\n table.getLeftVisibleLeafColumns = makeVisibleColumnsMethod('getLeftVisibleLeafColumns', () => table.getLeftLeafColumns());\n table.getRightVisibleLeafColumns = makeVisibleColumnsMethod('getRightVisibleLeafColumns', () => table.getRightLeafColumns());\n table.getCenterVisibleLeafColumns = makeVisibleColumnsMethod('getCenterVisibleLeafColumns', () => table.getCenterLeafColumns());\n table.setColumnVisibility = updater => table.options.onColumnVisibilityChange == null ? void 0 : table.options.onColumnVisibilityChange(updater);\n table.resetColumnVisibility = defaultState => {\n var _table$initialState$c;\n table.setColumnVisibility(defaultState ? {} : (_table$initialState$c = table.initialState.columnVisibility) != null ? _table$initialState$c : {});\n };\n table.toggleAllColumnsVisible = value => {\n var _value;\n value = (_value = value) != null ? _value : !table.getIsAllColumnsVisible();\n table.setColumnVisibility(table.getAllLeafColumns().reduce((obj, column) => ({\n ...obj,\n [column.id]: !value ? !(column.getCanHide != null && column.getCanHide()) : value\n }), {}));\n };\n table.getIsAllColumnsVisible = () => !table.getAllLeafColumns().some(column => !(column.getIsVisible != null && column.getIsVisible()));\n table.getIsSomeColumnsVisible = () => table.getAllLeafColumns().some(column => column.getIsVisible == null ? void 0 : column.getIsVisible());\n table.getToggleAllColumnsVisibilityHandler = () => {\n return e => {\n var _target;\n table.toggleAllColumnsVisible((_target = e.target) == null ? void 0 : _target.checked);\n };\n };\n }\n};\nfunction _getVisibleLeafColumns(table, position) {\n return !position ? table.getVisibleLeafColumns() : position === 'center' ? table.getCenterVisibleLeafColumns() : position === 'left' ? table.getLeftVisibleLeafColumns() : table.getRightVisibleLeafColumns();\n}\n\nconst features = [Headers, Visibility, Ordering, Pinning, Filters, Sorting, Grouping, Expanding, Pagination, RowSelection, ColumnSizing];\n\n//\n\nfunction createTable(options) {\n var _options$initialState;\n if (options.debugAll || options.debugTable) {\n console.info('Creating Table Instance...');\n }\n let table = {\n _features: features\n };\n const defaultOptions = table._features.reduce((obj, feature) => {\n return Object.assign(obj, feature.getDefaultOptions == null ? void 0 : feature.getDefaultOptions(table));\n }, {});\n const mergeOptions = options => {\n if (table.options.mergeOptions) {\n return table.options.mergeOptions(defaultOptions, options);\n }\n return {\n ...defaultOptions,\n ...options\n };\n };\n const coreInitialState = {};\n let initialState = {\n ...coreInitialState,\n ...((_options$initialState = options.initialState) != null ? _options$initialState : {})\n };\n table._features.forEach(feature => {\n var _feature$getInitialSt;\n initialState = (_feature$getInitialSt = feature.getInitialState == null ? void 0 : feature.getInitialState(initialState)) != null ? _feature$getInitialSt : initialState;\n });\n const queued = [];\n let queuedTimeout = false;\n const coreInstance = {\n _features: features,\n options: {\n ...defaultOptions,\n ...options\n },\n initialState,\n _queue: cb => {\n queued.push(cb);\n if (!queuedTimeout) {\n queuedTimeout = true;\n\n // Schedule a microtask to run the queued callbacks after\n // the current call stack (render, etc) has finished.\n Promise.resolve().then(() => {\n while (queued.length) {\n queued.shift()();\n }\n queuedTimeout = false;\n }).catch(error => setTimeout(() => {\n throw error;\n }));\n }\n },\n reset: () => {\n table.setState(table.initialState);\n },\n setOptions: updater => {\n const newOptions = functionalUpdate(updater, table.options);\n table.options = mergeOptions(newOptions);\n },\n getState: () => {\n return table.options.state;\n },\n setState: updater => {\n table.options.onStateChange == null || table.options.onStateChange(updater);\n },\n _getRowId: (row, index, parent) => {\n var _table$options$getRow;\n return (_table$options$getRow = table.options.getRowId == null ? void 0 : table.options.getRowId(row, index, parent)) != null ? _table$options$getRow : `${parent ? [parent.id, index].join('.') : index}`;\n },\n getCoreRowModel: () => {\n if (!table._getCoreRowModel) {\n table._getCoreRowModel = table.options.getCoreRowModel(table);\n }\n return table._getCoreRowModel();\n },\n // The final calls start at the bottom of the model,\n // expanded rows, which then work their way up\n\n getRowModel: () => {\n return table.getPaginationRowModel();\n },\n //in next version, we should just pass in the row model as the optional 2nd arg\n getRow: (id, searchAll) => {\n let row = (searchAll ? table.getPrePaginationRowModel() : table.getRowModel()).rowsById[id];\n if (!row) {\n row = table.getCoreRowModel().rowsById[id];\n if (!row) {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error(`getRow could not find row with ID: ${id}`);\n }\n throw new Error();\n }\n }\n return row;\n },\n _getDefaultColumnDef: memo(() => [table.options.defaultColumn], defaultColumn => {\n var _defaultColumn;\n defaultColumn = (_defaultColumn = defaultColumn) != null ? _defaultColumn : {};\n return {\n header: props => {\n const resolvedColumnDef = props.header.column.columnDef;\n if (resolvedColumnDef.accessorKey) {\n return resolvedColumnDef.accessorKey;\n }\n if (resolvedColumnDef.accessorFn) {\n return resolvedColumnDef.id;\n }\n return null;\n },\n // footer: props => props.header.column.id,\n cell: props => {\n var _props$renderValue$to, _props$renderValue;\n return (_props$renderValue$to = (_props$renderValue = props.renderValue()) == null || _props$renderValue.toString == null ? void 0 : _props$renderValue.toString()) != null ? _props$renderValue$to : null;\n },\n ...table._features.reduce((obj, feature) => {\n return Object.assign(obj, feature.getDefaultColumnDef == null ? void 0 : feature.getDefaultColumnDef());\n }, {}),\n ...defaultColumn\n };\n }, getMemoOptions(options, 'debugColumns', '_getDefaultColumnDef')),\n _getColumnDefs: () => table.options.columns,\n getAllColumns: memo(() => [table._getColumnDefs()], columnDefs => {\n const recurseColumns = function (columnDefs, parent, depth) {\n if (depth === void 0) {\n depth = 0;\n }\n return columnDefs.map(columnDef => {\n const column = createColumn(table, columnDef, depth, parent);\n const groupingColumnDef = columnDef;\n column.columns = groupingColumnDef.columns ? recurseColumns(groupingColumnDef.columns, column, depth + 1) : [];\n return column;\n });\n };\n return recurseColumns(columnDefs);\n }, getMemoOptions(options, 'debugColumns', 'getAllColumns')),\n getAllFlatColumns: memo(() => [table.getAllColumns()], allColumns => {\n return allColumns.flatMap(column => {\n return column.getFlatColumns();\n });\n }, getMemoOptions(options, 'debugColumns', 'getAllFlatColumns')),\n _getAllFlatColumnsById: memo(() => [table.getAllFlatColumns()], flatColumns => {\n return flatColumns.reduce((acc, column) => {\n acc[column.id] = column;\n return acc;\n }, {});\n }, getMemoOptions(options, 'debugColumns', 'getAllFlatColumnsById')),\n getAllLeafColumns: memo(() => [table.getAllColumns(), table._getOrderColumnsFn()], (allColumns, orderColumns) => {\n let leafColumns = allColumns.flatMap(column => column.getLeafColumns());\n return orderColumns(leafColumns);\n }, getMemoOptions(options, 'debugColumns', 'getAllLeafColumns')),\n getColumn: columnId => {\n const column = table._getAllFlatColumnsById()[columnId];\n if (process.env.NODE_ENV !== 'production' && !column) {\n console.error(`[Table] Column with id '${columnId}' does not exist.`);\n }\n return column;\n }\n };\n Object.assign(table, coreInstance);\n for (let index = 0; index < table._features.length; index++) {\n const feature = table._features[index];\n feature == null || feature.createTable == null || feature.createTable(table);\n }\n return table;\n}\n\nfunction createCell(table, row, column, columnId) {\n const getRenderValue = () => {\n var _cell$getValue;\n return (_cell$getValue = cell.getValue()) != null ? _cell$getValue : table.options.renderFallbackValue;\n };\n const cell = {\n id: `${row.id}_${column.id}`,\n row,\n column,\n getValue: () => row.getValue(columnId),\n renderValue: getRenderValue,\n getContext: memo(() => [table, column, row, cell], (table, column, row, cell) => ({\n table,\n column,\n row,\n cell: cell,\n getValue: cell.getValue,\n renderValue: cell.renderValue\n }), getMemoOptions(table.options, 'debugCells', 'cell.getContext'))\n };\n table._features.forEach(feature => {\n feature.createCell == null || feature.createCell(cell, column, row, table);\n }, {});\n return cell;\n}\n\nconst createRow = (table, id, original, rowIndex, depth, subRows, parentId) => {\n let row = {\n id,\n index: rowIndex,\n original,\n depth,\n parentId,\n _valuesCache: {},\n _uniqueValuesCache: {},\n getValue: columnId => {\n if (row._valuesCache.hasOwnProperty(columnId)) {\n return row._valuesCache[columnId];\n }\n const column = table.getColumn(columnId);\n if (!(column != null && column.accessorFn)) {\n return undefined;\n }\n row._valuesCache[columnId] = column.accessorFn(row.original, rowIndex);\n return row._valuesCache[columnId];\n },\n getUniqueValues: columnId => {\n if (row._uniqueValuesCache.hasOwnProperty(columnId)) {\n return row._uniqueValuesCache[columnId];\n }\n const column = table.getColumn(columnId);\n if (!(column != null && column.accessorFn)) {\n return undefined;\n }\n if (!column.columnDef.getUniqueValues) {\n row._uniqueValuesCache[columnId] = [row.getValue(columnId)];\n return row._uniqueValuesCache[columnId];\n }\n row._uniqueValuesCache[columnId] = column.columnDef.getUniqueValues(row.original, rowIndex);\n return row._uniqueValuesCache[columnId];\n },\n renderValue: columnId => {\n var _row$getValue;\n return (_row$getValue = row.getValue(columnId)) != null ? _row$getValue : table.options.renderFallbackValue;\n },\n subRows: subRows != null ? subRows : [],\n getLeafRows: () => flattenBy(row.subRows, d => d.subRows),\n getParentRow: () => row.parentId ? table.getRow(row.parentId, true) : undefined,\n getParentRows: () => {\n let parentRows = [];\n let currentRow = row;\n while (true) {\n const parentRow = currentRow.getParentRow();\n if (!parentRow) break;\n parentRows.push(parentRow);\n currentRow = parentRow;\n }\n return parentRows.reverse();\n },\n getAllCells: memo(() => [table.getAllLeafColumns()], leafColumns => {\n return leafColumns.map(column => {\n return createCell(table, row, column, column.id);\n });\n }, getMemoOptions(table.options, 'debugRows', 'getAllCells')),\n _getAllCellsByColumnId: memo(() => [row.getAllCells()], allCells => {\n return allCells.reduce((acc, cell) => {\n acc[cell.column.id] = cell;\n return acc;\n }, {});\n }, getMemoOptions(table.options, 'debugRows', 'getAllCellsByColumnId'))\n };\n for (let i = 0; i < table._features.length; i++) {\n const feature = table._features[i];\n feature == null || feature.createRow == null || feature.createRow(row, table);\n }\n return row;\n};\n\n// type Person = {\n// firstName: string\n// lastName: string\n// age: number\n// visits: number\n// status: string\n// progress: number\n// createdAt: Date\n// nested: {\n// foo: [\n// {\n// bar: 'bar'\n// }\n// ]\n// bar: { subBar: boolean }[]\n// baz: {\n// foo: 'foo'\n// bar: {\n// baz: 'baz'\n// }\n// }\n// }\n// }\n\n// const test: DeepKeys = 'nested.foo.0.bar'\n// const test2: DeepKeys = 'nested.bar'\n\n// const helper = createColumnHelper()\n\n// helper.accessor('nested.foo', {\n// cell: info => info.getValue(),\n// })\n\n// helper.accessor('nested.foo.0.bar', {\n// cell: info => info.getValue(),\n// })\n\n// helper.accessor('nested.bar', {\n// cell: info => info.getValue(),\n// })\n\nfunction createColumnHelper() {\n return {\n accessor: (accessor, column) => {\n return typeof accessor === 'function' ? {\n ...column,\n accessorFn: accessor\n } : {\n ...column,\n accessorKey: accessor\n };\n },\n display: column => column,\n group: column => column\n };\n}\n\nfunction getCoreRowModel() {\n return table => memo(() => [table.options.data], data => {\n const rowModel = {\n rows: [],\n flatRows: [],\n rowsById: {}\n };\n const accessRows = function (originalRows, depth, parentRow) {\n if (depth === void 0) {\n depth = 0;\n }\n const rows = [];\n for (let i = 0; i < originalRows.length; i++) {\n // This could be an expensive check at scale, so we should move it somewhere else, but where?\n // if (!id) {\n // if (process.env.NODE_ENV !== 'production') {\n // throw new Error(`getRowId expected an ID, but got ${id}`)\n // }\n // }\n\n // Make the row\n const row = createRow(table, table._getRowId(originalRows[i], i, parentRow), originalRows[i], i, depth, undefined, parentRow == null ? void 0 : parentRow.id);\n\n // Keep track of every row in a flat array\n rowModel.flatRows.push(row);\n // Also keep track of every row by its ID\n rowModel.rowsById[row.id] = row;\n // Push table row into parent\n rows.push(row);\n\n // Get the original subrows\n if (table.options.getSubRows) {\n var _row$originalSubRows;\n row.originalSubRows = table.options.getSubRows(originalRows[i], i);\n\n // Then recursively access them\n if ((_row$originalSubRows = row.originalSubRows) != null && _row$originalSubRows.length) {\n row.subRows = accessRows(row.originalSubRows, depth + 1, row);\n }\n }\n }\n return rows;\n };\n rowModel.rows = accessRows(data);\n return rowModel;\n }, getMemoOptions(table.options, 'debugTable', 'getRowModel', () => table._autoResetPageIndex()));\n}\n\nfunction filterRows(rows, filterRowImpl, table) {\n if (table.options.filterFromLeafRows) {\n return filterRowModelFromLeafs(rows, filterRowImpl, table);\n }\n return filterRowModelFromRoot(rows, filterRowImpl, table);\n}\nfunction filterRowModelFromLeafs(rowsToFilter, filterRow, table) {\n var _table$options$maxLea;\n const newFilteredFlatRows = [];\n const newFilteredRowsById = {};\n const maxDepth = (_table$options$maxLea = table.options.maxLeafRowFilterDepth) != null ? _table$options$maxLea : 100;\n const recurseFilterRows = function (rowsToFilter, depth) {\n if (depth === void 0) {\n depth = 0;\n }\n const rows = [];\n\n // Filter from children up first\n for (let i = 0; i < rowsToFilter.length; i++) {\n var _row$subRows;\n let row = rowsToFilter[i];\n const newRow = createRow(table, row.id, row.original, row.index, row.depth, undefined, row.parentId);\n newRow.columnFilters = row.columnFilters;\n if ((_row$subRows = row.subRows) != null && _row$subRows.length && depth < maxDepth) {\n newRow.subRows = recurseFilterRows(row.subRows, depth + 1);\n row = newRow;\n if (filterRow(row) && !newRow.subRows.length) {\n rows.push(row);\n newFilteredRowsById[row.id] = row;\n newFilteredFlatRows.push(row);\n continue;\n }\n if (filterRow(row) || newRow.subRows.length) {\n rows.push(row);\n newFilteredRowsById[row.id] = row;\n newFilteredFlatRows.push(row);\n continue;\n }\n } else {\n row = newRow;\n if (filterRow(row)) {\n rows.push(row);\n newFilteredRowsById[row.id] = row;\n newFilteredFlatRows.push(row);\n }\n }\n }\n return rows;\n };\n return {\n rows: recurseFilterRows(rowsToFilter),\n flatRows: newFilteredFlatRows,\n rowsById: newFilteredRowsById\n };\n}\nfunction filterRowModelFromRoot(rowsToFilter, filterRow, table) {\n var _table$options$maxLea2;\n const newFilteredFlatRows = [];\n const newFilteredRowsById = {};\n const maxDepth = (_table$options$maxLea2 = table.options.maxLeafRowFilterDepth) != null ? _table$options$maxLea2 : 100;\n\n // Filters top level and nested rows\n const recurseFilterRows = function (rowsToFilter, depth) {\n if (depth === void 0) {\n depth = 0;\n }\n // Filter from parents downward first\n\n const rows = [];\n\n // Apply the filter to any subRows\n for (let i = 0; i < rowsToFilter.length; i++) {\n let row = rowsToFilter[i];\n const pass = filterRow(row);\n if (pass) {\n var _row$subRows2;\n if ((_row$subRows2 = row.subRows) != null && _row$subRows2.length && depth < maxDepth) {\n const newRow = createRow(table, row.id, row.original, row.index, row.depth, undefined, row.parentId);\n newRow.subRows = recurseFilterRows(row.subRows, depth + 1);\n row = newRow;\n }\n rows.push(row);\n newFilteredFlatRows.push(row);\n newFilteredRowsById[row.id] = row;\n }\n }\n return rows;\n };\n return {\n rows: recurseFilterRows(rowsToFilter),\n flatRows: newFilteredFlatRows,\n rowsById: newFilteredRowsById\n };\n}\n\nfunction getFilteredRowModel() {\n return table => memo(() => [table.getPreFilteredRowModel(), table.getState().columnFilters, table.getState().globalFilter], (rowModel, columnFilters, globalFilter) => {\n if (!rowModel.rows.length || !(columnFilters != null && columnFilters.length) && !globalFilter) {\n for (let i = 0; i < rowModel.flatRows.length; i++) {\n rowModel.flatRows[i].columnFilters = {};\n rowModel.flatRows[i].columnFiltersMeta = {};\n }\n return rowModel;\n }\n const resolvedColumnFilters = [];\n const resolvedGlobalFilters = [];\n (columnFilters != null ? columnFilters : []).forEach(d => {\n var _filterFn$resolveFilt;\n const column = table.getColumn(d.id);\n if (!column) {\n return;\n }\n const filterFn = column.getFilterFn();\n if (!filterFn) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${column.id}.`);\n }\n return;\n }\n resolvedColumnFilters.push({\n id: d.id,\n filterFn,\n resolvedValue: (_filterFn$resolveFilt = filterFn.resolveFilterValue == null ? void 0 : filterFn.resolveFilterValue(d.value)) != null ? _filterFn$resolveFilt : d.value\n });\n });\n const filterableIds = columnFilters.map(d => d.id);\n const globalFilterFn = table.getGlobalFilterFn();\n const globallyFilterableColumns = table.getAllLeafColumns().filter(column => column.getCanGlobalFilter());\n if (globalFilter && globalFilterFn && globallyFilterableColumns.length) {\n filterableIds.push('__global__');\n globallyFilterableColumns.forEach(column => {\n var _globalFilterFn$resol;\n resolvedGlobalFilters.push({\n id: column.id,\n filterFn: globalFilterFn,\n resolvedValue: (_globalFilterFn$resol = globalFilterFn.resolveFilterValue == null ? void 0 : globalFilterFn.resolveFilterValue(globalFilter)) != null ? _globalFilterFn$resol : globalFilter\n });\n });\n }\n let currentColumnFilter;\n let currentGlobalFilter;\n\n // Flag the prefiltered row model with each filter state\n for (let j = 0; j < rowModel.flatRows.length; j++) {\n const row = rowModel.flatRows[j];\n row.columnFilters = {};\n if (resolvedColumnFilters.length) {\n for (let i = 0; i < resolvedColumnFilters.length; i++) {\n currentColumnFilter = resolvedColumnFilters[i];\n const id = currentColumnFilter.id;\n\n // Tag the row with the column filter state\n row.columnFilters[id] = currentColumnFilter.filterFn(row, id, currentColumnFilter.resolvedValue, filterMeta => {\n row.columnFiltersMeta[id] = filterMeta;\n });\n }\n }\n if (resolvedGlobalFilters.length) {\n for (let i = 0; i < resolvedGlobalFilters.length; i++) {\n currentGlobalFilter = resolvedGlobalFilters[i];\n const id = currentGlobalFilter.id;\n // Tag the row with the first truthy global filter state\n if (currentGlobalFilter.filterFn(row, id, currentGlobalFilter.resolvedValue, filterMeta => {\n row.columnFiltersMeta[id] = filterMeta;\n })) {\n row.columnFilters.__global__ = true;\n break;\n }\n }\n if (row.columnFilters.__global__ !== true) {\n row.columnFilters.__global__ = false;\n }\n }\n }\n const filterRowsImpl = row => {\n // Horizontally filter rows through each column\n for (let i = 0; i < filterableIds.length; i++) {\n if (row.columnFilters[filterableIds[i]] === false) {\n return false;\n }\n }\n return true;\n };\n\n // Filter final rows using all of the active filters\n return filterRows(rowModel.rows, filterRowsImpl, table);\n }, getMemoOptions(table.options, 'debugTable', 'getFilteredRowModel', () => table._autoResetPageIndex()));\n}\n\nfunction getFacetedRowModel() {\n return (table, columnId) => memo(() => [table.getPreFilteredRowModel(), table.getState().columnFilters, table.getState().globalFilter, table.getFilteredRowModel()], (preRowModel, columnFilters, globalFilter) => {\n if (!preRowModel.rows.length || !(columnFilters != null && columnFilters.length) && !globalFilter) {\n return preRowModel;\n }\n const filterableIds = [...columnFilters.map(d => d.id).filter(d => d !== columnId), globalFilter ? '__global__' : undefined].filter(Boolean);\n const filterRowsImpl = row => {\n // Horizontally filter rows through each column\n for (let i = 0; i < filterableIds.length; i++) {\n if (row.columnFilters[filterableIds[i]] === false) {\n return false;\n }\n }\n return true;\n };\n return filterRows(preRowModel.rows, filterRowsImpl, table);\n }, getMemoOptions(table.options, 'debugTable', 'getFacetedRowModel'));\n}\n\nfunction getFacetedUniqueValues() {\n return (table, columnId) => memo(() => {\n var _table$getColumn;\n return [(_table$getColumn = table.getColumn(columnId)) == null ? void 0 : _table$getColumn.getFacetedRowModel()];\n }, facetedRowModel => {\n if (!facetedRowModel) return new Map();\n let facetedUniqueValues = new Map();\n for (let i = 0; i < facetedRowModel.flatRows.length; i++) {\n const values = facetedRowModel.flatRows[i].getUniqueValues(columnId);\n for (let j = 0; j < values.length; j++) {\n const value = values[j];\n if (facetedUniqueValues.has(value)) {\n var _facetedUniqueValues$;\n facetedUniqueValues.set(value, ((_facetedUniqueValues$ = facetedUniqueValues.get(value)) != null ? _facetedUniqueValues$ : 0) + 1);\n } else {\n facetedUniqueValues.set(value, 1);\n }\n }\n }\n return facetedUniqueValues;\n }, getMemoOptions(table.options, 'debugTable', `getFacetedUniqueValues_${columnId}`));\n}\n\nfunction getFacetedMinMaxValues() {\n return (table, columnId) => memo(() => {\n var _table$getColumn;\n return [(_table$getColumn = table.getColumn(columnId)) == null ? void 0 : _table$getColumn.getFacetedRowModel()];\n }, facetedRowModel => {\n var _facetedRowModel$flat;\n if (!facetedRowModel) return undefined;\n const firstValue = (_facetedRowModel$flat = facetedRowModel.flatRows[0]) == null ? void 0 : _facetedRowModel$flat.getUniqueValues(columnId);\n if (typeof firstValue === 'undefined') {\n return undefined;\n }\n let facetedMinMaxValues = [firstValue, firstValue];\n for (let i = 0; i < facetedRowModel.flatRows.length; i++) {\n const values = facetedRowModel.flatRows[i].getUniqueValues(columnId);\n for (let j = 0; j < values.length; j++) {\n const value = values[j];\n if (value < facetedMinMaxValues[0]) {\n facetedMinMaxValues[0] = value;\n } else if (value > facetedMinMaxValues[1]) {\n facetedMinMaxValues[1] = value;\n }\n }\n }\n return facetedMinMaxValues;\n }, getMemoOptions(table.options, 'debugTable', 'getFacetedMinMaxValues'));\n}\n\nfunction getSortedRowModel() {\n return table => memo(() => [table.getState().sorting, table.getPreSortedRowModel()], (sorting, rowModel) => {\n if (!rowModel.rows.length || !(sorting != null && sorting.length)) {\n return rowModel;\n }\n const sortingState = table.getState().sorting;\n const sortedFlatRows = [];\n\n // Filter out sortings that correspond to non existing columns\n const availableSorting = sortingState.filter(sort => {\n var _table$getColumn;\n return (_table$getColumn = table.getColumn(sort.id)) == null ? void 0 : _table$getColumn.getCanSort();\n });\n const columnInfoById = {};\n availableSorting.forEach(sortEntry => {\n const column = table.getColumn(sortEntry.id);\n if (!column) return;\n columnInfoById[sortEntry.id] = {\n sortUndefined: column.columnDef.sortUndefined,\n invertSorting: column.columnDef.invertSorting,\n sortingFn: column.getSortingFn()\n };\n });\n const sortData = rows => {\n // This will also perform a stable sorting using the row index\n // if needed.\n const sortedData = rows.map(row => ({\n ...row\n }));\n sortedData.sort((rowA, rowB) => {\n for (let i = 0; i < availableSorting.length; i += 1) {\n var _sortEntry$desc;\n const sortEntry = availableSorting[i];\n const columnInfo = columnInfoById[sortEntry.id];\n const isDesc = (_sortEntry$desc = sortEntry == null ? void 0 : sortEntry.desc) != null ? _sortEntry$desc : false;\n let sortInt = 0;\n\n // All sorting ints should always return in ascending order\n if (columnInfo.sortUndefined) {\n const aValue = rowA.getValue(sortEntry.id);\n const bValue = rowB.getValue(sortEntry.id);\n const aUndefined = aValue === undefined;\n const bUndefined = bValue === undefined;\n if (aUndefined || bUndefined) {\n sortInt = aUndefined && bUndefined ? 0 : aUndefined ? columnInfo.sortUndefined : -columnInfo.sortUndefined;\n }\n }\n if (sortInt === 0) {\n sortInt = columnInfo.sortingFn(rowA, rowB, sortEntry.id);\n }\n\n // If sorting is non-zero, take care of desc and inversion\n if (sortInt !== 0) {\n if (isDesc) {\n sortInt *= -1;\n }\n if (columnInfo.invertSorting) {\n sortInt *= -1;\n }\n return sortInt;\n }\n }\n return rowA.index - rowB.index;\n });\n\n // If there are sub-rows, sort them\n sortedData.forEach(row => {\n var _row$subRows;\n sortedFlatRows.push(row);\n if ((_row$subRows = row.subRows) != null && _row$subRows.length) {\n row.subRows = sortData(row.subRows);\n }\n });\n return sortedData;\n };\n return {\n rows: sortData(rowModel.rows),\n flatRows: sortedFlatRows,\n rowsById: rowModel.rowsById\n };\n }, getMemoOptions(table.options, 'debugTable', 'getSortedRowModel', () => table._autoResetPageIndex()));\n}\n\nfunction getGroupedRowModel() {\n return table => memo(() => [table.getState().grouping, table.getPreGroupedRowModel()], (grouping, rowModel) => {\n if (!rowModel.rows.length || !grouping.length) {\n return rowModel;\n }\n\n // Filter the grouping list down to columns that exist\n const existingGrouping = grouping.filter(columnId => table.getColumn(columnId));\n const groupedFlatRows = [];\n const groupedRowsById = {};\n // const onlyGroupedFlatRows: Row[] = [];\n // const onlyGroupedRowsById: Record = {};\n // const nonGroupedFlatRows: Row[] = [];\n // const nonGroupedRowsById: Record = {};\n\n // Recursively group the data\n const groupUpRecursively = function (rows, depth, parentId) {\n if (depth === void 0) {\n depth = 0;\n }\n // Grouping depth has been been met\n // Stop grouping and simply rewrite thd depth and row relationships\n if (depth >= existingGrouping.length) {\n return rows.map(row => {\n row.depth = depth;\n groupedFlatRows.push(row);\n groupedRowsById[row.id] = row;\n if (row.subRows) {\n row.subRows = groupUpRecursively(row.subRows, depth + 1, row.id);\n }\n return row;\n });\n }\n const columnId = existingGrouping[depth];\n\n // Group the rows together for this level\n const rowGroupsMap = groupBy(rows, columnId);\n\n // Peform aggregations for each group\n const aggregatedGroupedRows = Array.from(rowGroupsMap.entries()).map((_ref, index) => {\n let [groupingValue, groupedRows] = _ref;\n let id = `${columnId}:${groupingValue}`;\n id = parentId ? `${parentId}>${id}` : id;\n\n // First, Recurse to group sub rows before aggregation\n const subRows = groupUpRecursively(groupedRows, depth + 1, id);\n\n // Flatten the leaf rows of the rows in this group\n const leafRows = depth ? flattenBy(groupedRows, row => row.subRows) : groupedRows;\n const row = createRow(table, id, leafRows[0].original, index, depth, undefined, parentId);\n Object.assign(row, {\n groupingColumnId: columnId,\n groupingValue,\n subRows,\n leafRows,\n getValue: columnId => {\n // Don't aggregate columns that are in the grouping\n if (existingGrouping.includes(columnId)) {\n if (row._valuesCache.hasOwnProperty(columnId)) {\n return row._valuesCache[columnId];\n }\n if (groupedRows[0]) {\n var _groupedRows$0$getVal;\n row._valuesCache[columnId] = (_groupedRows$0$getVal = groupedRows[0].getValue(columnId)) != null ? _groupedRows$0$getVal : undefined;\n }\n return row._valuesCache[columnId];\n }\n if (row._groupingValuesCache.hasOwnProperty(columnId)) {\n return row._groupingValuesCache[columnId];\n }\n\n // Aggregate the values\n const column = table.getColumn(columnId);\n const aggregateFn = column == null ? void 0 : column.getAggregationFn();\n if (aggregateFn) {\n row._groupingValuesCache[columnId] = aggregateFn(columnId, leafRows, groupedRows);\n return row._groupingValuesCache[columnId];\n }\n }\n });\n subRows.forEach(subRow => {\n groupedFlatRows.push(subRow);\n groupedRowsById[subRow.id] = subRow;\n // if (subRow.getIsGrouped?.()) {\n // onlyGroupedFlatRows.push(subRow);\n // onlyGroupedRowsById[subRow.id] = subRow;\n // } else {\n // nonGroupedFlatRows.push(subRow);\n // nonGroupedRowsById[subRow.id] = subRow;\n // }\n });\n return row;\n });\n return aggregatedGroupedRows;\n };\n const groupedRows = groupUpRecursively(rowModel.rows, 0);\n groupedRows.forEach(subRow => {\n groupedFlatRows.push(subRow);\n groupedRowsById[subRow.id] = subRow;\n // if (subRow.getIsGrouped?.()) {\n // onlyGroupedFlatRows.push(subRow);\n // onlyGroupedRowsById[subRow.id] = subRow;\n // } else {\n // nonGroupedFlatRows.push(subRow);\n // nonGroupedRowsById[subRow.id] = subRow;\n // }\n });\n return {\n rows: groupedRows,\n flatRows: groupedFlatRows,\n rowsById: groupedRowsById\n };\n }, getMemoOptions(table.options, 'debugTable', 'getGroupedRowModel', () => {\n table._queue(() => {\n table._autoResetExpanded();\n table._autoResetPageIndex();\n });\n }));\n}\nfunction groupBy(rows, columnId) {\n const groupMap = new Map();\n return rows.reduce((map, row) => {\n const resKey = `${row.getGroupingValue(columnId)}`;\n const previous = map.get(resKey);\n if (!previous) {\n map.set(resKey, [row]);\n } else {\n previous.push(row);\n }\n return map;\n }, groupMap);\n}\n\nfunction getExpandedRowModel() {\n return table => memo(() => [table.getState().expanded, table.getPreExpandedRowModel(), table.options.paginateExpandedRows], (expanded, rowModel, paginateExpandedRows) => {\n if (!rowModel.rows.length || expanded !== true && !Object.keys(expanded != null ? expanded : {}).length) {\n return rowModel;\n }\n if (!paginateExpandedRows) {\n // Only expand rows at this point if they are being paginated\n return rowModel;\n }\n return expandRows(rowModel);\n }, getMemoOptions(table.options, 'debugTable', 'getExpandedRowModel'));\n}\nfunction expandRows(rowModel) {\n const expandedRows = [];\n const handleRow = row => {\n var _row$subRows;\n expandedRows.push(row);\n if ((_row$subRows = row.subRows) != null && _row$subRows.length && row.getIsExpanded()) {\n row.subRows.forEach(handleRow);\n }\n };\n rowModel.rows.forEach(handleRow);\n return {\n rows: expandedRows,\n flatRows: rowModel.flatRows,\n rowsById: rowModel.rowsById\n };\n}\n\nfunction getPaginationRowModel(opts) {\n return table => memo(() => [table.getState().pagination, table.getPrePaginationRowModel(), table.options.paginateExpandedRows ? undefined : table.getState().expanded], (pagination, rowModel) => {\n if (!rowModel.rows.length) {\n return rowModel;\n }\n const {\n pageSize,\n pageIndex\n } = pagination;\n let {\n rows,\n flatRows,\n rowsById\n } = rowModel;\n const pageStart = pageSize * pageIndex;\n const pageEnd = pageStart + pageSize;\n rows = rows.slice(pageStart, pageEnd);\n let paginatedRowModel;\n if (!table.options.paginateExpandedRows) {\n paginatedRowModel = expandRows({\n rows,\n flatRows,\n rowsById\n });\n } else {\n paginatedRowModel = {\n rows,\n flatRows,\n rowsById\n };\n }\n paginatedRowModel.flatRows = [];\n const handleRow = row => {\n paginatedRowModel.flatRows.push(row);\n if (row.subRows.length) {\n row.subRows.forEach(handleRow);\n }\n };\n paginatedRowModel.rows.forEach(handleRow);\n return paginatedRowModel;\n }, getMemoOptions(table.options, 'debugTable', 'getPaginationRowModel'));\n}\n\nexport { ColumnSizing, Expanding, Filters, Grouping, Headers, Ordering, Pagination, Pinning, RowSelection, Sorting, Visibility, _getVisibleLeafColumns, aggregationFns, buildHeaderGroups, createCell, createColumn, createColumnHelper, createRow, createTable, defaultColumnSizing, expandRows, filterFns, flattenBy, functionalUpdate, getCoreRowModel, getExpandedRowModel, getFacetedMinMaxValues, getFacetedRowModel, getFacetedUniqueValues, getFilteredRowModel, getGroupedRowModel, getMemoOptions, getPaginationRowModel, getSortedRowModel, isFunction, isNumberArray, isRowSelected, isSubRowSelected, makeStateUpdater, memo, noop, orderColumns, passiveEventSupported, reSplitAlphaNumeric, selectRowsFn, shouldAutoRemoveFilter, sortingFns };\n//# sourceMappingURL=index.mjs.map\n","/**\n * react-table\n *\n * Copyright (c) TanStack\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nimport * as React from 'react';\nimport { createTable } from '@tanstack/table-core';\nexport * from '@tanstack/table-core';\n\n//\n\n/**\n * If rendering headers, cells, or footers with custom markup, use flexRender instead of `cell.getValue()` or `cell.renderValue()`.\n */\nfunction flexRender(Comp, props) {\n return !Comp ? null : isReactComponent(Comp) ? /*#__PURE__*/React.createElement(Comp, props) : Comp;\n}\nfunction isReactComponent(component) {\n return isClassComponent(component) || typeof component === 'function' || isExoticComponent(component);\n}\nfunction isClassComponent(component) {\n return typeof component === 'function' && (() => {\n const proto = Object.getPrototypeOf(component);\n return proto.prototype && proto.prototype.isReactComponent;\n })();\n}\nfunction isExoticComponent(component) {\n return typeof component === 'object' && typeof component.$$typeof === 'symbol' && ['react.memo', 'react.forward_ref'].includes(component.$$typeof.description);\n}\nfunction useReactTable(options) {\n // Compose in the generic options to the user options\n const resolvedOptions = {\n state: {},\n // Dummy state\n onStateChange: () => {},\n // noop\n renderFallbackValue: null,\n ...options\n };\n\n // Create a new table and store it in state\n const [tableRef] = React.useState(() => ({\n current: createTable(resolvedOptions)\n }));\n\n // By default, manage table state here using the table's initial state\n const [state, setState] = React.useState(() => tableRef.current.initialState);\n\n // Compose the default state above with any user state. This will allow the user\n // to only control a subset of the state if desired.\n tableRef.current.setOptions(prev => ({\n ...prev,\n ...options,\n state: {\n ...state,\n ...options.state\n },\n // Similarly, we'll maintain both our internal state and any user-provided\n // state.\n onStateChange: updater => {\n setState(updater);\n options.onStateChange == null || options.onStateChange(updater);\n }\n }));\n return tableRef.current;\n}\n\nexport { flexRender, useReactTable };\n//# sourceMappingURL=index.mjs.map\n","var global$1 = (typeof global !== \"undefined\" ? global :\n typeof self !== \"undefined\" ? self :\n typeof window !== \"undefined\" ? window : {});\n\nvar lookup = [];\nvar revLookup = [];\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;\nvar inited = false;\nfunction init () {\n inited = true;\n var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n for (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i];\n revLookup[code.charCodeAt(i)] = i;\n }\n\n revLookup['-'.charCodeAt(0)] = 62;\n revLookup['_'.charCodeAt(0)] = 63;\n}\n\nfunction toByteArray (b64) {\n if (!inited) {\n init();\n }\n var i, j, l, tmp, placeHolders, arr;\n var len = b64.length;\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // the number of equal signs (place holders)\n // if there are two placeholders, than the two characters before it\n // represent one byte\n // if there is only one, then the three characters before it represent 2 bytes\n // this is just a cheap hack to not do indexOf twice\n placeHolders = b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0;\n\n // base64 is 4/3 + up to two characters of the original data\n arr = new Arr(len * 3 / 4 - placeHolders);\n\n // if there are placeholders, only get up to the last complete 4 chars\n l = placeHolders > 0 ? len - 4 : len;\n\n var L = 0;\n\n for (i = 0, j = 0; i < l; i += 4, j += 3) {\n tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)];\n arr[L++] = (tmp >> 16) & 0xFF;\n arr[L++] = (tmp >> 8) & 0xFF;\n arr[L++] = tmp & 0xFF;\n }\n\n if (placeHolders === 2) {\n tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4);\n arr[L++] = tmp & 0xFF;\n } else if (placeHolders === 1) {\n tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2);\n arr[L++] = (tmp >> 8) & 0xFF;\n arr[L++] = tmp & 0xFF;\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp;\n var output = [];\n for (var i = start; i < end; i += 3) {\n tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]);\n output.push(tripletToBase64(tmp));\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n if (!inited) {\n init();\n }\n var tmp;\n var len = uint8.length;\n var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes\n var output = '';\n var parts = [];\n var maxChunkLength = 16383; // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)));\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1];\n output += lookup[tmp >> 2];\n output += lookup[(tmp << 4) & 0x3F];\n output += '==';\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + (uint8[len - 1]);\n output += lookup[tmp >> 10];\n output += lookup[(tmp >> 4) & 0x3F];\n output += lookup[(tmp << 2) & 0x3F];\n output += '=';\n }\n\n parts.push(output);\n\n return parts.join('')\n}\n\nfunction read (buffer, offset, isLE, mLen, nBytes) {\n var e, m;\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var nBits = -7;\n var i = isLE ? (nBytes - 1) : 0;\n var d = isLE ? -1 : 1;\n var s = buffer[offset + i];\n\n i += d;\n\n e = s & ((1 << (-nBits)) - 1);\n s >>= (-nBits);\n nBits += eLen;\n for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1);\n e >>= (-nBits);\n nBits += mLen;\n for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias;\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen);\n e = e - eBias;\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nfunction write (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c;\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0);\n var i = isLE ? 0 : (nBytes - 1);\n var d = isLE ? 1 : -1;\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0;\n\n value = Math.abs(value);\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0;\n e = eMax;\n } else {\n e = Math.floor(Math.log(value) / Math.LN2);\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--;\n c *= 2;\n }\n if (e + eBias >= 1) {\n value += rt / c;\n } else {\n value += rt * Math.pow(2, 1 - eBias);\n }\n if (value * c >= 2) {\n e++;\n c /= 2;\n }\n\n if (e + eBias >= eMax) {\n m = 0;\n e = eMax;\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * Math.pow(2, mLen);\n e = e + eBias;\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);\n e = 0;\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m;\n eLen += mLen;\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128;\n}\n\nvar toString = {}.toString;\n\nvar isArray = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n\nvar INSPECT_MAX_BYTES = 50;\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global$1.TYPED_ARRAY_SUPPORT !== undefined\n ? global$1.TYPED_ARRAY_SUPPORT\n : true;\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nkMaxLength();\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length);\n that.__proto__ = Buffer.prototype;\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length);\n }\n that.length = length;\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192; // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype;\n return arr\n};\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n};\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype;\n Buffer.__proto__ = Uint8Array;\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) ;\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size);\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n};\n\nfunction allocUnsafe (that, size) {\n assertSize(size);\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0);\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0;\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n};\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n};\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8';\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0;\n that = createBuffer(that, length);\n\n var actual = that.write(string, encoding);\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual);\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0;\n that = createBuffer(that, length);\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255;\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength; // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array);\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset);\n } else {\n array = new Uint8Array(array, byteOffset, length);\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array;\n that.__proto__ = Buffer.prototype;\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array);\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (internalIsBuffer(obj)) {\n var len = checked(obj.length) | 0;\n that = createBuffer(that, len);\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len);\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\nBuffer.isBuffer = isBuffer;\nfunction internalIsBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!internalIsBuffer(a) || !internalIsBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n};\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n};\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i;\n if (length === undefined) {\n length = 0;\n for (i = 0; i < list.length; ++i) {\n length += list[i].length;\n }\n }\n\n var buffer = Buffer.allocUnsafe(length);\n var pos = 0;\n for (i = 0; i < list.length; ++i) {\n var buf = list[i];\n if (!internalIsBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos);\n pos += buf.length;\n }\n return buffer\n};\n\nfunction byteLength (string, encoding) {\n if (internalIsBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string;\n }\n\n var len = string.length;\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false;\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n}\nBuffer.byteLength = byteLength;\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false;\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0;\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length;\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0;\n start >>>= 0;\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8';\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase();\n loweredCase = true;\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true;\n\nfunction swap (b, n, m) {\n var i = b[n];\n b[n] = b[m];\n b[m] = i;\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length;\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1);\n }\n return this\n};\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length;\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3);\n swap(this, i + 1, i + 2);\n }\n return this\n};\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length;\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7);\n swap(this, i + 1, i + 6);\n swap(this, i + 2, i + 5);\n swap(this, i + 3, i + 4);\n }\n return this\n};\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0;\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n};\n\nBuffer.prototype.equals = function equals (b) {\n if (!internalIsBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n};\n\nBuffer.prototype.inspect = function inspect () {\n var str = '';\n var max = INSPECT_MAX_BYTES;\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ');\n if (this.length > max) str += ' ... ';\n }\n return ''\n};\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!internalIsBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0;\n }\n if (end === undefined) {\n end = target ? target.length : 0;\n }\n if (thisStart === undefined) {\n thisStart = 0;\n }\n if (thisEnd === undefined) {\n thisEnd = this.length;\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0;\n end >>>= 0;\n thisStart >>>= 0;\n thisEnd >>>= 0;\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart;\n var y = end - start;\n var len = Math.min(x, y);\n\n var thisCopy = this.slice(thisStart, thisEnd);\n var targetCopy = target.slice(start, end);\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i];\n y = targetCopy[i];\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n};\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset;\n byteOffset = 0;\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff;\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000;\n }\n byteOffset = +byteOffset; // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1);\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset;\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1;\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0;\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding);\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (internalIsBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF; // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1;\n var arrLength = arr.length;\n var valLength = val.length;\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase();\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2;\n arrLength /= 2;\n valLength /= 2;\n byteOffset /= 2;\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i;\n if (dir) {\n var foundIndex = -1;\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i;\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex;\n foundIndex = -1;\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;\n for (i = byteOffset; i >= 0; i--) {\n var found = true;\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false;\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n};\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n};\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n};\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0;\n var remaining = buf.length - offset;\n if (!length) {\n length = remaining;\n } else {\n length = Number(length);\n if (length > remaining) {\n length = remaining;\n }\n }\n\n // must be an even number of digits\n var strLen = string.length;\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2;\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16);\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed;\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8';\n length = this.length;\n offset = 0;\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset;\n length = this.length;\n offset = 0;\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0;\n if (isFinite(length)) {\n length = length | 0;\n if (encoding === undefined) encoding = 'utf8';\n } else {\n encoding = length;\n length = undefined;\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset;\n if (length === undefined || length > remaining) length = remaining;\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8';\n\n var loweredCase = false;\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n};\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n};\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return fromByteArray(buf)\n } else {\n return fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end);\n var res = [];\n\n var i = start;\n while (i < end) {\n var firstByte = buf[i];\n var codePoint = null;\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1;\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint;\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte;\n }\n break\n case 2:\n secondByte = buf[i + 1];\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F);\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint;\n }\n }\n break\n case 3:\n secondByte = buf[i + 1];\n thirdByte = buf[i + 2];\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F);\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint;\n }\n }\n break\n case 4:\n secondByte = buf[i + 1];\n thirdByte = buf[i + 2];\n fourthByte = buf[i + 3];\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F);\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint;\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD;\n bytesPerSequence = 1;\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000;\n res.push(codePoint >>> 10 & 0x3FF | 0xD800);\n codePoint = 0xDC00 | codePoint & 0x3FF;\n }\n\n res.push(codePoint);\n i += bytesPerSequence;\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000;\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length;\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = '';\n var i = 0;\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n );\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = '';\n end = Math.min(buf.length, end);\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F);\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = '';\n end = Math.min(buf.length, end);\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i]);\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length;\n\n if (!start || start < 0) start = 0;\n if (!end || end < 0 || end > len) end = len;\n\n var out = '';\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i]);\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end);\n var res = '';\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length;\n start = ~~start;\n end = end === undefined ? len : ~~end;\n\n if (start < 0) {\n start += len;\n if (start < 0) start = 0;\n } else if (start > len) {\n start = len;\n }\n\n if (end < 0) {\n end += len;\n if (end < 0) end = 0;\n } else if (end > len) {\n end = len;\n }\n\n if (end < start) end = start;\n\n var newBuf;\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end);\n newBuf.__proto__ = Buffer.prototype;\n } else {\n var sliceLen = end - start;\n newBuf = new Buffer(sliceLen, undefined);\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start];\n }\n }\n\n return newBuf\n};\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) checkOffset(offset, byteLength, this.length);\n\n var val = this[offset];\n var mul = 1;\n var i = 0;\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul;\n }\n\n return val\n};\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length);\n }\n\n var val = this[offset + --byteLength];\n var mul = 1;\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul;\n }\n\n return val\n};\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length);\n return this[offset]\n};\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length);\n return this[offset] | (this[offset + 1] << 8)\n};\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length);\n return (this[offset] << 8) | this[offset + 1]\n};\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n};\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n};\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) checkOffset(offset, byteLength, this.length);\n\n var val = this[offset];\n var mul = 1;\n var i = 0;\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul;\n }\n mul *= 0x80;\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n\n return val\n};\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) checkOffset(offset, byteLength, this.length);\n\n var i = byteLength;\n var mul = 1;\n var val = this[offset + --i];\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul;\n }\n mul *= 0x80;\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n\n return val\n};\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length);\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n};\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length);\n var val = this[offset] | (this[offset + 1] << 8);\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n};\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length);\n var val = this[offset + 1] | (this[offset] << 8);\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n};\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n};\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n};\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n return read(this, offset, true, 23, 4)\n};\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n return read(this, offset, false, 23, 4)\n};\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length);\n return read(this, offset, true, 52, 8)\n};\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length);\n return read(this, offset, false, 52, 8)\n};\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!internalIsBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1;\n checkInt(this, value, offset, byteLength, maxBytes, 0);\n }\n\n var mul = 1;\n var i = 0;\n this[offset] = value & 0xFF;\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF;\n }\n\n return offset + byteLength\n};\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1;\n checkInt(this, value, offset, byteLength, maxBytes, 0);\n }\n\n var i = byteLength - 1;\n var mul = 1;\n this[offset + i] = value & 0xFF;\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF;\n }\n\n return offset + byteLength\n};\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0);\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);\n this[offset] = (value & 0xff);\n return offset + 1\n};\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1;\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8;\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff);\n this[offset + 1] = (value >>> 8);\n } else {\n objectWriteUInt16(this, value, offset, true);\n }\n return offset + 2\n};\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8);\n this[offset + 1] = (value & 0xff);\n } else {\n objectWriteUInt16(this, value, offset, false);\n }\n return offset + 2\n};\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1;\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff;\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24);\n this[offset + 2] = (value >>> 16);\n this[offset + 1] = (value >>> 8);\n this[offset] = (value & 0xff);\n } else {\n objectWriteUInt32(this, value, offset, true);\n }\n return offset + 4\n};\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24);\n this[offset + 1] = (value >>> 16);\n this[offset + 2] = (value >>> 8);\n this[offset + 3] = (value & 0xff);\n } else {\n objectWriteUInt32(this, value, offset, false);\n }\n return offset + 4\n};\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1);\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit);\n }\n\n var i = 0;\n var mul = 1;\n var sub = 0;\n this[offset] = value & 0xFF;\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1;\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF;\n }\n\n return offset + byteLength\n};\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1);\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit);\n }\n\n var i = byteLength - 1;\n var mul = 1;\n var sub = 0;\n this[offset + i] = value & 0xFF;\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1;\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF;\n }\n\n return offset + byteLength\n};\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80);\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);\n if (value < 0) value = 0xff + value + 1;\n this[offset] = (value & 0xff);\n return offset + 1\n};\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff);\n this[offset + 1] = (value >>> 8);\n } else {\n objectWriteUInt16(this, value, offset, true);\n }\n return offset + 2\n};\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8);\n this[offset + 1] = (value & 0xff);\n } else {\n objectWriteUInt16(this, value, offset, false);\n }\n return offset + 2\n};\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff);\n this[offset + 1] = (value >>> 8);\n this[offset + 2] = (value >>> 16);\n this[offset + 3] = (value >>> 24);\n } else {\n objectWriteUInt32(this, value, offset, true);\n }\n return offset + 4\n};\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);\n if (value < 0) value = 0xffffffff + value + 1;\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24);\n this[offset + 1] = (value >>> 16);\n this[offset + 2] = (value >>> 8);\n this[offset + 3] = (value & 0xff);\n } else {\n objectWriteUInt32(this, value, offset, false);\n }\n return offset + 4\n};\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4);\n }\n write(buf, value, offset, littleEndian, 23, 4);\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n};\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n};\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8);\n }\n write(buf, value, offset, littleEndian, 52, 8);\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n};\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n};\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0;\n if (!end && end !== 0) end = this.length;\n if (targetStart >= target.length) targetStart = target.length;\n if (!targetStart) targetStart = 0;\n if (end > 0 && end < start) end = start;\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length;\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start;\n }\n\n var len = end - start;\n var i;\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start];\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start];\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n );\n }\n\n return len\n};\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start;\n start = 0;\n end = this.length;\n } else if (typeof end === 'string') {\n encoding = end;\n end = this.length;\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0);\n if (code < 256) {\n val = code;\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255;\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0;\n end = end === undefined ? this.length : end >>> 0;\n\n if (!val) val = 0;\n\n var i;\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val;\n }\n } else {\n var bytes = internalIsBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString());\n var len = bytes.length;\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len];\n }\n }\n\n return this\n};\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g;\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '');\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '=';\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity;\n var codePoint;\n var length = string.length;\n var leadSurrogate = null;\n var bytes = [];\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i);\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint;\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n leadSurrogate = codePoint;\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n }\n\n leadSurrogate = null;\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint);\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n );\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n );\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n );\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = [];\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF);\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo;\n var byteArray = [];\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i);\n hi = c >> 8;\n lo = c % 256;\n byteArray.push(lo);\n byteArray.push(hi);\n }\n\n return byteArray\n}\n\n\nfunction base64ToBytes (str) {\n return toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i];\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n\n\n// the following is from is-buffer, also by Feross Aboukhadijeh and with same lisence\n// The _isBuffer check is for Safari 5-7 support, because it's missing\n// Object.prototype.constructor. Remove this eventually\nfunction isBuffer(obj) {\n return obj != null && (!!obj._isBuffer || isFastBuffer(obj) || isSlowBuffer(obj))\n}\n\nfunction isFastBuffer (obj) {\n return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n\n// For Node v0.10 support. Remove this eventually.\nfunction isSlowBuffer (obj) {\n return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isFastBuffer(obj.slice(0, 0))\n}\n\n// Lodash implementation of `get`\n\nconst charCodeOfDot = '.'.charCodeAt(0);\nconst reEscapeChar = /\\\\(\\\\)?/g;\nconst rePropName = RegExp(\n // Match anything that isn't a dot or bracket.\n '[^.[\\\\]]+' + '|' +\n // Or match property names within brackets.\n '\\\\[(?:' +\n // Match a non-string expression.\n '([^\"\\'][^[]*)' + '|' +\n // Or match strings (supports escaping characters).\n '([\"\\'])((?:(?!\\\\2)[^\\\\\\\\]|\\\\\\\\.)*?)\\\\2' +\n ')\\\\]'+ '|' +\n // Or match \"\" as the space between consecutive dots or empty brackets.\n '(?=(?:\\\\.|\\\\[\\\\])(?:\\\\.|\\\\[\\\\]|$))'\n , 'g');\nconst reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/;\nconst reIsPlainProp = /^\\w*$/;\nconst getTag = function(value){\n return Object.prototype.toString.call(value);\n};\nconst isSymbol = function(value){\n const type = typeof value;\n return type === 'symbol' || (type === 'object' && value && getTag(value) === '[object Symbol]');\n};\nconst isKey = function(value, object){\n if(Array.isArray(value)){\n return false;\n }\n const type = typeof value;\n if(type === 'number' || type === 'symbol' || type === 'boolean' || !value || isSymbol(value)){\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n};\nconst stringToPath = function(string){\n const result = [];\n if(string.charCodeAt(0) === charCodeOfDot){\n result.push('');\n }\n string.replace(rePropName, function(match, expression, quote, subString){\n let key = match;\n if(quote){\n key = subString.replace(reEscapeChar, '$1');\n }else if(expression){\n key = expression.trim();\n }\n result.push(key);\n });\n return result;\n};\nconst castPath = function(value, object){\n if(Array.isArray(value)){\n return value;\n } else {\n return isKey(value, object) ? [value] : stringToPath(value);\n }\n};\nconst toKey = function(value){\n if(typeof value === 'string' || isSymbol(value))\n return value;\n const result = `${value}`;\n // eslint-disable-next-line\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n};\nconst get = function(object, path){\n path = castPath(path, object);\n let index = 0;\n const length = path.length;\n while(object != null && index < length){\n object = object[toKey(path[index++])];\n }\n return (index && index === length) ? object : undefined;\n};\n\nconst is_object = function(obj){\n return typeof obj === 'object' && obj !== null && ! Array.isArray(obj);\n};\n\nconst normalize_columns = function(columns){\n if(columns === undefined || columns === null){\n return [undefined, undefined];\n }\n if(typeof columns !== 'object'){\n return [Error('Invalid option \"columns\": expect an array or an object')];\n }\n if(!Array.isArray(columns)){\n const newcolumns = [];\n for(const k in columns){\n newcolumns.push({\n key: k,\n header: columns[k]\n });\n }\n columns = newcolumns;\n }else {\n const newcolumns = [];\n for(const column of columns){\n if(typeof column === 'string'){\n newcolumns.push({\n key: column,\n header: column\n });\n }else if(typeof column === 'object' && column !== null && !Array.isArray(column)){\n if(!column.key){\n return [Error('Invalid column definition: property \"key\" is required')];\n }\n if(column.header === undefined){\n column.header = column.key;\n }\n newcolumns.push(column);\n }else {\n return [Error('Invalid column definition: expect a string or an object')];\n }\n }\n columns = newcolumns;\n }\n return [undefined, columns];\n};\n\nclass CsvError extends Error {\n constructor(code, message, ...contexts) {\n if(Array.isArray(message)) message = message.join(' ');\n super(message);\n if(Error.captureStackTrace !== undefined){\n Error.captureStackTrace(this, CsvError);\n }\n this.code = code;\n for(const context of contexts){\n for(const key in context){\n const value = context[key];\n this[key] = isBuffer(value) ? value.toString() : value == null ? value : JSON.parse(JSON.stringify(value));\n }\n }\n }\n}\n\nconst underscore = function(str){\n return str.replace(/([A-Z])/g, function(_, match){\n return '_' + match.toLowerCase();\n });\n};\n\nconst normalize_options = function(opts) {\n const options = {};\n // Merge with user options\n for(const opt in opts){\n options[underscore(opt)] = opts[opt];\n }\n // Normalize option `bom`\n if(options.bom === undefined || options.bom === null || options.bom === false){\n options.bom = false;\n }else if(options.bom !== true){\n return [new CsvError('CSV_OPTION_BOOLEAN_INVALID_TYPE', [\n 'option `bom` is optional and must be a boolean value,',\n `got ${JSON.stringify(options.bom)}`\n ])];\n }\n // Normalize option `delimiter`\n if(options.delimiter === undefined || options.delimiter === null){\n options.delimiter = ',';\n }else if(isBuffer(options.delimiter)){\n options.delimiter = options.delimiter.toString();\n }else if(typeof options.delimiter !== 'string'){\n return [new CsvError('CSV_OPTION_DELIMITER_INVALID_TYPE', [\n 'option `delimiter` must be a buffer or a string,',\n `got ${JSON.stringify(options.delimiter)}`\n ])];\n }\n // Normalize option `quote`\n if(options.quote === undefined || options.quote === null){\n options.quote = '\"';\n }else if(options.quote === true){\n options.quote = '\"';\n }else if(options.quote === false){\n options.quote = '';\n }else if (isBuffer(options.quote)){\n options.quote = options.quote.toString();\n }else if(typeof options.quote !== 'string'){\n return [new CsvError('CSV_OPTION_QUOTE_INVALID_TYPE', [\n 'option `quote` must be a boolean, a buffer or a string,',\n `got ${JSON.stringify(options.quote)}`\n ])];\n }\n // Normalize option `quoted`\n if(options.quoted === undefined || options.quoted === null){\n options.quoted = false;\n }\n // Normalize option `escape_formulas`\n if(options.escape_formulas === undefined || options.escape_formulas === null){\n options.escape_formulas = false;\n }else if(typeof options.escape_formulas !== 'boolean'){\n return [new CsvError('CSV_OPTION_ESCAPE_FORMULAS_INVALID_TYPE', [\n 'option `escape_formulas` must be a boolean,',\n `got ${JSON.stringify(options.escape_formulas)}`\n ])];\n }\n // Normalize option `quoted_empty`\n if(options.quoted_empty === undefined || options.quoted_empty === null){\n options.quoted_empty = undefined;\n }\n // Normalize option `quoted_match`\n if(options.quoted_match === undefined || options.quoted_match === null || options.quoted_match === false){\n options.quoted_match = null;\n }else if(!Array.isArray(options.quoted_match)){\n options.quoted_match = [options.quoted_match];\n }\n if(options.quoted_match){\n for(const quoted_match of options.quoted_match){\n const isString = typeof quoted_match === 'string';\n const isRegExp = quoted_match instanceof RegExp;\n if(!isString && !isRegExp){\n return [Error(`Invalid Option: quoted_match must be a string or a regex, got ${JSON.stringify(quoted_match)}`)];\n }\n }\n }\n // Normalize option `quoted_string`\n if(options.quoted_string === undefined || options.quoted_string === null){\n options.quoted_string = false;\n }\n // Normalize option `eof`\n if(options.eof === undefined || options.eof === null){\n options.eof = true;\n }\n // Normalize option `escape`\n if(options.escape === undefined || options.escape === null){\n options.escape = '\"';\n }else if(isBuffer(options.escape)){\n options.escape = options.escape.toString();\n }else if(typeof options.escape !== 'string'){\n return [Error(`Invalid Option: escape must be a buffer or a string, got ${JSON.stringify(options.escape)}`)];\n }\n if (options.escape.length > 1){\n return [Error(`Invalid Option: escape must be one character, got ${options.escape.length} characters`)];\n }\n // Normalize option `header`\n if(options.header === undefined || options.header === null){\n options.header = false;\n }\n // Normalize option `columns`\n const [errColumns, columns] = normalize_columns(options.columns);\n if(errColumns !== undefined) return [errColumns];\n options.columns = columns;\n // Normalize option `quoted`\n if(options.quoted === undefined || options.quoted === null){\n options.quoted = false;\n }\n // Normalize option `cast`\n if(options.cast === undefined || options.cast === null){\n options.cast = {};\n }\n // Normalize option cast.bigint\n if(options.cast.bigint === undefined || options.cast.bigint === null){\n // Cast boolean to string by default\n options.cast.bigint = value => '' + value;\n }\n // Normalize option cast.boolean\n if(options.cast.boolean === undefined || options.cast.boolean === null){\n // Cast boolean to string by default\n options.cast.boolean = value => value ? '1' : '';\n }\n // Normalize option cast.date\n if(options.cast.date === undefined || options.cast.date === null){\n // Cast date to timestamp string by default\n options.cast.date = value => '' + value.getTime();\n }\n // Normalize option cast.number\n if(options.cast.number === undefined || options.cast.number === null){\n // Cast number to string using native casting by default\n options.cast.number = value => '' + value;\n }\n // Normalize option cast.object\n if(options.cast.object === undefined || options.cast.object === null){\n // Stringify object as JSON by default\n options.cast.object = value => JSON.stringify(value);\n }\n // Normalize option cast.string\n if(options.cast.string === undefined || options.cast.string === null){\n // Leave string untouched\n options.cast.string = function(value){return value;};\n }\n // Normalize option `on_record`\n if(options.on_record !== undefined && typeof options.on_record !== 'function'){\n return [Error(`Invalid Option: \"on_record\" must be a function.`)];\n }\n // Normalize option `record_delimiter`\n if(options.record_delimiter === undefined || options.record_delimiter === null){\n options.record_delimiter = '\\n';\n }else if(isBuffer(options.record_delimiter)){\n options.record_delimiter = options.record_delimiter.toString();\n }else if(typeof options.record_delimiter !== 'string'){\n return [Error(`Invalid Option: record_delimiter must be a buffer or a string, got ${JSON.stringify(options.record_delimiter)}`)];\n }\n switch(options.record_delimiter){\n case 'unix':\n options.record_delimiter = \"\\n\";\n break;\n case 'mac':\n options.record_delimiter = \"\\r\";\n break;\n case 'windows':\n options.record_delimiter = \"\\r\\n\";\n break;\n case 'ascii':\n options.record_delimiter = \"\\u001e\";\n break;\n case 'unicode':\n options.record_delimiter = \"\\u2028\";\n break;\n }\n return [undefined, options];\n};\n\nconst bom_utf8 = Buffer.from([239, 187, 191]);\n\nconst stringifier = function(options, state, info){\n return {\n options: options,\n state: state,\n info: info,\n __transform: function(chunk, push){\n // Chunk validation\n if(!Array.isArray(chunk) && typeof chunk !== 'object'){\n return Error(`Invalid Record: expect an array or an object, got ${JSON.stringify(chunk)}`);\n }\n // Detect columns from the first record\n if(this.info.records === 0){\n if(Array.isArray(chunk)){\n if(this.options.header === true && this.options.columns === undefined){\n return Error('Undiscoverable Columns: header option requires column option or object records');\n }\n }else if(this.options.columns === undefined){\n const [err, columns] = normalize_columns(Object.keys(chunk));\n if(err) return;\n this.options.columns = columns;\n }\n }\n // Emit the header\n if(this.info.records === 0){\n this.bom(push);\n const err = this.headers(push);\n if(err) return err;\n }\n // Emit and stringify the record if an object or an array\n try{\n // this.emit('record', chunk, this.info.records);\n if(this.options.on_record){\n this.options.on_record(chunk, this.info.records);\n }\n }catch(err){\n return err;\n }\n // Convert the record into a string\n let err, chunk_string;\n if(this.options.eof){\n [err, chunk_string] = this.stringify(chunk);\n if(err) return err;\n if(chunk_string === undefined){\n return;\n }else {\n chunk_string = chunk_string + this.options.record_delimiter;\n }\n }else {\n [err, chunk_string] = this.stringify(chunk);\n if(err) return err;\n if(chunk_string === undefined){\n return;\n }else {\n if(this.options.header || this.info.records){\n chunk_string = this.options.record_delimiter + chunk_string;\n }\n }\n }\n // Emit the csv\n this.info.records++;\n push(chunk_string);\n },\n stringify: function(chunk, chunkIsHeader=false){\n if(typeof chunk !== 'object'){\n return [undefined, chunk];\n }\n const {columns} = this.options;\n const record = [];\n // Record is an array\n if(Array.isArray(chunk)){\n // We are getting an array but the user has specified output columns. In\n // this case, we respect the columns indexes\n if(columns){\n chunk.splice(columns.length);\n }\n // Cast record elements\n for(let i=0; i {\n if(typeof quoted_match === 'string'){\n return value.indexOf(quoted_match) !== -1;\n }else {\n return quoted_match.test(value);\n }\n });\n quotedMatch = quotedMatch && quotedMatch.length > 0;\n const shouldQuote = quotedMatch || true === quoted_empty ||\n (true === quoted_string && false !== quoted_empty);\n if(shouldQuote === true){\n value = quote + value + quote;\n }\n csvrecord += value;\n }else if(value){\n if(typeof value !== 'string'){\n return [Error(`Formatter must return a string, null or undefined, got ${JSON.stringify(value)}`)];\n }\n const containsdelimiter = delimiter.length && value.indexOf(delimiter) >= 0;\n const containsQuote = (quote !== '') && value.indexOf(quote) >= 0;\n const containsEscape = value.indexOf(escape) >= 0 && (escape !== quote);\n const containsRecordDelimiter = value.indexOf(record_delimiter) >= 0;\n const quotedString = quoted_string && typeof field === 'string';\n let quotedMatch = quoted_match && quoted_match.filter(quoted_match => {\n if(typeof quoted_match === 'string'){\n return value.indexOf(quoted_match) !== -1;\n }else {\n return quoted_match.test(value);\n }\n });\n quotedMatch = quotedMatch && quotedMatch.length > 0;\n // See https://github.com/adaltas/node-csv/pull/387\n // More about CSV injection or formula injection, when websites embed\n // untrusted input inside CSV files:\n // https://owasp.org/www-community/attacks/CSV_Injection\n // http://georgemauer.net/2017/10/07/csv-injection.html\n // Apple Numbers unicode normalization is empirical from testing\n if (escape_formulas) {\n switch (value[0]) {\n case '=':\n case '+':\n case '-':\n case '@':\n case '\\t':\n case '\\r':\n case '\\uFF1D': // Unicode '='\n case '\\uFF0B': // Unicode '+'\n case '\\uFF0D': // Unicode '-'\n case '\\uFF20': // Unicode '@'\n value = `'${value}`;\n break;\n }\n }\n const shouldQuote = containsQuote === true || containsdelimiter || containsRecordDelimiter || quoted || quotedString || quotedMatch;\n if(shouldQuote === true && containsEscape === true){\n const regexp = escape === '\\\\'\n ? new RegExp(escape + escape, 'g')\n : new RegExp(escape, 'g');\n value = value.replace(regexp, escape + escape);\n }\n if(containsQuote === true){\n const regexp = new RegExp(quote,'g');\n value = value.replace(regexp, escape + quote);\n }\n if(shouldQuote === true){\n value = quote + value + quote;\n }\n csvrecord += value;\n }else if(quoted_empty === true || (field === '' && quoted_string === true && quoted_empty !== false)){\n csvrecord += quote + quote;\n }\n if(i !== record.length - 1){\n csvrecord += delimiter;\n }\n }\n return [undefined, csvrecord];\n },\n bom: function(push){\n if(this.options.bom !== true){\n return;\n }\n push(bom_utf8);\n },\n headers: function(push){\n if(this.options.header === false){\n return;\n }\n if(this.options.columns === undefined){\n return;\n }\n let err;\n let headers = this.options.columns.map(column => column.header);\n if(this.options.eof){\n [err, headers] = this.stringify(headers, true);\n headers += this.options.record_delimiter;\n }else {\n [err, headers] = this.stringify(headers);\n }\n if(err) return err;\n push(headers);\n },\n __cast: function(value, context){\n const type = typeof value;\n try{\n if(type === 'string'){ // Fine for 99% of the cases\n return [undefined, this.options.cast.string(value, context)];\n }else if(type === 'bigint'){\n return [undefined, this.options.cast.bigint(value, context)];\n }else if(type === 'number'){\n return [undefined, this.options.cast.number(value, context)];\n }else if(type === 'boolean'){\n return [undefined, this.options.cast.boolean(value, context)];\n }else if(value instanceof Date){\n return [undefined, this.options.cast.date(value, context)];\n }else if(type === 'object' && value !== null){\n return [undefined, this.options.cast.object(value, context)];\n }else {\n return [undefined, value, value];\n }\n }catch(err){\n return [err];\n }\n }\n };\n};\n\nconst stringify = function(records, opts={}){\n const data = [];\n const [err, options] = normalize_options(opts);\n if(err !== undefined) throw err;\n const state = {\n stop: false\n };\n // Information\n const info = {\n records: 0\n };\n const api = stringifier(options, state, info);\n for(const record of records){\n const err = api.__transform(record, function(record){\n data.push(record);\n });\n if(err !== undefined) throw err;\n }\n if(data.length === 0){\n api.bom((d) => {\n data.push(d);\n });\n const err = api.headers((headers) => {\n data.push(headers);\n });\n if(err !== undefined) throw err;\n }\n return data.join('');\n};\n\nexport { stringify };\n","import tableStyles from \"./BaseTable.module.css\";\nimport Filter from \"./BaseTableFilter\";\nimport {\n ColumnDef,\n Header,\n HeaderGroup,\n PaginationInitialTableState,\n Table as ReactTable,\n SortingTableState,\n VisibilityTableState,\n flexRender,\n getCoreRowModel,\n getFacetedMinMaxValues,\n getFacetedRowModel,\n getFacetedUniqueValues,\n getFilteredRowModel,\n getPaginationRowModel,\n getSortedRowModel,\n useReactTable,\n} from \"@tanstack/react-table\";\nimport { stringify } from \"csv-stringify/browser/esm/sync\";\nimport {\n Button,\n ButtonGroup,\n ButtonToolbar,\n Dropdown,\n OverlayTrigger,\n SplitButton,\n Table,\n Tooltip,\n} from \"react-bootstrap\";\nimport { useLocation } from \"react-router-dom\";\n\nfunction MyTooltip(message: string) {\n return {message};\n}\n\nconst exportToCSV = (table: ReactTable, exportFileName: string) => {\n const { rows } = table.getCoreRowModel();\n\n const headerRows = table.getHeaderGroups().map((headerGroup: HeaderGroup) => {\n return headerGroup.headers.map((header: Header) => {\n return header.column.columnDef.header;\n });\n });\n\n const csvData = rows.map((row: any) => {\n return row.getVisibleCells().map((cell: any) => {\n return cell.getValue();\n });\n });\n console.log(headerRows, csvData);\n const csv = stringify([...headerRows, ...csvData]);\n const fileType = \"csv\";\n const blob = new Blob([csv], {\n type: `text/${fileType};charset=utf8;`,\n });\n\n // spoof a download\n const link = document.createElement(\"a\");\n link.download = exportFileName;\n link.href = URL.createObjectURL(blob);\n\n // Ensure the link isn't visible to the user or cause layout shifts.\n link.setAttribute(\"visibility\", \"hidden\");\n\n // Add to document body, click and remove it.\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n};\n\n// function strToKey(keyString: string, ob: object) {\n// return keyString.split(\".\").reduce(function (p: any, prop: any) {\n// return p[prop];\n// }, ob);\n// }\n\ntype tableInitialState = SortingTableState & VisibilityTableState & PaginationInitialTableState;\n\nexport interface BaseTableProps extends Partial {\n isLoading?: boolean;\n isFetching?: boolean;\n debugTable?: boolean;\n striped?: boolean;\n data?: any;\n error?: boolean;\n hover?: boolean;\n columns: ColumnDef[];\n asyncExpandFunction?: any;\n initialState?: tableInitialState;\n exportFileName?: String;\n}\n\ninterface _BaseTableProps extends BaseTableProps {\n table: ReactTable;\n}\n\nconst BaseTable = ({\n // isLoading = false,\n isFetching = false,\n debugTable = false,\n data = [],\n // error = false,\n columns,\n // asyncExpandFunction = undefined,\n striped = false,\n hover = false,\n initialState = undefined,\n exportFileName = undefined,\n}: BaseTableProps) => {\n const table = useReactTable({\n data,\n columns,\n // Pipeline\n getCoreRowModel: getCoreRowModel(),\n getFilteredRowModel: getFilteredRowModel(),\n getSortedRowModel: getSortedRowModel(),\n getPaginationRowModel: getPaginationRowModel(),\n getFacetedRowModel: getFacetedRowModel(),\n getFacetedUniqueValues: getFacetedUniqueValues(),\n getFacetedMinMaxValues: getFacetedMinMaxValues(),\n //\n debugTable: debugTable,\n // state: initialState,\n });\n\n return (\n <_baseTable\n {...{\n table,\n data,\n columns,\n isFetching,\n debugTable,\n initialState,\n striped,\n hover,\n exportFileName,\n }}\n />\n );\n};\n\nfunction _baseTable({\n table,\n isFetching = false,\n striped = false,\n hover = false,\n debugTable = false,\n exportFileName = undefined,\n}: _BaseTableProps) {\n const { rows } = table.getRowModel();\n const location = useLocation();\n const fileName =\n typeof exportFileName !== \"undefined\" ? exportFileName : `ExportedData_${location.pathname}`;\n return (\n <>\n \n \n {table.getHeaderGroups().map((headerGroup: HeaderGroup) => (\n <>\n \n {headerGroup.headers.map((header: Header) => {\n return (\n \n );\n })}\n \n \n {headerGroup.headers.map((header) => {\n return (\n \n );\n })}\n \n \n ))}\n \n \n {rows.map((row) => {\n return (\n \n {row.getVisibleCells().map((cell) => {\n return (\n \n );\n })}\n \n );\n })}\n \n
\n {header.isPlaceholder ? null : (\n \n {header.column.getCanSort() ? (\n
\n {{\n asc: ,\n desc: ,\n }[header.column.getIsSorted() as string] ?? (\n \n )}\n
\n ) : null}\n
\n {flexRender(header.column.columnDef.header, header.getContext())}\n
\n \n )}\n
\n {header.column.getCanFilter() && rows.length >= 0 ? (\n \n ) : (\n <>\n )}\n
\n {flexRender(cell.column.columnDef.cell, cell.getContext())}\n
\n
\n \n \n {isFetching ? (\n \n \n \n ) : (\n \n \n \n )}\n {\" \"}\n \n\n \n \n table.setPageIndex(0)}\n disabled={!table.getCanPreviousPage()}\n >\n \n {\" \"}\n table.previousPage()}\n disabled={!table.getCanPreviousPage()}\n >\n \n {\" \"}\n table.nextPage()}\n disabled={!table.getCanNextPage()}\n >\n \n \n table.setPageIndex(table.getPageCount() - 1)}\n disabled={!table.getCanNextPage()}\n >\n \n \n \n\n \n {\" \"}\n \n {[10, 50, 100, 1000000].map((_pageSize) => (\n {\n console.log(eventKey.target.id);\n table.setPageSize(Number(eventKey.target.id));\n }}\n >\n Show {_pageSize}\n \n ))}\n \n \n \n
\n {debugTable && (\n
\n
{table.getRowModel().rows.length} Rows
\n
{JSON.stringify(table.getState(), null, 2)}
\n
\n )}\n \n );\n}\n// export all the base table modules\n\nexport default BaseTable; // Export the table\n","import BaseTable from \"../Tables/BaseTable/BaseTable\";\nimport { createColumnHelper } from \"@tanstack/react-table\";\n\ntype Character = {\n character_name: string;\n corporation_name: string;\n alliance_name: string;\n};\n\ntype BaseItemType = {\n id: number;\n name: string;\n cat: string;\n};\n\ntype AssetType = {\n character: Character;\n item: BaseItemType;\n location: BaseItemType;\n active: boolean;\n quantity: number;\n};\n\nconst CharacterAssetTable = ({ data, isFetching }: { data: any; isFetching: boolean }) => {\n const columnHelper = createColumnHelper();\n\n const columns = [\n columnHelper.accessor(\"character.character_name\", {\n header: \"Character\",\n }),\n columnHelper.accessor(\"item.name\", {\n header: \"Type\",\n }),\n columnHelper.accessor(\"item.cat\", {\n header: \"Category\",\n }),\n columnHelper.accessor(\"quantity\", {\n header: \"Quantity\",\n }),\n columnHelper.accessor(\"location.name\", {\n header: \"Location\",\n }),\n ];\n\n return ;\n};\n\nexport default CharacterAssetTable;\n","import CharacterAssetLocationSelect from \"../../Components/Character/CharacterAssetLocationSelect\";\nimport CharacterAssetTable from \"../../Components/Character/CharacterAssetsTable\";\nimport { loadAssetList } from \"../../api/character\";\nimport { useState } from \"react\";\nimport { Card } from \"react-bootstrap\";\nimport { useQuery } from \"react-query\";\nimport { useParams } from \"react-router-dom\";\n\nconst CharacterAssets = () => {\n const { characterID } = useParams();\n\n const [location_id, setLocation] = useState(0);\n\n const { data, isFetching } = useQuery({\n queryKey: [\"assetList\", characterID, location_id],\n queryFn: () => loadAssetList(Number(characterID), location_id),\n refetchOnWindowFocus: false,\n initialData: { characters: [], main: undefined, headers: [] },\n });\n\n return (\n <>\n Location Filter\n
\n \n
\n \n \n );\n};\n\nexport default CharacterAssets;\n","import { postAccountRefresh } from \"../api/character\";\nimport styles from \"./RefreshAccountButton.module.css\";\nimport Button from \"react-bootstrap/Button\";\nimport { useQuery } from \"react-query\";\nimport { useParams } from \"react-router-dom\";\n\nexport const RefreshCharButton = () => {\n const { characterID } = useParams();\n\n const { refetch, isFetching } = useQuery(\n \"my_key\",\n () => {\n return postAccountRefresh(characterID? Number(characterID): 0);\n },\n {\n refetchOnWindowFocus: false,\n enabled: false, // disable this query from automatically running\n }\n );\n async function refreshChar() {\n return await refetch();\n }\n\n return (\n \n );\n};\n","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n","var core = module.exports = { version: '2.6.12' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n","module.exports = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n","// optional / simple context binding\nvar aFunction = require('./_a-function');\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","var isObject = require('./_is-object');\nmodule.exports = function (it) {\n if (!isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n","var isObject = require('./_is-object');\nvar document = require('./_global').document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return is ? document.createElement(it) : {};\n};\n","module.exports = !require('./_descriptors') && !require('./_fails')(function () {\n return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n","// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","var anObject = require('./_an-object');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar toPrimitive = require('./_to-primitive');\nvar dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","var dP = require('./_object-dp');\nvar createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n","var global = require('./_global');\nvar core = require('./_core');\nvar ctx = require('./_ctx');\nvar hide = require('./_hide');\nvar has = require('./_has');\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var IS_WRAP = type & $export.W;\n var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n var expProto = exports[PROTOTYPE];\n var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];\n var key, own, out;\n if (IS_GLOBAL) source = name;\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n if (own && has(exports, key)) continue;\n // export native or passed\n out = own ? target[key] : source[key];\n // prevent global pollution for namespaces\n exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]\n // bind timers to global for call from export context\n : IS_BIND && own ? ctx(out, global)\n // wrap global constructors for prevent change them in library\n : IS_WRAP && target[key] == out ? (function (C) {\n var F = function (a, b, c) {\n if (this instanceof C) {\n switch (arguments.length) {\n case 0: return new C();\n case 1: return new C(a);\n case 2: return new C(a, b);\n } return new C(a, b, c);\n } return C.apply(this, arguments);\n };\n F[PROTOTYPE] = C[PROTOTYPE];\n return F;\n // make static versions for prototype methods\n })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%\n if (IS_PROTO) {\n (exports.virtual || (exports.virtual = {}))[key] = out;\n // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%\n if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);\n }\n }\n};\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library`\nmodule.exports = $export;\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = require('./_cof');\n// eslint-disable-next-line no-prototype-builtins\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n","// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = require('./_iobject');\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return IObject(defined(it));\n};\n","// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\nmodule.exports = function (it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n","// 7.1.15 ToLength\nvar toInteger = require('./_to-integer');\nvar min = Math.min;\nmodule.exports = function (it) {\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n","var toInteger = require('./_to-integer');\nvar max = Math.max;\nvar min = Math.min;\nmodule.exports = function (index, length) {\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};\n","// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = require('./_to-iobject');\nvar toLength = require('./_to-length');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nmodule.exports = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n","var core = require('./_core');\nvar global = require('./_global');\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || (global[SHARED] = {});\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: core.version,\n mode: require('./_library') ? 'pure' : 'global',\n copyright: '© 2020 Denis Pushkarev (zloirock.ru)'\n});\n","var id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n","var shared = require('./_shared')('keys');\nvar uid = require('./_uid');\nmodule.exports = function (key) {\n return shared[key] || (shared[key] = uid(key));\n};\n","var has = require('./_has');\nvar toIObject = require('./_to-iobject');\nvar arrayIndexOf = require('./_array-includes')(false);\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\n\nmodule.exports = function (object, names) {\n var O = toIObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};\n","// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n","// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = require('./_object-keys-internal');\nvar enumBugKeys = require('./_enum-bug-keys');\n\nmodule.exports = Object.keys || function keys(O) {\n return $keys(O, enumBugKeys);\n};\n","exports.f = Object.getOwnPropertySymbols;\n","exports.f = {}.propertyIsEnumerable;\n","// 7.1.13 ToObject(argument)\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return Object(defined(it));\n};\n","'use strict';\n// 19.1.2.1 Object.assign(target, source, ...)\nvar DESCRIPTORS = require('./_descriptors');\nvar getKeys = require('./_object-keys');\nvar gOPS = require('./_object-gops');\nvar pIE = require('./_object-pie');\nvar toObject = require('./_to-object');\nvar IObject = require('./_iobject');\nvar $assign = Object.assign;\n\n// should work with symbols and should have deterministic property order (V8 bug)\nmodule.exports = !$assign || require('./_fails')(function () {\n var A = {};\n var B = {};\n // eslint-disable-next-line no-undef\n var S = Symbol();\n var K = 'abcdefghijklmnopqrst';\n A[S] = 7;\n K.split('').forEach(function (k) { B[k] = k; });\n return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars\n var T = toObject(target);\n var aLen = arguments.length;\n var index = 1;\n var getSymbols = gOPS.f;\n var isEnum = pIE.f;\n while (aLen > index) {\n var S = IObject(arguments[index++]);\n var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) {\n key = keys[j++];\n if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key];\n }\n } return T;\n} : $assign;\n","// 19.1.3.1 Object.assign(target, source)\nvar $export = require('./_export');\n\n$export($export.S + $export.F, 'Object', { assign: require('./_object-assign') });\n","require('../../modules/es6.object.assign');\nmodule.exports = require('../../modules/_core').Object.assign;\n","import _Object$assign from \"core-js/library/fn/object/assign.js\";\nfunction _extends() {\n return _extends = _Object$assign ? _Object$assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, _extends.apply(null, arguments);\n}\nexport { _extends as default };","var dP = require('./_object-dp');\nvar anObject = require('./_an-object');\nvar getKeys = require('./_object-keys');\n\nmodule.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = getKeys(Properties);\n var length = keys.length;\n var i = 0;\n var P;\n while (length > i) dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};\n","var document = require('./_global').document;\nmodule.exports = document && document.documentElement;\n","// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = require('./_an-object');\nvar dPs = require('./_object-dps');\nvar enumBugKeys = require('./_enum-bug-keys');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar Empty = function () { /* empty */ };\nvar PROTOTYPE = 'prototype';\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = require('./_dom-create')('iframe');\n var i = enumBugKeys.length;\n var lt = '<';\n var gt = '>';\n var iframeDocument;\n iframe.style.display = 'none';\n require('./_html').appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];\n return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty();\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : dPs(result, Properties);\n};\n","var $export = require('./_export');\n// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\n$export($export.S, 'Object', { create: require('./_object-create') });\n","require('../../modules/es6.object.create');\nvar $Object = require('../../modules/_core').Object;\nmodule.exports = function create(P, D) {\n return $Object.create(P, D);\n};\n","var pIE = require('./_object-pie');\nvar createDesc = require('./_property-desc');\nvar toIObject = require('./_to-iobject');\nvar toPrimitive = require('./_to-primitive');\nvar has = require('./_has');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nexports.f = require('./_descriptors') ? gOPD : function getOwnPropertyDescriptor(O, P) {\n O = toIObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return gOPD(O, P);\n } catch (e) { /* empty */ }\n if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);\n};\n","// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nvar isObject = require('./_is-object');\nvar anObject = require('./_an-object');\nvar check = function (O, proto) {\n anObject(O);\n if (!isObject(proto) && proto !== null) throw TypeError(proto + \": can't set as prototype!\");\n};\nmodule.exports = {\n set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n function (test, buggy, set) {\n try {\n set = require('./_ctx')(Function.call, require('./_object-gopd').f(Object.prototype, '__proto__').set, 2);\n set(test, []);\n buggy = !(test instanceof Array);\n } catch (e) { buggy = true; }\n return function setPrototypeOf(O, proto) {\n check(O, proto);\n if (buggy) O.__proto__ = proto;\n else set(O, proto);\n return O;\n };\n }({}, false) : undefined),\n check: check\n};\n","// 19.1.3.19 Object.setPrototypeOf(O, proto)\nvar $export = require('./_export');\n$export($export.S, 'Object', { setPrototypeOf: require('./_set-proto').set });\n","require('../../modules/es6.object.set-prototype-of');\nmodule.exports = require('../../modules/_core').Object.setPrototypeOf;\n","import _Object$setPrototypeOf from \"core-js/library/fn/object/set-prototype-of.js\";\nfunction _setPrototypeOf(t, e) {\n return _setPrototypeOf = _Object$setPrototypeOf ? _Object$setPrototypeOf.bind() : function (t, e) {\n return t.__proto__ = e, t;\n }, _setPrototypeOf(t, e);\n}\nexport { _setPrototypeOf as default };","import _Object$create from \"core-js/library/fn/object/create.js\";\nimport setPrototypeOf from \"./setPrototypeOf.js\";\nfunction _inheritsLoose(t, o) {\n t.prototype = _Object$create(o.prototype), t.prototype.constructor = t, setPrototypeOf(t, o);\n}\nexport { _inheritsLoose as default };","function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (e.indexOf(n) >= 0) continue;\n t[n] = r[n];\n }\n return t;\n}\nexport { _objectWithoutPropertiesLoose as default };","var DESCRIPTORS = require('./_descriptors');\nvar getKeys = require('./_object-keys');\nvar toIObject = require('./_to-iobject');\nvar isEnum = require('./_object-pie').f;\nmodule.exports = function (isEntries) {\n return function (it) {\n var O = toIObject(it);\n var keys = getKeys(O);\n var length = keys.length;\n var i = 0;\n var result = [];\n var key;\n while (length > i) {\n key = keys[i++];\n if (!DESCRIPTORS || isEnum.call(O, key)) {\n result.push(isEntries ? [key, O[key]] : O[key]);\n }\n }\n return result;\n };\n};\n","// https://github.com/tc39/proposal-object-values-entries\nvar $export = require('./_export');\nvar $entries = require('./_object-to-array')(true);\n\n$export($export.S, 'Object', {\n entries: function entries(it) {\n return $entries(it);\n }\n});\n","require('../../modules/es7.object.entries');\nmodule.exports = require('../../modules/_core').Object.entries;\n","module.exports = require(\"core-js/library/fn/object/entries\");","import _Object$entries from \"@babel/runtime-corejs2/core-js/object/entries\";\nimport _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\n// TODO: The publicly exposed parts of this should be in lib/BootstrapUtils.\nimport invariant from 'invariant';\nimport PropTypes from 'prop-types';\nimport { SIZE_MAP } from './StyleConfig';\n\nfunction curry(fn) {\n return function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var last = args[args.length - 1];\n\n if (typeof last === 'function') {\n return fn.apply(void 0, args);\n }\n\n return function (Component) {\n return fn.apply(void 0, args.concat([Component]));\n };\n };\n}\n\nexport function prefix(props, variant) {\n var bsClass = (props.bsClass || '').trim();\n !(bsClass != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'A `bsClass` prop is required for this component') : invariant(false) : void 0;\n return bsClass + (variant ? \"-\" + variant : '');\n}\nexport var bsClass = curry(function (defaultClass, Component) {\n var propTypes = Component.propTypes || (Component.propTypes = {});\n var defaultProps = Component.defaultProps || (Component.defaultProps = {});\n propTypes.bsClass = PropTypes.string;\n defaultProps.bsClass = defaultClass;\n return Component;\n});\nexport var bsStyles = curry(function (styles, defaultStyle, Component) {\n if (typeof defaultStyle !== 'string') {\n Component = defaultStyle;\n defaultStyle = undefined;\n }\n\n var existing = Component.STYLES || [];\n var propTypes = Component.propTypes || {};\n styles.forEach(function (style) {\n if (existing.indexOf(style) === -1) {\n existing.push(style);\n }\n });\n var propType = PropTypes.oneOf(existing); // expose the values on the propType function for documentation\n\n Component.STYLES = existing;\n propType._values = existing;\n Component.propTypes = _extends({}, propTypes, {\n bsStyle: propType\n });\n\n if (defaultStyle !== undefined) {\n var defaultProps = Component.defaultProps || (Component.defaultProps = {});\n defaultProps.bsStyle = defaultStyle;\n }\n\n return Component;\n});\nexport var bsSizes = curry(function (sizes, defaultSize, Component) {\n if (typeof defaultSize !== 'string') {\n Component = defaultSize;\n defaultSize = undefined;\n }\n\n var existing = Component.SIZES || [];\n var propTypes = Component.propTypes || {};\n sizes.forEach(function (size) {\n if (existing.indexOf(size) === -1) {\n existing.push(size);\n }\n });\n var values = [];\n existing.forEach(function (size) {\n var mappedSize = SIZE_MAP[size];\n\n if (mappedSize && mappedSize !== size) {\n values.push(mappedSize);\n }\n\n values.push(size);\n });\n var propType = PropTypes.oneOf(values);\n propType._values = values; // expose the values on the propType function for documentation\n\n Component.SIZES = existing;\n Component.propTypes = _extends({}, propTypes, {\n bsSize: propType\n });\n\n if (defaultSize !== undefined) {\n if (!Component.defaultProps) {\n Component.defaultProps = {};\n }\n\n Component.defaultProps.bsSize = defaultSize;\n }\n\n return Component;\n});\nexport function getClassSet(props) {\n var _classes;\n\n var classes = (_classes = {}, _classes[prefix(props)] = true, _classes);\n\n if (props.bsSize) {\n var bsSize = SIZE_MAP[props.bsSize] || props.bsSize;\n classes[prefix(props, bsSize)] = true;\n }\n\n if (props.bsStyle) {\n classes[prefix(props, props.bsStyle)] = true;\n }\n\n return classes;\n}\n\nfunction getBsProps(props) {\n return {\n bsClass: props.bsClass,\n bsSize: props.bsSize,\n bsStyle: props.bsStyle,\n bsRole: props.bsRole\n };\n}\n\nfunction isBsProp(propName) {\n return propName === 'bsClass' || propName === 'bsSize' || propName === 'bsStyle' || propName === 'bsRole';\n}\n\nexport function splitBsProps(props) {\n var elementProps = {};\n\n _Object$entries(props).forEach(function (_ref) {\n var propName = _ref[0],\n propValue = _ref[1];\n\n if (!isBsProp(propName)) {\n elementProps[propName] = propValue;\n }\n });\n\n return [getBsProps(props), elementProps];\n}\nexport function splitBsPropsAndOmit(props, omittedPropNames) {\n var isOmittedProp = {};\n omittedPropNames.forEach(function (propName) {\n isOmittedProp[propName] = true;\n });\n var elementProps = {};\n\n _Object$entries(props).forEach(function (_ref2) {\n var propName = _ref2[0],\n propValue = _ref2[1];\n\n if (!isBsProp(propName) && !isOmittedProp[propName]) {\n elementProps[propName] = propValue;\n }\n });\n\n return [getBsProps(props), elementProps];\n}\n/**\n * Add a style variant to a Component. Mutates the propTypes of the component\n * in order to validate the new variant.\n */\n\nexport function addStyle(Component) {\n for (var _len2 = arguments.length, styleVariant = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n styleVariant[_key2 - 1] = arguments[_key2];\n }\n\n bsStyles(styleVariant)(Component);\n}\nexport var _curry = curry;","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { bsClass, prefix, splitBsProps } from './utils/bootstrapUtils';\nvar propTypes = {\n /**\n * Sets image as responsive image\n */\n responsive: PropTypes.bool,\n\n /**\n * Sets image shape as rounded\n */\n rounded: PropTypes.bool,\n\n /**\n * Sets image shape as circle\n */\n circle: PropTypes.bool,\n\n /**\n * Sets image shape as thumbnail\n */\n thumbnail: PropTypes.bool\n};\nvar defaultProps = {\n responsive: false,\n rounded: false,\n circle: false,\n thumbnail: false\n};\n\nvar Image =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Image, _React$Component);\n\n function Image() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = Image.prototype;\n\n _proto.render = function render() {\n var _classes;\n\n var _this$props = this.props,\n responsive = _this$props.responsive,\n rounded = _this$props.rounded,\n circle = _this$props.circle,\n thumbnail = _this$props.thumbnail,\n className = _this$props.className,\n props = _objectWithoutPropertiesLoose(_this$props, [\"responsive\", \"rounded\", \"circle\", \"thumbnail\", \"className\"]);\n\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = (_classes = {}, _classes[prefix(bsProps, 'responsive')] = responsive, _classes[prefix(bsProps, 'rounded')] = rounded, _classes[prefix(bsProps, 'circle')] = circle, _classes[prefix(bsProps, 'thumbnail')] = thumbnail, _classes);\n return React.createElement(\"img\", _extends({}, elementProps, {\n className: classNames(className, classes)\n }));\n };\n\n return Image;\n}(React.Component);\n\nImage.propTypes = propTypes;\nImage.defaultProps = defaultProps;\nexport default bsClass('img', Image);","import React, { useState } from 'react';\nimport { Button, Image, Table, Glyphicon, ButtonToolbar, ButtonGroup, SplitButton, MenuItem, OverlayTrigger, Popover, Tooltip } from 'react-bootstrap';\nimport { useReactTable, getCoreRowModel, getFilteredRowModel, getSortedRowModel, getPaginationRowModel, getFacetedRowModel, getFacetedUniqueValues, getFacetedMinMaxValues, flexRender } from '@tanstack/react-table';\nimport Select from 'react-select';\n\nfunction ZKillButton(props) {\n return (React.createElement(Button, { target: \"_blank\", rel: \"noopener noreferrer\", disabled: props.character_name ? false : true, alt: \"zKillboard\", href: `https://zkillboard.com/search/${props.character_name}/` },\n React.createElement(\"span\", { className: \"fa-stack fas\", style: { lineHeight: \"1em\", height: \"1em\", width: \"1em\" } },\n React.createElement(\"i\", { className: \"fas fa-sort-down\" }),\n React.createElement(\"i\", { className: \"fas fa-minus fa-stack-1x\", style: { top: \"-3px\" } }))));\n}\n\nfunction EveWhoButton(props) {\n return (React.createElement(Button, { target: \"_blank\", rel: \"noopener noreferrer\", disabled: props.character_id ? false : true, alt: \"Eve Who\", href: `https://evewho.com/character/${props.character_id}/` },\n React.createElement(\"i\", { className: \"fas fa-user\" })));\n}\n\nconst CharacterPortrait = (props) => {\n return (React.createElement(Image, { height: props.height && props.height, width: props.width && props.width, style: props.style && props.style, src: `https://images.evetech.net/characters/${props.character_id}/portrait?size=${props.size}` }));\n};\nconst CorporationLogo = (props) => {\n return (React.createElement(Image, { height: props.height && props.height, width: props.width && props.width, style: props.style && props.style, src: `https://images.evetech.net/corporations/${props.corporation_id}/logo?size=${props.size}` }));\n};\nconst AllianceLogo = (props) => {\n return (React.createElement(Image, { height: props.height && props.height, width: props.width && props.width, style: props.style && props.style, src: `https://images.evetech.net/alliances/${props.alliance_id}/logo?size=${props.size}` }));\n};\nconst TypeIcon = (props) => {\n return (React.createElement(Image, { height: props.height && props.height, width: props.width && props.width, style: props.style && props.style, src: `https://images.evetech.net/types/${props.type_id}/${props.size > 64 ? \"render\" : \"icon\"}?size=${props.size}` }));\n};\n\nfunction styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nvar css_248z$1 = \".Loader-module_flexContainer__GlMdi {\\n margin-top: 150px;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n align-content: center;\\n flex-wrap: wrap;\\n flex-direction: row;\\n}\\n\\n@keyframes Loader-module_shake__1mapc {\\n 10%,\\n 90% {\\n transform: translate3d(-1px, 0, 0);\\n }\\n\\n 20%,\\n 80% {\\n transform: translate3d(2px, 0, 0);\\n }\\n\\n 30%,\\n 50%,\\n 70% {\\n transform: translate3d(-4px, 0, 0);\\n }\\n\\n 40%,\\n 60% {\\n transform: translate3d(4px, 0, 0);\\n }\\n}\\n\\n.Loader-module_errorAnim__h3bUy {\\n animation: Loader-module_shake__1mapc 0.82s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;\\n animation-iteration-count: infinite;\\n}\\n\\n.Loader-module_ldsDualRing__EJnqD {\\n display: inline-block;\\n width: 80px;\\n height: 80px;\\n}\\n\\n.Loader-module_ldsDualRing__EJnqD:after {\\n content: \\\" \\\";\\n display: block;\\n width: 64px;\\n height: 64px;\\n margin: 8px;\\n border-radius: 50%;\\n border-width: 6px;\\n border-style: solid;\\n border-left-color: inherit;\\n border-top-color: transparent;\\n border-right-color: inherit;\\n border-bottom-color: transparent;\\n animation: Loader-module_lds-dual-ring__4SWmn 1.2s linear infinite;\\n}\\n\\n@keyframes Loader-module_lds-dual-ring__4SWmn {\\n 0% {\\n transform: rotate(0deg);\\n }\\n 100% {\\n transform: rotate(360deg);\\n }\\n}\\n\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkxvYWRlci5tb2R1bGUuY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsaUJBQWlCO0VBQ2pCLGFBQWE7RUFDYixtQkFBbUI7RUFDbkIsdUJBQXVCO0VBQ3ZCLHFCQUFxQjtFQUNyQixlQUFlO0VBQ2YsbUJBQW1CO0FBQ3JCOztBQUVBO0VBQ0U7O0lBRUUsa0NBQWtDO0VBQ3BDOztFQUVBOztJQUVFLGlDQUFpQztFQUNuQzs7RUFFQTs7O0lBR0Usa0NBQWtDO0VBQ3BDOztFQUVBOztJQUVFLGlDQUFpQztFQUNuQztBQUNGOztBQUVBO0VBQ0UscUZBQWdFO0VBQ2hFLG1DQUFtQztBQUNyQzs7QUFFQTtFQUNFLHFCQUFxQjtFQUNyQixXQUFXO0VBQ1gsWUFBWTtBQUNkOztBQUVBO0VBQ0UsWUFBWTtFQUNaLGNBQWM7RUFDZCxXQUFXO0VBQ1gsWUFBWTtFQUNaLFdBQVc7RUFDWCxrQkFBa0I7RUFDbEIsaUJBQWlCO0VBQ2pCLG1CQUFtQjtFQUNuQiwwQkFBMEI7RUFDMUIsNkJBQTZCO0VBQzdCLDJCQUEyQjtFQUMzQixnQ0FBZ0M7RUFDaEMsa0VBQTZDO0FBQy9DOztBQUVBO0VBQ0U7SUFDRSx1QkFBdUI7RUFDekI7RUFDQTtJQUNFLHlCQUF5QjtFQUMzQjtBQUNGIiwiZmlsZSI6IkxvYWRlci5tb2R1bGUuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmZsZXhDb250YWluZXIge1xuICBtYXJnaW4tdG9wOiAxNTBweDtcbiAgZGlzcGxheTogZmxleDtcbiAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG4gIGFsaWduLWNvbnRlbnQ6IGNlbnRlcjtcbiAgZmxleC13cmFwOiB3cmFwO1xuICBmbGV4LWRpcmVjdGlvbjogcm93O1xufVxuXG5Aa2V5ZnJhbWVzIHNoYWtlIHtcbiAgMTAlLFxuICA5MCUge1xuICAgIHRyYW5zZm9ybTogdHJhbnNsYXRlM2QoLTFweCwgMCwgMCk7XG4gIH1cblxuICAyMCUsXG4gIDgwJSB7XG4gICAgdHJhbnNmb3JtOiB0cmFuc2xhdGUzZCgycHgsIDAsIDApO1xuICB9XG5cbiAgMzAlLFxuICA1MCUsXG4gIDcwJSB7XG4gICAgdHJhbnNmb3JtOiB0cmFuc2xhdGUzZCgtNHB4LCAwLCAwKTtcbiAgfVxuXG4gIDQwJSxcbiAgNjAlIHtcbiAgICB0cmFuc2Zvcm06IHRyYW5zbGF0ZTNkKDRweCwgMCwgMCk7XG4gIH1cbn1cblxuLmVycm9yQW5pbSB7XG4gIGFuaW1hdGlvbjogc2hha2UgMC44MnMgY3ViaWMtYmV6aWVyKDAuMzYsIDAuMDcsIDAuMTksIDAuOTcpIGJvdGg7XG4gIGFuaW1hdGlvbi1pdGVyYXRpb24tY291bnQ6IGluZmluaXRlO1xufVxuXG4ubGRzRHVhbFJpbmcge1xuICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XG4gIHdpZHRoOiA4MHB4O1xuICBoZWlnaHQ6IDgwcHg7XG59XG5cbi5sZHNEdWFsUmluZzphZnRlciB7XG4gIGNvbnRlbnQ6IFwiIFwiO1xuICBkaXNwbGF5OiBibG9jaztcbiAgd2lkdGg6IDY0cHg7XG4gIGhlaWdodDogNjRweDtcbiAgbWFyZ2luOiA4cHg7XG4gIGJvcmRlci1yYWRpdXM6IDUwJTtcbiAgYm9yZGVyLXdpZHRoOiA2cHg7XG4gIGJvcmRlci1zdHlsZTogc29saWQ7XG4gIGJvcmRlci1sZWZ0LWNvbG9yOiBpbmhlcml0O1xuICBib3JkZXItdG9wLWNvbG9yOiB0cmFuc3BhcmVudDtcbiAgYm9yZGVyLXJpZ2h0LWNvbG9yOiBpbmhlcml0O1xuICBib3JkZXItYm90dG9tLWNvbG9yOiB0cmFuc3BhcmVudDtcbiAgYW5pbWF0aW9uOiBsZHMtZHVhbC1yaW5nIDEuMnMgbGluZWFyIGluZmluaXRlO1xufVxuXG5Aa2V5ZnJhbWVzIGxkcy1kdWFsLXJpbmcge1xuICAwJSB7XG4gICAgdHJhbnNmb3JtOiByb3RhdGUoMGRlZyk7XG4gIH1cbiAgMTAwJSB7XG4gICAgdHJhbnNmb3JtOiByb3RhdGUoMzYwZGVnKTtcbiAgfVxufVxuIl19 */\";\nvar styles = {\"flexContainer\":\"Loader-module_flexContainer__GlMdi\",\"errorAnim\":\"Loader-module_errorAnim__h3bUy\",\"shake\":\"Loader-module_shake__1mapc\",\"ldsDualRing\":\"Loader-module_ldsDualRing__EJnqD\",\"lds-dual-ring\":\"Loader-module_lds-dual-ring__4SWmn\"};\nstyleInject(css_248z$1);\n\nconst PanelLoader = (props = { title: \"Loading...\" }) => {\n return (React.createElement(\"div\", { className: styles.flexContainer },\n React.createElement(\"div\", { className: \"text-center\" },\n React.createElement(\"div\", null,\n React.createElement(\"div\", { className: styles.ldsDualRing })),\n React.createElement(\"h3\", null, props.title && props.title),\n React.createElement(\"p\", null, props.message && props.message))));\n};\nconst ErrorLoader = (props = { title: \"Error Loading Component\" }) => {\n return (React.createElement(\"div\", { className: styles.flexContainer },\n React.createElement(\"div\", { className: \"text-center\" },\n React.createElement(\"div\", { className: styles.errorAnim },\n React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: \"100\", height: \"100\", fill: \"currentColor\", className: \"bi bi-exclamation-triangle\", viewBox: \"0 0 16 16\" },\n React.createElement(\"path\", { d: \"M7.938 2.016A.13.13 0 0 1 8.002 2a.13.13 0 0 1 .063.016.146.146 0 0 1 .054.057l6.857 11.667c.036.06.035.124.002.183a.163.163 0 0 1-.054.06.116.116 0 0 1-.066.017H1.146a.115.115 0 0 1-.066-.017.163.163 0 0 1-.054-.06.176.176 0 0 1 .002-.183L7.884 2.073a.147.147 0 0 1 .054-.057zm1.044-.45a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566z\" }),\n React.createElement(\"path\", { d: \"M7.002 12a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 5.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995z\" }))),\n React.createElement(\"h3\", null, props.title && props.title),\n React.createElement(\"p\", null, props.message && props.message),\n React.createElement(\"p\", null))));\n};\n\nvar css_248z = \"@keyframes BaseTable-module_spin__lpdYb {\\n from {\\n transform: rotate(0deg);\\n }\\n to {\\n transform: rotate(359deg);\\n }\\n}\\n\\n.BaseTable-module_glyphiconRefreshAnimate__HIIZm {\\n -animation: BaseTable-module_spin__lpdYb 2s infinite linear;\\n -ms-animation: BaseTable-module_spin__lpdYb 2s infinite linear;\\n -webkit-animation: BaseTable-module_spin__lpdYb 2s infinite linear;\\n -moz-animation: BaseTable-module_spin__lpdYb 2s infinite linear;\\n}\\n\\n.BaseTable-module_filterBtn__ODmli{\\n color: hsl(0, 0%, 50%) !important;\\n margin-top: 2px !important;\\n min-height: 38px !important;\\n background-color: white !important;\\n border-color: hsl(0, 0%, 80%) !important;\\n border-top-left-radius: 4px !important;\\n border-bottom-left-radius: 4px !important;\\n border-right: 0 !important;\\n border-width: 1px !important;\\n font-weight: bold !important;\\n display: flex !important;\\n font-size: 15px !important;\\n font-family: \\\"Lato\\\",\\\"Helvetica Neue\\\",Helvetica,Arial,sans-serif !important;\\n}\\n\\n.BaseTable-module_filterToggle__tmPmV{\\n stroke: hsl(0, 0%, 80%) !important;\\n fill: hsl(0, 0%, 80%) !important;\\n stroke-width: 0;\\n padding-top: 8px !important;\\n margin-top: 2px !important;\\n min-height: 38px !important;\\n background-color: white !important;\\n border-color: hsl(0, 0%, 80%) !important;\\n border-top-right-radius: 4px !important;\\n border-bottom-right-radius: 4px !important;\\n border-left: 0 !important;\\n border-width: 1px !important;\\n display: flex !important;\\n font-size: 15px !important;\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkJhc2VUYWJsZS5tb2R1bGUuY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0U7SUFDRSx1QkFBdUI7RUFDekI7RUFDQTtJQUNFLHlCQUF5QjtFQUMzQjtBQUNGOztBQUVBO0VBQ0UsMkRBQW1DO0VBQ25DLDhEQUFzQztFQUN0QyxrRUFBMEM7RUFDMUMsK0RBQXVDO0FBQ3pDOztBQUVBO0VBQ0UsaUNBQWlDO0VBQ2pDLDBCQUEwQjtFQUMxQiwyQkFBMkI7RUFDM0Isa0NBQWtDO0VBQ2xDLHdDQUF3QztFQUN4QyxzQ0FBc0M7RUFDdEMseUNBQXlDO0VBQ3pDLDBCQUEwQjtFQUMxQiw0QkFBNEI7RUFDNUIsNEJBQTRCO0VBQzVCLHdCQUF3QjtFQUN4QiwwQkFBMEI7RUFDMUIsMEVBQTBFO0FBQzVFOztBQUVBO0VBQ0Usa0NBQWtDO0VBQ2xDLGdDQUFnQztFQUNoQyxlQUFlO0VBQ2YsMkJBQTJCO0VBQzNCLDBCQUEwQjtFQUMxQiwyQkFBMkI7RUFDM0Isa0NBQWtDO0VBQ2xDLHdDQUF3QztFQUN4Qyx1Q0FBdUM7RUFDdkMsMENBQTBDO0VBQzFDLHlCQUF5QjtFQUN6Qiw0QkFBNEI7RUFDNUIsd0JBQXdCO0VBQ3hCLDBCQUEwQjtBQUM1QiIsImZpbGUiOiJCYXNlVGFibGUubW9kdWxlLmNzcyIsInNvdXJjZXNDb250ZW50IjpbIkBrZXlmcmFtZXMgc3BpbiB7XG4gIGZyb20ge1xuICAgIHRyYW5zZm9ybTogcm90YXRlKDBkZWcpO1xuICB9XG4gIHRvIHtcbiAgICB0cmFuc2Zvcm06IHJvdGF0ZSgzNTlkZWcpO1xuICB9XG59XG5cbi5nbHlwaGljb25SZWZyZXNoQW5pbWF0ZSB7XG4gIC1hbmltYXRpb246IHNwaW4gMnMgaW5maW5pdGUgbGluZWFyO1xuICAtbXMtYW5pbWF0aW9uOiBzcGluIDJzIGluZmluaXRlIGxpbmVhcjtcbiAgLXdlYmtpdC1hbmltYXRpb246IHNwaW4gMnMgaW5maW5pdGUgbGluZWFyO1xuICAtbW96LWFuaW1hdGlvbjogc3BpbiAycyBpbmZpbml0ZSBsaW5lYXI7XG59XG5cbi5maWx0ZXJCdG57XG4gIGNvbG9yOiBoc2woMCwgMCUsIDUwJSkgIWltcG9ydGFudDtcbiAgbWFyZ2luLXRvcDogMnB4ICFpbXBvcnRhbnQ7XG4gIG1pbi1oZWlnaHQ6IDM4cHggIWltcG9ydGFudDtcbiAgYmFja2dyb3VuZC1jb2xvcjogd2hpdGUgIWltcG9ydGFudDtcbiAgYm9yZGVyLWNvbG9yOiBoc2woMCwgMCUsIDgwJSkgIWltcG9ydGFudDtcbiAgYm9yZGVyLXRvcC1sZWZ0LXJhZGl1czogNHB4ICFpbXBvcnRhbnQ7XG4gIGJvcmRlci1ib3R0b20tbGVmdC1yYWRpdXM6IDRweCAhaW1wb3J0YW50O1xuICBib3JkZXItcmlnaHQ6IDAgIWltcG9ydGFudDtcbiAgYm9yZGVyLXdpZHRoOiAxcHggIWltcG9ydGFudDtcbiAgZm9udC13ZWlnaHQ6IGJvbGQgIWltcG9ydGFudDtcbiAgZGlzcGxheTogZmxleCAhaW1wb3J0YW50O1xuICBmb250LXNpemU6IDE1cHggIWltcG9ydGFudDtcbiAgZm9udC1mYW1pbHk6IFwiTGF0b1wiLFwiSGVsdmV0aWNhIE5ldWVcIixIZWx2ZXRpY2EsQXJpYWwsc2Fucy1zZXJpZiAhaW1wb3J0YW50O1xufVxuXG4uZmlsdGVyVG9nZ2xle1xuICBzdHJva2U6IGhzbCgwLCAwJSwgODAlKSAhaW1wb3J0YW50O1xuICBmaWxsOiBoc2woMCwgMCUsIDgwJSkgIWltcG9ydGFudDtcbiAgc3Ryb2tlLXdpZHRoOiAwO1xuICBwYWRkaW5nLXRvcDogOHB4ICFpbXBvcnRhbnQ7XG4gIG1hcmdpbi10b3A6IDJweCAhaW1wb3J0YW50O1xuICBtaW4taGVpZ2h0OiAzOHB4ICFpbXBvcnRhbnQ7XG4gIGJhY2tncm91bmQtY29sb3I6IHdoaXRlICFpbXBvcnRhbnQ7XG4gIGJvcmRlci1jb2xvcjogaHNsKDAsIDAlLCA4MCUpICFpbXBvcnRhbnQ7XG4gIGJvcmRlci10b3AtcmlnaHQtcmFkaXVzOiA0cHggIWltcG9ydGFudDtcbiAgYm9yZGVyLWJvdHRvbS1yaWdodC1yYWRpdXM6IDRweCAhaW1wb3J0YW50O1xuICBib3JkZXItbGVmdDogMCAhaW1wb3J0YW50O1xuICBib3JkZXItd2lkdGg6IDFweCAhaW1wb3J0YW50O1xuICBkaXNwbGF5OiBmbGV4ICFpbXBvcnRhbnQ7XG4gIGZvbnQtc2l6ZTogMTVweCAhaW1wb3J0YW50O1xufSJdfQ== */\";\nvar tableStyles = {\"glyphiconRefreshAnimate\":\"BaseTable-module_glyphiconRefreshAnimate__HIIZm\",\"spin\":\"BaseTable-module_spin__lpdYb\",\"filterBtn\":\"BaseTable-module_filterBtn__ODmli\",\"filterToggle\":\"BaseTable-module_filterToggle__tmPmV\"};\nstyleInject(css_248z);\n\nconst colourStyles = {\n option: (styles) => {\n return {\n ...styles,\n color: \"black\",\n };\n },\n};\n\nfunction MyTooltip(message) {\n return React.createElement(Tooltip, { id: \"character_tooltip\" }, message);\n}\nconst BaseTable = ({ isLoading, isFetching, debugTable, data, error, columns, asyncExpandFunction, striped, hover, initialState = {}, rowClasses = (row) => {\n return \"\";\n}, }) => {\n const table = useReactTable({\n data,\n columns,\n // Pipeline\n getCoreRowModel: getCoreRowModel(),\n getFilteredRowModel: getFilteredRowModel(),\n getSortedRowModel: getSortedRowModel(),\n getPaginationRowModel: getPaginationRowModel(),\n getFacetedRowModel: getFacetedRowModel(),\n getFacetedUniqueValues: getFacetedUniqueValues(),\n getFacetedMinMaxValues: getFacetedMinMaxValues(),\n //\n debugTable: debugTable,\n state: initialState,\n });\n if (isLoading)\n return (React.createElement(React.Fragment, null,\n React.createElement(\"hr\", null),\n React.createElement(PanelLoader, { title: \"Loading Data\", message: \"Please Wait\" })));\n if (error)\n return (React.createElement(React.Fragment, null,\n React.createElement(\"hr\", null),\n React.createElement(ErrorLoader, { title: \"Error Loading from API\", message: \"Try Again Later\" })));\n return (React.createElement(_baseTable, { ...{\n table,\n data,\n columns,\n isFetching,\n debugTable,\n initialState,\n striped,\n hover,\n rowClasses,\n } }));\n};\nfunction _baseTable({ table, data, columns, isFetching, striped = false, hover = false, debugTable = false, initialState = {}, rowClasses = (row) => {\n return \"\";\n}, }) {\n return (React.createElement(React.Fragment, null,\n React.createElement(Table, { ...{ striped, hover } },\n React.createElement(\"thead\", null, table.getHeaderGroups().map((headerGroup) => (React.createElement(React.Fragment, null,\n React.createElement(\"tr\", { key: `name-${headerGroup.id}` }, headerGroup.headers.map((header) => {\n return (React.createElement(\"th\", { key: header.id, colSpan: header.colSpan }, header.isPlaceholder ? null : (React.createElement(\"div\", { ...{\n className: header.column.getCanSort()\n ? \"cursor-pointer select-none\"\n : \"\",\n onClick: header.column.getToggleSortingHandler(),\n } },\n flexRender(header.column.columnDef.header, header.getContext()),\n header.column.getCanSort() ? (React.createElement(React.Fragment, null, {\n asc: (React.createElement(Glyphicon, { className: \"pull-right\", glyph: \"sort-by-attributes\" })),\n desc: (React.createElement(Glyphicon, { className: \"pull-right\", glyph: \"sort-by-attributes-alt\" })),\n }[header.column.getIsSorted()] ?? (React.createElement(Glyphicon, { className: \"pull-right\", glyph: \"sort\" })))) : null))));\n })),\n React.createElement(\"tr\", { key: `filter-${headerGroup.id}` }, headerGroup.headers.map((header) => {\n return (React.createElement(\"th\", { key: header.id, colSpan: header.colSpan }, header.column.getCanFilter() ? (React.createElement(\"div\", null,\n React.createElement(Filter, { column: header.column, table: table }))) : (\"\")));\n })))))),\n React.createElement(\"tbody\", null, table.getRowModel().rows.map((row) => {\n return (React.createElement(\"tr\", { key: row.id, className: rowClasses(row.original) }, row.getVisibleCells().map((cell) => {\n return (React.createElement(\"td\", { key: cell.id, style: { verticalAlign: \"middle\" } }, flexRender(cell.column.columnDef.cell, cell.getContext())));\n })));\n }))),\n React.createElement(\"div\", { className: \"pagination pull-right\" },\n React.createElement(ButtonToolbar, null,\n React.createElement(ButtonGroup, null,\n React.createElement(Button, { bsStyle: \"success\", onClick: () => table.setPageIndex(0), disabled: !table.getCanPreviousPage() },\n React.createElement(Glyphicon, { glyph: \"step-backward\" })),\n \" \",\n React.createElement(Button, { bsStyle: \"success\", onClick: () => table.previousPage(), disabled: !table.getCanPreviousPage() },\n React.createElement(Glyphicon, { glyph: \"triangle-left\" })),\n \" \",\n React.createElement(Button, { bsStyle: \"success\", onClick: () => table.nextPage(), disabled: !table.getCanNextPage() },\n React.createElement(Glyphicon, { glyph: \"triangle-right\" })),\n \" \",\n React.createElement(Button, { bsStyle: \"success\", onClick: () => table.setPageIndex(table.getPageCount() - 1), disabled: !table.getCanNextPage() },\n React.createElement(Glyphicon, { glyph: \"step-forward\" }))),\n React.createElement(ButtonGroup, null,\n React.createElement(Button, { active: true, bsStyle: \"success\" }, \"Page Size:\"),\n \" \",\n React.createElement(SplitButton, { id: \"pageSizeDropdown\", bsStyle: \"success\", title: table.getState().pagination.pageSize }, [10, 50, 100, 1000000].map((_pageSize) => (React.createElement(MenuItem, { id: _pageSize, key: _pageSize, eventKey: _pageSize, value: _pageSize, onSelect: (eventKey, event) => {\n table.setPageSize(Number(eventKey));\n } },\n \"Show \",\n _pageSize))))))),\n React.createElement(\"div\", { className: \"pagination pull-left\" },\n React.createElement(ButtonGroup, null,\n React.createElement(Button, { active: true, bsStyle: \"info\" }, React.createElement(React.Fragment, null,\n table.getState().pagination.pageIndex + 1,\n \" of\",\n \" \",\n table.getPageCount())),\n \" \",\n isFetching ? (React.createElement(OverlayTrigger, { placement: \"bottom\", trigger: \"focus\", overlay: MyTooltip({ message: \"Refreshing Data\" }) },\n React.createElement(Button, { bsStyle: \"info\" },\n React.createElement(Glyphicon, { className: tableStyles.glyphiconRefreshAnimate, glyph: \"refresh\" })))) : (React.createElement(OverlayTrigger, { placement: \"bottom\", trigger: \"focus\", overlay: MyTooltip(\"Data Loaded: \" + new Date().toLocaleString()) },\n React.createElement(Button, { bsStyle: \"info\" },\n React.createElement(Glyphicon, { glyph: \"ok\" })))))),\n debugTable && (React.createElement(\"div\", { className: \"col-xs-12\" },\n React.createElement(\"div\", null,\n table.getRowModel().rows.length,\n \" Rows\"),\n React.createElement(\"pre\", null, JSON.stringify(table.getState(), null, 2))))));\n}\nfunction Filter({ column, table, }) {\n const [input, setInput] = useState(\"\");\n const firstValue = table\n .getPreFilteredRowModel()\n .flatRows[0]?.getValue(column.id);\n const isHTML = RegExp.prototype.test.bind(/(<([^>]+)>)/i);\n const selectOveride = { Menu: () => React.createElement(React.Fragment, null), IndicatorsContainer: () => React.createElement(React.Fragment, null) };\n const columnFilterValue = column.getFilterValue();\n const popoverNumber = (React.createElement(Popover, { id: \"popover-positioned-top\" },\n React.createElement(\"input\", { type: \"number\", value: columnFilterValue?.[0] ?? \"\", onChange: (e) => column.setFilterValue((old) => [\n e.target.value,\n old?.[1],\n ]), placeholder: `Min`, className: \"form-control\" }),\n React.createElement(\"p\", { className: \"text-center\" }, \"to\"),\n React.createElement(\"input\", { type: \"number\", value: columnFilterValue?.[1] ?? \"\", onChange: (e) => column.setFilterValue((old) => [\n old?.[0],\n e.target.value,\n ]), placeholder: `Max`, className: \"form-control\" })));\n if (typeof firstValue === \"number\") {\n let fromToNumber = columnFilterValue;\n return (React.createElement(OverlayTrigger, { trigger: \"click\", placement: \"bottom\", overlay: popoverNumber },\n React.createElement(ButtonGroup, { style: { display: \"flex\", width: \"100%\" } },\n React.createElement(Button, { className: tableStyles.filterBtn + \" btn-block\", bsStyle: \"primary\", bsSize: \"small\" },\n React.createElement(React.Fragment, null,\n typeof fromToNumber?.[0] === \"undefined\" ||\n fromToNumber?.[0] === \"\"\n ? \"-∞\"\n : fromToNumber?.[0],\n \" to \",\n typeof fromToNumber?.[1] === \"undefined\" ||\n fromToNumber?.[1] === \"\"\n ? \"∞\"\n : fromToNumber?.[1])),\n React.createElement(Button, { className: tableStyles.filterToggle, bsStyle: \"primary\", bsSize: \"small\" },\n React.createElement(\"svg\", { height: \"20\", width: \"20\", viewBox: \"0 0 20 20\", \"aria-hidden\": \"true\", focusable: \"false\" },\n React.createElement(\"path\", { d: \"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z\" }))))));\n }\n else if (typeof firstValue === \"boolean\") {\n return (React.createElement(Select, { styles: colourStyles, isClearable: true, onChange: (value, action) => {\n setInput(\"\");\n column.setFilterValue(value ? value.value : \"\");\n }, placeholder: `Filter...`, options: [\n { value: true, label: \"Pass\" },\n { value: false, label: \"Fail\" },\n ] }));\n }\n else if (typeof firstValue === \"object\") {\n return (React.createElement(Select, { styles: colourStyles, isClearable: true, onChange: (value, action) => {\n setInput(\"\");\n column.setFilterValue(value ? value.value : \"\");\n }, inputValue: input, onInputChange: (value, action) => {\n if (action.action === \"input-change\") {\n setInput(value);\n column.setFilterValue(value);\n }\n }, placeholder: `Search...`, className: \"\", options: [], components: selectOveride }));\n }\n else {\n const sortedUniqueValues = Array.from(column.getFacetedUniqueValues().keys()).sort();\n const selectOptions = sortedUniqueValues\n .slice(0, 50)\n .reduce((previousValue, currentValue) => {\n previousValue.push({ value: currentValue, label: currentValue });\n return previousValue;\n }, []);\n return (React.createElement(Select, { styles: colourStyles, isClearable: true, onChange: (value, action) => {\n setInput(\"\");\n column.setFilterValue(value ? value.value : \"\");\n }, inputValue: input, onInputChange: (value, action) => {\n if (action.action === \"input-change\") {\n setInput(value);\n column.setFilterValue(value);\n }\n }, placeholder: `Search...`, className: \"\", options: selectOptions, components: isHTML(firstValue) ? selectOveride : {} }));\n }\n}\n\nexport { AllianceLogo, BaseTable, CharacterPortrait, CorporationLogo, ErrorLoader, EveWhoButton, PanelLoader, TypeIcon, ZKillButton };\n//# sourceMappingURL=index.js.map\n","import { loadCharacterStatus } from \"../../api/character\";\nimport { RefreshCharButton } from \"../RefreshAccountButton\";\nimport {\n AllianceLogo,\n CharacterPortrait,\n CorporationLogo,\n} from \"@pvyparts/allianceauth-components\";\nimport { Card } from \"react-bootstrap\";\nimport Button from \"react-bootstrap/Button\";\nimport ButtonGroup from \"react-bootstrap/ButtonGroup\";\nimport OverlayTrigger from \"react-bootstrap/OverlayTrigger\";\nimport Tooltip from \"react-bootstrap/Tooltip\";\nimport { useQuery } from \"react-query\";\nimport { useParams } from \"react-router-dom\";\n\nfunction MyTooltip({ message }: { message: String }) {\n return {message};\n}\n\nconst CharHeader = () => {\n const { characterID } = useParams();\n const style = {\n borderRadius: `25%`,\n };\n\n const { data } = useQuery([\"status\", characterID], () => loadCharacterStatus(characterID? Number(characterID): 0), {\n refetchOnWindowFocus: false,\n });\n\n // const isk = data?.characters.reduce((p: number, c: any) => {\n // try {\n // return p + c.isk;\n // } catch (err) {\n // return p;\n // }\n // }, 0);\n // const sp = data?.characters.reduce((p: number, c: any) => {\n // try {\n // return p + c.sp;\n // } catch (err) {\n // return p;\n // }\n // }, 0);\n const bad_chars = data?.characters\n .filter((char: any) => !char.active)\n .map((char: any) => char.character.character_name);\n\n return (\n \n
\n \n

{data?.main.character_name}

\n \n
{data?.main.corporation_name}
\n {data?.main.alliance_id && (\n <>\n \n
{data?.main.alliance_name}
\n \n )}\n {/*

\n {sp ? (\n <>\n Total SP: {sp.toLocaleString()}
\n \n ) : (\n <>\n )}\n {isk ? (\n <>\n Total Isk: {isk.toLocaleString()}\n \n ) : (\n <>\n )}\n

*/}\n \n \n {data ? (\n bad_chars.length === 0 ? (\n \n \n \n ) : (\n \n \n \n )\n ) : (\n <>\n )}\n \n
\n
\n );\n};\n\nexport { CharHeader };\n","import { Nav } from \"react-bootstrap\";\nimport { NavDropdown } from \"react-bootstrap\";\nimport { LinkContainer } from \"react-router-bootstrap\";\n\nexport interface CharMenuItemProps {\n name: string;\n link: string;\n}\n\nexport interface CharCategoryProps {\n name: string;\n links: Array;\n}\n\nexport interface CharMenuProps extends Partial {\n isLoading: boolean;\n data: Array;\n error: boolean;\n characterID: string;\n}\n\nconst CharMenu = ({ data, characterID }: CharMenuProps) => {\n return (\n <>\n \n \n Overview\n \n \n \n \n Status\n \n \n \n \n Public Data\n \n \n {data &&\n data.map((cat: any) => {\n return (\n \n {cat.links.map((link: any) => {\n return (\n \n \n {link.name}\n \n \n );\n })}\n \n );\n })}\n \n );\n};\n\nexport default CharMenu;\n","import CharMenu from \"./CharMenu\";\nimport axios from \"axios\";\nimport ReactDOM from \"react-dom\";\nimport { useQuery } from \"react-query\";\nimport { useParams } from \"react-router-dom\";\n\nconst menuRoot = document.getElementById(\"nav-left\");\n\nconst CharMenuAsync = () => {\n let { characterID } = useParams();\n const { isLoading, error, data } = useQuery({\n queryKey: [\"Menu\"],\n queryFn: async () => {\n const api = await axios.get(`/audit/api/account/menu`);\n return api.data;\n },\n refetchOnWindowFocus: false,\n });\n if (!menuRoot) {\n return <>;\n }\n return ReactDOM.createPortal(\n ,\n menuRoot\n );\n};\n\nexport { CharMenuAsync };\n","import styles from \"./CharMenu.module.css\";\nimport React from \"react\";\nimport { Nav } from \"react-bootstrap\";\nimport ReactDOM from \"react-dom\";\nimport { useIsFetching } from \"react-query\";\nimport { LinkContainer } from \"react-router-bootstrap\";\n\nconst menuRoot = document.getElementById(\"nav-right\");\n\nconst CharMenuRight = () => {\n const isLoading = useIsFetching();\n const [innerHtmlEmptied, setInnerHtmlEmptied] = React.useState(false);\n\n React.useEffect(() => {\n if (!innerHtmlEmptied) {\n if (menuRoot) {\n menuRoot.innerHTML = \"\";\n setInnerHtmlEmptied(true);\n }\n }\n }, [innerHtmlEmptied]);\n\n if (!innerHtmlEmptied) return null;\n if (!menuRoot) {\n return <>;\n }\n return ReactDOM.createPortal(\n <>\n {isLoading ? (\n <>\n \n \n \n \n ) : (\n <>\n )}\n \n Add Character\n \n \n Account List\n \n {/* TODO Check perms for this */}\n \n \n \n \n \n ,\n menuRoot\n );\n};\n\nexport { CharMenuRight };\n","import { CharHeader } from \"../../Components/Character/CharacterHeader\";\nimport { CharMenuAsync } from \"../../Components/CharacterMenu/CharacterMenuAsync\";\nimport { CharMenuRight } from \"../../Components/CharacterMenu/CharacterMenuRight\";\nimport { Card, Col } from \"react-bootstrap\";\nimport { Outlet } from \"react-router-dom\";\n\nconst CharacterAudit = () => {\n return (\n <>\n \n \n \n \n \n {/* Render the Children here */}\n \n \n \n );\n};\n\nexport default CharacterAudit;\n","import Card from \"react-bootstrap/Card\";\nimport OverlayTrigger from \"react-bootstrap/OverlayTrigger\";\nimport Spinner from \"react-bootstrap/Spinner\";\nimport Tooltip from \"react-bootstrap/Tooltip\";\n\ntype IconStatusCardProps = {\n iconSrc: string;\n text?: string;\n cardVariant?:\n | \"primary\"\n | \"secondary\"\n | \"success\"\n | \"danger\"\n | \"warning\"\n | \"info\"\n | \"dark\"\n | \"light\";\n textVariant?:\n | \"primary\"\n | \"secondary\"\n | \"success\"\n | \"danger\"\n | \"warning\"\n | \"info\"\n | \"dark\"\n | \"light\"\n | \"muted\";\n borderVariant?: \"thick\";\n isLoading?: boolean;\n toolTipText?: string;\n};\n\nconst showOverlay = (toolTipText: string | undefined) => {\n return toolTipText ? (\n \n {toolTipText}\n \n ) : (\n <>\n );\n};\n\nexport const IconStatusDiv = ({\n iconSrc,\n text,\n textVariant,\n isLoading,\n toolTipText,\n}: IconStatusCardProps) => {\n return (\n \n \n \n {!isLoading ? (\n text &&
{text}
\n ) : (\n \n )}\n \n
\n );\n};\n\nexport const IconStatusCard = ({\n iconSrc,\n text,\n cardVariant,\n textVariant,\n isLoading,\n borderVariant,\n toolTipText,\n}: IconStatusCardProps) => {\n return (\n \n \n \n );\n};\n","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABCJJREFUeNrsWe1LU2EUvw/4dX+A61uQgSUYsyQTtkRC0PVGhBP6ErhVWNNtaZPl3XxNdEsFoY2+hS3IilIJK2oWZREXIxJiH/qW/gH7fO/tPCKktsE9d8992bo/GGPovc85v+d3znPOeTjOggULFixYsPC/gqh98Mev30n4cpjRqcP799Up/d8KtYtIklgWClBPgCjZTOpTTh8CJLHKpFEd04kAqdCfFjlCBPjeKNoXWfYi88xi3aEDGV0IEMV/ckCOEOI7VnMwy2Ifv3z/6UA6vwnrx3XJAatr6/Y8Ckgcr61m4vyntXUbvD+KPM6i9bXVOV0IAOMq97J/wlGzwCqK4f1ecKgS8Uga1hd0OwXy7H6KlfPvv35zyZLkkRHSh+1XvX6FyvjfdQRC7GVYOP9uVbDB8cqjpE9I1Fl/JKcrAXuOwExTw9EcCwJkWeJlmUPUFyTV1FAnFLMmixBYYeH86w+fXfBeF+KRbHNjfdGhpzYEqshfDRYt/+XMR5r1eYLTfpQF8RXqpCqvQJKiR95mi7OhaPlLsswTWbYhEl+q5WQjkyOXcAZj6c0Klf0kRvqtzc4Ow5shFlh49ZYWVJisT6vNKEsbDCVAhCOPEEzW51JnWpqzZUHA06VlDxQ8DkTcC+daT6VNMw8oBvMvXtqh4PEipR/TwhZDCIBCisY9quC5eLZ1oywISD957oHEh2lzhfbzp9Na2aMrAXOPn9m3Oz3F0oeCJ6SlTUzqgAeP5pXtKCFBWFDxKA0SZBqqrkKVZvZS+4WcKRQgyVJSqUdIeLY/+eCj4WEOAkSJK1WwIaCE7wgsBTDKAb4CXSNNeEHEqzYRtb65u8HZ5H0bOEOTo+KsT8fqVzsvCyWngAK7791WgOIaqetKp1CSIbAX07P3HJAYPRjp03LXiBzAPAQSM7NU+g85xFwfWmJfd9c1wQgCmCsAWlyvTFCXGqmg/7ohzjNXwERiCkpikkQ8kr0Z8HdwBoKZAu5MxPH3eYzHW4YSAM4HwSGU9MO9oWxZEDA8Nk4vNdow0o+E+5hnfbAjueP9cV0IiA2N2CRRNHSySzE4POoGOxzYKrFoAqDY4eGDmuxGByLMpQ8KdO74KehCwG0+BtIXXYhHhMEoz3y8BXbYd9lBiPYK6I8M2FRcamgy2QU7dladuZGh2IbmBOCvsrnU2Mgw88luuD9Cd79NbZeoioC+W2E38ipbGB8bTWu0+wFu9+2SoCkBod4++9aiOOlrMtkFW9x5cpC2CqBHHjiEkX4sPjmRY+18IBhyQ9/By0UOSlAEdPcEsJcamam7iQwrp/3dPXY6YIENKFh4wXqoPKO4Gbrh99PF5zjUlZbuEGamp32aKEASt+LezM5v5RvNegFINmZ3Hh3/KALEEhh9E0JHaxYsWLBgwYJS/BFgAE4Kq3N5izE5AAAAAElFTkSuQmCC\"","export default \"__VITE_ASSET__9LIjGFPr__\"","export default \"__VITE_ASSET__BqU_Xg4q__\"","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABztJREFUeNrsW2tsFFUUnm3rA8ICiZFQVCRSFoTSQLcVwWIXMErqlpjIH/wnwVaCxJg2RkiM5YdFSdEEpbGLwfgIGw2R4C6lEhYWUimPDhIeAltEQW35qW78sVtmxu8sdzfDMDM7d3Z3oI9JTmf2nDPn3u/cc8+59+62SBjhV9GoA0YdMOqAUQeM5KvkbjR6/upfbtz8LpfgY6yYogiB8iceiTvdF5fTDZ69ct3tcrk68OjRiOKKojRWlE2NDespoMhKkyzJHpCgITfJhn0OkGTJDxIMyHv64tUpwzoHyLKcTaUU1D98HSBJlOjchknJ5RreOQAREIQTBAMKV5d7HK0EtqpAt3jOjRfbMFzeW5lNERVBaK7xzrXU+WOnz7dB36fpiAh7zYvmz4lbbL8J+n7GGkAFaUL7MUemgCLLbYpL8ApKhkXPbbg3Wnl/UWV5c3fvWW/qPbYOeKaqIsrRfgPa96vaL8XzVtzrHXEAwtirw/by2KipqhAFGnV77fv0kueREz97axfMFx1wgKTHzoTuoWOnMBKuVVjpeUxHUrnlAKbnNtBBWCvBpYuqQ6r246xa3J0kiEVLWGchEyDZwe4TLVjQvIcw1Vvs3EbQ8RLRIshEx0P2yK6q/aiO7sCShVWiMw5Q5K1YtIRVC5jwspqnggeO9ngRnmYLHdtEdmE/NcfRVgC8ICjO5CL61ORYFTC6ug530yj5C1i1xOVLahrzadA0B+w7eIQ2LuTZWs0cpTkYRumJssWLULfsWRGjVCo4cHVGjjbgNoW1T33xoA+vaPICdphK4MXnaqO2HQBAHQaJjJyxihElKpr/okFyLMBiKtWOXx1tinKHGvW7LXTgcHP980ui3A7Y2xWh+ezh2uhIst7SFs5RMFpcU2MA74UwgvV62V6vHZOLBinKnQThZa+cSj7WKD0yWlrxwtKAJEkhHlugfnqP7lbbydY37giQ+bxs+o4dW4WwxxsBt9HL9curZCo3nBFgZ8RytNeo7ae9CNDZt2fbyxvJLZwBOGKPywGYt5Z4VuTZ3nPKHmcOkCzxrMhlmx3Ot73RKcDnAMnqLjCr3O4CKd/2OHOAbIlnRS7ZLFv5tjcaAZw5YGAI54CBfDggih2Gnx11BXWzL63zsV5X2E6RHXnfcUpUwCoQZnsFr6Zfu9Av4o3Dc9iWA9aueTWuPeTU1t83Xn8t8OlnO6ghOqPbCqcFlFsNu9lG6COTup3a8FDn2Tt6g0D22pi9OPSDzF76TDDEwHs1/YpZPSAt4g1JNal4pdvaO1rWNa6hPfgK+pKT7vgc0nuPUT/ktFES9eR0QS5q7EXRzirapRrY5J5uJbkmJRXP//En7eNu3hzc9Nb6daLVpJUtoa1f2xBPnx7Dfj308/oFKp8DdMqPhudj+UK0unvj2dkpiDTFQNbT85P0w57vI4lEol7g+H4gnxFga5R5SpqR7vGeHim0dw+BTxY0AuwsjrLp8Cxq9HR3fh4Y+/tvV1PgEXq+hYLguVs5wPEI+Da4q+7ypYvFeEx+DfAoBZ5kQXOAjQ1SNh2erK3WPXXyhPTLhQtjCPwXAF8J8IOFToJ2zgiy6fDs7dO64qmT0v7OfZEkrh0AP8/GyA/ZKSD29ko/7u9MgW8H+IocwBeiDHKXOp4y+M1XX469fu1aCvw2Bn5QyO0aShHw0pW+vok057G+9pXnOPL2lsKab2T1eEZRYqRnJlODB82jhy0AP4eNvDx+vGv27t0Tp7W2uumzEZGc9EhfK+NLgrIkqjYecT2e3o+cJJNRlrJHQAb8+wD/pGrkvTt3ThhTVlZCRFYubdx4x89rZgH8Q3V1D9DzbOiLK1f+bXsKYEMSZMBpdxYl3oebWwNvv7Mhw8PneB7LYAb8JoCfpQn7f2MxaSzA0/PDAEmWzqucUA7wxFdU+slccsCWDzbH02cDGn7Qzr4+iywD/l2An6mT8M4A7Fzcp7ARnoQ7IkQ4C34FwE9Sge/v7Eyc04kQR34naNMBKfAbAH6GScITAYosPMqcMBn3CZWV942ZPLkoDf5PgD+jA94xB0gmYS5lWQlOt5DtTwIcWXmMOeFBFfg/AL7XADx3FbAdAZzf/6lLY9IiHQPI/27ckAl4mugz8c3ec8gBclzvR03pw1cdWaaSDFqkasz5dNiniT5XZymRjjigffv2GICGVSMcVxR5F5OFIFN/mxuDLMATAQsA8nGW8IjiqkggPsmN3nX0HyYaGhpTvwcMBDpEC7IW+tMKkZlNH8BNZ3OfriuY80cQ9rXgl6n4v4If1ckFjv/HCMfVwv4YOmAZQM5QgYwB5CEVyKWQe1TyPsgjGieUCPf4ZVYBJno8xelsfxngDmjAdbHqMJM5gfS19orvYex0wCo8jRUvgdCjS11diWmLF99/7fjxwf0MrJb6IpHkhKlTixWXS/hu9ep/konEbfJ7fgq8mSUH5HoN6SkwIhwwONIdUOgI+F+AAQB611CDy6S9ZAAAAABJRU5ErkJggg==\"","import { IconStatusCard } from \"../../Components/Cards/IconStatusCard\";\nimport { loadCharacterStatus } from \"../../api/character\";\n// import Asteroid from \"../../../assets/asteroid_64.png\";\n// import NPC from \"../../../assets/npcbattleship_32.png\";\nimport Isk from \"../../assets/isk_128.png\";\nimport Omega from \"../../assets/omega_128.png\";\nimport Skills from \"../../assets/skillInjector_64.png\";\nimport Unknowns from \"../../assets/unknown_64.png\";\nimport styles from \"./AtAGlance.module.css\";\nimport { useQuery } from \"react-query\";\nimport { useParams } from \"react-router-dom\";\n\nexport const CharacterGlancesAccount = () => {\n const { characterID } = useParams();\n\n const { data, isLoading } = useQuery({\n queryKey: [\"glances\", \"account\", characterID],\n queryFn: () => loadCharacterStatus(characterID? Number(characterID): 0),\n refetchOnWindowFocus: false,\n });\n\n const isk = data?.characters?.reduce((p: number, c: any) => {\n try {\n return p + c.isk;\n } catch (err) {\n return p;\n }\n }, 0);\n\n const sp = data?.characters?.reduce((p: number, c: any) => {\n try {\n return p + c.sp;\n } catch (err) {\n return p;\n }\n }, 0);\n\n const bad_chars = data?.characters?.filter((char: any) => !char.active).length;\n\n const total_chars = data?.characters?.length;\n\n return (\n <>\n

Account at a Glance

\n
\n \n \n\n \n\n 0 ? \"danger\" : \"success\"}\n iconSrc={Unknowns}\n textVariant={bad_chars > 0 ? \"danger\" : \"success\"}\n text={bad_chars?.toLocaleString()}\n isLoading={isLoading}\n toolTipText=\"Count of all known alts not loading into audit\"\n />\n\n {/* \n */}\n
\n \n );\n};\n","import axios from \"axios\";\n\n// import Cookies from \"js-cookie\";\n\naxios.defaults.xsrfHeaderName = \"X-CSRFToken\";\n\nexport async function postCorporationRefresh() {\n return 1;\n}\n\nexport async function loadCorpGlanceAssetData(corporation_id: number) {\n const api = await axios.get(`/audit/api/corporation/${corporation_id}/glance/assets`);\n console.log(`get glance/assets in api ${corporation_id}`);\n return api.data;\n}\n\nexport async function loadCorpGlanceStatusData(corporation_id: number) {\n const api = await axios.get(`/audit/api/corporation/${corporation_id}/character/status`);\n console.log(`get glance/assets in api ${corporation_id}`);\n return api.data;\n}\n\nexport async function loadCorpGlanceActivityData(corporation_id: number) {\n const api = await axios.get(`/audit/api/corporation/${corporation_id}/glance/activities`);\n console.log(`get glance/activities in api ${corporation_id}`);\n return api.data;\n}\n\nexport async function loadCorpGlanceFactionData(corporation_id: number) {\n const api = await axios.get(`/audit/api/corporation/${corporation_id}/glance/faction`);\n console.log(`get glance/faction in api ${corporation_id}`);\n return api.data;\n}\n\nexport async function loadAllStructures() {\n const api = await axios.get(`/audit/api/corp/structures`);\n console.log(`get structures in api`);\n return api.data;\n}\n","export default \"__VITE_ASSET__aTUB1VTV__\"","export default \"__VITE_ASSET__DHvQjmPz__\"","export default \"__VITE_ASSET__DEheLcdU__\"","export default \"__VITE_ASSET__1_3lp11w__\"","export default \"__VITE_ASSET__Doz2tcoH__\"","export default \"__VITE_ASSET__COqC8tEM__\"","export default \"__VITE_ASSET__B2EHIfDt__\"","export default \"__VITE_ASSET__BgZrbr9S__\"","export default \"__VITE_ASSET__CbDrfS8S__\"","export default \"__VITE_ASSET__BxBhPtX7__\"","export default \"__VITE_ASSET__DfgmBsMx__\"","import { IconStatusCard } from \"../../Components/Cards/IconStatusCard\";\nimport { loadGlanceActivityData } from \"../../api/character\";\nimport { loadCorpGlanceActivityData } from \"../../api/corporation\";\nimport Asteroid from \"../../assets/asteroid_64.png\";\nimport Gas from \"../../assets/gas_64.png\";\nimport Ice from \"../../assets/ice_64.png\";\nimport Sansha from \"../../assets/incursion_2_64.png\";\nimport Industry from \"../../assets/industry_128.png\";\nimport Market from \"../../assets/market_128.png\";\nimport Missions from \"../../assets/missions_2_128.png\";\nimport Moons from \"../../assets/moonAsteroid_JackpotR32.png\";\nimport NPC from \"../../assets/npcbattleship_32.png\";\nimport Planet from \"../../assets/planet_128.png\";\nimport Triglavian from \"../../assets/triglavian_128.png\";\nimport styles from \"./AtAGlance.module.css\";\nimport Card from \"react-bootstrap/Card\";\nimport { useQuery } from \"react-query\";\nimport { useParams } from \"react-router-dom\";\n\nconst Activities = ({ data }: any) => {\n return (\n <>\n

Activity

\n
\n \n PvE\n\n
\n \n \n \n \n
\n
\n \n Economic\n\n
\n \n \n
\n
\n \n Mining\n\n
\n \n \n \n \n \n
\n
\n
\n \n );\n};\n\nexport const CharacterGlancesActivities = () => {\n const { characterID } = useParams();\n\n const { data } = useQuery({\n queryKey: [\"glances\", \"activities\", characterID],\n queryFn: () => loadGlanceActivityData(characterID? Number(characterID): 0),\n refetchOnWindowFocus: false,\n });\n\n return ;\n};\n\nexport const CorporationGlancesActivities = () => {\n const { data } = useQuery({\n queryKey: [\"glances\", \"corp\", \"activities\", 0],\n queryFn: () => loadCorpGlanceActivityData(0),\n refetchOnWindowFocus: false,\n });\n\n return ;\n};\n","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAOFJREFUeNpiYBgFo2AUUAD+//8/H4QH0nIYmD8glj99+vQ5CNPVEciWy8nJdaioqBQAuefp4gh0y4FCGUDMARQSoLkjcFmOJE87RxCynKaOINZymjiCVMup7ghyLMfmCCA3AJc6JkIGHT169OajR48eAJkLgPgHsQ5gZGT8AKQ2QrkGZDsACm6QYjkpgIlhgMGoA1gIKTAwMJA/c+ZMgrGxsQMZ5ttT7ABVVVUFIKUwICEAzEqMQKphWLeqGAmUZvupYgkjoyPZaeD27dvUiP8EaElKchpwhGoeBaOAZgAgwADRIPnv6gjUcQAAAABJRU5ErkJggg==\"","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAATVJREFUeNpiYBgFo4AC8P////kgPJCWw8D8AbH86dOnz0GYro5AtlxOTq5DRUWlAMg9TxdHoFsOFMoAYg6gkADNHYHLciR52jmCkOU0dQSxltPEEaRaTnVHELIcapEAIUcAuQG47GAi5IijR4/efPTo0QMgcwEQ/0C2AEjtB2FsjmBkZPwApDZCuQZkOwAKbuCw3ACK9+MKCUKAiYxogVsODJ0LIEyJI1gosdzGxgYUxBeA4v5AOgHqCEdo8FM3BHBZDsQbgBYmQtMIySFBlAOMjY1xWo6U6Mh2BN5suH379uOwGu/IkSPngcIN+LIVUjUNyoL90GzYQLYDYIAYy3G0FSh3ACmWY3MERQ4gx3J0R+BzACMhA4CJ6yF6giPVEVAzGshNiwEMlANqmDEKRsEwBQABBgAOibaZR7OUTgAAAABJRU5ErkJggg==\"","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAPZJREFUeNpiYBgFFID////PB+GBtBwG5g+I5U+fPn0OwnR1BLLlcnJyHSoqKgVA7nm6OALdcqBQBhBzAIUEaO4IXJYjydPOEYQsp6kjiLWcJo4g1XKqOoJcy6niCEotp9gR1LAcmyOA3AB0eSZcGo8ePXrz0aNHD4DMBUD8g1wHMDIyfgBSG6FcA6IdAAU3KLGcGIDTAdbW1uoWFhYcVMjGAkDKn9ya7jzUAIrj/8iRI+eBQg10cwQOywPoEhJUsZxcR1DVclIdQRPLiXUETS0n5Ai6WI7LEXS1HIcj6Gs5tmY53S1HdsSAWY4EAgbS8lFAMQAIMACyRj6cz5mg0AAAAABJRU5ErkJggg==\"","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAMVJREFUeNpiYBgFo2AUUAD+//8/H4QH0nIYmD8glj99+vQ5CNPVEciWy8nJdaioqBQAuefp4gh0y4FCGUDMARQSoLkjcFmOJE87RxCynKaOINZymjiCVMup7ghyLMfmCCA3AJc6JkIGHT169OajR48eAJkLgPgHsQ5gZGT8AKQ2QrkGZDsACm6QYjkpgIlhgMGoA1gIKTAwMJA/c+ZMgrGxsQMZ5ttT7ABVVVUFIKUwICEAzEqMQKphtOk1CkbBKKAlAAgwADz48ZFJ3SP6AAAAAElFTkSuQmCC\"","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAL1JREFUeNpiYBgFo2AUjIKhDP7//z8fhAfSchiYPyCWP3369DkI09URyJbLycl1qKioFAC55+niCHTLgUIZQMwBFBKguSNwWY4kTztHELKcEkcwEmM5kEoAsXfs2HHi8+fPP93c3E7w8/P/wKGFH4gLoOwFjIyMidTKauSC+RSFABAEALEBhbF4AYg3DMrSlJFAFOyniiWMjI645FgIab59+7YCFdwASsQLSHYA1OUJo9XuKBgFo2BYA4AAAwDuOPZAKdxOvgAAAABJRU5ErkJggg==\"","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAARxJREFUeNpiYBgFo4AC8P////kgPJCWw8D8AbH86dOnz0GYro5AtlxOTq5DRUWlAMg9TxdHoFsOFMoAYg6gkADNHYHLciR52jmCkOU0dQSxltPEEaRaTlVHkGs5VRxBqeUUO4IalmNzBJAbgC7PhEvj0aNHbz569OgBkLkAiH+Q6wBGRsYPQGojlGtAtAOg4AYllhMDmBgGGIw6gAWXhIGBgfyZM2cSjI2NHdCkJkATFtYUD6QKsEjZk5p18IHzUIvw5XmsAKisgagQAPqQEZviI0eO+FtbW4Oy0n6geY6wkIA6aD8o4IDZ94KNjc1GejTFzkN9Dfc50IHnoQ4PoFd78DzdLcfWKKW75ciOGDDLkUDAQFo+CigGAAEGAKzczqNJim5wAAAAAElFTkSuQmCC\"","export default \"__VITE_ASSET__ChL1k$F3__\"","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAARtJREFUeNpiYBgFRIL////P/088mE+suSzEWg6kEp49e/bi6NGjN/Gptba2VpeSkkoA6mFgZGRMpJrPnz59+lxOTq4DKJQBxA64sIWFhQdQ+XlSQ4IUyzmI0CdAsSPItZwqjqDUcoocQS3LiXUEEz7NbGxsL4DUAiD+QY2sDMxBBkAqgJQ8D3K5ADV8f+TIkfNAoQaiHEANR1BkOaWOoIrl5DqCqpaT6ghyLGcixSHAukBCVVU1gYRseQGIN9C1OKZKMTxaF4z4usBgQOsCNBcPTF1ADUdQXCJS4giqFcfkOIJUyxmJMRBI7YcmTlDRupGAFn+QWmCCu2BjY7ORWsUxckgQBKQEOyMJ7gCVBaCKSIJuFdEooAcACDAAVWOwQScYFDwAAAAASUVORK5CYII=\"","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAZ9JREFUeNrsV7FugzAQhQihjJkZWLtGYgHB0G7dwifQrWM/IVu7tX9A+gfNxJgFxBjGdKuQoBk7dqPn1qmQhWufTduFkyzHoNx7tu/eHYYxmcC6rks7dUtF/i0ROExJ27bHoiieMcTDMDxzHCcBH4ZpmldoAn3wIAge67p+gfVBloDv+/OyLG+JDxEJ7rE3TfPquu4dPLqGMVe4vgWMvex1jAquTGJM8CESsIz772ZDfyABR+98A+NdlwDc/xtMW7pcCglQO4wBLrLZf+vMRMCSiWCYbhT9P9AAVJZiAr5jIxdhK/Bx8RMJLgHP877BIS2rKIq2GOQ8z1dQDwjxHSGBEY0uy7KSiBH5DY728HjNCgiykhIRuqdCtBYSOJkOOK+cSxNgwZF9QcojwRKwOFJ8uvMKxhOmLxjqA8j8hW0kUkc2tHOmQJ3zBvQBl7zq1/MttFinNAtKcIwKHtXSLNsHSEmxbdtHndIMcbNUyiQmjxcqu9dOZSwJLLgpS4KmUNXrbLj6z8j3Zyr/6QcK5thNJI8YURnH2flkv20fAgwA/mRRRowKgjEAAAAASUVORK5CYII=\"","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJxJREFUeNpiYBgFo2AUjIKhDP7//z8fhAfSchiYPyCWP3369DkI09URyJbLycl1qKioFAC55+niCHTLgUIZQMwBFBKguSNwWY4kTztHELKcEkcwEmM5kEoAsXfs2HHi8+fPP93c3E7w8/P/wKGFH4gLoOwFjIyMidTKauSC+RSFABAEALEBhbF4AYg3jBbdo2AUjIJRMAoGJQAIMABD/+3i1WyW1AAAAABJRU5ErkJggg==\"","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAUhJREFUeNpiYBgFo2AUEAD///+f/598MJ+Q+SyELAdSCc+ePXtx9OjRm6Q43NraWl1KSioBaAYDIyNjIskOQLbc0tJy4aNHjx4A+TeIdYCFhQXH8ePH20FmEHIEzmB/+vTpczk5uQ6gUAYQc5ARfQJAfJ7Y6KCq5WQ7gpqWY3MEkBuALMeETQMowUHjfAEQ/6DUAcD4/wCkNkK5BgQdAAU3qGE5IcA00OXMqANYiEnBQKqATPMnQBMg2UUxyPL96CmXBOAPNMMRnyNwOsDY2BhuOTBbXrCxsdlIis1HjhzxB9YHIIfvBzmClELj//bt24+DCiMQG2jQeaBwA3oBQmJNCiqE+qEFUQNBB8AAJZbjqs6JdgA1LMfmCKIcQE3L0R2B7gBGbAqBqfYhkHkBiDdQu3UFNbuBkNoAGpY9AQyjYBSMAiQAEGAA489NnZ/6iiAAAAAASUVORK5CYII=\"","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAPhJREFUeNpiYBgFo2AUEAn+//8//z/xYD6x5rIQazmQSnj27NmLo0eP3sSn1traWl1KSioBqIeBkZExkWo+f/r06XM5ObkOoFAGEDvgwhYWFh5A5edJDQlSLOcgQp8AxY4g13KqOYISy7E5AsgNwKaGCZ8BoAT36NGjB0DmAiD+QaoDgInwA5DaCOUakOwAKLhBjuXEAqaBLl9GHTDgDmDElw3fv3//4e/fvw9EREQ+UGCHAggDc0QjkG4gqS4QFBQUwJV9qAVY8ORhRmwuHnYAXxrYT1WLGBkdSW4P3L59W4GKbkiAFulEpwFHqKZRMApGwfAGAAEGAJy+xoU1pcSFAAAAAElFTkSuQmCC\"","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAANxJREFUeNpiYBgFo2AUjAIiwf///+f/Jx7MJ9ZcFmItB1IJz549e3H06NGb+NRaW1urS0lJJQD1MDAyMiZSzedPnz59Licn1wEUygBiB1zYwsLCA6j8PKkhQYrlHEToE6DYEeRaTjVHUGI5NkcAuQHY1DDhMwCU4B49evQAyFwAxD9IdQAwEX4AUhuhXAOSHQAFN8ixnFjANNDly6gDBtwBjPiy4fv37z/8/fv3gYiIyAcK7FAAYWCOaATSDSTVBYKCggK4sg+1AAuePMyIzcWjYBSMglEw7ABAgAEAnPm+J1RtnyoAAAAASUVORK5CYII=\"","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAXlJREFUeNrsl7FugzAQQKMOKGPGTigDH+CxY8aO/gQm1DFjNjpWYsjYbskndOMHQF2QMlZiyYTSCSQG2o2eJbuyEOCYs8PSk04oPuT3wBgui8V/IKJt2wPLOeEiDrPAi6K4sLyphAx3XffF87wt/DzdRKILh6EnyCUMraxLDMGluj0JFdyqxLVwKxK6cKMSU+FGJLBwHYk71SSO43zB4Qj5g1nONE0JHOiUVy27ghXm6pMkOcHQs5YARsIIfKqEUbiuhDF4H0glMQYXNR2BVkfiGjir8e2sdcvPkGRMQgEnfA65pr3ulUJiDF6hnoe6rl8lic1QS9YD3wh4HMcfqJ2QZdlO6v38rkQP3BcnR1H0zmuP2G3oD0lw8BicGOkL4E7Qbwg+/75Hcs8K7JwgCI5G4SLyPH8Qayt/3cTzwOCU0jcY2kGubfWGpGmav1ZcwMuyrCT4vdXuOAzDNUh8ivWW+oatdXj37YdtWtAS7I/JLHAplhj4rwADAAc8Lmsu6N7iAAAAAElFTkSuQmCC\"","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAUhJREFUeNrslz0OgjAYhqmTo6MTEwcwYeUOduEAbo4egdHNI+DMpFNHHSCOcAUHorfArwlNKukP9gcXvuSLUJs+T4q+QBDMZVFd1+W0/wlnlf8F3rbti/akEjw8DMNjFEUHOK0nkRjCYWgPvYShlXcJEbwoijWF99/7k1DA6779SWjgrPxI6OBlWda0vUno4DCWQWMuE4QSdI6xAEDvKrggmHiJrBfIZIzFGJE4jt9pmhI43FRV1SRJcoXjBtbesi1GCO3g40znQN+YhO1voCOEPFjaSbb96zoPduKk2wGtACsRXBbFAzl7ARlcFcW8hJWACq6LYjbfRiBXwcdEMbeGcWEHUYznKJ6j2EoAohir4DIJJwKyKB7xtOwvin98ZHcbxSbvDc6i2PRvrBJAugXgPv+k937oi2mW9GsYxzEO7MvFGn7qI8AAjvv49jSDa0QAAAAASUVORK5CYII=\"","import { IconStatusDiv } from \"../../Components/Cards/IconStatusCard\";\nimport { loadGlanceAssetData } from \"../../api/character\";\nimport { loadCorpGlanceAssetData } from \"../../api/corporation\";\nimport Battlecruiser from \"../../assets/battleCruiser_32.png\";\nimport Battleship from \"../../assets/battleship_32.png\";\nimport Carrier from \"../../assets/carrier_32.png\";\nimport Cruiser from \"../../assets/cruiser_32.png\";\nimport Destroyer from \"../../assets/destroyer_32.png\";\nimport Dreadnought from \"../../assets/dreadnought_32.png\";\nimport Extractor from \"../../assets/extractor_64.png\";\nimport Fax from \"../../assets/forceAuxiliary_32.png\";\nimport Frieghter from \"../../assets/freighter_32.png\";\nimport Frigate from \"../../assets/frigate_32.png\";\nimport IndustrialCommand from \"../../assets/industrialCommand_32.png\";\nimport Industrial from \"../../assets/industrial_32.png\";\nimport MiningBarge from \"../../assets/miningBarge_32.png\";\nimport Injector from \"../../assets/skillInjector_64.png\";\nimport Supercarrier from \"../../assets/superCarrier_32.png\";\nimport Titan from \"../../assets/titan_32.png\";\nimport styles from \"./AtAGlance.module.css\";\nimport Card from \"react-bootstrap/Card\";\nimport { useQuery } from \"react-query\";\nimport { useParams } from \"react-router-dom\";\n\nexport const Assets = ({ data, isLoading }: any) => {\n return (\n <>\n

Assets

\n
\n \n Subcapital\n\n
\n \n \n \n \n \n
\n
\n \n Capital\n\n
\n \n \n \n \n \n
\n
\n \n Industrial\n\n
\n \n \n \n \n
\n
\n \n Notable\n\n
\n \n \n
\n
\n {/* \n
\n \n \n \n \n
\n
*/}\n
\n \n );\n};\n\nexport const CharacterGlancesAssets = () => {\n const { characterID } = useParams();\n\n const { data, isLoading } = useQuery({\n queryKey: [\"glances\", \"assets\", characterID],\n queryFn: () => loadGlanceAssetData(characterID? Number(characterID): 0),\n refetchOnWindowFocus: false,\n });\n console.log(data, isLoading);\n return ;\n};\n\nexport const CorporationGlancesAssets = () => {\n const { data, isLoading } = useQuery({\n queryKey: [\"glances\", \"corp\", \"assets\", 0],\n queryFn: () => loadCorpGlanceAssetData(0),\n refetchOnWindowFocus: false,\n });\n\n return ;\n};\n","export default \"__VITE_ASSET___vcKW$0U__\"","export default \"__VITE_ASSET__DTy1pRHE__\"","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAFiQAABYkBbWid+gAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAgKSURBVHic7VprcJTVGX7Ot7tBwm1qxXKTiwWlg3Rw0jFguEMCUYwkmJCBMJahE6SlhTEkTIVOBqd1jAHFJNxrRcp9B5rGhFDUJA4lBMpWISZgAyJyC1B1iGkue973nP7YXZtSlt1sdvfrjPvMnD9n3+c9z/t87377nfOt0FrjuwzDbAFmI2KA2QLMRsQAswWYjYgBZgswGxEDzBZgNiIGmC3AbEQMMFuA2QiHAaL+UmOi4/r1aH8J589/1fuTi9cTQinKg5AaUP/Z9cG1Fy7XMslD3Vp4kb+8FtGyWCv6S+2Fy6fPXrrUP5QaRTDPA86cudFDd2tJ1sL4aswjQw4BMD7+x6VPofVwAJ83PDp0eCrA98pRX18f5bREfwZgIATqxjwydDQA/dGnF5OgRY+2ntbicYMGtQZLc1A6wOFw2Bx1Db+R1m8aifmPTPS6O7cicq5lJjDT0GF1DWm+crXBNo+ZBjITFMm1ALQdsCjm9UrR7qimthuOuvMrq6qqrMHQ3mUDqurre5Ktx1FifpmIehIRiOSjJ2vPJgFAc7TtHSK6SURQzNk+0glJvMKVg67q1qZdAPDQ6bPPEdEw93wvYnq1+/39KxwOh9/3FW/okgEOh8MW1Y6DzBzLzOg4iHQOAEweOrSNiQqYGcT8eM1HZ6d7y1f98SdPMfMoZgYpejMmJkYCgFJqxZ35mWlCu+W+fV3thIANcDgctlZl3ckk45kI/zvkuGOO0+MBQLXojSypmYlA5MzxlpOlynbzb1vb/7UFAD48cXoKE/3krmtImmXp8b23u2JCQAa873D0aXbiMDGlub/fdx1SyhwAGD9+9Nes5e+ZCcQUX1X9tzF35qw4fuoJZjmJmaCYt8TGxjYBgNacfa81mCkD9/V8t6qqvmcgtfj1K1B+4kTv7ko9SMp4QABToMVCACP8yK+1UqOmTxx79v1jjsFC8wUAVgHsnjr+ifkdAz/460k7gOcAOJWQw+Lj4q4dqT71mEWpWr8KgT6ntXjbEOpDbdj+2U233YyLi/vGF8+/DmhFbyn1ekV8nIlfYaYRPq6KZwitVTYATI+L+YKZ9rq7IO1QRfUQT/ryiuofMlOK6+rTrvi4uGsAAKdc4ec6IOaRrChPsqoh2b62BejlT2l+GZA4OfZK/MQnZzFRBjE3kOuG5teQzPNL3js2AAAUcb573grQQk9+Bc4iZoOYNRGvBYDSiuMDSdG8zqxFrM5JVmkJk55M/tZEH+jUzSNx2sRdAHaVlx/tSxaOhdYWJdBoAOsAxHmhRQFYDiBn5rQJZ949UnkYwEwY4jAAlJcf7ass9FNXqC57JmFqvcustmUasHnTIiAqtYGXhEI/pbVkq6pJnjbty87UA3TSAA8SEyfcAlAKAMVlR2LYEN6KlwI4AK0PeCa0dL7GhhGdnBBfAwBOtC3VjO4AIAz12rdxJA8oYQwGdArubsRkrVVr8owZxYHU4EGXn6ZIqzWC7pgUuK0VCqNg2ZSUFP9frZj09IzKP5WVNQJAaWlpNGnrL9wf1cx5ZuZRT9yzTyWcAJBeUvLeACd4iTDwS2j06biKFngZwLNd0d+lvcDePx+KNbSquWO6VsOSPHd24gVffHtx6VINFAKA1mLO3OSnD3qNLSkZDjaKtcCojvMCiE2dPetkQAWgCw9Cdru9n5Zy+x0PPzuirRjrV/F2u4WJXnRzG86dOXXPVk5NSjoPah3LRHs6rknE7+zZU/KDQOsIqAO22+39LMqoBDDSlQVXhBIvZKSnlPmbY+f+A2laY5+LLhZnzE3Z6jd378EkbegN0BjknqqH05iyYEHyzU6UASCADlhTVWUVUq1i4g+I6eeKeRLaW0Z2pngAIEk57qt4g1qbdnSGm5GeUoL2lpGKeZJLA1Ww4fy13W63dK6aIJ8H+Is/7Ng9RUNXAIAWWP2zBfN/F3YRbphyJkjEOUwMJm6WzWIjAGzYseP7ZmgJuwFFW7ePZpYz3Zuet5Ysmfc1AIh22rhh27ZRvvjBRlBOVToDrZzZ7jMxUgZeB4BNmzY9rIRljoBuAbDwHvSgI6wdUFhYOIiJ04kYxLTvV5mZXwBAG+F5IrZIUvOKiooGhFNTWA1wKixnJhszQSnO98wr5Sx17+qi2kktC6emsP0K5OXl9RHWbpcB9NICR1a+uHxGx8/z162v1MBkALfBzodycnJ87uWDgbB1gBaWF5ipFzOB6T+bHg9IyXx3F/QhWDLDpSssHbBmzZooi63b5wD6A+Lvq19aGXM3Lb995dUzAB4DcOXBB+5/ODMzU4ZaW3g6wLBlMHN/94luvpcorYjXumMGNTbeSg+LtFAvIAQEkfSc9V+sqx1h9xZ79Wrf3UR0lYggmVaEWhsQBgNWrVo9i5l+5Lrz0xv796d6fTW2ZUumZJbr3feCH69alTvDW2ywEHIDJKtsd1t/GWW1vuUrvtlm28rMt10vUqSvN0ldRkgNyMpaOZaJJjARmGlDbm5uiy9OQW5uE0va4uZMy8rKejyUGkNqgNLS81Kj1dnWVuQvr90i3mQmJzNBASHtgpAZsGzZshFMPNu161PbCwoKbvnLLczLu6aYdzExWFLq0qVLh/hmBYaQGUBE40gxEZNqh1oXAD+fmDQxsdZ6bCg0AiF+EFq0aNEAm802dfPmzTsD4S9evPh5pdThbdu23Qi2Ng9MORH6f0LkX2JmCzAbEQPMFmA2IgaYLcBsRAwwW4DZiBhgtgCzETHAbAFm4ztvwL8Bjr5p8scs1bMAAAAASUVORK5CYII=\"","export default \"__VITE_ASSET__BZrGgydY__\"","export default \"__VITE_ASSET__B0Zl6HV2__\"","import { IconStatusCard, IconStatusDiv } from \"../../Components/Cards/IconStatusCard\";\nimport { loadGlanceFactionData } from \"../../api/character\";\nimport { loadCorpGlanceFactionData } from \"../../api/corporation\";\nimport Amarr from \"../../assets/amarr_128.png\";\nimport Cal from \"../../assets/caldari_128.png\";\nimport FW from \"../../assets/fw_64.png\";\nimport Gal from \"../../assets/gallente_128.png\";\nimport Min from \"../../assets/minmatar128.png\";\nimport styles from \"./AtAGlance.module.css\";\nimport Card from \"react-bootstrap/Card\";\nimport { useQuery } from \"react-query\";\nimport { useParams } from \"react-router-dom\";\n\nexport const Factions = ({ data }: any) => {\n return (\n <>\n

Affiliations

\n
\n \n Detected Militia\n
\n \n \n \n \n \n \n
\n
\n \n Loyalty Points\n\n
\n \n {data?.lp?.top_five?.map((lp_data: any) => {\n return (\n \n );\n })}\n
\n
\n
\n \n );\n};\n\nexport const CharacterGlancesFactions = () => {\n const { characterID } = useParams();\n\n const { data } = useQuery({\n queryKey: [\"glances\", \"faction\", characterID],\n queryFn: () => loadGlanceFactionData(characterID? Number(characterID): 0),\n refetchOnWindowFocus: false,\n });\n return ;\n};\n\nexport const CorporationGlancesFactions = () => {\n const { data } = useQuery({\n queryKey: [\"glances\", \"corp\", \"faction\", 0],\n queryFn: () => loadCorpGlanceFactionData(0),\n refetchOnWindowFocus: false,\n });\n return ;\n};\n","import { CharacterGlancesAccount } from \"../Glance/Account\";\nimport { CharacterGlancesActivities } from \"../Glance/Activities\";\nimport { CharacterGlancesAssets } from \"../Glance/Assets\";\nimport { CharacterGlancesFactions } from \"../Glance/Factions\";\n\nconst CharacterAtAGlance = () => {\n return (\n
\n {/* */}\n \n \n \n \n\n {/*

Character Status

*/}\n
\n );\n};\n\nexport default CharacterAtAGlance;\n","import CharacterAtAGlance from \"./CharacterAtAGlance\";\n\nconst CharacterOverview = () => {\n return (\n <>\n \n \n );\n};\n\nexport default CharacterOverview;\n","import React from \"react\";\nimport { Image } from \"react-bootstrap\";\n\ntype Sizes = 32 | 64 | 128 | 256 | 512;\n\nexport interface CharacterPortraitProps extends Partial {\n character_id?: number | string | undefined;\n size: Sizes;\n height?: number;\n width?: number;\n style?: Partial;\n className?: string;\n}\n\nexport const CharacterPortrait = (props: CharacterPortraitProps) => {\n return (\n \n );\n};\n\nexport interface CorporationLogoProps extends Partial {\n corporation_id?: number | string | undefined;\n size: Sizes;\n height?: number;\n width?: number;\n style?: Partial;\n}\n\nexport const CorporationLogo = (props: CorporationLogoProps) => {\n return (\n \n );\n};\n\nexport interface AllianceLogoProps extends Partial {\n alliance_id?: number | string | undefined;\n size: Sizes;\n height?: number;\n width?: number;\n style?: Partial;\n}\n\nexport const AllianceLogo = (props: AllianceLogoProps) => {\n return (\n \n );\n};\n\nexport interface TypeIconProps extends Partial {\n type_id?: number;\n size: Sizes;\n height?: number;\n width?: number;\n style?: Partial;\n}\n\nexport const TypeIcon = (props: TypeIconProps) => {\n return (\n 64 ? \"render\" : \"icon\"\n }?size=${props.size}`}\n />\n );\n};\n\nexport interface PortraitProps extends Partial {\n character: {\n character_id: number | string | undefined;\n corporation_id?: number | string | undefined;\n alliance_id?: number | string | undefined;\n faction_id?: number | string | undefined;\n };\n size: number;\n rounded_images?: boolean;\n style?: Partial;\n className?: string;\n}\n\nexport const CharacterAllegiancePortrait = (props: PortraitProps) => {\n const borderStyle = props.rounded_images\n ? {\n borderRadius: \"50%\",\n }\n : {};\n return (\n \n \n \n {props.character.faction_id ? (\n \n ) : (\n props.character.alliance_id && (\n \n )\n )}\n \n );\n};\n","import { CharacterAllegiancePortrait } from \"../EveImages/EveImages\";\nimport styles from \"./PortraitCard.module.css\";\nimport React from \"react\";\nimport { Card } from \"react-bootstrap\";\nimport Row from \"react-bootstrap/Row\";\n\nexport declare interface PortraitCardProps {\n children: React.ReactNode; // best, accepts everything React can render\n style?: React.CSSProperties; // to pass through style props\n bg?: string;\n border?: string;\n heading: string;\n isFetching?: boolean;\n headerIcon?: string;\n roundedImages?: string;\n character: any; //todo type from api?\n}\n\nexport function PortraitCard({\n children,\n character,\n style,\n bg,\n border,\n isFetching,\n headerIcon,\n heading,\n roundedImages,\n}: PortraitCardProps) {\n return (\n \n \n \n \n \n
{headerIcon && }
\n
{heading}
\n
\n {isFetching && }\n
\n
\n\n {headerIcon && <>}\n
\n {children}\n
\n \n );\n}\n","import { PortraitCard } from \"../Cards/PortraitCard\";\nimport { Table } from \"react-bootstrap\";\n\nconst CharacterPubDataPanels = ({ isFetching, data }: { isFetching: boolean; data: any }) => {\n if (!data) return

Loading

;\n\n return (\n
\n {data?.characters.map((char: any) => {\n const char_status = char.active ? \"success\" : \"warning\";\n return (\n \n
\n
\n \n \n \n \n \n \n \n
CorporationJoined
\n
\n \n \n {char.history?.map((h: any) => {\n return (\n \n \n \n \n );\n })}\n \n
{h.corporation.corporation_name}{h.start.slice(0, 10)}
\n
\n
\n
\n \n );\n })}\n
\n );\n};\n\nexport default CharacterPubDataPanels;\n","import CharacterPubDataPanels from \"../../Components/Character/CharacterPubDataPanels\";\nimport { loadPubData } from \"../../api/character\";\nimport { useQuery } from \"react-query\";\nimport { useParams } from \"react-router-dom\";\n\nconst CharacterPubData = () => {\n const { characterID } = useParams();\n\n const { data, isFetching } = useQuery([\"pubdata\", characterID], () => loadPubData(characterID? Number(characterID): 0), {\n refetchOnWindowFocus: false,\n });\n\n console.log(data);\n\n return (\n <>\n {/* */}\n \n \n );\n};\n\nexport default CharacterPubData;\n","import React, { JSXElementConstructor, ReactElement, useState } from \"react\";\nimport { Collapse } from \"react-bootstrap\";\nimport { Row } from \"react-bootstrap\";\n\nexport declare interface CollapseBlockProps {\n children: ReactElement>; // best, accepts everything React can render\n style?: React.CSSProperties; // to pass through style props\n heading: string;\n className?: string;\n id?: string;\n}\n\nexport function CollapseBlock({ heading, id, children, className }: CollapseBlockProps) {\n const [open, setOpen] = useState(false);\n return (\n <>\n \n
\n

{heading}

\n
\n
\n

\n setOpen(!open)}\n className={`text-right fas fa-chevron-${open ? \"up\" : \"down\"} fa-fw`}\n aria-controls=\"example-collapse-text\"\n aria-expanded={open}\n >\n

\n
\n \n \n
{children}
\n
\n \n );\n}\n","export default function dateParser(date) {\n const parsed = new Date(date);\n if (!Number.isNaN(parsed.valueOf())) {\n return parsed;\n }\n const parts = String(date).match(/\\d+/g);\n if (parts == null || parts.length <= 2) {\n return parsed;\n } else {\n const [firstP, secondP, ...restPs] = parts.map(x => parseInt(x));\n const correctedParts = [firstP, secondP - 1, ...restPs];\n const isoDate = new Date(Date.UTC(...correctedParts));\n return isoDate;\n }\n}","export default function defaultFormatter(value, _unit, suffix) {\n const unit = value !== 1 ? _unit + 's' : _unit;\n return value + ' ' + unit + ' ' + suffix;\n}","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport * as React from 'react';\nimport { useEffect, useState } from 'react';\nimport dateParser from './dateParser';\nimport defaultFormatter from './defaultFormatter';\n// Just some simple constants for readability\nconst MINUTE = 60;\nconst HOUR = MINUTE * 60;\nconst DAY = HOUR * 24;\nconst WEEK = DAY * 7;\nconst MONTH = DAY * 30;\nconst YEAR = DAY * 365;\nconst defaultNow = () => Date.now();\nexport default function TimeAgo({\n date,\n formatter = defaultFormatter,\n component = 'time',\n live = true,\n minPeriod = 0,\n maxPeriod = WEEK,\n title,\n now = defaultNow,\n ...passDownProps\n}) {\n const [timeNow, setTimeNow] = useState(now());\n useEffect(() => {\n if (!live) {\n return;\n }\n const tick = () => {\n const then = dateParser(date).valueOf();\n if (!then) {\n console.warn('[react-timeago] Invalid Date provided');\n return 0;\n }\n const seconds = Math.round(Math.abs(timeNow - then) / 1000);\n const unboundPeriod = seconds < MINUTE ? 1000 : seconds < HOUR ? 1000 * MINUTE : seconds < DAY ? 1000 * HOUR : 1000 * WEEK;\n const period = Math.min(Math.max(unboundPeriod, minPeriod * 1000), maxPeriod * 1000);\n if (period) {\n return setTimeout(() => {\n setTimeNow(now());\n }, period);\n }\n return 0;\n };\n const timeoutId = tick();\n return () => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n };\n }, [date, live, maxPeriod, minPeriod, now, timeNow]);\n const Komponent = component;\n const then = dateParser(date).valueOf();\n if (!then) {\n return null;\n }\n const seconds = Math.round(Math.abs(timeNow - then) / 1000);\n const suffix = then < timeNow ? 'ago' : 'from now';\n const [value, unit] = seconds < MINUTE ? [Math.round(seconds), 'second'] : seconds < HOUR ? [Math.round(seconds / MINUTE), 'minute'] : seconds < DAY ? [Math.round(seconds / HOUR), 'hour'] : seconds < WEEK ? [Math.round(seconds / DAY), 'day'] : seconds < MONTH ? [Math.round(seconds / WEEK), 'week'] : seconds < YEAR ? [Math.round(seconds / MONTH), 'month'] : [Math.round(seconds / YEAR), 'year'];\n const passDownTitle = typeof title === 'undefined' ? typeof date === 'string' ? date : dateParser(date).toISOString().substr(0, 16).replace('T', ' ') : title;\n const spreadProps = Komponent === 'time' ? {\n ...passDownProps,\n dateTime: dateParser(date).toISOString()\n } : passDownProps;\n const nextFormatter = defaultFormatter.bind(null, value, unit, suffix);\n return /*#__PURE__*/React.createElement(Komponent, _extends({}, spreadProps, {\n title: passDownTitle\n }), formatter(value, unit, suffix, then, nextFormatter, now));\n}","import { PortraitCard } from \"../Cards/PortraitCard\";\nimport { CollapseBlock } from \"../Helpers/CollapseBlock\";\nimport { Badge, Button, ButtonGroup, Card, Table } from \"react-bootstrap\";\nimport TimeAgo from \"react-timeago\";\n\nconst CharacterStatusPanels = ({ data, isFetching }: { data: any; isFetching: boolean }) => {\n return (\n
\n {data?.characters.map((char: any) => {\n const char_status = char.active ? \"success\" : \"warning\";\n return (\n \n
\n \n {char.character.corporation_name}\n
\n {char.character.alliance_name ? char.character.alliance_name :
}\n
\n\n \n Skill Points:{\" \"}\n {char.sp && char.sp.toLocaleString()}\n
\n Isk:{\" \"}\n ${char.isk && char.isk.toLocaleString()}\n
\n Location\n \n \n {char.location ? char.location : \"Unknown Location\"}\n \n
\n {char.ship ? char.ship : \"Unknown Ship\"}\n
\n \n \n \n zKill\n \n \n Eve Who\n \n \n DotLan\n \n \n \n \n
\n \n \n \n \n \n \n \n
UpdateLast Run
\n
\n \n \n {data?.headers.map((h: any) => {\n return (\n \n \n \n \n );\n })}\n \n
{h}\n {char.last_updates ? (\n char.last_updates[h] ? (\n \n ) : (\n \"Never\"\n )\n ) : (\n \"Never\"\n )}\n
\n
\n
\n \n
\n \n );\n })}\n
\n );\n};\n\nexport default CharacterStatusPanels;\n","import { CollapseBlock } from \"../Helpers/CollapseBlock\";\nimport BaseTable from \"../Tables/BaseTable/BaseTable\";\nimport { createColumnHelper } from \"@tanstack/react-table\";\nimport { Button, Table } from \"react-bootstrap\";\nimport TimeAgo from \"react-timeago\";\n\ntype Character = {\n character_name: string;\n corporation_name: string;\n alliance_name: string;\n};\n\ntype UpdateType = Record;\n\ntype CharacterType = {\n character: Character;\n isk: number;\n sp: number;\n active: boolean;\n last_updates: UpdateType;\n};\n\nconst UpdateTableRows = ({ values }: { values: UpdateType }) => {\n if (values) {\n return Object.keys(values)?.map((h: string) => {\n return (\n \n {h}\n \n {values ? values[h] ? : \"Never\" : \"Never\"}\n \n \n );\n });\n }\n};\n\nconst CharacterStatusTable = ({ data, isFetching }: { data: any; isFetching: boolean }) => {\n const columnHelper = createColumnHelper();\n\n const columns = [\n columnHelper.accessor(\"character.character_name\", {\n header: \"Character\",\n }),\n columnHelper.accessor(\"character.corporation_name\", {\n header: \"Corporation\",\n }),\n columnHelper.accessor(\"character.alliance_name\", {\n header: \"Alliance\",\n }),\n columnHelper.accessor(\"isk\", {\n header: \"Isk\",\n cell: (cell) => {\n return cell.getValue().toLocaleString();\n },\n }),\n columnHelper.accessor(\"sp\", {\n header: \"SP\",\n cell: (cell) => {\n return cell.getValue().toLocaleString();\n },\n }),\n columnHelper.accessor(\"active\", {\n header: \"Active\",\n cell: (cell) => {\n const isActive = cell.getValue();\n return (\n
\n \n
\n );\n },\n }),\n columnHelper.accessor(\"last_updates\", {\n header: \"Updates\",\n cell: (cell) => {\n return (\n \n <>\n \n \n \n \n \n \n \n
UpdateLast Run
\n
\n \n \n \n \n
\n
\n \n \n );\n },\n }),\n ];\n\n return ;\n};\n\nexport default CharacterStatusTable;\n","import CharacterStatusPanels from \"../../Components/Character/CharacterStatusPanels\";\nimport CharacterStatusTable from \"../../Components/Character/CharacterStatusTable\";\nimport { loadCharacterStatus } from \"../../api/character\";\nimport { useState } from \"react\";\nimport { Card, Form } from \"react-bootstrap\";\nimport { useQuery } from \"react-query\";\nimport { useParams } from \"react-router-dom\";\n\nconst CharacterStatus = () => {\n const { characterID } = useParams();\n const [table, setTable] = useState(false);\n const { data, isFetching } = useQuery({\n queryKey: [\"status\", characterID],\n queryFn: () => loadCharacterStatus(characterID? Number(characterID): 0),\n refetchOnWindowFocus: false,\n initialData: { characters: [], main: undefined, headers: [] },\n });\n\n return (\n <>\n \n
\n {\n setTable(event.target.checked);\n }}\n defaultChecked={table}\n />\n
\n
\n {table ? (\n \n ) : (\n <>\n \n \n )}\n \n );\n};\n\nexport default CharacterStatus;\n","import { IconStatusCard } from \"../../Components/Cards/IconStatusCard\";\nimport { loadCorpGlanceStatusData } from \"../../api/corporation\";\nimport Isk from \"../../assets/isk_128.png\";\nimport Omega from \"../../assets/omega_128.png\";\nimport Unknowns from \"../../assets/unknown_64.png\";\nimport styles from \"./AtAGlance.module.css\";\nimport { useQuery } from \"react-query\";\n\nexport const CorporationGlancesInfo = () => {\n const { data, isLoading } = useQuery({\n queryKey: [\"glances\", \"corporation\", \"status\", 0],\n queryFn: () => loadCorpGlanceStatusData(0),\n refetchOnWindowFocus: false,\n });\n\n return (\n <>\n

Corporation Members

\n
\n \n\n \n\n \n\n 0 ? \"danger\" : \"success\"}\n iconSrc={Unknowns}\n textVariant={data?.characters?.bad > 0 ? \"danger\" : \"success\"}\n text={data?.characters?.bad?.toLocaleString()}\n isLoading={isLoading}\n toolTipText=\"Count of all known characters or alts not loading into audit\"\n />\n\n {/* \n */}\n
\n \n );\n};\n","import { CorporationGlancesActivities } from \"../Glance/Activities\";\nimport { CorporationGlancesAssets } from \"../Glance/Assets\";\nimport { CorporationGlancesInfo } from \"../Glance/Corporation\";\nimport { CorporationGlancesFactions } from \"../Glance/Factions\";\n\nconst CorporationAtAGlance = () => {\n return (\n
\n {/* */}\n \n \n \n \n\n {/*

Character Status

*/}\n
\n );\n};\n\nexport default CorporationAtAGlance;\n","import { Nav } from \"react-bootstrap\";\nimport { NavDropdown } from \"react-bootstrap\";\nimport { LinkContainer } from \"react-router-bootstrap\";\n\nexport interface MenuItemProps {\n name: string;\n link: string;\n}\n\nexport interface CategoryProps {\n name: string;\n links: Array;\n}\n\nexport interface CorpMenuProps extends Partial {\n isLoading?: boolean;\n data?: Array | null;\n error?: boolean;\n}\n\nconst CorpMenu = (props: CorpMenuProps) => {\n console.log(props);\n return (\n <>\n \n \n Overview\n \n \n \n \n Structures\n \n \n \n \n Wallets\n \n \n \n \n Asset Overview\n \n \n \n \n Asset List\n \n \n \n \n Pocos\n \n \n \n \n Bridges\n \n \n Sov Upgrades\n \n \n\n {/* {data &&\n data.map((cat: CategoryProps) => {\n return (\n \n {cat.links.map((link: MenuItemProps) => {\n return (\n \n \n {link.name}\n \n \n );\n })}\n \n );\n })} */}\n \n );\n};\n\nexport default CorpMenu;\n","import CorpMenu from \"./CorpMenu\";\nimport ReactDOM from \"react-dom\";\n\nconst menuRoot = document.getElementById(\"nav-left\");\n\nconst CorpMenuPortal = () => {\n if (!menuRoot) {\n return <>;\n }\n return ReactDOM.createPortal(, menuRoot);\n};\n\nexport { CorpMenuPortal };\n","import { postCorporationRefresh } from \"../../api/corporation\";\nimport Button from \"react-bootstrap/Button\";\n// import { Checkbox, FormControl, Glyphicon, NavDropdown, NavItem } from \"react-bootstrap\";\nimport Form from \"react-bootstrap/Form\";\nimport Nav from \"react-bootstrap/Nav\";\nimport NavDropdown from \"react-bootstrap/NavDropdown\";\nimport { useMutation } from \"react-query\";\n\nfunction CorpAddToken() {\n const { mutate } = useMutation(postCorporationRefresh);\n\n return (\n <>\n \n {/* */}\n \n
\n \n
\n \n
Assets Enables LO Levels in Bridges
\n\n \n
Moons enable Active Observation Tracking
\n\n \n
Required for invoice module on holding corps
\n\n \n
Member Tracking enables the Last Login Tracking of characters for smart filters
\n\n \n\n
\n
\n \n \n \n {/*
*/}\n
\n mutate()}>\n \n \n \n );\n}\n\nexport default CorpAddToken;\n","import CorpAddToken from \"./CorpAddToken\";\nimport styles from \"./CorpMenu.module.css\";\nimport React from \"react\";\nimport { Nav } from \"react-bootstrap\";\nimport ReactDOM from \"react-dom\";\nimport { useIsFetching } from \"react-query\";\nimport { LinkContainer } from \"react-router-bootstrap\";\n\nconst menuRoot = document.getElementById(\"nav-right\");\n\nconst CorpMenuRight = () => {\n const isLoading = useIsFetching();\n const [innerHtmlEmptied, setInnerHtmlEmptied] = React.useState(false);\n\n React.useEffect(() => {\n if (!innerHtmlEmptied) {\n if (menuRoot) {\n menuRoot.innerHTML = \"\";\n setInnerHtmlEmptied(true);\n }\n }\n }, [innerHtmlEmptied]);\n\n if (!innerHtmlEmptied) return null;\n if (!menuRoot) {\n return <>;\n }\n return ReactDOM.createPortal(\n <>\n {isLoading ? (\n <>\n \n \n \n \n ) : (\n <>\n )}\n \n \n Corporations\n \n \n \n \n \n \n ,\n menuRoot\n );\n};\n\nexport { CorpMenuRight };\n","import { CorpMenuPortal } from \"../../Components/CorporationMenu/CorpMenuPortal\";\nimport { CorpMenuRight } from \"../../Components/CorporationMenu/CorpMenuRight\";\nimport { Card, Col } from \"react-bootstrap\";\nimport { Outlet } from \"react-router-dom\";\n\nconst CharacterAudit = () => {\n return (\n <>\n \n \n \n \n {/* Render the Children here */}\n \n \n \n );\n};\n\nexport default CharacterAudit;\n","var _excluded = [\"date\", \"verboseDate\", \"tooltip\", \"children\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React, { useMemo } from 'react';\nimport PropTypes from 'prop-types';\nexport default function Time(_ref, ref) {\n var date = _ref.date,\n verboseDate = _ref.verboseDate,\n tooltip = _ref.tooltip,\n children = _ref.children,\n rest = _objectWithoutProperties(_ref, _excluded);\n\n var isoString = useMemo(function () {\n return date.toISOString();\n }, [date]);\n return /*#__PURE__*/React.createElement(\"time\", _extends({\n ref: ref\n }, rest, {\n dateTime: isoString,\n title: tooltip ? verboseDate : undefined\n }), children);\n} // https://gitlab.com/catamphetamine/react-time-ago/-/issues/5\n//\n// Someone used this component with \"Material UI\"'s `` component,\n// and that component required `children` be `ref`-able.\n// https://github.com/mui-org/material-ui/blob/a9903917f919092f80d84075f39fb51d51f241f2/packages/mui-material/src/Tooltip/Tooltip.js#L494-L496\n// \n// That component seems to only be using that `ref-`ability to check whether \n// the `children` element qualifies for `:focus-visible` selector.\n// https://github.com/mui-org/material-ui/blob/a9903917f919092f80d84075f39fb51d51f241f2/packages/mui-utils/src/useIsFocusVisible.ts#L105\n//\n\nTime = /*#__PURE__*/React.forwardRef(Time);\nTime.propTypes = {\n date: PropTypes.instanceOf(Date).isRequired,\n verboseDate: PropTypes.string,\n tooltip: PropTypes.bool.isRequired,\n children: PropTypes.string.isRequired\n};\n//# sourceMappingURL=Time.js.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); }\n\n/**\r\n * Whether can use `Intl.DateTimeFormat` for these `locales`.\r\n * Returns the first suitable one.\r\n * @param {(string|string[])} locales\r\n * @return {?string} The first locale that can be used.\r\n */\nexport function intlDateTimeFormatSupportedLocale(locales) {\n /* istanbul ignore else */\n if (intlDateTimeFormatSupported()) {\n return Intl.DateTimeFormat.supportedLocalesOf(locales)[0];\n }\n}\n/**\r\n * Whether can use `Intl.DateTimeFormat`.\r\n * @return {boolean}\r\n */\n\nexport function intlDateTimeFormatSupported() {\n // Babel transforms `typeof` into some \"branches\"\n // so istanbul will show this as \"branch not covered\".\n\n /* istanbul ignore next */\n var isIntlAvailable = (typeof Intl === \"undefined\" ? \"undefined\" : _typeof(Intl)) === 'object';\n return isIntlAvailable && typeof Intl.DateTimeFormat === 'function';\n}\n//# sourceMappingURL=locale.js.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); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\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, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\n/**\r\n * A basic in-memory cache.\r\n *\r\n * import Cache from 'javascript-time-ago/Cache'\r\n * const cache = new Cache()\r\n * const object = cache.get('key1', 'key2', ...) || cache.put('key1', 'key2', ..., createObject())\r\n */\nvar Cache = /*#__PURE__*/function () {\n function Cache() {\n _classCallCheck(this, Cache);\n\n this.cache = {};\n }\n\n _createClass(Cache, [{\n key: \"get\",\n value: function get() {\n var cache = this.cache;\n\n for (var _len = arguments.length, keys = new Array(_len), _key = 0; _key < _len; _key++) {\n keys[_key] = arguments[_key];\n }\n\n for (var _i = 0, _keys = keys; _i < _keys.length; _i++) {\n var key = _keys[_i];\n\n if (_typeof(cache) !== 'object') {\n return;\n }\n\n cache = cache[key];\n }\n\n return cache;\n }\n }, {\n key: \"put\",\n value: function put() {\n for (var _len2 = arguments.length, keys = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n keys[_key2] = arguments[_key2];\n }\n\n var value = keys.pop();\n var lastKey = keys.pop();\n var cache = this.cache;\n\n for (var _i2 = 0, _keys2 = keys; _i2 < _keys2.length; _i2++) {\n var key = _keys2[_i2];\n\n if (_typeof(cache[key]) !== 'object') {\n cache[key] = {};\n }\n\n cache = cache[key];\n }\n\n return cache[lastKey] = value;\n }\n }]);\n\n return Cache;\n}();\n\nexport { Cache as default };\n//# sourceMappingURL=cache.js.map","import memoize from 'memoize-one';\nimport { intlDateTimeFormatSupported, intlDateTimeFormatSupportedLocale } from './locale.js';\nimport Cache from './cache.js';\nvar cache = new Cache();\nvar INTL_DATE_TIME_FORMAT_SUPPORTED = intlDateTimeFormatSupported();\n\nvar FALLBACK_VERBOSE_DATE_FORMATTER = function FALLBACK_VERBOSE_DATE_FORMATTER(date) {\n return date.toString();\n};\n/**\r\n * Returns a verbose date formatter.\r\n * \r\n * @param {string} locale - Date formatting locale\r\n * @param {object} format - Output format\r\n * @param {string} format.day - Day format\r\n * @param {string} format.month - Month format\r\n * @param {string} format.year - Year format\r\n * @param {string} format.weekday - Weekday format\r\n * @param {string} format.hour - Hour format\r\n * @param {string} format.minute - Minute format\r\n * @param {string} format.second - Second format\r\n *\r\n * @returns {Function} `(date) -> string`.\r\n */\n\n\nfunction getVerboseDateFormatter(locales, format) {\n // Fall back to `date.toString()` for old web browsers.\n // https://caniuse.com/#search=intl\n if (!INTL_DATE_TIME_FORMAT_SUPPORTED) {\n return FALLBACK_VERBOSE_DATE_FORMATTER;\n } // If none of the `locales` are supported\n // a default system locale will be used.\n\n\n var locale = resolveLocale(locales); // `Intl.DateTimeFormat` format caching key.\n // E.g. `\"{\"day\":\"numeric\",\"month\":\"short\",...}\"`.\n // Didn't benchmark what's faster:\n // creating a new `Intl.DateTimeFormat` instance\n // or stringifying a small JSON `format`.\n // Perhaps strigifying JSON `format` is faster.\n\n var formatFingerprint = JSON.stringify(format); // Get `Intl.DateTimeFormat` instance for these `locale` and `format`.\n // (`locale` can be `undefined`, hence the `String(locale)` conversion)\n\n var formatter = cache.get(String(locale), formatFingerprint) || cache.put(String(locale), formatFingerprint, new Intl.DateTimeFormat(locale, format)); // Return date formatter\n\n return function (date) {\n return formatter.format(date);\n };\n} // Even though `getVerboseDateFormatter()` function is called inside a\n// `useMemo()` hook, it's still invoked every time for different \n// `` elements on a page. There could be a lot of such\n// `` elements on a page. And `useMemo()` wouldn't speed up\n// the initial render. To work around that, simple argument-based memoization\n// is used.\n\n\nexport default memoize(getVerboseDateFormatter); // Caching locale resolving for optimizing pages \n// with a lot of `` elements (say, 100 or more).\n// `Intl.DateTimeFormat.supportedLocalesOf(locales)` is not instantaneous.\n// For example, it could be 25 milliseconds for 200 calls.\n\nvar resolvedLocales = {};\n/**\r\n * Resolves a list of possible locales to a single (\"best fit\") supported locale.\r\n * @param {string[]} locales\r\n * @return {string}\r\n */\n\nfunction resolveLocale(locales) {\n var localesFingerprint = locales.toString();\n\n if (resolvedLocales[localesFingerprint]) {\n return resolvedLocales[localesFingerprint];\n }\n\n return resolvedLocales[localesFingerprint] = intlDateTimeFormatSupportedLocale(locales);\n}\n//# sourceMappingURL=getVerboseDateFormatter.js.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); }\n\n/**\r\n * Converts value to a `Date`\r\n * @param {(number|Date)} value\r\n * @return {Date}\r\n */\nexport function getDate(value) {\n return isDate(value) ? value : new Date(value);\n}\n/**\r\n * Converts value to a timestamp.\r\n * @param {(number|Date)} value\r\n * @return {number}\r\n */\n\nexport function getTime(value) {\n return isDate(value) ? value.getTime() : value;\n}\n\nfunction isDate(object) {\n return object instanceof Date || isMockedDate(object);\n} // During testing via some testing libraries `Date`s aren't actually `Date`s.\n// https://github.com/catamphetamine/javascript-time-ago/issues/22\n\n\nexport function isMockedDate(object) {\n return _typeof(object) === 'object' && typeof object.getTime === 'function';\n}\n//# sourceMappingURL=date.js.map","import TimeAgo from 'javascript-time-ago';\nimport Cache from './cache.js';\nvar TimeAgoCache = new Cache();\nexport default function getTimeAgo(preferredLocales, _ref) {\n var polyfill = _ref.polyfill;\n // `TimeAgo` instance creation is (hypothetically) assumed\n // a lengthy operation so the instances are cached and reused.\n // https://gitlab.com/catamphetamine/react-time-ago/-/issues/1\n var key = String(preferredLocales) + ':' + String(polyfill);\n return TimeAgoCache.get(key) || TimeAgoCache.put(key, new TimeAgo(preferredLocales, {\n polyfill: polyfill\n }));\n}\n//# sourceMappingURL=getTimeAgo.js.map","// Generated by CoffeeScript 1.12.2\n(function() {\n var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime;\n\n if ((typeof performance !== \"undefined\" && performance !== null) && performance.now) {\n module.exports = function() {\n return performance.now();\n };\n } else if ((typeof process !== \"undefined\" && process !== null) && process.hrtime) {\n module.exports = function() {\n return (getNanoSeconds() - nodeLoadTime) / 1e6;\n };\n hrtime = process.hrtime;\n getNanoSeconds = function() {\n var hr;\n hr = hrtime();\n return hr[0] * 1e9 + hr[1];\n };\n moduleLoadTime = getNanoSeconds();\n upTime = process.uptime() * 1e9;\n nodeLoadTime = moduleLoadTime - upTime;\n } else if (Date.now) {\n module.exports = function() {\n return Date.now() - loadTime;\n };\n loadTime = Date.now();\n } else {\n module.exports = function() {\n return new Date().getTime() - loadTime;\n };\n loadTime = new Date().getTime();\n }\n\n}).call(this);\n\n//# sourceMappingURL=performance-now.js.map\n","var now = require('performance-now')\n , root = typeof window === 'undefined' ? global : window\n , vendors = ['moz', 'webkit']\n , suffix = 'AnimationFrame'\n , raf = root['request' + suffix]\n , caf = root['cancel' + suffix] || root['cancelRequest' + suffix]\n\nfor(var i = 0; !raf && i < vendors.length; i++) {\n raf = root[vendors[i] + 'Request' + suffix]\n caf = root[vendors[i] + 'Cancel' + suffix]\n || root[vendors[i] + 'CancelRequest' + suffix]\n}\n\n// Some versions of FF have rAF but not cAF\nif(!raf || !caf) {\n var last = 0\n , id = 0\n , queue = []\n , frameDuration = 1000 / 60\n\n raf = function(callback) {\n if(queue.length === 0) {\n var _now = now()\n , next = Math.max(0, frameDuration - (_now - last))\n last = next + _now\n setTimeout(function() {\n var cp = queue.slice(0)\n // Clear queue here to prevent\n // callbacks from appending listeners\n // to the current frame's queue\n queue.length = 0\n for(var i = 0; i < cp.length; i++) {\n if(!cp[i].cancelled) {\n try{\n cp[i].callback(last)\n } catch(e) {\n setTimeout(function() { throw e }, 0)\n }\n }\n }\n }, Math.round(next))\n }\n queue.push({\n handle: ++id,\n callback: callback,\n cancelled: false\n })\n return id\n }\n\n caf = function(handle) {\n for(var i = 0; i < queue.length; i++) {\n if(queue[i].handle === handle) {\n queue[i].cancelled = true\n }\n }\n }\n}\n\nmodule.exports = function(fn) {\n // Wrap in a new function to prevent\n // `cancel` potentially being assigned\n // to the native rAF function\n return raf.call(root, fn)\n}\nmodule.exports.cancel = function() {\n caf.apply(root, arguments)\n}\nmodule.exports.polyfill = function(object) {\n if (!object) {\n object = root;\n }\n object.requestAnimationFrame = raf\n object.cancelAnimationFrame = caf\n}\n","// \"Binary\" search in a sorted array.\nexport default function (array, test) {\n if (array.length === 0) {\n return 0;\n }\n\n var min = 0;\n var max = array.length - 1;\n var guess;\n\n while (min <= max) {\n guess = Math.floor((max + min) / 2);\n var result = test(array[guess]);\n\n if (result === 0) {\n return guess;\n } else if (result < 0) {\n min = guess + 1;\n\n if (min > max) {\n return min;\n }\n } else {\n max = guess - 1;\n\n if (max < min) {\n return min;\n }\n }\n } // return -1\n // return min\n\n}\n//# sourceMappingURL=binarySearch.js.map","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\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.\"); }\n\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); }\n\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; }\n\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; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\n// Manages the updates of all `` elements on a page.\n// The reasons for going with `requestAnimationFrame()`:\n// * `requestAnimationFrame` won't be called when a tab is in background.\n// * Chrome has bugs when handling `setTimeout()`: https://www.npmjs.com/package/request-animation-frame-timeout\n// `requestAnimationFrame()` polyfill for old browsers.\nimport requestAnimationFrame from 'raf';\nimport binarySearch from './helpers/binarySearch.js';\nexport default {\n instances: [],\n add: function add(instance) {\n var _this = this;\n\n var wasIdle = this.instances.length === 0;\n\n _add(this.instances, instance);\n\n if (wasIdle) {\n this.start();\n }\n\n return {\n stop: function stop() {\n remove(_this.instances, instance);\n\n if (_this.instances.length === 0) {\n _this.stop();\n }\n },\n forceUpdate: function forceUpdate() {\n updateInstance(instance, _this.instances);\n }\n };\n },\n tick: function tick() {\n var now = Date.now();\n\n while (true) {\n var instance = this.instances[0];\n\n if (now >= instance.nextUpdateTime) {\n updateInstance(instance, this.instances);\n } else {\n break;\n }\n }\n },\n scheduleNextTick: function scheduleNextTick() {\n var _this2 = this;\n\n this.scheduledTick = requestAnimationFrame(function () {\n _this2.tick();\n\n _this2.scheduleNextTick();\n });\n },\n start: function start() {\n this.scheduleNextTick();\n },\n stop: function stop() {\n requestAnimationFrame.cancel(this.scheduledTick);\n }\n};\n\nfunction _updateInstance(instance) {\n var _instance$getNextValu = instance.getNextValue(),\n _instance$getNextValu2 = _slicedToArray(_instance$getNextValu, 2),\n value = _instance$getNextValu2[0],\n nextUpdateTime = _instance$getNextValu2[1];\n\n instance.setValue(value);\n instance.nextUpdateTime = nextUpdateTime;\n}\n\nfunction updateInstance(instance, instances) {\n _updateInstance(instance);\n\n remove(instances, instance);\n\n _add(instances, instance);\n}\n\nfunction _add(instances, instance) {\n var i = findTargetIndex(instances, instance);\n instances.splice(i, 0, instance);\n}\n\nfunction remove(instances, instance) {\n var i = instances.indexOf(instance);\n instances.splice(i, 1);\n}\n\nfunction findTargetIndex(instances, instance) {\n var nextUpdateTime = instance.nextUpdateTime;\n return binarySearch(instances, function (instance) {\n if (instance.nextUpdateTime === nextUpdateTime) {\n return 0;\n } else if (instance.nextUpdateTime > nextUpdateTime) {\n return 1;\n } else {\n return -1;\n }\n });\n}\n//# sourceMappingURL=Updater.js.map","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\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.\"); }\n\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); }\n\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; }\n\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; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport { useEffect, useState, useRef, useCallback, useMemo } from 'react';\nimport TimeAgo from 'javascript-time-ago';\nimport getVerboseDateFormatter from './helpers/getVerboseDateFormatter.js';\nimport { getDate } from './helpers/date.js';\nimport getTimeAgo from './helpers/getTimeAgo.js';\nimport Updater from './Updater.js';\nexport default function useTimeAgo(_ref) {\n var date = _ref.date,\n future = _ref.future,\n locale = _ref.locale,\n locales = _ref.locales,\n timeStyle = _ref.timeStyle,\n round = _ref.round,\n minTimeLeft = _ref.minTimeLeft,\n formatVerboseDate = _ref.formatVerboseDate,\n _ref$verboseDateForma = _ref.verboseDateFormat,\n verboseDateFormat = _ref$verboseDateForma === void 0 ? DEFAULT_VERBOSE_DATE_FORMAT : _ref$verboseDateForma,\n updateInterval = _ref.updateInterval,\n _ref$tick = _ref.tick,\n tick = _ref$tick === void 0 ? true : _ref$tick,\n nowProperty = _ref.now,\n _ref$timeOffset = _ref.timeOffset,\n timeOffset = _ref$timeOffset === void 0 ? 0 : _ref$timeOffset,\n polyfill = _ref.polyfill;\n // Get the list of preferred locales.\n var preferredLocales = useMemo(function () {\n // Convert `locale` to `locales`.\n if (locale) {\n locales = [locale];\n } // Add `javascript-time-ago` default locale.\n\n\n return locales.concat(TimeAgo.getDefaultLocale());\n }, [locale, locales]); // Create `javascript-time-ago` formatter instance.\n\n var timeAgo = useMemo(function () {\n return getTimeAgo(preferredLocales, {\n polyfill: polyfill\n });\n }, [preferredLocales, polyfill]); // The date or timestamp that was passed.\n // Convert timestamp to `Date`.\n\n date = useMemo(function () {\n return getDate(date);\n }, [date]); // Formats the `date`.\n\n var formatDate = useCallback(function () {\n var now = (nowProperty || Date.now()) - timeOffset;\n var stopUpdates;\n\n if (future) {\n if (now >= date.getTime()) {\n now = date.getTime();\n stopUpdates = true;\n }\n }\n\n if (minTimeLeft !== undefined) {\n var maxNow = date.getTime() - minTimeLeft * 1000;\n\n if (now > maxNow) {\n now = maxNow;\n stopUpdates = true;\n }\n }\n\n var _timeAgo$format = timeAgo.format(date, timeStyle, {\n getTimeToNextUpdate: true,\n now: now,\n future: future,\n round: round\n }),\n _timeAgo$format2 = _slicedToArray(_timeAgo$format, 2),\n formattedDate = _timeAgo$format2[0],\n timeToNextUpdate = _timeAgo$format2[1];\n\n if (stopUpdates) {\n timeToNextUpdate = INFINITY;\n } else {\n // Legacy compatibility: there used to be an `updateInterval` property.\n // That was before `getTimeToNextUpdate` feature was introduced in `javascript-time-ago`.\n // A default interval of one minute is introduced because\n // `getTimeToNextUpdate` feature may theoretically return `undefined`.\n timeToNextUpdate = updateInterval || timeToNextUpdate || 60 * 1000; // A minute by default.\n }\n\n return [formattedDate, now + timeToNextUpdate];\n }, [date, future, timeStyle, updateInterval, round, minTimeLeft, timeAgo, nowProperty]);\n var formatDateRef = useRef();\n formatDateRef.current = formatDate;\n\n var _useMemo = useMemo(formatDate, []),\n _useMemo2 = _slicedToArray(_useMemo, 2),\n _formattedDate = _useMemo2[0],\n _nextUpdateTime = _useMemo2[1];\n\n var _useState = useState(_formattedDate),\n _useState2 = _slicedToArray(_useState, 2),\n formattedDate = _useState2[0],\n setFormattedDate = _useState2[1];\n\n var updater = useRef();\n useEffect(function () {\n if (tick) {\n updater.current = Updater.add({\n getNextValue: function getNextValue() {\n return formatDateRef.current();\n },\n setValue: setFormattedDate,\n nextUpdateTime: _nextUpdateTime\n });\n return function () {\n return updater.current.stop();\n };\n }\n }, [tick]);\n useEffect(function () {\n if (updater.current) {\n updater.current.forceUpdate();\n } else {\n var _formatDate = formatDate(),\n _formatDate2 = _slicedToArray(_formatDate, 1),\n _formattedDate2 = _formatDate2[0];\n\n setFormattedDate(_formattedDate2);\n }\n }, [formatDate]); // Create verbose date formatter for the tooltip text.\n\n var verboseDateFormatter = useMemo(function () {\n return getVerboseDateFormatter(preferredLocales, verboseDateFormat);\n }, [preferredLocales, verboseDateFormat]); // Format verbose date for the tooltip.\n\n var verboseDate = useMemo(function () {\n if (formatVerboseDate) {\n return formatVerboseDate(date);\n }\n\n return verboseDateFormatter(date);\n }, [date, formatVerboseDate, verboseDateFormatter]);\n return {\n date: date,\n formattedDate: formattedDate,\n verboseDate: verboseDate\n };\n} // A thousand years is practically a metaphor for \"infinity\"\n// in the context of this component.\n\nvar YEAR = 365 * 24 * 60 * 60 * 1000;\nvar INFINITY = 1000 * YEAR; // `Intl.DateTimeFormat` for verbose date.\n// Formatted date example: \"Thursday, December 20, 2012, 7:00:00 AM GMT+4\"\n\nvar DEFAULT_VERBOSE_DATE_FORMAT = {\n weekday: 'long',\n day: 'numeric',\n month: 'long',\n year: 'numeric',\n hour: 'numeric',\n minute: '2-digit',\n second: '2-digit' // timeZoneName: 'short'\n\n};\n//# sourceMappingURL=useTimeAgo.js.map","import PropTypes from 'prop-types';\nvar oneOfType = PropTypes.oneOfType,\n arrayOf = PropTypes.arrayOf,\n string = PropTypes.string,\n number = PropTypes.number,\n shape = PropTypes.shape,\n func = PropTypes.func; // The first step isn't required to define `minTime` or `test()`.\n\nvar step = oneOfType([shape({\n minTime: number,\n formatAs: string.isRequired\n}), shape({\n test: func,\n formatAs: string.isRequired\n}), shape({\n minTime: number,\n format: func.isRequired\n}), shape({\n test: func,\n format: func.isRequired\n})]); // Formatting style.\n\nexport var style = oneOfType([// Not using `oneOf()` here, because that way\n// this package wouldn't support some hypothetical\n// new styles added to `javascript-time-ago` in some future.\nstring, shape({\n steps: arrayOf(step).isRequired,\n labels: oneOfType([string, arrayOf(string)]).isRequired,\n round: string\n})]);\n//# sourceMappingURL=PropTypes.js.map","var _excluded = [\"date\", \"future\", \"timeStyle\", \"round\", \"minTimeLeft\", \"locale\", \"locales\", \"formatVerboseDate\", \"verboseDateFormat\", \"updateInterval\", \"tick\", \"now\", \"timeOffset\", \"polyfill\", \"tooltip\", \"component\", \"container\", \"wrapperComponent\", \"wrapperProps\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport Time from './Time.js';\nimport useTimeAgo from './useTimeAgo.js';\nimport { style as styleType } from './PropTypes.js';\n\nfunction ReactTimeAgo(_ref) {\n var dateProperty = _ref.date,\n future = _ref.future,\n timeStyle = _ref.timeStyle,\n round = _ref.round,\n minTimeLeft = _ref.minTimeLeft,\n locale = _ref.locale,\n _ref$locales = _ref.locales,\n locales = _ref$locales === void 0 ? [] : _ref$locales,\n formatVerboseDate = _ref.formatVerboseDate,\n verboseDateFormat = _ref.verboseDateFormat,\n updateInterval = _ref.updateInterval,\n tick = _ref.tick,\n nowProperty = _ref.now,\n timeOffset = _ref.timeOffset,\n polyfill = _ref.polyfill,\n _ref$tooltip = _ref.tooltip,\n tooltip = _ref$tooltip === void 0 ? true : _ref$tooltip,\n _ref$component = _ref.component,\n Component = _ref$component === void 0 ? Time : _ref$component,\n container = _ref.container,\n wrapperComponent = _ref.wrapperComponent,\n wrapperProps = _ref.wrapperProps,\n rest = _objectWithoutProperties(_ref, _excluded);\n\n var _useTimeAgo = useTimeAgo({\n date: dateProperty,\n future: future,\n timeStyle: timeStyle,\n round: round,\n minTimeLeft: minTimeLeft,\n locale: locale,\n locales: locales,\n formatVerboseDate: formatVerboseDate,\n verboseDateFormat: verboseDateFormat,\n updateInterval: updateInterval,\n tick: tick,\n now: nowProperty,\n timeOffset: timeOffset,\n polyfill: polyfill\n }),\n date = _useTimeAgo.date,\n verboseDate = _useTimeAgo.verboseDate,\n formattedDate = _useTimeAgo.formattedDate;\n\n var result = /*#__PURE__*/React.createElement(Component, _extends({\n date: date,\n verboseDate: verboseDate,\n tooltip: tooltip\n }, rest), formattedDate);\n var WrapperComponent = wrapperComponent || container;\n\n if (WrapperComponent) {\n return /*#__PURE__*/React.createElement(WrapperComponent, _extends({}, wrapperProps, {\n verboseDate: verboseDate\n }), result);\n }\n\n return result;\n}\n\nReactTimeAgo.propTypes = {\n // `date: Date` or `timestamp: number`.\n // E.g. `new Date()` or `1355972400000`.\n date: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired,\n // Preferred locale.\n // Is 'en' by default.\n // E.g. 'ru-RU'.\n locale: PropTypes.string,\n // Alternatively to `locale`, one could pass `locales`:\n // A list of preferred locales (ordered).\n // Will choose the first supported locale from the list.\n // E.g. `['ru-RU', 'en-GB']`.\n locales: PropTypes.arrayOf(PropTypes.string),\n // If set to `true`, then will stop at \"zero point\"\n // when going from future dates to past dates.\n // In other words, even if the `date` has passed,\n // it will still render as if `date` is `now`.\n future: PropTypes.bool,\n // Date/time formatting style.\n // See `javascript-time-ago` docs on \"Styles\" for more info.\n // E.g. 'round', 'round-minute', 'twitter', 'twitter-first-minute'.\n timeStyle: styleType,\n // `round` parameter of `javascript-time-ago`.\n // See `javascript-time-ago` docs on \"Rounding\" for more info.\n // Examples: \"round\", \"floor\".\n round: PropTypes.string,\n // If specified, the time won't \"tick\" past this threshold (in seconds).\n // For example, if `minTimeLeft` is `60 * 60`\n // then the time won't \"tick\" past \"in 1 hour\".\n minTimeLeft: PropTypes.number,\n // A React component to render the relative time label.\n // Receives properties:\n // * date: Date — The date.\n // * verboseDate: string — Formatted verbose date.\n // * tooltip: boolean — The `tooltip` property of `` component.\n // * children: string — The relative time label.\n // * All \"unknown\" properties that have been passed to `` are passed through to this component.\n component: PropTypes.elementType,\n // Whether to use HTML `tooltip` attribute to show a verbose date tooltip.\n // Is `true` by default.\n // Can be set to `false` to disable the native HTML `tooltip`.\n tooltip: PropTypes.bool,\n // Verbose date formatter.\n // By default it's `(date) => new Intl.DateTimeFormat(locale, {…}).format(date)`.\n formatVerboseDate: PropTypes.func,\n // `Intl.DateTimeFormat` format for formatting verbose date.\n // See `Intl.DateTimeFormat` docs for more info.\n verboseDateFormat: PropTypes.object,\n // (deprecated)\n // How often the component refreshes itself.\n // When not provided, will use `getNextTimeToUpdate()` feature\n // of `javascript-time-ago` styles to determine the update interval.\n updateInterval: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.shape({\n threshold: PropTypes.number,\n interval: PropTypes.number.isRequired\n }))]),\n // (deprecated).\n // Set to `false` to disable automatic refresh of the component.\n // Is `true` by default.\n // I guess no one actually turns auto-update off, so this parameter is deprecated.\n tick: PropTypes.bool,\n // Allows setting a custom baseline for relative time measurement.\n // https://gitlab.com/catamphetamine/react-time-ago/-/issues/4\n now: PropTypes.number,\n // Allows offsetting the `date` by an arbitrary amount of milliseconds.\n // https://gitlab.com/catamphetamine/react-time-ago/-/issues/4\n timeOffset: PropTypes.number,\n // Pass `false` to use native `Intl.RelativeTimeFormat` / `Intl.PluralRules`\n // instead of the polyfilled ones in `javascript-time-ago`.\n polyfill: PropTypes.bool,\n // (advanced)\n // A React Component to wrap the resulting `\n * ```\n */\nexport default function useForceUpdate() {\n // The toggling state value is designed to defeat React optimizations for skipping\n // updates when they are strictly equal to the last state value\n const [, dispatch] = useReducer(state => !state, false);\n return dispatch;\n}","import * as React from 'react';\nconst DropdownContext = /*#__PURE__*/React.createContext(null);\nexport default DropdownContext;","var has = Object.prototype.hasOwnProperty;\n\nfunction find(iter, tar, key) {\n\tfor (key of iter.keys()) {\n\t\tif (dequal(key, tar)) return key;\n\t}\n}\n\nexport function dequal(foo, bar) {\n\tvar ctor, len, tmp;\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 === Set) {\n\t\t\tif (foo.size !== bar.size) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tfor (len of foo) {\n\t\t\t\ttmp = len;\n\t\t\t\tif (tmp && typeof tmp === 'object') {\n\t\t\t\t\ttmp = find(bar, tmp);\n\t\t\t\t\tif (!tmp) return false;\n\t\t\t\t}\n\t\t\t\tif (!bar.has(tmp)) return false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\tif (ctor === Map) {\n\t\t\tif (foo.size !== bar.size) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tfor (len of foo) {\n\t\t\t\ttmp = len[0];\n\t\t\t\tif (tmp && typeof tmp === 'object') {\n\t\t\t\t\ttmp = find(bar, tmp);\n\t\t\t\t\tif (!tmp) return false;\n\t\t\t\t}\n\t\t\t\tif (!dequal(len[1], bar.get(tmp))) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\tif (ctor === ArrayBuffer) {\n\t\t\tfoo = new Uint8Array(foo);\n\t\t\tbar = new Uint8Array(bar);\n\t\t} else if (ctor === DataView) {\n\t\t\tif ((len=foo.byteLength) === bar.byteLength) {\n\t\t\t\twhile (len-- && foo.getInt8(len) === bar.getInt8(len));\n\t\t\t}\n\t\t\treturn len === -1;\n\t\t}\n\n\t\tif (ArrayBuffer.isView(foo)) {\n\t\t\tif ((len=foo.byteLength) === bar.byteLength) {\n\t\t\t\twhile (len-- && 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","import { useCallback } from 'react';\nimport useMounted from './useMounted';\n\n/**\n * `useSafeState` takes the return value of a `useState` hook and wraps the\n * setter to prevent updates onces the component has unmounted. Can used\n * with `useMergeState` and `useStateAsync` as well\n *\n * @param state The return value of a useStateHook\n *\n * ```ts\n * const [show, setShow] = useSafeState(useState(true));\n * ```\n */\n\nfunction useSafeState(state) {\n const isMounted = useMounted();\n return [state[0], useCallback(nextState => {\n if (!isMounted()) return;\n return state[1](nextState);\n }, [isMounted, state[1]])];\n}\nexport default useSafeState;","export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];","import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}","export default function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n}","import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };","export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;","export default function getUAString() {\n var uaData = navigator.userAgentData;\n\n if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {\n return uaData.brands.map(function (item) {\n return item.brand + \"/\" + item.version;\n }).join(' ');\n }\n\n return navigator.userAgent;\n}","import getUAString from \"../utils/userAgent.js\";\nexport default function isLayoutViewport() {\n return !/^((?!chrome|android).)*safari/i.test(getUAString());\n}","import { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport { round } from \"../utils/math.js\";\nimport getWindow from \"./getWindow.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getBoundingClientRect(element, includeScale, isFixedStrategy) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n\n var clientRect = element.getBoundingClientRect();\n var scaleX = 1;\n var scaleY = 1;\n\n if (includeScale && isHTMLElement(element)) {\n scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n }\n\n var _ref = isElement(element) ? getWindow(element) : window,\n visualViewport = _ref.visualViewport;\n\n var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n var width = clientRect.width / scaleX;\n var height = clientRect.height / scaleY;\n return {\n width: width,\n height: height,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x,\n x: x,\n y: y\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}","export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getUAString from \"../utils/userAgent.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}","export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","export default function getVariation(placement) {\n return placement.split('-')[1];\n}","import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref, win) {\n var x = _ref.x,\n y = _ref.y;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets,\n isFixed = _ref2.isFixed;\n var _offsets$x = offsets.x,\n x = _offsets$x === void 0 ? 0 : _offsets$x,\n _offsets$y = offsets.y,\n y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref3.x;\n y = _ref3.y;\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom;\n var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n offsetParent[heightProp];\n y -= offsetY - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right;\n var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n offsetParent[widthProp];\n x -= offsetX - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n x: x,\n y: y\n }, getWindow(popper)) : {\n x: x,\n y: y\n };\n\n x = _ref4.x;\n y = _ref4.y;\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n var state = _ref5.state,\n options = _ref5.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration,\n isFixed: state.options.strategy === 'fixed'\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};","var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}","var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on \n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getViewportRect(element, strategy) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0;\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n var layoutViewport = isLayoutViewport();\n\n if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}","export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element, strategy) {\n var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent, strategy) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary, strategy) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent, 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 }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}","import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$strategy = _options.strategy,\n strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n mainAxis: tetherOffsetValue,\n altAxis: tetherOffsetValue\n } : Object.assign({\n mainAxis: 0,\n altAxis: 0\n }, tetherOffsetValue);\n var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var _offsetModifierState$;\n\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = offset + overflow[mainSide];\n var max = offset - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = offset + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _offsetModifierState$2;\n\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _len = altAxis === 'y' ? 'height' : 'width';\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};","export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = round(rect.width) / element.offsetWidth || 1;\n var scaleY = round(rect.height) / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}","export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}","export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n });\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref) {\n var name = _ref.name,\n _ref$options = _ref.options,\n options = _ref$options === void 0 ? {} : _ref$options,\n effect = _ref.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","import arrow from '@popperjs/core/lib/modifiers/arrow';\nimport computeStyles from '@popperjs/core/lib/modifiers/computeStyles';\nimport eventListeners from '@popperjs/core/lib/modifiers/eventListeners';\nimport flip from '@popperjs/core/lib/modifiers/flip';\nimport hide from '@popperjs/core/lib/modifiers/hide';\nimport offset from '@popperjs/core/lib/modifiers/offset';\nimport popperOffsets from '@popperjs/core/lib/modifiers/popperOffsets';\nimport preventOverflow from '@popperjs/core/lib/modifiers/preventOverflow';\nimport { placements } from '@popperjs/core/lib/enums';\nimport { popperGenerator } from '@popperjs/core/lib/popper-base';\n\n// For the common JS build we will turn this file into a bundle with no imports.\n// This is b/c the Popper lib is all esm files, and would break in a common js only environment\nexport const createPopper = popperGenerator({\n defaultModifiers: [hide, popperOffsets, computeStyles, eventListeners, offset, flip, preventOverflow, arrow]\n});\nexport { placements };","const _excluded = [\"enabled\", \"placement\", \"strategy\", \"modifiers\"];\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { dequal } from 'dequal';\nimport useSafeState from '@restart/hooks/useSafeState';\nimport { createPopper } from './popper';\nconst disabledApplyStylesModifier = {\n name: 'applyStyles',\n enabled: false,\n phase: 'afterWrite',\n fn: () => undefined\n};\n\n// until docjs supports type exports...\n\nconst ariaDescribedByModifier = {\n name: 'ariaDescribedBy',\n enabled: true,\n phase: 'afterWrite',\n effect: ({\n state\n }) => () => {\n const {\n reference,\n popper\n } = state.elements;\n if ('removeAttribute' in reference) {\n const ids = (reference.getAttribute('aria-describedby') || '').split(',').filter(id => id.trim() !== popper.id);\n if (!ids.length) reference.removeAttribute('aria-describedby');else reference.setAttribute('aria-describedby', ids.join(','));\n }\n },\n fn: ({\n state\n }) => {\n var _popper$getAttribute;\n const {\n popper,\n reference\n } = state.elements;\n const role = (_popper$getAttribute = popper.getAttribute('role')) == null ? void 0 : _popper$getAttribute.toLowerCase();\n if (popper.id && role === 'tooltip' && 'setAttribute' in reference) {\n const ids = reference.getAttribute('aria-describedby');\n if (ids && ids.split(',').indexOf(popper.id) !== -1) {\n return;\n }\n reference.setAttribute('aria-describedby', ids ? `${ids},${popper.id}` : popper.id);\n }\n }\n};\nconst EMPTY_MODIFIERS = [];\n/**\n * Position an element relative some reference element using Popper.js\n *\n * @param referenceElement\n * @param popperElement\n * @param {object} options\n * @param {object=} options.modifiers Popper.js modifiers\n * @param {boolean=} options.enabled toggle the popper functionality on/off\n * @param {string=} options.placement The popper element placement relative to the reference element\n * @param {string=} options.strategy the positioning strategy\n * @param {function=} options.onCreate called when the popper is created\n * @param {function=} options.onUpdate called when the popper is updated\n *\n * @returns {UsePopperState} The popper state\n */\nfunction usePopper(referenceElement, popperElement, _ref = {}) {\n let {\n enabled = true,\n placement = 'bottom',\n strategy = 'absolute',\n modifiers = EMPTY_MODIFIERS\n } = _ref,\n config = _objectWithoutPropertiesLoose(_ref, _excluded);\n const prevModifiers = useRef(modifiers);\n const popperInstanceRef = useRef();\n const update = useCallback(() => {\n var _popperInstanceRef$cu;\n (_popperInstanceRef$cu = popperInstanceRef.current) == null ? void 0 : _popperInstanceRef$cu.update();\n }, []);\n const forceUpdate = useCallback(() => {\n var _popperInstanceRef$cu2;\n (_popperInstanceRef$cu2 = popperInstanceRef.current) == null ? void 0 : _popperInstanceRef$cu2.forceUpdate();\n }, []);\n const [popperState, setState] = useSafeState(useState({\n placement,\n update,\n forceUpdate,\n attributes: {},\n styles: {\n popper: {},\n arrow: {}\n }\n }));\n const updateModifier = useMemo(() => ({\n name: 'updateStateModifier',\n enabled: true,\n phase: 'write',\n requires: ['computeStyles'],\n fn: ({\n state\n }) => {\n const styles = {};\n const attributes = {};\n Object.keys(state.elements).forEach(element => {\n styles[element] = state.styles[element];\n attributes[element] = state.attributes[element];\n });\n setState({\n state,\n styles,\n attributes,\n update,\n forceUpdate,\n placement: state.placement\n });\n }\n }), [update, forceUpdate, setState]);\n const nextModifiers = useMemo(() => {\n if (!dequal(prevModifiers.current, modifiers)) {\n prevModifiers.current = modifiers;\n }\n return prevModifiers.current;\n }, [modifiers]);\n useEffect(() => {\n if (!popperInstanceRef.current || !enabled) return;\n popperInstanceRef.current.setOptions({\n placement,\n strategy,\n modifiers: [...nextModifiers, updateModifier, disabledApplyStylesModifier]\n });\n }, [strategy, placement, updateModifier, enabled, nextModifiers]);\n useEffect(() => {\n if (!enabled || referenceElement == null || popperElement == null) {\n return undefined;\n }\n popperInstanceRef.current = createPopper(referenceElement, popperElement, Object.assign({}, config, {\n placement,\n strategy,\n modifiers: [...nextModifiers, ariaDescribedByModifier, updateModifier]\n }));\n return () => {\n if (popperInstanceRef.current != null) {\n popperInstanceRef.current.destroy();\n popperInstanceRef.current = undefined;\n setState(s => Object.assign({}, s, {\n attributes: {},\n styles: {\n popper: {}\n }\n }));\n }\n };\n // This is only run once to _create_ the popper\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [enabled, referenceElement, popperElement]);\n return popperState;\n}\nexport default usePopper;","/* eslint-disable no-bitwise, no-cond-assign */\n\n/**\n * Checks if an element contains another given element.\n * \n * @param context the context element\n * @param node the element to check\n */\nexport default function contains(context, node) {\n // HTML DOM and SVG DOM may have different support levels,\n // so we need to check on context instead of a document root element.\n if (context.contains) return context.contains(node);\n if (context.compareDocumentPosition) return context === node || !!(context.compareDocumentPosition(node) & 16);\n}","/**\n * A `removeEventListener` ponyfill\n * \n * @param node the element\n * @param eventName the event name\n * @param handle the handler\n * @param options event options\n */\nfunction removeEventListener(node, eventName, handler, options) {\n var capture = options && typeof options !== 'boolean' ? options.capture : options;\n node.removeEventListener(eventName, handler, capture);\n\n if (handler.__once) {\n node.removeEventListener(eventName, handler.__once, capture);\n }\n}\n\nexport default removeEventListener;","import addEventListener from './addEventListener';\nimport removeEventListener from './removeEventListener';\n\nfunction listen(node, eventName, handler, options) {\n addEventListener(node, eventName, handler, options);\n return function () {\n removeEventListener(node, eventName, handler, options);\n };\n}\n\nexport default listen;","/**\n * Returns the owner document of a given element.\n * \n * @param node the element\n */\nexport default function ownerDocument(node) {\n return node && node.ownerDocument || document;\n}","/**\n * Copyright (c) 2014-present, Facebook, Inc.\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'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nvar warning = function() {};\n\nif (__DEV__) {\n var printWarning = function printWarning(format, args) {\n var len = arguments.length;\n args = new Array(len > 1 ? len - 1 : 0);\n for (var key = 1; key < len; key++) {\n args[key - 1] = arguments[key];\n }\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n }\n\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n if (!condition) {\n printWarning.apply(null, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;\n","import contains from 'dom-helpers/contains';\nimport listen from 'dom-helpers/listen';\nimport ownerDocument from 'dom-helpers/ownerDocument';\nimport { useCallback, useEffect, useRef } from 'react';\nimport useEventCallback from '@restart/hooks/useEventCallback';\nimport warning from 'warning';\nconst noop = () => {};\nfunction isLeftClickEvent(event) {\n return event.button === 0;\n}\nfunction isModifiedEvent(event) {\n return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n}\nexport const getRefTarget = ref => ref && ('current' in ref ? ref.current : ref);\nconst InitialTriggerEvents = {\n click: 'mousedown',\n mouseup: 'mousedown',\n pointerup: 'pointerdown'\n};\n\n/**\n * The `useClickOutside` hook registers your callback on the document that fires\n * when a pointer event is registered outside of the provided ref or element.\n *\n * @param {Ref| HTMLElement} ref The element boundary\n * @param {function} onClickOutside\n * @param {object=} options\n * @param {boolean=} options.disabled\n * @param {string=} options.clickTrigger The DOM event name (click, mousedown, etc) to attach listeners on\n */\nfunction useClickOutside(ref, onClickOutside = noop, {\n disabled,\n clickTrigger = 'click'\n} = {}) {\n const preventMouseClickOutsideRef = useRef(false);\n const waitingForTrigger = useRef(false);\n const handleMouseCapture = useCallback(e => {\n const currentTarget = getRefTarget(ref);\n warning(!!currentTarget, 'ClickOutside captured a close event but does not have a ref to compare it to. ' + 'useClickOutside(), should be passed a ref that resolves to a DOM node');\n preventMouseClickOutsideRef.current = !currentTarget || isModifiedEvent(e) || !isLeftClickEvent(e) || !!contains(currentTarget, e.target) || waitingForTrigger.current;\n waitingForTrigger.current = false;\n }, [ref]);\n const handleInitialMouse = useEventCallback(e => {\n const currentTarget = getRefTarget(ref);\n if (currentTarget && contains(currentTarget, e.target)) {\n waitingForTrigger.current = true;\n }\n });\n const handleMouse = useEventCallback(e => {\n if (!preventMouseClickOutsideRef.current) {\n onClickOutside(e);\n }\n });\n useEffect(() => {\n var _ownerWindow$event, _ownerWindow$parent;\n if (disabled || ref == null) return undefined;\n const doc = ownerDocument(getRefTarget(ref));\n const ownerWindow = doc.defaultView || window;\n\n // Store the current event to avoid triggering handlers immediately\n // For things rendered in an iframe, the event might originate on the parent window\n // so we should fall back to that global event if the local one doesn't exist\n // https://github.com/facebook/react/issues/20074\n let currentEvent = (_ownerWindow$event = ownerWindow.event) != null ? _ownerWindow$event : (_ownerWindow$parent = ownerWindow.parent) == null ? void 0 : _ownerWindow$parent.event;\n let removeInitialTriggerListener = null;\n if (InitialTriggerEvents[clickTrigger]) {\n removeInitialTriggerListener = listen(doc, InitialTriggerEvents[clickTrigger], handleInitialMouse, true);\n }\n\n // Use capture for this listener so it fires before React's listener, to\n // avoid false positives in the contains() check below if the target DOM\n // element is removed in the React mouse callback.\n const removeMouseCaptureListener = listen(doc, clickTrigger, handleMouseCapture, true);\n const removeMouseListener = listen(doc, clickTrigger, e => {\n // skip if this event is the same as the one running when we added the handlers\n if (e === currentEvent) {\n currentEvent = undefined;\n return;\n }\n handleMouse(e);\n });\n let mobileSafariHackListeners = [];\n if ('ontouchstart' in doc.documentElement) {\n mobileSafariHackListeners = [].slice.call(doc.body.children).map(el => listen(el, 'mousemove', noop));\n }\n return () => {\n removeInitialTriggerListener == null ? void 0 : removeInitialTriggerListener();\n removeMouseCaptureListener();\n removeMouseListener();\n mobileSafariHackListeners.forEach(remove => remove());\n };\n }, [ref, disabled, clickTrigger, handleMouseCapture, handleInitialMouse, handleMouse]);\n}\nexport default useClickOutside;","export function toModifierMap(modifiers) {\n const result = {};\n if (!Array.isArray(modifiers)) {\n return modifiers || result;\n }\n\n // eslint-disable-next-line no-unused-expressions\n modifiers == null ? void 0 : modifiers.forEach(m => {\n result[m.name] = m;\n });\n return result;\n}\nexport function toModifierArray(map = {}) {\n if (Array.isArray(map)) return map;\n return Object.keys(map).map(k => {\n map[k].name = k;\n return map[k];\n });\n}\nexport default function mergeOptionsWithPopperConfig({\n enabled,\n enableEvents,\n placement,\n flip,\n offset,\n fixed,\n containerPadding,\n arrowElement,\n popperConfig = {}\n}) {\n var _modifiers$eventListe, _modifiers$preventOve, _modifiers$preventOve2, _modifiers$offset, _modifiers$arrow;\n const modifiers = toModifierMap(popperConfig.modifiers);\n return Object.assign({}, popperConfig, {\n placement,\n enabled,\n strategy: fixed ? 'fixed' : popperConfig.strategy,\n modifiers: toModifierArray(Object.assign({}, modifiers, {\n eventListeners: {\n enabled: enableEvents,\n options: (_modifiers$eventListe = modifiers.eventListeners) == null ? void 0 : _modifiers$eventListe.options\n },\n preventOverflow: Object.assign({}, modifiers.preventOverflow, {\n options: containerPadding ? Object.assign({\n padding: containerPadding\n }, (_modifiers$preventOve = modifiers.preventOverflow) == null ? void 0 : _modifiers$preventOve.options) : (_modifiers$preventOve2 = modifiers.preventOverflow) == null ? void 0 : _modifiers$preventOve2.options\n }),\n offset: {\n options: Object.assign({\n offset\n }, (_modifiers$offset = modifiers.offset) == null ? void 0 : _modifiers$offset.options)\n },\n arrow: Object.assign({}, modifiers.arrow, {\n enabled: !!arrowElement,\n options: Object.assign({}, (_modifiers$arrow = modifiers.arrow) == null ? void 0 : _modifiers$arrow.options, {\n element: arrowElement\n })\n }),\n flip: Object.assign({\n enabled: !!flip\n }, modifiers.flip)\n }))\n });\n}","const _excluded = [\"children\"];\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport { useContext, useRef } from 'react';\nimport * as React from 'react';\nimport useCallbackRef from '@restart/hooks/useCallbackRef';\nimport DropdownContext from './DropdownContext';\nimport usePopper from './usePopper';\nimport useClickOutside from './useClickOutside';\nimport mergeOptionsWithPopperConfig from './mergeOptionsWithPopperConfig';\nimport { Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst noop = () => {};\n\n/**\n * @memberOf Dropdown\n * @param {object} options\n * @param {boolean} options.flip Automatically adjust the menu `drop` position based on viewport edge detection\n * @param {[number, number]} options.offset Define an offset distance between the Menu and the Toggle\n * @param {boolean} options.show Display the menu manually, ignored in the context of a `Dropdown`\n * @param {boolean} options.usePopper opt in/out of using PopperJS to position menus. When disabled you must position it yourself.\n * @param {string} options.rootCloseEvent The pointer event to listen for when determining \"clicks outside\" the menu for triggering a close.\n * @param {object} options.popperConfig Options passed to the [`usePopper`](/api/usePopper) hook.\n */\nexport function useDropdownMenu(options = {}) {\n const context = useContext(DropdownContext);\n const [arrowElement, attachArrowRef] = useCallbackRef();\n const hasShownRef = useRef(false);\n const {\n flip,\n offset,\n rootCloseEvent,\n fixed = false,\n placement: placementOverride,\n popperConfig = {},\n enableEventListeners = true,\n usePopper: shouldUsePopper = !!context\n } = options;\n const show = (context == null ? void 0 : context.show) == null ? !!options.show : context.show;\n if (show && !hasShownRef.current) {\n hasShownRef.current = true;\n }\n const handleClose = e => {\n context == null ? void 0 : context.toggle(false, e);\n };\n const {\n placement,\n setMenu,\n menuElement,\n toggleElement\n } = context || {};\n const popper = usePopper(toggleElement, menuElement, mergeOptionsWithPopperConfig({\n placement: placementOverride || placement || 'bottom-start',\n enabled: shouldUsePopper,\n enableEvents: enableEventListeners == null ? show : enableEventListeners,\n offset,\n flip,\n fixed,\n arrowElement,\n popperConfig\n }));\n const menuProps = Object.assign({\n ref: setMenu || noop,\n 'aria-labelledby': toggleElement == null ? void 0 : toggleElement.id\n }, popper.attributes.popper, {\n style: popper.styles.popper\n });\n const metadata = {\n show,\n placement,\n hasShown: hasShownRef.current,\n toggle: context == null ? void 0 : context.toggle,\n popper: shouldUsePopper ? popper : null,\n arrowProps: shouldUsePopper ? Object.assign({\n ref: attachArrowRef\n }, popper.attributes.arrow, {\n style: popper.styles.arrow\n }) : {}\n };\n useClickOutside(menuElement, handleClose, {\n clickTrigger: rootCloseEvent,\n disabled: !show\n });\n return [menuProps, metadata];\n}\nconst defaultProps = {\n usePopper: true\n};\n/**\n * Also exported as `` from `Dropdown`.\n *\n * @displayName DropdownMenu\n * @memberOf Dropdown\n */\nfunction DropdownMenu(_ref) {\n let {\n children\n } = _ref,\n options = _objectWithoutPropertiesLoose(_ref, _excluded);\n const [props, meta] = useDropdownMenu(options);\n return /*#__PURE__*/_jsx(_Fragment, {\n children: children(props, meta)\n });\n}\nDropdownMenu.displayName = 'DropdownMenu';\nDropdownMenu.defaultProps = defaultProps;\n\n/** @component */\nexport default DropdownMenu;","import $73SJx$react, {useContext as $73SJx$useContext, useState as $73SJx$useState, useMemo as $73SJx$useMemo, useLayoutEffect as $73SJx$useLayoutEffect, useRef as $73SJx$useRef} from \"react\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ /*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ // We must avoid a circular dependency with @react-aria/utils, and this useLayoutEffect is\n// guarded by a check that it only runs on the client side.\n// eslint-disable-next-line rulesdir/useLayoutEffectRule\n\n// Default context value to use in case there is no SSRProvider. This is fine for\n// client-only apps. In order to support multiple copies of React Aria potentially\n// being on the page at once, the prefix is set to a random number. SSRProvider\n// will reset this to zero for consistency between server and client, so in the\n// SSR case multiple copies of React Aria is not supported.\nconst $b5e257d569688ac6$var$defaultContext = {\n prefix: String(Math.round(Math.random() * 10000000000)),\n current: 0\n};\nconst $b5e257d569688ac6$var$SSRContext = /*#__PURE__*/ (0, $73SJx$react).createContext($b5e257d569688ac6$var$defaultContext);\nconst $b5e257d569688ac6$var$IsSSRContext = /*#__PURE__*/ (0, $73SJx$react).createContext(false);\n// This is only used in React < 18.\nfunction $b5e257d569688ac6$var$LegacySSRProvider(props) {\n let cur = (0, $73SJx$useContext)($b5e257d569688ac6$var$SSRContext);\n let counter = $b5e257d569688ac6$var$useCounter(cur === $b5e257d569688ac6$var$defaultContext);\n let [isSSR, setIsSSR] = (0, $73SJx$useState)(true);\n let value = (0, $73SJx$useMemo)(()=>({\n // If this is the first SSRProvider, start with an empty string prefix, otherwise\n // append and increment the counter.\n prefix: cur === $b5e257d569688ac6$var$defaultContext ? \"\" : `${cur.prefix}-${counter}`,\n current: 0\n }), [\n cur,\n counter\n ]);\n // If on the client, and the component was initially server rendered,\n // then schedule a layout effect to update the component after hydration.\n if (typeof document !== \"undefined\") // This if statement technically breaks the rules of hooks, but is safe\n // because the condition never changes after mounting.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n (0, $73SJx$useLayoutEffect)(()=>{\n setIsSSR(false);\n }, []);\n return /*#__PURE__*/ (0, $73SJx$react).createElement($b5e257d569688ac6$var$SSRContext.Provider, {\n value: value\n }, /*#__PURE__*/ (0, $73SJx$react).createElement($b5e257d569688ac6$var$IsSSRContext.Provider, {\n value: isSSR\n }, props.children));\n}\nlet $b5e257d569688ac6$var$warnedAboutSSRProvider = false;\nfunction $b5e257d569688ac6$export$9f8ac96af4b1b2ae(props) {\n if (typeof (0, $73SJx$react)[\"useId\"] === \"function\") {\n if (process.env.NODE_ENV !== \"test\" && !$b5e257d569688ac6$var$warnedAboutSSRProvider) {\n console.warn(\"In React 18, SSRProvider is not necessary and is a noop. You can remove it from your app.\");\n $b5e257d569688ac6$var$warnedAboutSSRProvider = true;\n }\n return /*#__PURE__*/ (0, $73SJx$react).createElement((0, $73SJx$react).Fragment, null, props.children);\n }\n return /*#__PURE__*/ (0, $73SJx$react).createElement($b5e257d569688ac6$var$LegacySSRProvider, props);\n}\nlet $b5e257d569688ac6$var$canUseDOM = Boolean(typeof window !== \"undefined\" && window.document && window.document.createElement);\nlet $b5e257d569688ac6$var$componentIds = new WeakMap();\nfunction $b5e257d569688ac6$var$useCounter(isDisabled = false) {\n let ctx = (0, $73SJx$useContext)($b5e257d569688ac6$var$SSRContext);\n let ref = (0, $73SJx$useRef)(null);\n // eslint-disable-next-line rulesdir/pure-render\n if (ref.current === null && !isDisabled) {\n var _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner, _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n // In strict mode, React renders components twice, and the ref will be reset to null on the second render.\n // This means our id counter will be incremented twice instead of once. This is a problem because on the\n // server, components are only rendered once and so ids generated on the server won't match the client.\n // In React 18, useId was introduced to solve this, but it is not available in older versions. So to solve this\n // we need to use some React internals to access the underlying Fiber instance, which is stable between renders.\n // This is exposed as ReactCurrentOwner in development, which is all we need since StrictMode only runs in development.\n // To ensure that we only increment the global counter once, we store the starting id for this component in\n // a weak map associated with the Fiber. On the second render, we reset the global counter to this value.\n // Since React runs the second render immediately after the first, this is safe.\n // @ts-ignore\n let currentOwner = (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = (0, $73SJx$react).__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED === void 0 ? void 0 : (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner = _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner === void 0 ? void 0 : _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner.current;\n if (currentOwner) {\n let prevComponentValue = $b5e257d569688ac6$var$componentIds.get(currentOwner);\n if (prevComponentValue == null) // On the first render, and first call to useId, store the id and state in our weak map.\n $b5e257d569688ac6$var$componentIds.set(currentOwner, {\n id: ctx.current,\n state: currentOwner.memoizedState\n });\n else if (currentOwner.memoizedState !== prevComponentValue.state) {\n // On the second render, the memoizedState gets reset by React.\n // Reset the counter, and remove from the weak map so we don't\n // do this for subsequent useId calls.\n ctx.current = prevComponentValue.id;\n $b5e257d569688ac6$var$componentIds.delete(currentOwner);\n }\n }\n // eslint-disable-next-line rulesdir/pure-render\n ref.current = ++ctx.current;\n }\n // eslint-disable-next-line rulesdir/pure-render\n return ref.current;\n}\nfunction $b5e257d569688ac6$var$useLegacySSRSafeId(defaultId) {\n let ctx = (0, $73SJx$useContext)($b5e257d569688ac6$var$SSRContext);\n // If we are rendering in a non-DOM environment, and there's no SSRProvider,\n // provide a warning to hint to the developer to add one.\n if (ctx === $b5e257d569688ac6$var$defaultContext && !$b5e257d569688ac6$var$canUseDOM) console.warn(\"When server rendering, you must wrap your application in an to ensure consistent ids are generated between the client and server.\");\n let counter = $b5e257d569688ac6$var$useCounter(!!defaultId);\n let prefix = ctx === $b5e257d569688ac6$var$defaultContext && process.env.NODE_ENV === \"test\" ? \"react-aria\" : `react-aria${ctx.prefix}`;\n return defaultId || `${prefix}-${counter}`;\n}\nfunction $b5e257d569688ac6$var$useModernSSRSafeId(defaultId) {\n // @ts-ignore\n let id = (0, $73SJx$react).useId();\n let [didSSR] = (0, $73SJx$useState)($b5e257d569688ac6$export$535bd6ca7f90a273());\n let prefix = didSSR || process.env.NODE_ENV === \"test\" ? \"react-aria\" : `react-aria${$b5e257d569688ac6$var$defaultContext.prefix}`;\n return defaultId || `${prefix}-${id}`;\n}\nconst $b5e257d569688ac6$export$619500959fc48b26 = typeof (0, $73SJx$react)[\"useId\"] === \"function\" ? $b5e257d569688ac6$var$useModernSSRSafeId : $b5e257d569688ac6$var$useLegacySSRSafeId;\nfunction $b5e257d569688ac6$var$getSnapshot() {\n return false;\n}\nfunction $b5e257d569688ac6$var$getServerSnapshot() {\n return true;\n}\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction $b5e257d569688ac6$var$subscribe(onStoreChange) {\n // noop\n return ()=>{};\n}\nfunction $b5e257d569688ac6$export$535bd6ca7f90a273() {\n // In React 18, we can use useSyncExternalStore to detect if we're server rendering or hydrating.\n if (typeof (0, $73SJx$react)[\"useSyncExternalStore\"] === \"function\") return (0, $73SJx$react)[\"useSyncExternalStore\"]($b5e257d569688ac6$var$subscribe, $b5e257d569688ac6$var$getSnapshot, $b5e257d569688ac6$var$getServerSnapshot);\n // eslint-disable-next-line react-hooks/rules-of-hooks\n return (0, $73SJx$useContext)($b5e257d569688ac6$var$IsSSRContext);\n}\n\n\n\n\nexport {$b5e257d569688ac6$export$9f8ac96af4b1b2ae as SSRProvider, $b5e257d569688ac6$export$619500959fc48b26 as useSSRSafeId, $b5e257d569688ac6$export$535bd6ca7f90a273 as useIsSSR};\n//# sourceMappingURL=module.js.map\n","import { useContext, useCallback } from 'react';\nimport * as React from 'react';\nimport { useSSRSafeId } from './ssr';\nimport DropdownContext from './DropdownContext';\nimport { Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const isRoleMenu = el => {\n var _el$getAttribute;\n return ((_el$getAttribute = el.getAttribute('role')) == null ? void 0 : _el$getAttribute.toLowerCase()) === 'menu';\n};\nconst noop = () => {};\n\n/**\n * Wires up Dropdown toggle functionality, returning a set a props to attach\n * to the element that functions as the dropdown toggle (generally a button).\n *\n * @memberOf Dropdown\n */\nexport function useDropdownToggle() {\n const id = useSSRSafeId();\n const {\n show = false,\n toggle = noop,\n setToggle,\n menuElement\n } = useContext(DropdownContext) || {};\n const handleClick = useCallback(e => {\n toggle(!show, e);\n }, [show, toggle]);\n const props = {\n id,\n ref: setToggle || noop,\n onClick: handleClick,\n 'aria-expanded': !!show\n };\n\n // This is maybe better down in an effect, but\n // the component is going to update anyway when the menu element\n // is set so might return new props.\n if (menuElement && isRoleMenu(menuElement)) {\n props['aria-haspopup'] = true;\n }\n return [props, {\n show,\n toggle\n }];\n}\n/**\n * Also exported as `` from `Dropdown`.\n *\n * @displayName DropdownToggle\n * @memberOf Dropdown\n */\nfunction DropdownToggle({\n children\n}) {\n const [props, meta] = useDropdownToggle();\n return /*#__PURE__*/_jsx(_Fragment, {\n children: children(props, meta)\n });\n}\nDropdownToggle.displayName = 'DropdownToggle';\n\n/** @component */\nexport default DropdownToggle;","import * as React from 'react';\nconst SelectableContext = /*#__PURE__*/React.createContext(null);\nexport const makeEventKey = (eventKey, href = null) => {\n if (eventKey != null) return String(eventKey);\n return href || null;\n};\nexport default SelectableContext;","import * as React from 'react';\nconst NavContext = /*#__PURE__*/React.createContext(null);\nNavContext.displayName = 'NavContext';\nexport default NavContext;","export const ATTRIBUTE_PREFIX = `data-rr-ui-`;\nexport const PROPERTY_PREFIX = `rrUi`;\nexport function dataAttr(property) {\n return `${ATTRIBUTE_PREFIX}${property}`;\n}\nexport function dataProp(property) {\n return `${PROPERTY_PREFIX}${property}`;\n}","const _excluded = [\"eventKey\", \"disabled\", \"onClick\", \"active\", \"as\"];\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport * as React from 'react';\nimport { useContext } from 'react';\nimport useEventCallback from '@restart/hooks/useEventCallback';\nimport SelectableContext, { makeEventKey } from './SelectableContext';\nimport NavContext from './NavContext';\nimport Button from './Button';\nimport { dataAttr } from './DataKey';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Create a dropdown item. Returns a set of props for the dropdown item component\n * including an `onClick` handler that prevents selection when the item is disabled\n */\nexport function useDropdownItem({\n key,\n href,\n active,\n disabled,\n onClick\n}) {\n const onSelectCtx = useContext(SelectableContext);\n const navContext = useContext(NavContext);\n const {\n activeKey\n } = navContext || {};\n const eventKey = makeEventKey(key, href);\n const isActive = active == null && key != null ? makeEventKey(activeKey) === eventKey : active;\n const handleClick = useEventCallback(event => {\n if (disabled) return;\n onClick == null ? void 0 : onClick(event);\n if (onSelectCtx && !event.isPropagationStopped()) {\n onSelectCtx(eventKey, event);\n }\n });\n return [{\n onClick: handleClick,\n 'aria-disabled': disabled || undefined,\n 'aria-selected': isActive,\n [dataAttr('dropdown-item')]: ''\n }, {\n isActive\n }];\n}\nconst DropdownItem = /*#__PURE__*/React.forwardRef((_ref, ref) => {\n let {\n eventKey,\n disabled,\n onClick,\n active,\n as: Component = Button\n } = _ref,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n const [dropdownItemProps] = useDropdownItem({\n key: eventKey,\n href: props.href,\n disabled,\n onClick,\n active\n });\n return /*#__PURE__*/_jsx(Component, Object.assign({}, props, {\n ref: ref\n }, dropdownItemProps));\n});\nDropdownItem.displayName = 'DropdownItem';\nexport default DropdownItem;","import { createContext, useContext } from 'react';\nimport canUseDOM from 'dom-helpers/canUseDOM';\nconst Context = /*#__PURE__*/createContext(canUseDOM ? window : undefined);\nexport const WindowProvider = Context.Provider;\n\n/**\n * The document \"window\" placed in React context. Helpful for determining\n * SSR context, or when rendering into an iframe.\n *\n * @returns the current window\n */\nexport default function useWindow() {\n return useContext(Context);\n}","import qsa from 'dom-helpers/querySelectorAll';\nimport addEventListener from 'dom-helpers/addEventListener';\nimport { useCallback, useRef, useEffect, useMemo, useContext } from 'react';\nimport * as React from 'react';\nimport { useUncontrolledProp } from 'uncontrollable';\nimport usePrevious from '@restart/hooks/usePrevious';\nimport useForceUpdate from '@restart/hooks/useForceUpdate';\nimport useEventListener from '@restart/hooks/useEventListener';\nimport useEventCallback from '@restart/hooks/useEventCallback';\nimport DropdownContext from './DropdownContext';\nimport DropdownMenu from './DropdownMenu';\nimport DropdownToggle, { isRoleMenu } from './DropdownToggle';\nimport DropdownItem from './DropdownItem';\nimport SelectableContext from './SelectableContext';\nimport { dataAttr } from './DataKey';\nimport useWindow from './useWindow';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction useRefWithUpdate() {\n const forceUpdate = useForceUpdate();\n const ref = useRef(null);\n const attachRef = useCallback(element => {\n ref.current = element;\n // ensure that a menu set triggers an update for consumers\n forceUpdate();\n }, [forceUpdate]);\n return [ref, attachRef];\n}\n\n/**\n * @displayName Dropdown\n * @public\n */\nfunction Dropdown({\n defaultShow,\n show: rawShow,\n onSelect,\n onToggle: rawOnToggle,\n itemSelector = `* [${dataAttr('dropdown-item')}]`,\n focusFirstItemOnShow,\n placement = 'bottom-start',\n children\n}) {\n const window = useWindow();\n const [show, onToggle] = useUncontrolledProp(rawShow, defaultShow, rawOnToggle);\n\n // We use normal refs instead of useCallbackRef in order to populate the\n // the value as quickly as possible, otherwise the effect to focus the element\n // may run before the state value is set\n const [menuRef, setMenu] = useRefWithUpdate();\n const menuElement = menuRef.current;\n const [toggleRef, setToggle] = useRefWithUpdate();\n const toggleElement = toggleRef.current;\n const lastShow = usePrevious(show);\n const lastSourceEvent = useRef(null);\n const focusInDropdown = useRef(false);\n const onSelectCtx = useContext(SelectableContext);\n const toggle = useCallback((nextShow, event, source = event == null ? void 0 : event.type) => {\n onToggle(nextShow, {\n originalEvent: event,\n source\n });\n }, [onToggle]);\n const handleSelect = useEventCallback((key, event) => {\n onSelect == null ? void 0 : onSelect(key, event);\n toggle(false, event, 'select');\n if (!event.isPropagationStopped()) {\n onSelectCtx == null ? void 0 : onSelectCtx(key, event);\n }\n });\n const context = useMemo(() => ({\n toggle,\n placement,\n show,\n menuElement,\n toggleElement,\n setMenu,\n setToggle\n }), [toggle, placement, show, menuElement, toggleElement, setMenu, setToggle]);\n if (menuElement && lastShow && !show) {\n focusInDropdown.current = menuElement.contains(menuElement.ownerDocument.activeElement);\n }\n const focusToggle = useEventCallback(() => {\n if (toggleElement && toggleElement.focus) {\n toggleElement.focus();\n }\n });\n const maybeFocusFirst = useEventCallback(() => {\n const type = lastSourceEvent.current;\n let focusType = focusFirstItemOnShow;\n if (focusType == null) {\n focusType = menuRef.current && isRoleMenu(menuRef.current) ? 'keyboard' : false;\n }\n if (focusType === false || focusType === 'keyboard' && !/^key.+$/.test(type)) {\n return;\n }\n const first = qsa(menuRef.current, itemSelector)[0];\n if (first && first.focus) first.focus();\n });\n useEffect(() => {\n if (show) maybeFocusFirst();else if (focusInDropdown.current) {\n focusInDropdown.current = false;\n focusToggle();\n }\n // only `show` should be changing\n }, [show, focusInDropdown, focusToggle, maybeFocusFirst]);\n useEffect(() => {\n lastSourceEvent.current = null;\n });\n const getNextFocusedChild = (current, offset) => {\n if (!menuRef.current) return null;\n const items = qsa(menuRef.current, itemSelector);\n let index = items.indexOf(current) + offset;\n index = Math.max(0, Math.min(index, items.length));\n return items[index];\n };\n useEventListener(useCallback(() => window.document, [window]), 'keydown', event => {\n var _menuRef$current, _toggleRef$current;\n const {\n key\n } = event;\n const target = event.target;\n const fromMenu = (_menuRef$current = menuRef.current) == null ? void 0 : _menuRef$current.contains(target);\n const fromToggle = (_toggleRef$current = toggleRef.current) == null ? void 0 : _toggleRef$current.contains(target);\n\n // Second only to https://github.com/twbs/bootstrap/blob/8cfbf6933b8a0146ac3fbc369f19e520bd1ebdac/js/src/dropdown.js#L400\n // in inscrutability\n const isInput = /input|textarea/i.test(target.tagName);\n if (isInput && (key === ' ' || key !== 'Escape' && fromMenu || key === 'Escape' && target.type === 'search')) {\n return;\n }\n if (!fromMenu && !fromToggle) {\n return;\n }\n if (key === 'Tab' && (!menuRef.current || !show)) {\n return;\n }\n lastSourceEvent.current = event.type;\n const meta = {\n originalEvent: event,\n source: event.type\n };\n switch (key) {\n case 'ArrowUp':\n {\n const next = getNextFocusedChild(target, -1);\n if (next && next.focus) next.focus();\n event.preventDefault();\n return;\n }\n case 'ArrowDown':\n event.preventDefault();\n if (!show) {\n onToggle(true, meta);\n } else {\n const next = getNextFocusedChild(target, 1);\n if (next && next.focus) next.focus();\n }\n return;\n case 'Tab':\n // on keydown the target is the element being tabbed FROM, we need that\n // to know if this event is relevant to this dropdown (e.g. in this menu).\n // On `keyup` the target is the element being tagged TO which we use to check\n // if focus has left the menu\n addEventListener(target.ownerDocument, 'keyup', e => {\n var _menuRef$current2;\n if (e.key === 'Tab' && !e.target || !((_menuRef$current2 = menuRef.current) != null && _menuRef$current2.contains(e.target))) {\n onToggle(false, meta);\n }\n }, {\n once: true\n });\n break;\n case 'Escape':\n if (key === 'Escape') {\n event.preventDefault();\n event.stopPropagation();\n }\n onToggle(false, meta);\n break;\n default:\n }\n });\n return /*#__PURE__*/_jsx(SelectableContext.Provider, {\n value: handleSelect,\n children: /*#__PURE__*/_jsx(DropdownContext.Provider, {\n value: context,\n children: children\n })\n });\n}\nDropdown.displayName = 'Dropdown';\nDropdown.Menu = DropdownMenu;\nDropdown.Toggle = DropdownToggle;\nDropdown.Item = DropdownItem;\nexport default Dropdown;","\"use client\";\n\nimport * as React from 'react';\nconst DropdownContext = /*#__PURE__*/React.createContext({});\nDropdownContext.displayName = 'DropdownContext';\nexport default DropdownContext;","\"use client\";\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst DropdownDivider = /*#__PURE__*/React.forwardRef(({\n className,\n bsPrefix,\n as: Component = 'hr',\n role = 'separator',\n ...props\n}, ref) => {\n bsPrefix = useBootstrapPrefix(bsPrefix, 'dropdown-divider');\n return /*#__PURE__*/_jsx(Component, {\n ref: ref,\n className: classNames(className, bsPrefix),\n role: role,\n ...props\n });\n});\nDropdownDivider.displayName = 'DropdownDivider';\nexport default DropdownDivider;","\"use client\";\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst DropdownHeader = /*#__PURE__*/React.forwardRef(({\n className,\n bsPrefix,\n as: Component = 'div',\n role = 'heading',\n ...props\n}, ref) => {\n bsPrefix = useBootstrapPrefix(bsPrefix, 'dropdown-header');\n return /*#__PURE__*/_jsx(Component, {\n ref: ref,\n className: classNames(className, bsPrefix),\n role: role,\n ...props\n });\n});\nDropdownHeader.displayName = 'DropdownHeader';\nexport default DropdownHeader;","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useDropdownItem } from '@restart/ui/DropdownItem';\nimport Anchor from '@restart/ui/Anchor';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst DropdownItem = /*#__PURE__*/React.forwardRef(({\n bsPrefix,\n className,\n eventKey,\n disabled = false,\n onClick,\n active,\n as: Component = Anchor,\n ...props\n}, ref) => {\n const prefix = useBootstrapPrefix(bsPrefix, 'dropdown-item');\n const [dropdownItemProps, meta] = useDropdownItem({\n key: eventKey,\n href: props.href,\n disabled,\n onClick,\n active\n });\n return /*#__PURE__*/_jsx(Component, {\n ...props,\n ...dropdownItemProps,\n ref: ref,\n className: classNames(className, prefix, meta.isActive && 'active', disabled && 'disabled')\n });\n});\nDropdownItem.displayName = 'DropdownItem';\nexport default DropdownItem;","\"use client\";\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst DropdownItemText = /*#__PURE__*/React.forwardRef(({\n className,\n bsPrefix,\n as: Component = 'span',\n ...props\n}, ref) => {\n bsPrefix = useBootstrapPrefix(bsPrefix, 'dropdown-item-text');\n return /*#__PURE__*/_jsx(Component, {\n ref: ref,\n className: classNames(className, bsPrefix),\n ...props\n });\n});\nDropdownItemText.displayName = 'DropdownItemText';\nexport default DropdownItemText;","\"use client\";\n\nimport * as React from 'react';\nconst context = /*#__PURE__*/React.createContext(null);\ncontext.displayName = 'InputGroupContext';\nexport default context;","\"use client\";\n\nimport * as React from 'react';\n\n// TODO: check\n\nconst context = /*#__PURE__*/React.createContext(null);\ncontext.displayName = 'NavbarContext';\nexport default context;","import invariant from 'invariant';\nimport { useCallback } from 'react';\nimport useMergedRefs from '@restart/hooks/useMergedRefs';\nexport default function useWrappedRefWithWarning(ref, componentName) {\n // @ts-ignore\n if (!(process.env.NODE_ENV !== \"production\")) return ref;\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const warningRef = useCallback(refValue => {\n !(refValue == null || !refValue.isReactComponent) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `${componentName} injected a ref to a provided \\`as\\` component that resolved to a component instance instead of a DOM element. ` + 'Use `React.forwardRef` to provide the injected ref to the class component as a prop in order to pass it directly to a DOM element') : invariant(false) : void 0;\n }, [componentName]);\n // eslint-disable-next-line react-hooks/rules-of-hooks\n return useMergedRefs(warningRef, ref);\n}","import PropTypes from 'prop-types';\nconst alignDirection = PropTypes.oneOf(['start', 'end']);\nexport const alignPropType = PropTypes.oneOfType([alignDirection, PropTypes.shape({\n sm: alignDirection\n}), PropTypes.shape({\n md: alignDirection\n}), PropTypes.shape({\n lg: alignDirection\n}), PropTypes.shape({\n xl: alignDirection\n}), PropTypes.shape({\n xxl: alignDirection\n}), PropTypes.object]);","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useContext } from 'react';\nimport { useDropdownMenu } from '@restart/ui/DropdownMenu';\nimport useIsomorphicEffect from '@restart/hooks/useIsomorphicEffect';\nimport useMergedRefs from '@restart/hooks/useMergedRefs';\nimport warning from 'warning';\nimport DropdownContext from './DropdownContext';\nimport InputGroupContext from './InputGroupContext';\nimport NavbarContext from './NavbarContext';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport useWrappedRefWithWarning from './useWrappedRefWithWarning';\nimport { alignPropType } from './types';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function getDropdownMenuPlacement(alignEnd, dropDirection, isRTL) {\n const topStart = isRTL ? 'top-end' : 'top-start';\n const topEnd = isRTL ? 'top-start' : 'top-end';\n const bottomStart = isRTL ? 'bottom-end' : 'bottom-start';\n const bottomEnd = isRTL ? 'bottom-start' : 'bottom-end';\n const leftStart = isRTL ? 'right-start' : 'left-start';\n const leftEnd = isRTL ? 'right-end' : 'left-end';\n const rightStart = isRTL ? 'left-start' : 'right-start';\n const rightEnd = isRTL ? 'left-end' : 'right-end';\n let placement = alignEnd ? bottomEnd : bottomStart;\n if (dropDirection === 'up') placement = alignEnd ? topEnd : topStart;else if (dropDirection === 'end') placement = alignEnd ? rightEnd : rightStart;else if (dropDirection === 'start') placement = alignEnd ? leftEnd : leftStart;else if (dropDirection === 'down-centered') placement = 'bottom';else if (dropDirection === 'up-centered') placement = 'top';\n return placement;\n}\nconst DropdownMenu = /*#__PURE__*/React.forwardRef(({\n bsPrefix,\n className,\n align,\n rootCloseEvent,\n flip = true,\n show: showProps,\n renderOnMount,\n // Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\n as: Component = 'div',\n popperConfig,\n variant,\n ...props\n}, ref) => {\n let alignEnd = false;\n const isNavbar = useContext(NavbarContext);\n const prefix = useBootstrapPrefix(bsPrefix, 'dropdown-menu');\n const {\n align: contextAlign,\n drop,\n isRTL\n } = useContext(DropdownContext);\n align = align || contextAlign;\n const isInputGroup = useContext(InputGroupContext);\n const alignClasses = [];\n if (align) {\n if (typeof align === 'object') {\n const keys = Object.keys(align);\n process.env.NODE_ENV !== \"production\" ? warning(keys.length === 1, 'There should only be 1 breakpoint when passing an object to `align`') : void 0;\n if (keys.length) {\n const brkPoint = keys[0];\n const direction = align[brkPoint];\n\n // .dropdown-menu-end is required for responsively aligning\n // left in addition to align left classes.\n alignEnd = direction === 'start';\n alignClasses.push(`${prefix}-${brkPoint}-${direction}`);\n }\n } else if (align === 'end') {\n alignEnd = true;\n }\n }\n const placement = getDropdownMenuPlacement(alignEnd, drop, isRTL);\n const [menuProps, {\n hasShown,\n popper,\n show,\n toggle\n }] = useDropdownMenu({\n flip,\n rootCloseEvent,\n show: showProps,\n usePopper: !isNavbar && alignClasses.length === 0,\n offset: [0, 2],\n popperConfig,\n placement\n });\n menuProps.ref = useMergedRefs(useWrappedRefWithWarning(ref, 'DropdownMenu'), menuProps.ref);\n useIsomorphicEffect(() => {\n // Popper's initial position for the menu is incorrect when\n // renderOnMount=true. Need to call update() to correct it.\n if (show) popper == null ? void 0 : popper.update();\n }, [show]);\n if (!hasShown && !renderOnMount && !isInputGroup) return null;\n\n // For custom components provide additional, non-DOM, props;\n if (typeof Component !== 'string') {\n menuProps.show = show;\n menuProps.close = () => toggle == null ? void 0 : toggle(false);\n menuProps.align = align;\n }\n let style = props.style;\n if (popper != null && popper.placement) {\n // we don't need the default popper style,\n // menus are display: none when not shown.\n style = {\n ...props.style,\n ...menuProps.style\n };\n props['x-placement'] = popper.placement;\n }\n return /*#__PURE__*/_jsx(Component, {\n ...props,\n ...menuProps,\n style: style\n // Bootstrap css requires this data attrib to style responsive menus.\n ,\n ...((alignClasses.length || isNavbar) && {\n 'data-bs-popper': 'static'\n }),\n className: classNames(className, prefix, show && 'show', alignEnd && `${prefix}-end`, variant && `${prefix}-${variant}`, ...alignClasses)\n });\n});\nDropdownMenu.displayName = 'DropdownMenu';\nexport default DropdownMenu;","\"use client\";\n\nimport useMergedRefs from '@restart/hooks/useMergedRefs';\nimport DropdownContext from '@restart/ui/DropdownContext';\nimport { useDropdownToggle } from '@restart/ui/DropdownToggle';\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useContext } from 'react';\nimport Button from './Button';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport useWrappedRefWithWarning from './useWrappedRefWithWarning';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst DropdownToggle = /*#__PURE__*/React.forwardRef(({\n bsPrefix,\n split,\n className,\n childBsPrefix,\n // Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\n as: Component = Button,\n ...props\n}, ref) => {\n const prefix = useBootstrapPrefix(bsPrefix, 'dropdown-toggle');\n const dropdownContext = useContext(DropdownContext);\n if (childBsPrefix !== undefined) {\n props.bsPrefix = childBsPrefix;\n }\n const [toggleProps] = useDropdownToggle();\n toggleProps.ref = useMergedRefs(toggleProps.ref, useWrappedRefWithWarning(ref, 'DropdownToggle'));\n\n // This intentionally forwards size and variant (if set) to the\n // underlying component, to allow it to render size and style variants.\n return /*#__PURE__*/_jsx(Component, {\n className: classNames(className, prefix, split && `${prefix}-split`, (dropdownContext == null ? void 0 : dropdownContext.show) && 'show'),\n ...toggleProps,\n ...props\n });\n});\nDropdownToggle.displayName = 'DropdownToggle';\nexport default DropdownToggle;","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useContext, useMemo } from 'react';\nimport BaseDropdown from '@restart/ui/Dropdown';\nimport { useUncontrolled } from 'uncontrollable';\nimport useEventCallback from '@restart/hooks/useEventCallback';\nimport DropdownContext from './DropdownContext';\nimport DropdownDivider from './DropdownDivider';\nimport DropdownHeader from './DropdownHeader';\nimport DropdownItem from './DropdownItem';\nimport DropdownItemText from './DropdownItemText';\nimport DropdownMenu, { getDropdownMenuPlacement } from './DropdownMenu';\nimport DropdownToggle from './DropdownToggle';\nimport InputGroupContext from './InputGroupContext';\nimport { useBootstrapPrefix, useIsRTL } from './ThemeProvider';\nimport { alignPropType } from './types';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst Dropdown = /*#__PURE__*/React.forwardRef((pProps, ref) => {\n const {\n bsPrefix,\n drop = 'down',\n show,\n className,\n align = 'start',\n onSelect,\n onToggle,\n focusFirstItemOnShow,\n // Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\n as: Component = 'div',\n navbar: _4,\n autoClose = true,\n ...props\n } = useUncontrolled(pProps, {\n show: 'onToggle'\n });\n const isInputGroup = useContext(InputGroupContext);\n const prefix = useBootstrapPrefix(bsPrefix, 'dropdown');\n const isRTL = useIsRTL();\n const isClosingPermitted = source => {\n // autoClose=false only permits close on button click\n if (autoClose === false) return source === 'click';\n\n // autoClose=inside doesn't permit close on rootClose\n if (autoClose === 'inside') return source !== 'rootClose';\n\n // autoClose=outside doesn't permit close on select\n if (autoClose === 'outside') return source !== 'select';\n return true;\n };\n const handleToggle = useEventCallback((nextShow, meta) => {\n var _meta$originalEvent, _meta$originalEvent$t;\n /** Checking if target of event is ToggleButton,\n * if it is then nullify mousedown event\n */\n const isToggleButton = (_meta$originalEvent = meta.originalEvent) == null ? void 0 : (_meta$originalEvent$t = _meta$originalEvent.target) == null ? void 0 : _meta$originalEvent$t.classList.contains('dropdown-toggle');\n if (isToggleButton && meta.source === 'mousedown') {\n return;\n }\n if (meta.originalEvent.currentTarget === document && (meta.source !== 'keydown' || meta.originalEvent.key === 'Escape')) meta.source = 'rootClose';\n if (isClosingPermitted(meta.source)) onToggle == null ? void 0 : onToggle(nextShow, meta);\n });\n const alignEnd = align === 'end';\n const placement = getDropdownMenuPlacement(alignEnd, drop, isRTL);\n const contextValue = useMemo(() => ({\n align,\n drop,\n isRTL\n }), [align, drop, isRTL]);\n const directionClasses = {\n down: prefix,\n 'down-centered': `${prefix}-center`,\n up: 'dropup',\n 'up-centered': 'dropup-center dropup',\n end: 'dropend',\n start: 'dropstart'\n };\n return /*#__PURE__*/_jsx(DropdownContext.Provider, {\n value: contextValue,\n children: /*#__PURE__*/_jsx(BaseDropdown, {\n placement: placement,\n show: show,\n onSelect: onSelect,\n onToggle: handleToggle,\n focusFirstItemOnShow: focusFirstItemOnShow,\n itemSelector: `.${prefix}-item:not(.disabled):not(:disabled)`,\n children: isInputGroup ? props.children : /*#__PURE__*/_jsx(Component, {\n ...props,\n ref: ref,\n className: classNames(className, show && 'show', directionClasses[drop])\n })\n })\n });\n});\nDropdown.displayName = 'Dropdown';\nexport default Object.assign(Dropdown, {\n Toggle: DropdownToggle,\n Menu: DropdownMenu,\n Item: DropdownItem,\n ItemText: DropdownItemText,\n Divider: DropdownDivider,\n Header: DropdownHeader\n});","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const propTypes = {\n /**\n * @default 'img'\n */\n bsPrefix: PropTypes.string,\n /**\n * Sets image as fluid image.\n */\n fluid: PropTypes.bool,\n /**\n * Sets image shape as rounded.\n */\n rounded: PropTypes.bool,\n /**\n * Sets image shape as circle.\n */\n roundedCircle: PropTypes.bool,\n /**\n * Sets image shape as thumbnail.\n */\n thumbnail: PropTypes.bool\n};\nconst Image = /*#__PURE__*/React.forwardRef(({\n bsPrefix,\n className,\n fluid = false,\n rounded = false,\n roundedCircle = false,\n thumbnail = false,\n ...props\n}, ref) => {\n bsPrefix = useBootstrapPrefix(bsPrefix, 'img');\n return /*#__PURE__*/_jsx(\"img\", {\n // eslint-disable-line jsx-a11y/alt-text\n ref: ref,\n ...props,\n className: classNames(className, fluid && `${bsPrefix}-fluid`, rounded && `rounded`, roundedCircle && `rounded-circle`, thumbnail && `${bsPrefix}-thumbnail`)\n });\n});\nImage.displayName = 'Image';\nexport default Image;","import classNames from 'classnames';\nimport * as React from 'react';\nimport Image, { propTypes as imagePropTypes } from './Image';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst FigureImage = /*#__PURE__*/React.forwardRef(({\n className,\n fluid = true,\n ...props\n}, ref) => /*#__PURE__*/_jsx(Image, {\n ref: ref,\n ...props,\n fluid: fluid,\n className: classNames(className, 'figure-img')\n}));\nFigureImage.displayName = 'FigureImage';\nFigureImage.propTypes = imagePropTypes;\nexport default FigureImage;","\"use client\";\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst FigureCaption = /*#__PURE__*/React.forwardRef(({\n className,\n bsPrefix,\n as: Component = 'figcaption',\n ...props\n}, ref) => {\n bsPrefix = useBootstrapPrefix(bsPrefix, 'figure-caption');\n return /*#__PURE__*/_jsx(Component, {\n ref: ref,\n className: classNames(className, bsPrefix),\n ...props\n });\n});\nFigureCaption.displayName = 'FigureCaption';\nexport default FigureCaption;","\"use client\";\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport FigureImage from './FigureImage';\nimport FigureCaption from './FigureCaption';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst Figure = /*#__PURE__*/React.forwardRef(({\n className,\n bsPrefix,\n as: Component = 'figure',\n ...props\n}, ref) => {\n bsPrefix = useBootstrapPrefix(bsPrefix, 'figure');\n return /*#__PURE__*/_jsx(Component, {\n ref: ref,\n className: classNames(className, bsPrefix),\n ...props\n });\n});\nFigure.displayName = 'Figure';\nexport default Object.assign(Figure, {\n Image: FigureImage,\n Caption: FigureCaption\n});","import classNames from 'classnames';\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst propTypes = {\n /**\n * Specify whether the feedback is for valid or invalid fields\n *\n * @type {('valid'|'invalid')}\n */\n type: PropTypes.string,\n /** Display feedback as a tooltip. */\n tooltip: PropTypes.bool,\n as: PropTypes.elementType\n};\nconst Feedback = /*#__PURE__*/React.forwardRef(\n// Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\n({\n as: Component = 'div',\n className,\n type = 'valid',\n tooltip = false,\n ...props\n}, ref) => /*#__PURE__*/_jsx(Component, {\n ...props,\n ref: ref,\n className: classNames(className, `${type}-${tooltip ? 'tooltip' : 'feedback'}`)\n}));\nFeedback.displayName = 'Feedback';\nFeedback.propTypes = propTypes;\nexport default Feedback;","\"use client\";\n\nimport * as React from 'react';\n\n// TODO\n\nconst FormContext = /*#__PURE__*/React.createContext({});\nexport default FormContext;","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useContext } from 'react';\nimport FormContext from './FormContext';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst FormCheckInput = /*#__PURE__*/React.forwardRef(({\n id,\n bsPrefix,\n className,\n type = 'checkbox',\n isValid = false,\n isInvalid = false,\n // Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\n as: Component = 'input',\n ...props\n}, ref) => {\n const {\n controlId\n } = useContext(FormContext);\n bsPrefix = useBootstrapPrefix(bsPrefix, 'form-check-input');\n return /*#__PURE__*/_jsx(Component, {\n ...props,\n ref: ref,\n type: type,\n id: id || controlId,\n className: classNames(className, bsPrefix, isValid && 'is-valid', isInvalid && 'is-invalid')\n });\n});\nFormCheckInput.displayName = 'FormCheckInput';\nexport default FormCheckInput;","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useContext } from 'react';\nimport FormContext from './FormContext';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst FormCheckLabel = /*#__PURE__*/React.forwardRef(({\n bsPrefix,\n className,\n htmlFor,\n ...props\n}, ref) => {\n const {\n controlId\n } = useContext(FormContext);\n bsPrefix = useBootstrapPrefix(bsPrefix, 'form-check-label');\n return /*#__PURE__*/_jsx(\"label\", {\n ...props,\n ref: ref,\n htmlFor: htmlFor || controlId,\n className: classNames(className, bsPrefix)\n });\n});\nFormCheckLabel.displayName = 'FormCheckLabel';\nexport default FormCheckLabel;","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useContext, useMemo } from 'react';\nimport Feedback from './Feedback';\nimport FormCheckInput from './FormCheckInput';\nimport FormCheckLabel from './FormCheckLabel';\nimport FormContext from './FormContext';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { hasChildOfType } from './ElementChildren';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst FormCheck = /*#__PURE__*/React.forwardRef(({\n id,\n bsPrefix,\n bsSwitchPrefix,\n inline = false,\n reverse = false,\n disabled = false,\n isValid = false,\n isInvalid = false,\n feedbackTooltip = false,\n feedback,\n feedbackType,\n className,\n style,\n title = '',\n type = 'checkbox',\n label,\n children,\n // Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\n as = 'input',\n ...props\n}, ref) => {\n bsPrefix = useBootstrapPrefix(bsPrefix, 'form-check');\n bsSwitchPrefix = useBootstrapPrefix(bsSwitchPrefix, 'form-switch');\n const {\n controlId\n } = useContext(FormContext);\n const innerFormContext = useMemo(() => ({\n controlId: id || controlId\n }), [controlId, id]);\n const hasLabel = !children && label != null && label !== false || hasChildOfType(children, FormCheckLabel);\n const input = /*#__PURE__*/_jsx(FormCheckInput, {\n ...props,\n type: type === 'switch' ? 'checkbox' : type,\n ref: ref,\n isValid: isValid,\n isInvalid: isInvalid,\n disabled: disabled,\n as: as\n });\n return /*#__PURE__*/_jsx(FormContext.Provider, {\n value: innerFormContext,\n children: /*#__PURE__*/_jsx(\"div\", {\n style: style,\n className: classNames(className, hasLabel && bsPrefix, inline && `${bsPrefix}-inline`, reverse && `${bsPrefix}-reverse`, type === 'switch' && bsSwitchPrefix),\n children: children || /*#__PURE__*/_jsxs(_Fragment, {\n children: [input, hasLabel && /*#__PURE__*/_jsx(FormCheckLabel, {\n title: title,\n children: label\n }), feedback && /*#__PURE__*/_jsx(Feedback, {\n type: feedbackType,\n tooltip: feedbackTooltip,\n children: feedback\n })]\n })\n })\n });\n});\nFormCheck.displayName = 'FormCheck';\nexport default Object.assign(FormCheck, {\n Input: FormCheckInput,\n Label: FormCheckLabel\n});","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useContext } from 'react';\nimport warning from 'warning';\nimport Feedback from './Feedback';\nimport FormContext from './FormContext';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst FormControl = /*#__PURE__*/React.forwardRef(({\n bsPrefix,\n type,\n size,\n htmlSize,\n id,\n className,\n isValid = false,\n isInvalid = false,\n plaintext,\n readOnly,\n // Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\n as: Component = 'input',\n ...props\n}, ref) => {\n const {\n controlId\n } = useContext(FormContext);\n bsPrefix = useBootstrapPrefix(bsPrefix, 'form-control');\n process.env.NODE_ENV !== \"production\" ? warning(controlId == null || !id, '`controlId` is ignored on `` when `id` is specified.') : void 0;\n return /*#__PURE__*/_jsx(Component, {\n ...props,\n type: type,\n size: htmlSize,\n ref: ref,\n readOnly: readOnly,\n id: id || controlId,\n className: classNames(className, plaintext ? `${bsPrefix}-plaintext` : bsPrefix, size && `${bsPrefix}-${size}`, type === 'color' && `${bsPrefix}-color`, isValid && 'is-valid', isInvalid && 'is-invalid')\n });\n});\nFormControl.displayName = 'FormControl';\nexport default Object.assign(FormControl, {\n Feedback\n});","\"use client\";\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst FormFloating = /*#__PURE__*/React.forwardRef(({\n className,\n bsPrefix,\n as: Component = 'div',\n ...props\n}, ref) => {\n bsPrefix = useBootstrapPrefix(bsPrefix, 'form-floating');\n return /*#__PURE__*/_jsx(Component, {\n ref: ref,\n className: classNames(className, bsPrefix),\n ...props\n });\n});\nFormFloating.displayName = 'FormFloating';\nexport default FormFloating;","import * as React from 'react';\nimport { useMemo } from 'react';\nimport FormContext from './FormContext';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst FormGroup = /*#__PURE__*/React.forwardRef(({\n controlId,\n // Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\n as: Component = 'div',\n ...props\n}, ref) => {\n const context = useMemo(() => ({\n controlId\n }), [controlId]);\n return /*#__PURE__*/_jsx(FormContext.Provider, {\n value: context,\n children: /*#__PURE__*/_jsx(Component, {\n ...props,\n ref: ref\n })\n });\n});\nFormGroup.displayName = 'FormGroup';\nexport default FormGroup;","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useContext } from 'react';\nimport warning from 'warning';\nimport Col from './Col';\nimport FormContext from './FormContext';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst FormLabel = /*#__PURE__*/React.forwardRef(({\n // Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\n as: Component = 'label',\n bsPrefix,\n column = false,\n visuallyHidden = false,\n className,\n htmlFor,\n ...props\n}, ref) => {\n const {\n controlId\n } = useContext(FormContext);\n bsPrefix = useBootstrapPrefix(bsPrefix, 'form-label');\n let columnClass = 'col-form-label';\n if (typeof column === 'string') columnClass = `${columnClass} ${columnClass}-${column}`;\n const classes = classNames(className, bsPrefix, visuallyHidden && 'visually-hidden', column && columnClass);\n process.env.NODE_ENV !== \"production\" ? warning(controlId == null || !htmlFor, '`controlId` is ignored on `` when `htmlFor` is specified.') : void 0;\n htmlFor = htmlFor || controlId;\n if (column) return /*#__PURE__*/_jsx(Col, {\n ref: ref,\n as: \"label\",\n className: classes,\n htmlFor: htmlFor,\n ...props\n });\n return (\n /*#__PURE__*/\n // eslint-disable-next-line jsx-a11y/label-has-for, jsx-a11y/label-has-associated-control\n _jsx(Component, {\n ref: ref,\n className: classes,\n htmlFor: htmlFor,\n ...props\n })\n );\n});\nFormLabel.displayName = 'FormLabel';\nexport default FormLabel;","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useContext } from 'react';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport FormContext from './FormContext';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst FormRange = /*#__PURE__*/React.forwardRef(({\n bsPrefix,\n className,\n id,\n ...props\n}, ref) => {\n const {\n controlId\n } = useContext(FormContext);\n bsPrefix = useBootstrapPrefix(bsPrefix, 'form-range');\n return /*#__PURE__*/_jsx(\"input\", {\n ...props,\n type: \"range\",\n ref: ref,\n className: classNames(className, bsPrefix),\n id: id || controlId\n });\n});\nFormRange.displayName = 'FormRange';\nexport default FormRange;","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useContext } from 'react';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport FormContext from './FormContext';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst FormSelect = /*#__PURE__*/React.forwardRef(({\n bsPrefix,\n size,\n htmlSize,\n className,\n isValid = false,\n isInvalid = false,\n id,\n ...props\n}, ref) => {\n const {\n controlId\n } = useContext(FormContext);\n bsPrefix = useBootstrapPrefix(bsPrefix, 'form-select');\n return /*#__PURE__*/_jsx(\"select\", {\n ...props,\n size: htmlSize,\n ref: ref,\n className: classNames(className, bsPrefix, size && `${bsPrefix}-${size}`, isValid && `is-valid`, isInvalid && `is-invalid`),\n id: id || controlId\n });\n});\nFormSelect.displayName = 'FormSelect';\nexport default FormSelect;","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst FormText = /*#__PURE__*/React.forwardRef(\n// Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\n({\n bsPrefix,\n className,\n as: Component = 'small',\n muted,\n ...props\n}, ref) => {\n bsPrefix = useBootstrapPrefix(bsPrefix, 'form-text');\n return /*#__PURE__*/_jsx(Component, {\n ...props,\n ref: ref,\n className: classNames(className, bsPrefix, muted && 'text-muted')\n });\n});\nFormText.displayName = 'FormText';\nexport default FormText;","import * as React from 'react';\nimport FormCheck from './FormCheck';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst Switch = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/_jsx(FormCheck, {\n ...props,\n ref: ref,\n type: \"switch\"\n}));\nSwitch.displayName = 'Switch';\nexport default Object.assign(Switch, {\n Input: FormCheck.Input,\n Label: FormCheck.Label\n});","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport FormGroup from './FormGroup';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst FloatingLabel = /*#__PURE__*/React.forwardRef(({\n bsPrefix,\n className,\n children,\n controlId,\n label,\n ...props\n}, ref) => {\n bsPrefix = useBootstrapPrefix(bsPrefix, 'form-floating');\n return /*#__PURE__*/_jsxs(FormGroup, {\n ref: ref,\n className: classNames(className, bsPrefix),\n controlId: controlId,\n ...props,\n children: [children, /*#__PURE__*/_jsx(\"label\", {\n htmlFor: controlId,\n children: label\n })]\n });\n});\nFloatingLabel.displayName = 'FloatingLabel';\nexport default FloatingLabel;","import classNames from 'classnames';\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\nimport FormCheck from './FormCheck';\nimport FormControl from './FormControl';\nimport FormFloating from './FormFloating';\nimport FormGroup from './FormGroup';\nimport FormLabel from './FormLabel';\nimport FormRange from './FormRange';\nimport FormSelect from './FormSelect';\nimport FormText from './FormText';\nimport Switch from './Switch';\nimport FloatingLabel from './FloatingLabel';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst propTypes = {\n /**\n * The Form `ref` will be forwarded to the underlying element,\n * which means, unless it's rendered `as` a composite component,\n * it will be a DOM node, when resolved.\n *\n * @type {ReactRef}\n * @alias ref\n */\n _ref: PropTypes.any,\n /**\n * Mark a form as having been validated. Setting it to `true` will\n * toggle any validation styles on the forms elements.\n */\n validated: PropTypes.bool,\n as: PropTypes.elementType\n};\nconst Form = /*#__PURE__*/React.forwardRef(({\n className,\n validated,\n // Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\n as: Component = 'form',\n ...props\n}, ref) => /*#__PURE__*/_jsx(Component, {\n ...props,\n ref: ref,\n className: classNames(className, validated && 'was-validated')\n}));\nForm.displayName = 'Form';\nForm.propTypes = propTypes;\nexport default Object.assign(Form, {\n Group: FormGroup,\n Control: FormControl,\n Floating: FormFloating,\n Check: FormCheck,\n Switch,\n Label: FormLabel,\n Text: FormText,\n Range: FormRange,\n Select: FormSelect,\n FloatingLabel\n});","import * as React from 'react';\nconst TabContext = /*#__PURE__*/React.createContext(null);\nexport default TabContext;","const _excluded = [\"as\", \"active\", \"eventKey\"];\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport * as React from 'react';\nimport { useContext } from 'react';\nimport useEventCallback from '@restart/hooks/useEventCallback';\nimport NavContext from './NavContext';\nimport SelectableContext, { makeEventKey } from './SelectableContext';\nimport Button from './Button';\nimport { dataAttr } from './DataKey';\nimport TabContext from './TabContext';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function useNavItem({\n key,\n onClick,\n active,\n id,\n role,\n disabled\n}) {\n const parentOnSelect = useContext(SelectableContext);\n const navContext = useContext(NavContext);\n const tabContext = useContext(TabContext);\n let isActive = active;\n const props = {\n role\n };\n if (navContext) {\n if (!role && navContext.role === 'tablist') props.role = 'tab';\n const contextControllerId = navContext.getControllerId(key != null ? key : null);\n const contextControlledId = navContext.getControlledId(key != null ? key : null);\n\n // @ts-ignore\n props[dataAttr('event-key')] = key;\n props.id = contextControllerId || id;\n isActive = active == null && key != null ? navContext.activeKey === key : active;\n\n /**\n * Simplified scenario for `mountOnEnter`.\n *\n * While it would make sense to keep 'aria-controls' for tabs that have been mounted at least\n * once, it would also complicate the code quite a bit, for very little gain.\n * The following implementation is probably good enough.\n *\n * @see https://github.com/react-restart/ui/pull/40#issuecomment-1009971561\n */\n if (isActive || !(tabContext != null && tabContext.unmountOnExit) && !(tabContext != null && tabContext.mountOnEnter)) props['aria-controls'] = contextControlledId;\n }\n if (props.role === 'tab') {\n props['aria-selected'] = isActive;\n if (!isActive) {\n props.tabIndex = -1;\n }\n if (disabled) {\n props.tabIndex = -1;\n props['aria-disabled'] = true;\n }\n }\n props.onClick = useEventCallback(e => {\n if (disabled) return;\n onClick == null ? void 0 : onClick(e);\n if (key == null) {\n return;\n }\n if (parentOnSelect && !e.isPropagationStopped()) {\n parentOnSelect(key, e);\n }\n });\n return [props, {\n isActive\n }];\n}\nconst NavItem = /*#__PURE__*/React.forwardRef((_ref, ref) => {\n let {\n as: Component = Button,\n active,\n eventKey\n } = _ref,\n options = _objectWithoutPropertiesLoose(_ref, _excluded);\n const [props, meta] = useNavItem(Object.assign({\n key: makeEventKey(eventKey, options.href),\n active\n }, options));\n\n // @ts-ignore\n props[dataAttr('active')] = meta.isActive;\n return /*#__PURE__*/_jsx(Component, Object.assign({}, options, props, {\n ref: ref\n }));\n});\nNavItem.displayName = 'NavItem';\nexport default NavItem;","const _excluded = [\"as\", \"onSelect\", \"activeKey\", \"role\", \"onKeyDown\"];\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport qsa from 'dom-helpers/querySelectorAll';\nimport * as React from 'react';\nimport { useContext, useEffect, useRef } from 'react';\nimport useForceUpdate from '@restart/hooks/useForceUpdate';\nimport useMergedRefs from '@restart/hooks/useMergedRefs';\nimport NavContext from './NavContext';\nimport SelectableContext, { makeEventKey } from './SelectableContext';\nimport TabContext from './TabContext';\nimport { dataAttr, dataProp } from './DataKey';\nimport NavItem from './NavItem';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst noop = () => {};\nconst EVENT_KEY_ATTR = dataAttr('event-key');\nconst Nav = /*#__PURE__*/React.forwardRef((_ref, ref) => {\n let {\n // Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\n as: Component = 'div',\n onSelect,\n activeKey,\n role,\n onKeyDown\n } = _ref,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n // A ref and forceUpdate for refocus, b/c we only want to trigger when needed\n // and don't want to reset the set in the effect\n const forceUpdate = useForceUpdate();\n const needsRefocusRef = useRef(false);\n const parentOnSelect = useContext(SelectableContext);\n const tabContext = useContext(TabContext);\n let getControlledId, getControllerId;\n if (tabContext) {\n role = role || 'tablist';\n activeKey = tabContext.activeKey;\n // TODO: do we need to duplicate these?\n getControlledId = tabContext.getControlledId;\n getControllerId = tabContext.getControllerId;\n }\n const listNode = useRef(null);\n const getNextActiveTab = offset => {\n const currentListNode = listNode.current;\n if (!currentListNode) return null;\n const items = qsa(currentListNode, `[${EVENT_KEY_ATTR}]:not([aria-disabled=true])`);\n const activeChild = currentListNode.querySelector('[aria-selected=true]');\n if (!activeChild || activeChild !== document.activeElement) return null;\n const index = items.indexOf(activeChild);\n if (index === -1) return null;\n let nextIndex = index + offset;\n if (nextIndex >= items.length) nextIndex = 0;\n if (nextIndex < 0) nextIndex = items.length - 1;\n return items[nextIndex];\n };\n const handleSelect = (key, event) => {\n if (key == null) return;\n onSelect == null ? void 0 : onSelect(key, event);\n parentOnSelect == null ? void 0 : parentOnSelect(key, event);\n };\n const handleKeyDown = event => {\n onKeyDown == null ? void 0 : onKeyDown(event);\n if (!tabContext) {\n return;\n }\n let nextActiveChild;\n switch (event.key) {\n case 'ArrowLeft':\n case 'ArrowUp':\n nextActiveChild = getNextActiveTab(-1);\n break;\n case 'ArrowRight':\n case 'ArrowDown':\n nextActiveChild = getNextActiveTab(1);\n break;\n default:\n return;\n }\n if (!nextActiveChild) return;\n event.preventDefault();\n handleSelect(nextActiveChild.dataset[dataProp('EventKey')] || null, event);\n needsRefocusRef.current = true;\n forceUpdate();\n };\n useEffect(() => {\n if (listNode.current && needsRefocusRef.current) {\n const activeChild = listNode.current.querySelector(`[${EVENT_KEY_ATTR}][aria-selected=true]`);\n activeChild == null ? void 0 : activeChild.focus();\n }\n needsRefocusRef.current = false;\n });\n const mergedRef = useMergedRefs(ref, listNode);\n return /*#__PURE__*/_jsx(SelectableContext.Provider, {\n value: handleSelect,\n children: /*#__PURE__*/_jsx(NavContext.Provider, {\n value: {\n role,\n // used by NavLink to determine it's role\n activeKey: makeEventKey(activeKey),\n getControlledId: getControlledId || noop,\n getControllerId: getControllerId || noop\n },\n children: /*#__PURE__*/_jsx(Component, Object.assign({}, props, {\n onKeyDown: handleKeyDown,\n ref: mergedRef,\n role: role\n }))\n })\n });\n});\nNav.displayName = 'Nav';\nexport default Object.assign(Nav, {\n Item: NavItem\n});","import ownerDocument from 'dom-helpers/ownerDocument';\nimport canUseDOM from 'dom-helpers/canUseDOM';\nimport { useState, useEffect } from 'react';\nimport useWindow from './useWindow';\nexport const resolveContainerRef = (ref, document) => {\n if (!canUseDOM) return null;\n if (ref == null) return (document || ownerDocument()).body;\n if (typeof ref === 'function') ref = ref();\n if (ref && 'current' in ref) ref = ref.current;\n if (ref && ('nodeType' in ref || ref.getBoundingClientRect)) return ref;\n return null;\n};\nexport default function useWaitForDOMRef(ref, onResolved) {\n const window = useWindow();\n const [resolvedRef, setRef] = useState(() => resolveContainerRef(ref, window == null ? void 0 : window.document));\n if (!resolvedRef) {\n const earlyRef = resolveContainerRef(ref);\n if (earlyRef) setRef(earlyRef);\n }\n useEffect(() => {\n if (onResolved && resolvedRef) {\n onResolved(resolvedRef);\n }\n }, [onResolved, resolvedRef]);\n useEffect(() => {\n const nextRef = resolveContainerRef(ref);\n if (nextRef !== resolvedRef) {\n setRef(nextRef);\n }\n }, [ref, resolvedRef]);\n return resolvedRef;\n}","import useEventCallback from '@restart/hooks/useEventCallback';\nimport useMergedRefs from '@restart/hooks/useMergedRefs';\nimport { cloneElement, useEffect, useRef } from 'react';\nfunction NoopTransition({\n children,\n in: inProp,\n onExited,\n mountOnEnter,\n unmountOnExit\n}) {\n const ref = useRef(null);\n const hasEnteredRef = useRef(inProp);\n const handleExited = useEventCallback(onExited);\n useEffect(() => {\n if (inProp) hasEnteredRef.current = true;else {\n handleExited(ref.current);\n }\n }, [inProp, handleExited]);\n const combinedRef = useMergedRefs(ref, children.ref);\n const child = /*#__PURE__*/cloneElement(children, {\n ref: combinedRef\n });\n if (inProp) return child;\n if (unmountOnExit) {\n return null;\n }\n if (!hasEnteredRef.current && mountOnEnter) {\n return null;\n }\n return child;\n}\nexport default NoopTransition;","import useMergedRefs from '@restart/hooks/useMergedRefs';\nimport useEventCallback from '@restart/hooks/useEventCallback';\nimport useIsomorphicEffect from '@restart/hooks/useIsomorphicEffect';\nimport React, { useRef, cloneElement, useState } from 'react';\nimport NoopTransition from './NoopTransition';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function useTransition({\n in: inProp,\n onTransition\n}) {\n const ref = useRef(null);\n const isInitialRef = useRef(true);\n const handleTransition = useEventCallback(onTransition);\n useIsomorphicEffect(() => {\n if (!ref.current) {\n return undefined;\n }\n let stale = false;\n handleTransition({\n in: inProp,\n element: ref.current,\n initial: isInitialRef.current,\n isStale: () => stale\n });\n return () => {\n stale = true;\n };\n }, [inProp, handleTransition]);\n useIsomorphicEffect(() => {\n isInitialRef.current = false;\n // this is for strict mode\n return () => {\n isInitialRef.current = true;\n };\n }, []);\n return ref;\n}\n/**\n * Adapts an imperative transition function to a subset of the RTG `` component API.\n *\n * ImperativeTransition does not support mounting options or `appear` at the moment, meaning\n * that it always acts like: `mountOnEnter={true} unmountOnExit={true} appear={true}`\n */\nexport default function ImperativeTransition({\n children,\n in: inProp,\n onExited,\n onEntered,\n transition\n}) {\n const [exited, setExited] = useState(!inProp);\n\n // TODO: I think this needs to be in an effect\n if (inProp && exited) {\n setExited(false);\n }\n const ref = useTransition({\n in: !!inProp,\n onTransition: options => {\n const onFinish = () => {\n if (options.isStale()) return;\n if (options.in) {\n onEntered == null ? void 0 : onEntered(options.element, options.initial);\n } else {\n setExited(true);\n onExited == null ? void 0 : onExited(options.element);\n }\n };\n Promise.resolve(transition(options)).then(onFinish, error => {\n if (!options.in) setExited(true);\n throw error;\n });\n }\n });\n const combinedRef = useMergedRefs(ref, children.ref);\n return exited && !inProp ? null : /*#__PURE__*/cloneElement(children, {\n ref: combinedRef\n });\n}\nexport function renderTransition(Component, runTransition, props) {\n if (Component) {\n return /*#__PURE__*/_jsx(Component, Object.assign({}, props));\n }\n if (runTransition) {\n return /*#__PURE__*/_jsx(ImperativeTransition, Object.assign({}, props, {\n transition: runTransition\n }));\n }\n return /*#__PURE__*/_jsx(NoopTransition, Object.assign({}, props));\n}","/* eslint-disable import/prefer-default-export */\nexport function isEscKey(e) {\n return e.code === 'Escape' || e.keyCode === 27;\n}","/**\n * Checks if a given element has a CSS class.\n * \n * @param element the element\n * @param className the CSS class name\n */\nexport default function hasClass(element, className) {\n if (element.classList) return !!className && element.classList.contains(className);\n return (\" \" + (element.className.baseVal || element.className) + \" \").indexOf(\" \" + className + \" \") !== -1;\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createChainableTypeChecker;\n/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n// Mostly taken from ReactPropTypes.\n\nfunction createChainableTypeChecker(validate) {\n function checkType(isRequired, props, propName, componentName, location, propFullName) {\n var componentNameSafe = componentName || '<>';\n var propFullNameSafe = propFullName || propName;\n\n if (props[propName] == null) {\n if (isRequired) {\n return new Error('Required ' + location + ' `' + propFullNameSafe + '` was not specified ' + ('in `' + componentNameSafe + '`.'));\n }\n\n return null;\n }\n\n for (var _len = arguments.length, args = Array(_len > 6 ? _len - 6 : 0), _key = 6; _key < _len; _key++) {\n args[_key - 6] = arguments[_key];\n }\n\n return validate.apply(undefined, [props, propName, componentNameSafe, location, propFullNameSafe].concat(args));\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n}\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = all;\n\nvar _createChainableTypeChecker = require('./utils/createChainableTypeChecker');\n\nvar _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction all() {\n for (var _len = arguments.length, validators = Array(_len), _key = 0; _key < _len; _key++) {\n validators[_key] = arguments[_key];\n }\n\n function allPropTypes() {\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n var error = null;\n\n validators.forEach(function (validator) {\n if (error != null) {\n return;\n }\n\n var result = validator.apply(undefined, args);\n if (result != null) {\n error = result;\n }\n });\n\n return error;\n }\n\n return (0, _createChainableTypeChecker2.default)(allPropTypes);\n}\nmodule.exports = exports['default'];","\"use client\";\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst NavItem = /*#__PURE__*/React.forwardRef(({\n className,\n bsPrefix,\n as: Component = 'div',\n ...props\n}, ref) => {\n bsPrefix = useBootstrapPrefix(bsPrefix, 'nav-item');\n return /*#__PURE__*/_jsx(Component, {\n ref: ref,\n className: classNames(className, bsPrefix),\n ...props\n });\n});\nNavItem.displayName = 'NavItem';\nexport default NavItem;","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport Anchor from '@restart/ui/Anchor';\nimport { useNavItem } from '@restart/ui/NavItem';\nimport { makeEventKey } from '@restart/ui/SelectableContext';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst NavLink = /*#__PURE__*/React.forwardRef(({\n bsPrefix,\n className,\n as: Component = Anchor,\n active,\n eventKey,\n disabled = false,\n ...props\n}, ref) => {\n bsPrefix = useBootstrapPrefix(bsPrefix, 'nav-link');\n const [navItemProps, meta] = useNavItem({\n key: makeEventKey(eventKey, props.href),\n active,\n disabled,\n ...props\n });\n return /*#__PURE__*/_jsx(Component, {\n ...props,\n ...navItemProps,\n ref: ref,\n disabled: disabled,\n className: classNames(className, bsPrefix, disabled && 'disabled', meta.isActive && 'active')\n });\n});\nNavLink.displayName = 'NavLink';\nexport default NavLink;","\"use client\";\n\nimport classNames from 'classnames';\nimport all from 'prop-types-extra/lib/all';\nimport * as React from 'react';\nimport { useContext } from 'react';\nimport { useUncontrolled } from 'uncontrollable';\nimport BaseNav from '@restart/ui/Nav';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport NavbarContext from './NavbarContext';\nimport CardHeaderContext from './CardHeaderContext';\nimport NavItem from './NavItem';\nimport NavLink from './NavLink';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst Nav = /*#__PURE__*/React.forwardRef((uncontrolledProps, ref) => {\n const {\n as = 'div',\n bsPrefix: initialBsPrefix,\n variant,\n fill = false,\n justify = false,\n navbar,\n navbarScroll,\n className,\n activeKey,\n ...props\n } = useUncontrolled(uncontrolledProps, {\n activeKey: 'onSelect'\n });\n const bsPrefix = useBootstrapPrefix(initialBsPrefix, 'nav');\n let navbarBsPrefix;\n let cardHeaderBsPrefix;\n let isNavbar = false;\n const navbarContext = useContext(NavbarContext);\n const cardHeaderContext = useContext(CardHeaderContext);\n if (navbarContext) {\n navbarBsPrefix = navbarContext.bsPrefix;\n isNavbar = navbar == null ? true : navbar;\n } else if (cardHeaderContext) {\n ({\n cardHeaderBsPrefix\n } = cardHeaderContext);\n }\n return /*#__PURE__*/_jsx(BaseNav, {\n as: as,\n ref: ref,\n activeKey: activeKey,\n className: classNames(className, {\n [bsPrefix]: !isNavbar,\n [`${navbarBsPrefix}-nav`]: isNavbar,\n [`${navbarBsPrefix}-nav-scroll`]: isNavbar && navbarScroll,\n [`${cardHeaderBsPrefix}-${variant}`]: !!cardHeaderBsPrefix,\n [`${bsPrefix}-${variant}`]: !!variant,\n [`${bsPrefix}-fill`]: fill,\n [`${bsPrefix}-justified`]: justify\n }),\n ...props\n });\n});\nNav.displayName = 'Nav';\nexport default Object.assign(Nav, {\n Item: NavItem,\n Link: NavLink\n});","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport Dropdown from './Dropdown';\nimport NavLink from './NavLink';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst NavDropdown = /*#__PURE__*/React.forwardRef(({\n id,\n title,\n children,\n bsPrefix,\n className,\n rootCloseEvent,\n menuRole,\n disabled,\n active,\n renderMenuOnMount,\n menuVariant,\n ...props\n}, ref) => {\n /* NavItem has no additional logic, it's purely presentational. Can set nav item class here to support \"as\" */\n const navItemPrefix = useBootstrapPrefix(undefined, 'nav-item');\n return /*#__PURE__*/_jsxs(Dropdown, {\n ref: ref,\n ...props,\n className: classNames(className, navItemPrefix),\n children: [/*#__PURE__*/_jsx(Dropdown.Toggle, {\n id: id,\n eventKey: null,\n active: active,\n disabled: disabled,\n childBsPrefix: bsPrefix,\n as: NavLink,\n children: title\n }), /*#__PURE__*/_jsx(Dropdown.Menu, {\n role: menuRole,\n renderOnMount: renderMenuOnMount,\n rootCloseEvent: rootCloseEvent,\n variant: menuVariant,\n children: children\n })]\n });\n});\nNavDropdown.displayName = 'NavDropdown';\nexport default Object.assign(NavDropdown, {\n Item: Dropdown.Item,\n ItemText: Dropdown.ItemText,\n Divider: Dropdown.Divider,\n Header: Dropdown.Header\n});","import listen from 'dom-helpers/listen';\nimport ownerDocument from 'dom-helpers/ownerDocument';\nimport { useEffect } from 'react';\nimport useEventCallback from '@restart/hooks/useEventCallback';\nimport useClickOutside, { getRefTarget } from './useClickOutside';\nimport { isEscKey } from './utils';\nconst noop = () => {};\n/**\n * The `useRootClose` hook registers your callback on the document\n * when rendered. Powers the `` component. This is used achieve modal\n * style behavior where your callback is triggered when the user tries to\n * interact with the rest of the document or hits the `esc` key.\n *\n * @param {Ref| HTMLElement} ref The element boundary\n * @param {function} onRootClose\n * @param {object=} options\n * @param {boolean=} options.disabled\n * @param {string=} options.clickTrigger The DOM event name (click, mousedown, etc) to attach listeners on\n */\nfunction useRootClose(ref, onRootClose, {\n disabled,\n clickTrigger\n} = {}) {\n const onClose = onRootClose || noop;\n useClickOutside(ref, onClose, {\n disabled,\n clickTrigger\n });\n const handleKeyUp = useEventCallback(e => {\n if (isEscKey(e)) {\n onClose(e);\n }\n });\n useEffect(() => {\n if (disabled || ref == null) return undefined;\n const doc = ownerDocument(getRefTarget(ref));\n\n // Store the current event to avoid triggering handlers immediately\n // https://github.com/facebook/react/issues/20074\n let currentEvent = (doc.defaultView || window).event;\n const removeKeyupListener = listen(doc, 'keyup', e => {\n // skip if this event is the same as the one running when we added the handlers\n if (e === currentEvent) {\n currentEvent = undefined;\n return;\n }\n handleKeyUp(e);\n });\n return () => {\n removeKeyupListener();\n };\n }, [ref, disabled, handleKeyUp]);\n}\nexport default useRootClose;","import * as React from 'react';\nimport ReactDOM from 'react-dom';\nimport useCallbackRef from '@restart/hooks/useCallbackRef';\nimport useMergedRefs from '@restart/hooks/useMergedRefs';\nimport { useState } from 'react';\nimport usePopper from './usePopper';\nimport useRootClose from './useRootClose';\nimport useWaitForDOMRef from './useWaitForDOMRef';\nimport mergeOptionsWithPopperConfig from './mergeOptionsWithPopperConfig';\nimport { renderTransition } from './ImperativeTransition';\n/**\n * Built on top of `Popper.js`, the overlay component is\n * great for custom tooltip overlays.\n */\nconst Overlay = /*#__PURE__*/React.forwardRef((props, outerRef) => {\n const {\n flip,\n offset,\n placement,\n containerPadding,\n popperConfig = {},\n transition: Transition,\n runTransition\n } = props;\n const [rootElement, attachRef] = useCallbackRef();\n const [arrowElement, attachArrowRef] = useCallbackRef();\n const mergedRef = useMergedRefs(attachRef, outerRef);\n const container = useWaitForDOMRef(props.container);\n const target = useWaitForDOMRef(props.target);\n const [exited, setExited] = useState(!props.show);\n const popper = usePopper(target, rootElement, mergeOptionsWithPopperConfig({\n placement,\n enableEvents: !!props.show,\n containerPadding: containerPadding || 5,\n flip,\n offset,\n arrowElement,\n popperConfig\n }));\n\n // TODO: I think this needs to be in an effect\n if (props.show && exited) {\n setExited(false);\n }\n const handleHidden = (...args) => {\n setExited(true);\n if (props.onExited) {\n props.onExited(...args);\n }\n };\n\n // Don't un-render the overlay while it's transitioning out.\n const mountOverlay = props.show || !exited;\n useRootClose(rootElement, props.onHide, {\n disabled: !props.rootClose || props.rootCloseDisabled,\n clickTrigger: props.rootCloseEvent\n });\n if (!mountOverlay) {\n // Don't bother showing anything if we don't have to.\n return null;\n }\n const {\n onExit,\n onExiting,\n onEnter,\n onEntering,\n onEntered\n } = props;\n let child = props.children(Object.assign({}, popper.attributes.popper, {\n style: popper.styles.popper,\n ref: mergedRef\n }), {\n popper,\n placement,\n show: !!props.show,\n arrowProps: Object.assign({}, popper.attributes.arrow, {\n style: popper.styles.arrow,\n ref: attachArrowRef\n })\n });\n child = renderTransition(Transition, runTransition, {\n in: !!props.show,\n appear: true,\n mountOnEnter: true,\n unmountOnExit: true,\n children: child,\n onExit,\n onExiting,\n onExited: handleHidden,\n onEnter,\n onEntering,\n onEntered\n });\n return container ? /*#__PURE__*/ReactDOM.createPortal(child, container) : null;\n});\nOverlay.displayName = 'Overlay';\nexport default Overlay;","\"use client\";\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst PopoverHeader = /*#__PURE__*/React.forwardRef(({\n className,\n bsPrefix,\n as: Component = 'div',\n ...props\n}, ref) => {\n bsPrefix = useBootstrapPrefix(bsPrefix, 'popover-header');\n return /*#__PURE__*/_jsx(Component, {\n ref: ref,\n className: classNames(className, bsPrefix),\n ...props\n });\n});\nPopoverHeader.displayName = 'PopoverHeader';\nexport default PopoverHeader;","\"use client\";\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst PopoverBody = /*#__PURE__*/React.forwardRef(({\n className,\n bsPrefix,\n as: Component = 'div',\n ...props\n}, ref) => {\n bsPrefix = useBootstrapPrefix(bsPrefix, 'popover-body');\n return /*#__PURE__*/_jsx(Component, {\n ref: ref,\n className: classNames(className, bsPrefix),\n ...props\n });\n});\nPopoverBody.displayName = 'PopoverBody';\nexport default PopoverBody;","import * as React from 'react';\nexport class BsPrefixComponent extends React.Component {}\n\n// Need to use this instead of typeof Component to get proper type checking.\n\nexport function getOverlayDirection(placement, isRTL) {\n let bsDirection = placement;\n if (placement === 'left') {\n bsDirection = isRTL ? 'end' : 'start';\n } else if (placement === 'right') {\n bsDirection = isRTL ? 'start' : 'end';\n }\n return bsDirection;\n}","export default function getInitialPopperStyles(position = 'absolute') {\n return {\n position,\n top: '0',\n left: '0',\n opacity: '0',\n pointerEvents: 'none'\n };\n}","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useBootstrapPrefix, useIsRTL } from './ThemeProvider';\nimport PopoverHeader from './PopoverHeader';\nimport PopoverBody from './PopoverBody';\nimport { getOverlayDirection } from './helpers';\nimport getInitialPopperStyles from './getInitialPopperStyles';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst Popover = /*#__PURE__*/React.forwardRef(({\n bsPrefix,\n placement = 'right',\n className,\n style,\n children,\n body,\n arrowProps,\n hasDoneInitialMeasure,\n popper,\n show,\n ...props\n}, ref) => {\n const decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'popover');\n const isRTL = useIsRTL();\n const [primaryPlacement] = (placement == null ? void 0 : placement.split('-')) || [];\n const bsDirection = getOverlayDirection(primaryPlacement, isRTL);\n let computedStyle = style;\n if (show && !hasDoneInitialMeasure) {\n computedStyle = {\n ...style,\n ...getInitialPopperStyles(popper == null ? void 0 : popper.strategy)\n };\n }\n return /*#__PURE__*/_jsxs(\"div\", {\n ref: ref,\n role: \"tooltip\",\n style: computedStyle,\n \"x-placement\": primaryPlacement,\n className: classNames(className, decoratedBsPrefix, primaryPlacement && `bs-popover-${bsDirection}`),\n ...props,\n children: [/*#__PURE__*/_jsx(\"div\", {\n className: \"popover-arrow\",\n ...arrowProps\n }), body ? /*#__PURE__*/_jsx(PopoverBody, {\n children: children\n }) : children]\n });\n});\nexport default Object.assign(Popover, {\n Header: PopoverHeader,\n Body: PopoverBody,\n // Default popover offset.\n // https://github.com/twbs/bootstrap/blob/5c32767e0e0dbac2d934bcdee03719a65d3f1187/js/src/popover.js#L28\n POPPER_OFFSET: [0, 8]\n});","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useBootstrapPrefix, useIsRTL } from './ThemeProvider';\nimport { getOverlayDirection } from './helpers';\nimport getInitialPopperStyles from './getInitialPopperStyles';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst Tooltip = /*#__PURE__*/React.forwardRef(({\n bsPrefix,\n placement = 'right',\n className,\n style,\n children,\n arrowProps,\n hasDoneInitialMeasure,\n popper,\n show,\n ...props\n}, ref) => {\n bsPrefix = useBootstrapPrefix(bsPrefix, 'tooltip');\n const isRTL = useIsRTL();\n const [primaryPlacement] = (placement == null ? void 0 : placement.split('-')) || [];\n const bsDirection = getOverlayDirection(primaryPlacement, isRTL);\n let computedStyle = style;\n if (show && !hasDoneInitialMeasure) {\n computedStyle = {\n ...style,\n ...getInitialPopperStyles(popper == null ? void 0 : popper.strategy)\n };\n }\n return /*#__PURE__*/_jsxs(\"div\", {\n ref: ref,\n style: computedStyle,\n role: \"tooltip\",\n \"x-placement\": primaryPlacement,\n className: classNames(className, bsPrefix, `bs-tooltip-${bsDirection}`),\n ...props,\n children: [/*#__PURE__*/_jsx(\"div\", {\n className: \"tooltip-arrow\",\n ...arrowProps\n }), /*#__PURE__*/_jsx(\"div\", {\n className: `${bsPrefix}-inner`,\n children: children\n })]\n });\n});\nTooltip.displayName = 'Tooltip';\nexport default Object.assign(Tooltip, {\n // Default tooltip offset.\n // https://github.com/twbs/bootstrap/blob/beca2a6c7f6bc88b6449339fc76edcda832c59e5/js/src/tooltip.js#L65\n TOOLTIP_OFFSET: [0, 6]\n});","\"use client\";\n\nimport { useMemo, useRef } from 'react';\nimport hasClass from 'dom-helpers/hasClass';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport Popover from './Popover';\nimport Tooltip from './Tooltip';\n\n// This is meant for internal use.\n// This applies a custom offset to the overlay if it's a popover or tooltip.\nexport default function useOverlayOffset(customOffset) {\n const overlayRef = useRef(null);\n const popoverClass = useBootstrapPrefix(undefined, 'popover');\n const tooltipClass = useBootstrapPrefix(undefined, 'tooltip');\n const offset = useMemo(() => ({\n name: 'offset',\n options: {\n offset: () => {\n if (customOffset) {\n return customOffset;\n }\n if (overlayRef.current) {\n if (hasClass(overlayRef.current, popoverClass)) {\n return Popover.POPPER_OFFSET;\n }\n if (hasClass(overlayRef.current, tooltipClass)) {\n return Tooltip.TOOLTIP_OFFSET;\n }\n }\n return [0, 0];\n }\n }\n }), [customOffset, popoverClass, tooltipClass]);\n return [overlayRef, [offset]];\n}","\"use client\";\n\nimport * as React from 'react';\nimport { useEffect, useRef, useState } from 'react';\nimport classNames from 'classnames';\nimport BaseOverlay from '@restart/ui/Overlay';\nimport useEventCallback from '@restart/hooks/useEventCallback';\nimport useIsomorphicEffect from '@restart/hooks/useIsomorphicEffect';\nimport useMergedRefs from '@restart/hooks/useMergedRefs';\nimport useOverlayOffset from './useOverlayOffset';\nimport Fade from './Fade';\nimport safeFindDOMNode from './safeFindDOMNode';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction wrapRefs(props, arrowProps) {\n const {\n ref\n } = props;\n const {\n ref: aRef\n } = arrowProps;\n props.ref = ref.__wrapped || (ref.__wrapped = r => ref(safeFindDOMNode(r)));\n arrowProps.ref = aRef.__wrapped || (aRef.__wrapped = r => aRef(safeFindDOMNode(r)));\n}\nconst Overlay = /*#__PURE__*/React.forwardRef(({\n children: overlay,\n transition = Fade,\n popperConfig = {},\n rootClose = false,\n placement = 'top',\n show: outerShow = false,\n ...outerProps\n}, outerRef) => {\n const popperRef = useRef({});\n const [firstRenderedState, setFirstRenderedState] = useState(null);\n const [ref, modifiers] = useOverlayOffset(outerProps.offset);\n const mergedRef = useMergedRefs(outerRef, ref);\n const actualTransition = transition === true ? Fade : transition || undefined;\n const handleFirstUpdate = useEventCallback(state => {\n setFirstRenderedState(state);\n popperConfig == null ? void 0 : popperConfig.onFirstUpdate == null ? void 0 : popperConfig.onFirstUpdate(state);\n });\n useIsomorphicEffect(() => {\n if (firstRenderedState && outerProps.target) {\n // Must wait for target element to resolve before updating popper.\n popperRef.current.scheduleUpdate == null ? void 0 : popperRef.current.scheduleUpdate();\n }\n }, [firstRenderedState, outerProps.target]);\n useEffect(() => {\n if (!outerShow) {\n setFirstRenderedState(null);\n }\n }, [outerShow]);\n return /*#__PURE__*/_jsx(BaseOverlay, {\n ...outerProps,\n ref: mergedRef,\n popperConfig: {\n ...popperConfig,\n modifiers: modifiers.concat(popperConfig.modifiers || []),\n onFirstUpdate: handleFirstUpdate\n },\n transition: actualTransition,\n rootClose: rootClose,\n placement: placement,\n show: outerShow,\n children: (overlayProps, {\n arrowProps,\n popper: popperObj,\n show\n }) => {\n var _popperObj$state, _popperObj$state$modi;\n wrapRefs(overlayProps, arrowProps);\n // Need to get placement from popper object, handling case when overlay is flipped using 'flip' prop\n const updatedPlacement = popperObj == null ? void 0 : popperObj.placement;\n const popper = Object.assign(popperRef.current, {\n state: popperObj == null ? void 0 : popperObj.state,\n scheduleUpdate: popperObj == null ? void 0 : popperObj.update,\n placement: updatedPlacement,\n outOfBoundaries: (popperObj == null ? void 0 : (_popperObj$state = popperObj.state) == null ? void 0 : (_popperObj$state$modi = _popperObj$state.modifiersData.hide) == null ? void 0 : _popperObj$state$modi.isReferenceHidden) || false,\n strategy: popperConfig.strategy\n });\n const hasDoneInitialMeasure = !!firstRenderedState;\n if (typeof overlay === 'function') return overlay({\n ...overlayProps,\n placement: updatedPlacement,\n show,\n ...(!transition && show && {\n className: 'show'\n }),\n popper,\n arrowProps,\n hasDoneInitialMeasure\n });\n return /*#__PURE__*/React.cloneElement(overlay, {\n ...overlayProps,\n placement: updatedPlacement,\n arrowProps,\n popper,\n hasDoneInitialMeasure,\n className: classNames(overlay.props.className, !transition && show && 'show'),\n style: {\n ...overlay.props.style,\n ...overlayProps.style\n }\n });\n }\n });\n});\nOverlay.displayName = 'Overlay';\nexport default Overlay;","/* eslint-disable no-bitwise, no-cond-assign */\n\n/**\n * Checks if an element contains another given element.\n * \n * @param context the context element\n * @param node the element to check\n */\nexport default function contains(context, node) {\n // HTML DOM and SVG DOM may have different support levels,\n // so we need to check on context instead of a document root element.\n if (context.contains) return context.contains(node);\n if (context.compareDocumentPosition) return context === node || !!(context.compareDocumentPosition(node) & 16);\n}","\"use client\";\n\nimport contains from 'dom-helpers/contains';\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\nimport { cloneElement, useCallback, useRef } from 'react';\nimport useTimeout from '@restart/hooks/useTimeout';\nimport warning from 'warning';\nimport { useUncontrolledProp } from 'uncontrollable';\nimport useMergedRefs from '@restart/hooks/useMergedRefs';\nimport Overlay from './Overlay';\nimport safeFindDOMNode from './safeFindDOMNode';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction normalizeDelay(delay) {\n return delay && typeof delay === 'object' ? delay : {\n show: delay,\n hide: delay\n };\n}\n\n// Simple implementation of mouseEnter and mouseLeave.\n// React's built version is broken: https://github.com/facebook/react/issues/4251\n// for cases when the trigger is disabled and mouseOut/Over can cause flicker\n// moving from one child element to another.\nfunction handleMouseOverOut(\n// eslint-disable-next-line @typescript-eslint/no-shadow\nhandler, args, relatedNative) {\n const [e] = args;\n const target = e.currentTarget;\n const related = e.relatedTarget || e.nativeEvent[relatedNative];\n if ((!related || related !== target) && !contains(target, related)) {\n handler(...args);\n }\n}\nconst triggerType = PropTypes.oneOf(['click', 'hover', 'focus']);\nconst OverlayTrigger = ({\n trigger = ['hover', 'focus'],\n overlay,\n children,\n popperConfig = {},\n show: propsShow,\n defaultShow = false,\n onToggle,\n delay: propsDelay,\n placement,\n flip = placement && placement.indexOf('auto') !== -1,\n ...props\n}) => {\n const triggerNodeRef = useRef(null);\n const mergedRef = useMergedRefs(triggerNodeRef, children.ref);\n const timeout = useTimeout();\n const hoverStateRef = useRef('');\n const [show, setShow] = useUncontrolledProp(propsShow, defaultShow, onToggle);\n const delay = normalizeDelay(propsDelay);\n const {\n onFocus,\n onBlur,\n onClick\n } = typeof children !== 'function' ? React.Children.only(children).props : {};\n const attachRef = r => {\n mergedRef(safeFindDOMNode(r));\n };\n const handleShow = useCallback(() => {\n timeout.clear();\n hoverStateRef.current = 'show';\n if (!delay.show) {\n setShow(true);\n return;\n }\n timeout.set(() => {\n if (hoverStateRef.current === 'show') setShow(true);\n }, delay.show);\n }, [delay.show, setShow, timeout]);\n const handleHide = useCallback(() => {\n timeout.clear();\n hoverStateRef.current = 'hide';\n if (!delay.hide) {\n setShow(false);\n return;\n }\n timeout.set(() => {\n if (hoverStateRef.current === 'hide') setShow(false);\n }, delay.hide);\n }, [delay.hide, setShow, timeout]);\n const handleFocus = useCallback((...args) => {\n handleShow();\n onFocus == null ? void 0 : onFocus(...args);\n }, [handleShow, onFocus]);\n const handleBlur = useCallback((...args) => {\n handleHide();\n onBlur == null ? void 0 : onBlur(...args);\n }, [handleHide, onBlur]);\n const handleClick = useCallback((...args) => {\n setShow(!show);\n onClick == null ? void 0 : onClick(...args);\n }, [onClick, setShow, show]);\n const handleMouseOver = useCallback((...args) => {\n handleMouseOverOut(handleShow, args, 'fromElement');\n }, [handleShow]);\n const handleMouseOut = useCallback((...args) => {\n handleMouseOverOut(handleHide, args, 'toElement');\n }, [handleHide]);\n const triggers = trigger == null ? [] : [].concat(trigger);\n const triggerProps = {\n ref: attachRef\n };\n if (triggers.indexOf('click') !== -1) {\n triggerProps.onClick = handleClick;\n }\n if (triggers.indexOf('focus') !== -1) {\n triggerProps.onFocus = handleFocus;\n triggerProps.onBlur = handleBlur;\n }\n if (triggers.indexOf('hover') !== -1) {\n process.env.NODE_ENV !== \"production\" ? warning(triggers.length > 1, '[react-bootstrap] Specifying only the `\"hover\"` trigger limits the visibility of the overlay to just mouse users. Consider also including the `\"focus\"` trigger so that touch and keyboard only users can see the overlay as well.') : void 0;\n triggerProps.onMouseOver = handleMouseOver;\n triggerProps.onMouseOut = handleMouseOut;\n }\n return /*#__PURE__*/_jsxs(_Fragment, {\n children: [typeof children === 'function' ? children(triggerProps) : /*#__PURE__*/cloneElement(children, triggerProps), /*#__PURE__*/_jsx(Overlay, {\n ...props,\n show: show,\n onHide: handleHide,\n flip: flip,\n placement: placement,\n popperConfig: popperConfig,\n target: triggerNodeRef.current,\n children: overlay\n })]\n });\n};\nexport default OverlayTrigger;","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useBootstrapPrefix, useBootstrapBreakpoints, useBootstrapMinBreakpoint } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst Row = /*#__PURE__*/React.forwardRef(({\n bsPrefix,\n className,\n // Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\n as: Component = 'div',\n ...props\n}, ref) => {\n const decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'row');\n const breakpoints = useBootstrapBreakpoints();\n const minBreakpoint = useBootstrapMinBreakpoint();\n const sizePrefix = `${decoratedBsPrefix}-cols`;\n const classes = [];\n breakpoints.forEach(brkPoint => {\n const propValue = props[brkPoint];\n delete props[brkPoint];\n let cols;\n if (propValue != null && typeof propValue === 'object') {\n ({\n cols\n } = propValue);\n } else {\n cols = propValue;\n }\n const infix = brkPoint !== minBreakpoint ? `-${brkPoint}` : '';\n if (cols != null) classes.push(`${sizePrefix}${infix}-${cols}`);\n });\n return /*#__PURE__*/_jsx(Component, {\n ref: ref,\n ...props,\n className: classNames(className, decoratedBsPrefix, ...classes)\n });\n});\nRow.displayName = 'Row';\nexport default Row;","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst Spinner = /*#__PURE__*/React.forwardRef(({\n bsPrefix,\n variant,\n animation = 'border',\n size,\n // Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\n as: Component = 'div',\n className,\n ...props\n}, ref) => {\n bsPrefix = useBootstrapPrefix(bsPrefix, 'spinner');\n const bsSpinnerPrefix = `${bsPrefix}-${animation}`;\n return /*#__PURE__*/_jsx(Component, {\n ref: ref,\n ...props,\n className: classNames(className, bsSpinnerPrefix, size && `${bsSpinnerPrefix}-${size}`, variant && `text-${variant}`)\n });\n});\nSpinner.displayName = 'Spinner';\nexport default Spinner;","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport Button from './Button';\nimport ButtonGroup from './ButtonGroup';\nimport Dropdown from './Dropdown';\nimport { alignPropType } from './types';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst propTypes = {\n /**\n * An html id attribute for the Toggle button, necessary for assistive technologies, such as screen readers.\n * @type {string}\n * @required\n */\n id: PropTypes.string,\n /**\n * Accessible label for the toggle; the value of `title` if not specified.\n */\n toggleLabel: PropTypes.string,\n /** An `href` passed to the non-toggle Button */\n href: PropTypes.string,\n /** An anchor `target` passed to the non-toggle Button */\n target: PropTypes.string,\n /** An `onClick` handler passed to the non-toggle Button */\n onClick: PropTypes.func,\n /** The content of the non-toggle Button. */\n title: PropTypes.node.isRequired,\n /** A `type` passed to the non-toggle Button */\n type: PropTypes.string,\n /** Disables both Buttons */\n disabled: PropTypes.bool,\n /**\n * Aligns the dropdown menu.\n *\n * _see [DropdownMenu](#dropdown-menu-props) for more details_\n *\n * @type {\"start\"|\"end\"|{ sm: \"start\"|\"end\" }|{ md: \"start\"|\"end\" }|{ lg: \"start\"|\"end\" }|{ xl: \"start\"|\"end\"}|{ xxl: \"start\"|\"end\"} }\n */\n align: alignPropType,\n /** An ARIA accessible role applied to the Menu component. When set to 'menu', The dropdown */\n menuRole: PropTypes.string,\n /** Whether to render the dropdown menu in the DOM before the first time it is shown */\n renderMenuOnMount: PropTypes.bool,\n /**\n * Which event when fired outside the component will cause it to be closed.\n *\n * _see [DropdownMenu](#dropdown-menu-props) for more details_\n */\n rootCloseEvent: PropTypes.string,\n /**\n * Allow Dropdown to flip in case of an overlapping on the reference element. For more information refer to\n * Popper.js's flip [docs](https://popper.js.org/docs/v2/modifiers/flip/).\n *\n */\n flip: PropTypes.bool,\n /** @ignore */\n bsPrefix: PropTypes.string,\n /** @ignore */\n variant: PropTypes.string,\n /** @ignore */\n size: PropTypes.string\n};\n\n/**\n * A convenience component for simple or general use split button dropdowns. Renders a\n * `ButtonGroup` containing a `Button` and a `Button` toggle for the `Dropdown`. All `children`\n * are passed directly to the default `Dropdown.Menu`. This component accepts all of [`Dropdown`'s\n * props](#dropdown-props).\n *\n * _All unknown props are passed through to the `Dropdown` component._\n * The Button `variant`, `size` and `bsPrefix` props are passed to the button and toggle,\n * and menu-related props are passed to the `Dropdown.Menu`\n */\nconst SplitButton = /*#__PURE__*/React.forwardRef(({\n id,\n bsPrefix,\n size,\n variant,\n title,\n type = 'button',\n toggleLabel = 'Toggle dropdown',\n children,\n onClick,\n href,\n target,\n menuRole,\n renderMenuOnMount,\n rootCloseEvent,\n flip,\n ...props\n}, ref) => /*#__PURE__*/_jsxs(Dropdown, {\n ref: ref,\n ...props,\n as: ButtonGroup,\n children: [/*#__PURE__*/_jsx(Button, {\n size: size,\n variant: variant,\n disabled: props.disabled,\n bsPrefix: bsPrefix,\n href: href,\n target: target,\n onClick: onClick,\n type: type,\n children: title\n }), /*#__PURE__*/_jsx(Dropdown.Toggle, {\n split: true,\n id: id,\n size: size,\n variant: variant,\n disabled: props.disabled,\n childBsPrefix: bsPrefix,\n children: /*#__PURE__*/_jsx(\"span\", {\n className: \"visually-hidden\",\n children: toggleLabel\n })\n }), /*#__PURE__*/_jsx(Dropdown.Menu, {\n role: menuRole,\n renderOnMount: renderMenuOnMount,\n rootCloseEvent: rootCloseEvent,\n flip: flip,\n children: children\n })]\n}));\nSplitButton.propTypes = propTypes;\nSplitButton.displayName = 'SplitButton';\nexport default SplitButton;","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst Table = /*#__PURE__*/React.forwardRef(({\n bsPrefix,\n className,\n striped,\n bordered,\n borderless,\n hover,\n size,\n variant,\n responsive,\n ...props\n}, ref) => {\n const decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'table');\n const classes = classNames(className, decoratedBsPrefix, variant && `${decoratedBsPrefix}-${variant}`, size && `${decoratedBsPrefix}-${size}`, striped && `${decoratedBsPrefix}-${typeof striped === 'string' ? `striped-${striped}` : 'striped'}`, bordered && `${decoratedBsPrefix}-bordered`, borderless && `${decoratedBsPrefix}-borderless`, hover && `${decoratedBsPrefix}-hover`);\n const table = /*#__PURE__*/_jsx(\"table\", {\n ...props,\n className: classes,\n ref: ref\n });\n if (responsive) {\n let responsiveClass = `${decoratedBsPrefix}-responsive`;\n if (typeof responsive === 'string') {\n responsiveClass = `${responsiveClass}-${responsive}`;\n }\n return /*#__PURE__*/_jsx(\"div\", {\n className: responsiveClass,\n children: table\n });\n }\n return table;\n});\nexport default Table;","import { colourStyles } from \"./BaseTableStyles\";\nimport { Column, Table as ReactTable, Row } from \"@tanstack/react-table\";\nimport { Form, OverlayTrigger, Popover } from \"react-bootstrap\";\nimport Select from \"react-select\";\n\nconst isHTML = RegExp.prototype.test.bind(/(<([^>]+)>)/i);\n\nexport const NameObjectArrayFilterFn = (row: Row, columnId: string, filterValue: any) => {\n const data: any = row.getValue(columnId);\n const _svrs = data.reduce((o: string, r: any) => (o += `|${r.name}`), \"\");\n return _svrs.toLowerCase().includes(filterValue.toLowerCase());\n};\n\nexport const NumberFilter = ({ column }: { column: Column }) => {\n const columnFilterValue = column.getFilterValue();\n const fromToNumber = columnFilterValue as [string, string];\n\n const popoverNumber = (\n \n \n column.setFilterValue((old: [number, number]) => [e.target.value, old?.[1]])\n }\n placeholder={`Min`}\n className=\"form-control\"\n />\n

to

\n \n column.setFilterValue((old: [number, number]) => [old?.[0], e.target.value])\n }\n placeholder={`Max`}\n className=\"form-control\"\n />\n
\n );\n\n return (\n \n \n \n );\n};\n\nexport const BoolFilter = ({ column }: { column: Column }) => {\n const options = [\n { value: true, label: \"Pass\" },\n { value: false, label: \"Fail\" },\n ];\n\n return (\n {\n column.setFilterValue(newValue ? newValue.value : \"\");\n }}\n onInputChange={(value, action) => {\n if (action.action === \"input-change\") {\n column.setFilterValue(value);\n }\n }}\n placeholder={`Search...`}\n className=\"\"\n options={options}\n />\n );\n};\n\nexport const TextFilter = ({ column }: { column: Column }) => {\n return (\n {\n column.setFilterValue(event.target.value ? event.target.value : \"\");\n }}\n />\n );\n};\n\nexport const SelectFilter = ({ column }: { column: Column }) => {\n const sortedUniqueValues = Array.from(column.getFacetedUniqueValues().keys()).sort();\n const selectOptions = sortedUniqueValues\n .slice(0, 50)\n .reduce((previousValue: Array, currentValue: any) => {\n previousValue.push({ value: currentValue, label: currentValue });\n return previousValue;\n }, []);\n\n const isObjectorHTML =\n isHTML(sortedUniqueValues?.[0]) || typeof sortedUniqueValues?.[0] === \"object\";\n return (\n {\n column.setFilterValue(newValue ? newValue.value : \"\");\n }}\n onInputChange={(value, action) => {\n if (action.action === \"input-change\") {\n column.setFilterValue(value);\n }\n }}\n placeholder={`Search...`}\n className=\"\"\n options={selectOptions}\n components={isObjectorHTML ? { Menu: () => <>, IndicatorsContainer: () => <> } : {}}\n />\n );\n};\nexport const Filter = ({ column, table }: { column: Column; table: ReactTable }) => {\n const firstValue: any = table.getPreFilteredRowModel().flatRows[0]?.getValue(column.id);\n\n if (typeof firstValue === \"number\") {\n return ;\n } else if (typeof firstValue === \"boolean\") {\n return ;\n } else if (typeof firstValue === \"object\") {\n return ;\n } else {\n return ;\n }\n};\n\nexport default Filter;\n","/**\n * table-core\n *\n * Copyright (c) TanStack\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\n// Is this type a tuple?\n\n// If this type is a tuple, what indices are allowed?\n\n///\n\nfunction functionalUpdate(updater, input) {\n return typeof updater === 'function' ? updater(input) : updater;\n}\nfunction noop() {\n //\n}\nfunction makeStateUpdater(key, instance) {\n return updater => {\n instance.setState(old => {\n return {\n ...old,\n [key]: functionalUpdate(updater, old[key])\n };\n });\n };\n}\nfunction isFunction(d) {\n return d instanceof Function;\n}\nfunction isNumberArray(d) {\n return Array.isArray(d) && d.every(val => typeof val === 'number');\n}\nfunction flattenBy(arr, getChildren) {\n const flat = [];\n const recurse = subArr => {\n subArr.forEach(item => {\n flat.push(item);\n const children = getChildren(item);\n if (children != null && children.length) {\n recurse(children);\n }\n });\n };\n recurse(arr);\n return flat;\n}\nfunction memo(getDeps, fn, opts) {\n let deps = [];\n let result;\n return depArgs => {\n let depTime;\n if (opts.key && opts.debug) depTime = Date.now();\n const newDeps = getDeps(depArgs);\n const depsChanged = newDeps.length !== deps.length || newDeps.some((dep, index) => deps[index] !== dep);\n if (!depsChanged) {\n return result;\n }\n deps = newDeps;\n let resultTime;\n if (opts.key && opts.debug) resultTime = Date.now();\n result = fn(...newDeps);\n opts == null || opts.onChange == null || opts.onChange(result);\n if (opts.key && opts.debug) {\n if (opts != null && opts.debug()) {\n const depEndTime = Math.round((Date.now() - depTime) * 100) / 100;\n const resultEndTime = Math.round((Date.now() - resultTime) * 100) / 100;\n const resultFpsPercentage = resultEndTime / 16;\n const pad = (str, num) => {\n str = String(str);\n while (str.length < num) {\n str = ' ' + str;\n }\n return str;\n };\n console.info(`%c⏱ ${pad(resultEndTime, 5)} /${pad(depEndTime, 5)} ms`, `\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0, Math.min(120 - 120 * resultFpsPercentage, 120))}deg 100% 31%);`, opts == null ? void 0 : opts.key);\n }\n }\n return result;\n };\n}\nfunction getMemoOptions(tableOptions, debugLevel, key, onChange) {\n return {\n debug: () => {\n var _tableOptions$debugAl;\n return (_tableOptions$debugAl = tableOptions == null ? void 0 : tableOptions.debugAll) != null ? _tableOptions$debugAl : tableOptions[debugLevel];\n },\n key: process.env.NODE_ENV === 'development' && key,\n onChange\n };\n}\n\nfunction createColumn(table, columnDef, depth, parent) {\n var _ref, _resolvedColumnDef$id;\n const defaultColumn = table._getDefaultColumnDef();\n const resolvedColumnDef = {\n ...defaultColumn,\n ...columnDef\n };\n const accessorKey = resolvedColumnDef.accessorKey;\n let id = (_ref = (_resolvedColumnDef$id = resolvedColumnDef.id) != null ? _resolvedColumnDef$id : accessorKey ? accessorKey.replace('.', '_') : undefined) != null ? _ref : typeof resolvedColumnDef.header === 'string' ? resolvedColumnDef.header : undefined;\n let accessorFn;\n if (resolvedColumnDef.accessorFn) {\n accessorFn = resolvedColumnDef.accessorFn;\n } else if (accessorKey) {\n // Support deep accessor keys\n if (accessorKey.includes('.')) {\n accessorFn = originalRow => {\n let result = originalRow;\n for (const key of accessorKey.split('.')) {\n var _result;\n result = (_result = result) == null ? void 0 : _result[key];\n if (process.env.NODE_ENV !== 'production' && result === undefined) {\n console.warn(`\"${key}\" in deeply nested key \"${accessorKey}\" returned undefined.`);\n }\n }\n return result;\n };\n } else {\n accessorFn = originalRow => originalRow[resolvedColumnDef.accessorKey];\n }\n }\n if (!id) {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error(resolvedColumnDef.accessorFn ? `Columns require an id when using an accessorFn` : `Columns require an id when using a non-string header`);\n }\n throw new Error();\n }\n let column = {\n id: `${String(id)}`,\n accessorFn,\n parent: parent,\n depth,\n columnDef: resolvedColumnDef,\n columns: [],\n getFlatColumns: memo(() => [true], () => {\n var _column$columns;\n return [column, ...((_column$columns = column.columns) == null ? void 0 : _column$columns.flatMap(d => d.getFlatColumns()))];\n }, getMemoOptions(table.options, 'debugColumns', 'column.getFlatColumns')),\n getLeafColumns: memo(() => [table._getOrderColumnsFn()], orderColumns => {\n var _column$columns2;\n if ((_column$columns2 = column.columns) != null && _column$columns2.length) {\n let leafColumns = column.columns.flatMap(column => column.getLeafColumns());\n return orderColumns(leafColumns);\n }\n return [column];\n }, getMemoOptions(table.options, 'debugColumns', 'column.getLeafColumns'))\n };\n for (const feature of table._features) {\n feature.createColumn == null || feature.createColumn(column, table);\n }\n\n // Yes, we have to convert table to uknown, because we know more than the compiler here.\n return column;\n}\n\nconst debug = 'debugHeaders';\n//\n\nfunction createHeader(table, column, options) {\n var _options$id;\n const id = (_options$id = options.id) != null ? _options$id : column.id;\n let header = {\n id,\n column,\n index: options.index,\n isPlaceholder: !!options.isPlaceholder,\n placeholderId: options.placeholderId,\n depth: options.depth,\n subHeaders: [],\n colSpan: 0,\n rowSpan: 0,\n headerGroup: null,\n getLeafHeaders: () => {\n const leafHeaders = [];\n const recurseHeader = h => {\n if (h.subHeaders && h.subHeaders.length) {\n h.subHeaders.map(recurseHeader);\n }\n leafHeaders.push(h);\n };\n recurseHeader(header);\n return leafHeaders;\n },\n getContext: () => ({\n table,\n header: header,\n column\n })\n };\n table._features.forEach(feature => {\n feature.createHeader == null || feature.createHeader(header, table);\n });\n return header;\n}\nconst Headers = {\n createTable: table => {\n // Header Groups\n\n table.getHeaderGroups = memo(() => [table.getAllColumns(), table.getVisibleLeafColumns(), table.getState().columnPinning.left, table.getState().columnPinning.right], (allColumns, leafColumns, left, right) => {\n var _left$map$filter, _right$map$filter;\n const leftColumns = (_left$map$filter = left == null ? void 0 : left.map(columnId => leafColumns.find(d => d.id === columnId)).filter(Boolean)) != null ? _left$map$filter : [];\n const rightColumns = (_right$map$filter = right == null ? void 0 : right.map(columnId => leafColumns.find(d => d.id === columnId)).filter(Boolean)) != null ? _right$map$filter : [];\n const centerColumns = leafColumns.filter(column => !(left != null && left.includes(column.id)) && !(right != null && right.includes(column.id)));\n const headerGroups = buildHeaderGroups(allColumns, [...leftColumns, ...centerColumns, ...rightColumns], table);\n return headerGroups;\n }, getMemoOptions(table.options, debug, 'getHeaderGroups'));\n table.getCenterHeaderGroups = memo(() => [table.getAllColumns(), table.getVisibleLeafColumns(), table.getState().columnPinning.left, table.getState().columnPinning.right], (allColumns, leafColumns, left, right) => {\n leafColumns = leafColumns.filter(column => !(left != null && left.includes(column.id)) && !(right != null && right.includes(column.id)));\n return buildHeaderGroups(allColumns, leafColumns, table, 'center');\n }, getMemoOptions(table.options, debug, 'getCenterHeaderGroups'));\n table.getLeftHeaderGroups = memo(() => [table.getAllColumns(), table.getVisibleLeafColumns(), table.getState().columnPinning.left], (allColumns, leafColumns, left) => {\n var _left$map$filter2;\n const orderedLeafColumns = (_left$map$filter2 = left == null ? void 0 : left.map(columnId => leafColumns.find(d => d.id === columnId)).filter(Boolean)) != null ? _left$map$filter2 : [];\n return buildHeaderGroups(allColumns, orderedLeafColumns, table, 'left');\n }, getMemoOptions(table.options, debug, 'getLeftHeaderGroups'));\n table.getRightHeaderGroups = memo(() => [table.getAllColumns(), table.getVisibleLeafColumns(), table.getState().columnPinning.right], (allColumns, leafColumns, right) => {\n var _right$map$filter2;\n const orderedLeafColumns = (_right$map$filter2 = right == null ? void 0 : right.map(columnId => leafColumns.find(d => d.id === columnId)).filter(Boolean)) != null ? _right$map$filter2 : [];\n return buildHeaderGroups(allColumns, orderedLeafColumns, table, 'right');\n }, getMemoOptions(table.options, debug, 'getRightHeaderGroups'));\n\n // Footer Groups\n\n table.getFooterGroups = memo(() => [table.getHeaderGroups()], headerGroups => {\n return [...headerGroups].reverse();\n }, getMemoOptions(table.options, debug, 'getFooterGroups'));\n table.getLeftFooterGroups = memo(() => [table.getLeftHeaderGroups()], headerGroups => {\n return [...headerGroups].reverse();\n }, getMemoOptions(table.options, debug, 'getLeftFooterGroups'));\n table.getCenterFooterGroups = memo(() => [table.getCenterHeaderGroups()], headerGroups => {\n return [...headerGroups].reverse();\n }, getMemoOptions(table.options, debug, 'getCenterFooterGroups'));\n table.getRightFooterGroups = memo(() => [table.getRightHeaderGroups()], headerGroups => {\n return [...headerGroups].reverse();\n }, getMemoOptions(table.options, debug, 'getRightFooterGroups'));\n\n // Flat Headers\n\n table.getFlatHeaders = memo(() => [table.getHeaderGroups()], headerGroups => {\n return headerGroups.map(headerGroup => {\n return headerGroup.headers;\n }).flat();\n }, getMemoOptions(table.options, debug, 'getFlatHeaders'));\n table.getLeftFlatHeaders = memo(() => [table.getLeftHeaderGroups()], left => {\n return left.map(headerGroup => {\n return headerGroup.headers;\n }).flat();\n }, getMemoOptions(table.options, debug, 'getLeftFlatHeaders'));\n table.getCenterFlatHeaders = memo(() => [table.getCenterHeaderGroups()], left => {\n return left.map(headerGroup => {\n return headerGroup.headers;\n }).flat();\n }, getMemoOptions(table.options, debug, 'getCenterFlatHeaders'));\n table.getRightFlatHeaders = memo(() => [table.getRightHeaderGroups()], left => {\n return left.map(headerGroup => {\n return headerGroup.headers;\n }).flat();\n }, getMemoOptions(table.options, debug, 'getRightFlatHeaders'));\n\n // Leaf Headers\n\n table.getCenterLeafHeaders = memo(() => [table.getCenterFlatHeaders()], flatHeaders => {\n return flatHeaders.filter(header => {\n var _header$subHeaders;\n return !((_header$subHeaders = header.subHeaders) != null && _header$subHeaders.length);\n });\n }, getMemoOptions(table.options, debug, 'getCenterLeafHeaders'));\n table.getLeftLeafHeaders = memo(() => [table.getLeftFlatHeaders()], flatHeaders => {\n return flatHeaders.filter(header => {\n var _header$subHeaders2;\n return !((_header$subHeaders2 = header.subHeaders) != null && _header$subHeaders2.length);\n });\n }, getMemoOptions(table.options, debug, 'getLeftLeafHeaders'));\n table.getRightLeafHeaders = memo(() => [table.getRightFlatHeaders()], flatHeaders => {\n return flatHeaders.filter(header => {\n var _header$subHeaders3;\n return !((_header$subHeaders3 = header.subHeaders) != null && _header$subHeaders3.length);\n });\n }, getMemoOptions(table.options, debug, 'getRightLeafHeaders'));\n table.getLeafHeaders = memo(() => [table.getLeftHeaderGroups(), table.getCenterHeaderGroups(), table.getRightHeaderGroups()], (left, center, right) => {\n var _left$0$headers, _left$, _center$0$headers, _center$, _right$0$headers, _right$;\n return [...((_left$0$headers = (_left$ = left[0]) == null ? void 0 : _left$.headers) != null ? _left$0$headers : []), ...((_center$0$headers = (_center$ = center[0]) == null ? void 0 : _center$.headers) != null ? _center$0$headers : []), ...((_right$0$headers = (_right$ = right[0]) == null ? void 0 : _right$.headers) != null ? _right$0$headers : [])].map(header => {\n return header.getLeafHeaders();\n }).flat();\n }, getMemoOptions(table.options, debug, 'getLeafHeaders'));\n }\n};\nfunction buildHeaderGroups(allColumns, columnsToGroup, table, headerFamily) {\n var _headerGroups$0$heade, _headerGroups$;\n // Find the max depth of the columns:\n // build the leaf column row\n // build each buffer row going up\n // placeholder for non-existent level\n // real column for existing level\n\n let maxDepth = 0;\n const findMaxDepth = function (columns, depth) {\n if (depth === void 0) {\n depth = 1;\n }\n maxDepth = Math.max(maxDepth, depth);\n columns.filter(column => column.getIsVisible()).forEach(column => {\n var _column$columns;\n if ((_column$columns = column.columns) != null && _column$columns.length) {\n findMaxDepth(column.columns, depth + 1);\n }\n }, 0);\n };\n findMaxDepth(allColumns);\n let headerGroups = [];\n const createHeaderGroup = (headersToGroup, depth) => {\n // The header group we are creating\n const headerGroup = {\n depth,\n id: [headerFamily, `${depth}`].filter(Boolean).join('_'),\n headers: []\n };\n\n // The parent columns we're going to scan next\n const pendingParentHeaders = [];\n\n // Scan each column for parents\n headersToGroup.forEach(headerToGroup => {\n // What is the latest (last) parent column?\n\n const latestPendingParentHeader = [...pendingParentHeaders].reverse()[0];\n const isLeafHeader = headerToGroup.column.depth === headerGroup.depth;\n let column;\n let isPlaceholder = false;\n if (isLeafHeader && headerToGroup.column.parent) {\n // The parent header is new\n column = headerToGroup.column.parent;\n } else {\n // The parent header is repeated\n column = headerToGroup.column;\n isPlaceholder = true;\n }\n if (latestPendingParentHeader && (latestPendingParentHeader == null ? void 0 : latestPendingParentHeader.column) === column) {\n // This column is repeated. Add it as a sub header to the next batch\n latestPendingParentHeader.subHeaders.push(headerToGroup);\n } else {\n // This is a new header. Let's create it\n const header = createHeader(table, column, {\n id: [headerFamily, depth, column.id, headerToGroup == null ? void 0 : headerToGroup.id].filter(Boolean).join('_'),\n isPlaceholder,\n placeholderId: isPlaceholder ? `${pendingParentHeaders.filter(d => d.column === column).length}` : undefined,\n depth,\n index: pendingParentHeaders.length\n });\n\n // Add the headerToGroup as a subHeader of the new header\n header.subHeaders.push(headerToGroup);\n // Add the new header to the pendingParentHeaders to get grouped\n // in the next batch\n pendingParentHeaders.push(header);\n }\n headerGroup.headers.push(headerToGroup);\n headerToGroup.headerGroup = headerGroup;\n });\n headerGroups.push(headerGroup);\n if (depth > 0) {\n createHeaderGroup(pendingParentHeaders, depth - 1);\n }\n };\n const bottomHeaders = columnsToGroup.map((column, index) => createHeader(table, column, {\n depth: maxDepth,\n index\n }));\n createHeaderGroup(bottomHeaders, maxDepth - 1);\n headerGroups.reverse();\n\n // headerGroups = headerGroups.filter(headerGroup => {\n // return !headerGroup.headers.every(header => header.isPlaceholder)\n // })\n\n const recurseHeadersForSpans = headers => {\n const filteredHeaders = headers.filter(header => header.column.getIsVisible());\n return filteredHeaders.map(header => {\n let colSpan = 0;\n let rowSpan = 0;\n let childRowSpans = [0];\n if (header.subHeaders && header.subHeaders.length) {\n childRowSpans = [];\n recurseHeadersForSpans(header.subHeaders).forEach(_ref => {\n let {\n colSpan: childColSpan,\n rowSpan: childRowSpan\n } = _ref;\n colSpan += childColSpan;\n childRowSpans.push(childRowSpan);\n });\n } else {\n colSpan = 1;\n }\n const minChildRowSpan = Math.min(...childRowSpans);\n rowSpan = rowSpan + minChildRowSpan;\n header.colSpan = colSpan;\n header.rowSpan = rowSpan;\n return {\n colSpan,\n rowSpan\n };\n });\n };\n recurseHeadersForSpans((_headerGroups$0$heade = (_headerGroups$ = headerGroups[0]) == null ? void 0 : _headerGroups$.headers) != null ? _headerGroups$0$heade : []);\n return headerGroups;\n}\n\n//\n\n//\n\nconst defaultColumnSizing = {\n size: 150,\n minSize: 20,\n maxSize: Number.MAX_SAFE_INTEGER\n};\nconst getDefaultColumnSizingInfoState = () => ({\n startOffset: null,\n startSize: null,\n deltaOffset: null,\n deltaPercentage: null,\n isResizingColumn: false,\n columnSizingStart: []\n});\nconst ColumnSizing = {\n getDefaultColumnDef: () => {\n return defaultColumnSizing;\n },\n getInitialState: state => {\n return {\n columnSizing: {},\n columnSizingInfo: getDefaultColumnSizingInfoState(),\n ...state\n };\n },\n getDefaultOptions: table => {\n return {\n columnResizeMode: 'onEnd',\n columnResizeDirection: 'ltr',\n onColumnSizingChange: makeStateUpdater('columnSizing', table),\n onColumnSizingInfoChange: makeStateUpdater('columnSizingInfo', table)\n };\n },\n createColumn: (column, table) => {\n column.getSize = () => {\n var _column$columnDef$min, _ref, _column$columnDef$max;\n const columnSize = table.getState().columnSizing[column.id];\n return Math.min(Math.max((_column$columnDef$min = column.columnDef.minSize) != null ? _column$columnDef$min : defaultColumnSizing.minSize, (_ref = columnSize != null ? columnSize : column.columnDef.size) != null ? _ref : defaultColumnSizing.size), (_column$columnDef$max = column.columnDef.maxSize) != null ? _column$columnDef$max : defaultColumnSizing.maxSize);\n };\n column.getStart = memo(position => [position, _getVisibleLeafColumns(table, position), table.getState().columnSizing], (position, columns) => columns.slice(0, column.getIndex(position)).reduce((sum, column) => sum + column.getSize(), 0), getMemoOptions(table.options, 'debugColumns', 'getStart'));\n column.getAfter = memo(position => [position, _getVisibleLeafColumns(table, position), table.getState().columnSizing], (position, columns) => columns.slice(column.getIndex(position) + 1).reduce((sum, column) => sum + column.getSize(), 0), getMemoOptions(table.options, 'debugColumns', 'getAfter'));\n column.resetSize = () => {\n table.setColumnSizing(_ref2 => {\n let {\n [column.id]: _,\n ...rest\n } = _ref2;\n return rest;\n });\n };\n column.getCanResize = () => {\n var _column$columnDef$ena, _table$options$enable;\n return ((_column$columnDef$ena = column.columnDef.enableResizing) != null ? _column$columnDef$ena : true) && ((_table$options$enable = table.options.enableColumnResizing) != null ? _table$options$enable : true);\n };\n column.getIsResizing = () => {\n return table.getState().columnSizingInfo.isResizingColumn === column.id;\n };\n },\n createHeader: (header, table) => {\n header.getSize = () => {\n let sum = 0;\n const recurse = header => {\n if (header.subHeaders.length) {\n header.subHeaders.forEach(recurse);\n } else {\n var _header$column$getSiz;\n sum += (_header$column$getSiz = header.column.getSize()) != null ? _header$column$getSiz : 0;\n }\n };\n recurse(header);\n return sum;\n };\n header.getStart = () => {\n if (header.index > 0) {\n const prevSiblingHeader = header.headerGroup.headers[header.index - 1];\n return prevSiblingHeader.getStart() + prevSiblingHeader.getSize();\n }\n return 0;\n };\n header.getResizeHandler = _contextDocument => {\n const column = table.getColumn(header.column.id);\n const canResize = column == null ? void 0 : column.getCanResize();\n return e => {\n if (!column || !canResize) {\n return;\n }\n e.persist == null || e.persist();\n if (isTouchStartEvent(e)) {\n // lets not respond to multiple touches (e.g. 2 or 3 fingers)\n if (e.touches && e.touches.length > 1) {\n return;\n }\n }\n const startSize = header.getSize();\n const columnSizingStart = header ? header.getLeafHeaders().map(d => [d.column.id, d.column.getSize()]) : [[column.id, column.getSize()]];\n const clientX = isTouchStartEvent(e) ? Math.round(e.touches[0].clientX) : e.clientX;\n const newColumnSizing = {};\n const updateOffset = (eventType, clientXPos) => {\n if (typeof clientXPos !== 'number') {\n return;\n }\n table.setColumnSizingInfo(old => {\n var _old$startOffset, _old$startSize;\n const deltaDirection = table.options.columnResizeDirection === 'rtl' ? -1 : 1;\n const deltaOffset = (clientXPos - ((_old$startOffset = old == null ? void 0 : old.startOffset) != null ? _old$startOffset : 0)) * deltaDirection;\n const deltaPercentage = Math.max(deltaOffset / ((_old$startSize = old == null ? void 0 : old.startSize) != null ? _old$startSize : 0), -0.999999);\n old.columnSizingStart.forEach(_ref3 => {\n let [columnId, headerSize] = _ref3;\n newColumnSizing[columnId] = Math.round(Math.max(headerSize + headerSize * deltaPercentage, 0) * 100) / 100;\n });\n return {\n ...old,\n deltaOffset,\n deltaPercentage\n };\n });\n if (table.options.columnResizeMode === 'onChange' || eventType === 'end') {\n table.setColumnSizing(old => ({\n ...old,\n ...newColumnSizing\n }));\n }\n };\n const onMove = clientXPos => updateOffset('move', clientXPos);\n const onEnd = clientXPos => {\n updateOffset('end', clientXPos);\n table.setColumnSizingInfo(old => ({\n ...old,\n isResizingColumn: false,\n startOffset: null,\n startSize: null,\n deltaOffset: null,\n deltaPercentage: null,\n columnSizingStart: []\n }));\n };\n const contextDocument = _contextDocument || typeof document !== 'undefined' ? document : null;\n const mouseEvents = {\n moveHandler: e => onMove(e.clientX),\n upHandler: e => {\n contextDocument == null || contextDocument.removeEventListener('mousemove', mouseEvents.moveHandler);\n contextDocument == null || contextDocument.removeEventListener('mouseup', mouseEvents.upHandler);\n onEnd(e.clientX);\n }\n };\n const touchEvents = {\n moveHandler: e => {\n if (e.cancelable) {\n e.preventDefault();\n e.stopPropagation();\n }\n onMove(e.touches[0].clientX);\n return false;\n },\n upHandler: e => {\n var _e$touches$;\n contextDocument == null || contextDocument.removeEventListener('touchmove', touchEvents.moveHandler);\n contextDocument == null || contextDocument.removeEventListener('touchend', touchEvents.upHandler);\n if (e.cancelable) {\n e.preventDefault();\n e.stopPropagation();\n }\n onEnd((_e$touches$ = e.touches[0]) == null ? void 0 : _e$touches$.clientX);\n }\n };\n const passiveIfSupported = passiveEventSupported() ? {\n passive: false\n } : false;\n if (isTouchStartEvent(e)) {\n contextDocument == null || contextDocument.addEventListener('touchmove', touchEvents.moveHandler, passiveIfSupported);\n contextDocument == null || contextDocument.addEventListener('touchend', touchEvents.upHandler, passiveIfSupported);\n } else {\n contextDocument == null || contextDocument.addEventListener('mousemove', mouseEvents.moveHandler, passiveIfSupported);\n contextDocument == null || contextDocument.addEventListener('mouseup', mouseEvents.upHandler, passiveIfSupported);\n }\n table.setColumnSizingInfo(old => ({\n ...old,\n startOffset: clientX,\n startSize,\n deltaOffset: 0,\n deltaPercentage: 0,\n columnSizingStart,\n isResizingColumn: column.id\n }));\n };\n };\n },\n createTable: table => {\n table.setColumnSizing = updater => table.options.onColumnSizingChange == null ? void 0 : table.options.onColumnSizingChange(updater);\n table.setColumnSizingInfo = updater => table.options.onColumnSizingInfoChange == null ? void 0 : table.options.onColumnSizingInfoChange(updater);\n table.resetColumnSizing = defaultState => {\n var _table$initialState$c;\n table.setColumnSizing(defaultState ? {} : (_table$initialState$c = table.initialState.columnSizing) != null ? _table$initialState$c : {});\n };\n table.resetHeaderSizeInfo = defaultState => {\n var _table$initialState$c2;\n table.setColumnSizingInfo(defaultState ? getDefaultColumnSizingInfoState() : (_table$initialState$c2 = table.initialState.columnSizingInfo) != null ? _table$initialState$c2 : getDefaultColumnSizingInfoState());\n };\n table.getTotalSize = () => {\n var _table$getHeaderGroup, _table$getHeaderGroup2;\n return (_table$getHeaderGroup = (_table$getHeaderGroup2 = table.getHeaderGroups()[0]) == null ? void 0 : _table$getHeaderGroup2.headers.reduce((sum, header) => {\n return sum + header.getSize();\n }, 0)) != null ? _table$getHeaderGroup : 0;\n };\n table.getLeftTotalSize = () => {\n var _table$getLeftHeaderG, _table$getLeftHeaderG2;\n return (_table$getLeftHeaderG = (_table$getLeftHeaderG2 = table.getLeftHeaderGroups()[0]) == null ? void 0 : _table$getLeftHeaderG2.headers.reduce((sum, header) => {\n return sum + header.getSize();\n }, 0)) != null ? _table$getLeftHeaderG : 0;\n };\n table.getCenterTotalSize = () => {\n var _table$getCenterHeade, _table$getCenterHeade2;\n return (_table$getCenterHeade = (_table$getCenterHeade2 = table.getCenterHeaderGroups()[0]) == null ? void 0 : _table$getCenterHeade2.headers.reduce((sum, header) => {\n return sum + header.getSize();\n }, 0)) != null ? _table$getCenterHeade : 0;\n };\n table.getRightTotalSize = () => {\n var _table$getRightHeader, _table$getRightHeader2;\n return (_table$getRightHeader = (_table$getRightHeader2 = table.getRightHeaderGroups()[0]) == null ? void 0 : _table$getRightHeader2.headers.reduce((sum, header) => {\n return sum + header.getSize();\n }, 0)) != null ? _table$getRightHeader : 0;\n };\n }\n};\nlet passiveSupported = null;\nfunction passiveEventSupported() {\n if (typeof passiveSupported === 'boolean') return passiveSupported;\n let supported = false;\n try {\n const options = {\n get passive() {\n supported = true;\n return false;\n }\n };\n const noop = () => {};\n window.addEventListener('test', noop, options);\n window.removeEventListener('test', noop);\n } catch (err) {\n supported = false;\n }\n passiveSupported = supported;\n return passiveSupported;\n}\nfunction isTouchStartEvent(e) {\n return e.type === 'touchstart';\n}\n\n//\n\nconst Expanding = {\n getInitialState: state => {\n return {\n expanded: {},\n ...state\n };\n },\n getDefaultOptions: table => {\n return {\n onExpandedChange: makeStateUpdater('expanded', table),\n paginateExpandedRows: true\n };\n },\n createTable: table => {\n let registered = false;\n let queued = false;\n table._autoResetExpanded = () => {\n var _ref, _table$options$autoRe;\n if (!registered) {\n table._queue(() => {\n registered = true;\n });\n return;\n }\n if ((_ref = (_table$options$autoRe = table.options.autoResetAll) != null ? _table$options$autoRe : table.options.autoResetExpanded) != null ? _ref : !table.options.manualExpanding) {\n if (queued) return;\n queued = true;\n table._queue(() => {\n table.resetExpanded();\n queued = false;\n });\n }\n };\n table.setExpanded = updater => table.options.onExpandedChange == null ? void 0 : table.options.onExpandedChange(updater);\n table.toggleAllRowsExpanded = expanded => {\n if (expanded != null ? expanded : !table.getIsAllRowsExpanded()) {\n table.setExpanded(true);\n } else {\n table.setExpanded({});\n }\n };\n table.resetExpanded = defaultState => {\n var _table$initialState$e, _table$initialState;\n table.setExpanded(defaultState ? {} : (_table$initialState$e = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.expanded) != null ? _table$initialState$e : {});\n };\n table.getCanSomeRowsExpand = () => {\n return table.getPrePaginationRowModel().flatRows.some(row => row.getCanExpand());\n };\n table.getToggleAllRowsExpandedHandler = () => {\n return e => {\n e.persist == null || e.persist();\n table.toggleAllRowsExpanded();\n };\n };\n table.getIsSomeRowsExpanded = () => {\n const expanded = table.getState().expanded;\n return expanded === true || Object.values(expanded).some(Boolean);\n };\n table.getIsAllRowsExpanded = () => {\n const expanded = table.getState().expanded;\n\n // If expanded is true, save some cycles and return true\n if (typeof expanded === 'boolean') {\n return expanded === true;\n }\n if (!Object.keys(expanded).length) {\n return false;\n }\n\n // If any row is not expanded, return false\n if (table.getRowModel().flatRows.some(row => !row.getIsExpanded())) {\n return false;\n }\n\n // They must all be expanded :shrug:\n return true;\n };\n table.getExpandedDepth = () => {\n let maxDepth = 0;\n const rowIds = table.getState().expanded === true ? Object.keys(table.getRowModel().rowsById) : Object.keys(table.getState().expanded);\n rowIds.forEach(id => {\n const splitId = id.split('.');\n maxDepth = Math.max(maxDepth, splitId.length);\n });\n return maxDepth;\n };\n table.getPreExpandedRowModel = () => table.getSortedRowModel();\n table.getExpandedRowModel = () => {\n if (!table._getExpandedRowModel && table.options.getExpandedRowModel) {\n table._getExpandedRowModel = table.options.getExpandedRowModel(table);\n }\n if (table.options.manualExpanding || !table._getExpandedRowModel) {\n return table.getPreExpandedRowModel();\n }\n return table._getExpandedRowModel();\n };\n },\n createRow: (row, table) => {\n row.toggleExpanded = expanded => {\n table.setExpanded(old => {\n var _expanded;\n const exists = old === true ? true : !!(old != null && old[row.id]);\n let oldExpanded = {};\n if (old === true) {\n Object.keys(table.getRowModel().rowsById).forEach(rowId => {\n oldExpanded[rowId] = true;\n });\n } else {\n oldExpanded = old;\n }\n expanded = (_expanded = expanded) != null ? _expanded : !exists;\n if (!exists && expanded) {\n return {\n ...oldExpanded,\n [row.id]: true\n };\n }\n if (exists && !expanded) {\n const {\n [row.id]: _,\n ...rest\n } = oldExpanded;\n return rest;\n }\n return old;\n });\n };\n row.getIsExpanded = () => {\n var _table$options$getIsR;\n const expanded = table.getState().expanded;\n return !!((_table$options$getIsR = table.options.getIsRowExpanded == null ? void 0 : table.options.getIsRowExpanded(row)) != null ? _table$options$getIsR : expanded === true || (expanded == null ? void 0 : expanded[row.id]));\n };\n row.getCanExpand = () => {\n var _table$options$getRow, _table$options$enable, _row$subRows;\n return (_table$options$getRow = table.options.getRowCanExpand == null ? void 0 : table.options.getRowCanExpand(row)) != null ? _table$options$getRow : ((_table$options$enable = table.options.enableExpanding) != null ? _table$options$enable : true) && !!((_row$subRows = row.subRows) != null && _row$subRows.length);\n };\n row.getIsAllParentsExpanded = () => {\n let isFullyExpanded = true;\n let currentRow = row;\n while (isFullyExpanded && currentRow.parentId) {\n currentRow = table.getRow(currentRow.parentId, true);\n isFullyExpanded = currentRow.getIsExpanded();\n }\n return isFullyExpanded;\n };\n row.getToggleExpandedHandler = () => {\n const canExpand = row.getCanExpand();\n return () => {\n if (!canExpand) return;\n row.toggleExpanded();\n };\n };\n }\n};\n\nconst includesString = (row, columnId, filterValue) => {\n var _row$getValue;\n const search = filterValue.toLowerCase();\n return Boolean((_row$getValue = row.getValue(columnId)) == null || (_row$getValue = _row$getValue.toString()) == null || (_row$getValue = _row$getValue.toLowerCase()) == null ? void 0 : _row$getValue.includes(search));\n};\nincludesString.autoRemove = val => testFalsey(val);\nconst includesStringSensitive = (row, columnId, filterValue) => {\n var _row$getValue2;\n return Boolean((_row$getValue2 = row.getValue(columnId)) == null || (_row$getValue2 = _row$getValue2.toString()) == null ? void 0 : _row$getValue2.includes(filterValue));\n};\nincludesStringSensitive.autoRemove = val => testFalsey(val);\nconst equalsString = (row, columnId, filterValue) => {\n var _row$getValue3;\n return ((_row$getValue3 = row.getValue(columnId)) == null || (_row$getValue3 = _row$getValue3.toString()) == null ? void 0 : _row$getValue3.toLowerCase()) === (filterValue == null ? void 0 : filterValue.toLowerCase());\n};\nequalsString.autoRemove = val => testFalsey(val);\nconst arrIncludes = (row, columnId, filterValue) => {\n var _row$getValue4;\n return (_row$getValue4 = row.getValue(columnId)) == null ? void 0 : _row$getValue4.includes(filterValue);\n};\narrIncludes.autoRemove = val => testFalsey(val) || !(val != null && val.length);\nconst arrIncludesAll = (row, columnId, filterValue) => {\n return !filterValue.some(val => {\n var _row$getValue5;\n return !((_row$getValue5 = row.getValue(columnId)) != null && _row$getValue5.includes(val));\n });\n};\narrIncludesAll.autoRemove = val => testFalsey(val) || !(val != null && val.length);\nconst arrIncludesSome = (row, columnId, filterValue) => {\n return filterValue.some(val => {\n var _row$getValue6;\n return (_row$getValue6 = row.getValue(columnId)) == null ? void 0 : _row$getValue6.includes(val);\n });\n};\narrIncludesSome.autoRemove = val => testFalsey(val) || !(val != null && val.length);\nconst equals = (row, columnId, filterValue) => {\n return row.getValue(columnId) === filterValue;\n};\nequals.autoRemove = val => testFalsey(val);\nconst weakEquals = (row, columnId, filterValue) => {\n return row.getValue(columnId) == filterValue;\n};\nweakEquals.autoRemove = val => testFalsey(val);\nconst inNumberRange = (row, columnId, filterValue) => {\n let [min, max] = filterValue;\n const rowValue = row.getValue(columnId);\n return rowValue >= min && rowValue <= max;\n};\ninNumberRange.resolveFilterValue = val => {\n let [unsafeMin, unsafeMax] = val;\n let parsedMin = typeof unsafeMin !== 'number' ? parseFloat(unsafeMin) : unsafeMin;\n let parsedMax = typeof unsafeMax !== 'number' ? parseFloat(unsafeMax) : unsafeMax;\n let min = unsafeMin === null || Number.isNaN(parsedMin) ? -Infinity : parsedMin;\n let max = unsafeMax === null || Number.isNaN(parsedMax) ? Infinity : parsedMax;\n if (min > max) {\n const temp = min;\n min = max;\n max = temp;\n }\n return [min, max];\n};\ninNumberRange.autoRemove = val => testFalsey(val) || testFalsey(val[0]) && testFalsey(val[1]);\n\n// Export\n\nconst filterFns = {\n includesString,\n includesStringSensitive,\n equalsString,\n arrIncludes,\n arrIncludesAll,\n arrIncludesSome,\n equals,\n weakEquals,\n inNumberRange\n};\n// Utils\n\nfunction testFalsey(val) {\n return val === undefined || val === null || val === '';\n}\n\n//\n\nconst Filters = {\n getDefaultColumnDef: () => {\n return {\n filterFn: 'auto'\n };\n },\n getInitialState: state => {\n return {\n columnFilters: [],\n globalFilter: undefined,\n // filtersProgress: 1,\n // facetProgress: {},\n ...state\n };\n },\n getDefaultOptions: table => {\n return {\n onColumnFiltersChange: makeStateUpdater('columnFilters', table),\n onGlobalFilterChange: makeStateUpdater('globalFilter', table),\n filterFromLeafRows: false,\n maxLeafRowFilterDepth: 100,\n globalFilterFn: 'auto',\n getColumnCanGlobalFilter: column => {\n var _table$getCoreRowMode;\n const value = (_table$getCoreRowMode = table.getCoreRowModel().flatRows[0]) == null || (_table$getCoreRowMode = _table$getCoreRowMode._getAllCellsByColumnId()[column.id]) == null ? void 0 : _table$getCoreRowMode.getValue();\n return typeof value === 'string' || typeof value === 'number';\n }\n };\n },\n createColumn: (column, table) => {\n column.getAutoFilterFn = () => {\n const firstRow = table.getCoreRowModel().flatRows[0];\n const value = firstRow == null ? void 0 : firstRow.getValue(column.id);\n if (typeof value === 'string') {\n return filterFns.includesString;\n }\n if (typeof value === 'number') {\n return filterFns.inNumberRange;\n }\n if (typeof value === 'boolean') {\n return filterFns.equals;\n }\n if (value !== null && typeof value === 'object') {\n return filterFns.equals;\n }\n if (Array.isArray(value)) {\n return filterFns.arrIncludes;\n }\n return filterFns.weakEquals;\n };\n column.getFilterFn = () => {\n var _table$options$filter, _table$options$filter2;\n return isFunction(column.columnDef.filterFn) ? column.columnDef.filterFn : column.columnDef.filterFn === 'auto' ? column.getAutoFilterFn() : // @ts-ignore\n (_table$options$filter = (_table$options$filter2 = table.options.filterFns) == null ? void 0 : _table$options$filter2[column.columnDef.filterFn]) != null ? _table$options$filter : filterFns[column.columnDef.filterFn];\n };\n column.getCanFilter = () => {\n var _column$columnDef$ena, _table$options$enable, _table$options$enable2;\n return ((_column$columnDef$ena = column.columnDef.enableColumnFilter) != null ? _column$columnDef$ena : true) && ((_table$options$enable = table.options.enableColumnFilters) != null ? _table$options$enable : true) && ((_table$options$enable2 = table.options.enableFilters) != null ? _table$options$enable2 : true) && !!column.accessorFn;\n };\n column.getCanGlobalFilter = () => {\n var _column$columnDef$ena2, _table$options$enable3, _table$options$enable4, _table$options$getCol;\n return ((_column$columnDef$ena2 = column.columnDef.enableGlobalFilter) != null ? _column$columnDef$ena2 : true) && ((_table$options$enable3 = table.options.enableGlobalFilter) != null ? _table$options$enable3 : true) && ((_table$options$enable4 = table.options.enableFilters) != null ? _table$options$enable4 : true) && ((_table$options$getCol = table.options.getColumnCanGlobalFilter == null ? void 0 : table.options.getColumnCanGlobalFilter(column)) != null ? _table$options$getCol : true) && !!column.accessorFn;\n };\n column.getIsFiltered = () => column.getFilterIndex() > -1;\n column.getFilterValue = () => {\n var _table$getState$colum;\n return (_table$getState$colum = table.getState().columnFilters) == null || (_table$getState$colum = _table$getState$colum.find(d => d.id === column.id)) == null ? void 0 : _table$getState$colum.value;\n };\n column.getFilterIndex = () => {\n var _table$getState$colum2, _table$getState$colum3;\n return (_table$getState$colum2 = (_table$getState$colum3 = table.getState().columnFilters) == null ? void 0 : _table$getState$colum3.findIndex(d => d.id === column.id)) != null ? _table$getState$colum2 : -1;\n };\n column.setFilterValue = value => {\n table.setColumnFilters(old => {\n const filterFn = column.getFilterFn();\n const previousfilter = old == null ? void 0 : old.find(d => d.id === column.id);\n const newFilter = functionalUpdate(value, previousfilter ? previousfilter.value : undefined);\n\n //\n if (shouldAutoRemoveFilter(filterFn, newFilter, column)) {\n var _old$filter;\n return (_old$filter = old == null ? void 0 : old.filter(d => d.id !== column.id)) != null ? _old$filter : [];\n }\n const newFilterObj = {\n id: column.id,\n value: newFilter\n };\n if (previousfilter) {\n var _old$map;\n return (_old$map = old == null ? void 0 : old.map(d => {\n if (d.id === column.id) {\n return newFilterObj;\n }\n return d;\n })) != null ? _old$map : [];\n }\n if (old != null && old.length) {\n return [...old, newFilterObj];\n }\n return [newFilterObj];\n });\n };\n column._getFacetedRowModel = table.options.getFacetedRowModel && table.options.getFacetedRowModel(table, column.id);\n column.getFacetedRowModel = () => {\n if (!column._getFacetedRowModel) {\n return table.getPreFilteredRowModel();\n }\n return column._getFacetedRowModel();\n };\n column._getFacetedUniqueValues = table.options.getFacetedUniqueValues && table.options.getFacetedUniqueValues(table, column.id);\n column.getFacetedUniqueValues = () => {\n if (!column._getFacetedUniqueValues) {\n return new Map();\n }\n return column._getFacetedUniqueValues();\n };\n column._getFacetedMinMaxValues = table.options.getFacetedMinMaxValues && table.options.getFacetedMinMaxValues(table, column.id);\n column.getFacetedMinMaxValues = () => {\n if (!column._getFacetedMinMaxValues) {\n return undefined;\n }\n return column._getFacetedMinMaxValues();\n };\n // () => [column.getFacetedRowModel()],\n // facetedRowModel => getRowModelMinMaxValues(facetedRowModel, column.id),\n },\n createRow: (row, table) => {\n row.columnFilters = {};\n row.columnFiltersMeta = {};\n },\n createTable: table => {\n table.getGlobalAutoFilterFn = () => {\n return filterFns.includesString;\n };\n table.getGlobalFilterFn = () => {\n var _table$options$filter3, _table$options$filter4;\n const {\n globalFilterFn: globalFilterFn\n } = table.options;\n return isFunction(globalFilterFn) ? globalFilterFn : globalFilterFn === 'auto' ? table.getGlobalAutoFilterFn() : // @ts-ignore\n (_table$options$filter3 = (_table$options$filter4 = table.options.filterFns) == null ? void 0 : _table$options$filter4[globalFilterFn]) != null ? _table$options$filter3 : filterFns[globalFilterFn];\n };\n table.setColumnFilters = updater => {\n const leafColumns = table.getAllLeafColumns();\n const updateFn = old => {\n var _functionalUpdate;\n return (_functionalUpdate = functionalUpdate(updater, old)) == null ? void 0 : _functionalUpdate.filter(filter => {\n const column = leafColumns.find(d => d.id === filter.id);\n if (column) {\n const filterFn = column.getFilterFn();\n if (shouldAutoRemoveFilter(filterFn, filter.value, column)) {\n return false;\n }\n }\n return true;\n });\n };\n table.options.onColumnFiltersChange == null || table.options.onColumnFiltersChange(updateFn);\n };\n table.setGlobalFilter = updater => {\n table.options.onGlobalFilterChange == null || table.options.onGlobalFilterChange(updater);\n };\n table.resetGlobalFilter = defaultState => {\n table.setGlobalFilter(defaultState ? undefined : table.initialState.globalFilter);\n };\n table.resetColumnFilters = defaultState => {\n var _table$initialState$c, _table$initialState;\n table.setColumnFilters(defaultState ? [] : (_table$initialState$c = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.columnFilters) != null ? _table$initialState$c : []);\n };\n table.getPreFilteredRowModel = () => table.getCoreRowModel();\n table.getFilteredRowModel = () => {\n if (!table._getFilteredRowModel && table.options.getFilteredRowModel) {\n table._getFilteredRowModel = table.options.getFilteredRowModel(table);\n }\n if (table.options.manualFiltering || !table._getFilteredRowModel) {\n return table.getPreFilteredRowModel();\n }\n return table._getFilteredRowModel();\n };\n table._getGlobalFacetedRowModel = table.options.getFacetedRowModel && table.options.getFacetedRowModel(table, '__global__');\n table.getGlobalFacetedRowModel = () => {\n if (table.options.manualFiltering || !table._getGlobalFacetedRowModel) {\n return table.getPreFilteredRowModel();\n }\n return table._getGlobalFacetedRowModel();\n };\n table._getGlobalFacetedUniqueValues = table.options.getFacetedUniqueValues && table.options.getFacetedUniqueValues(table, '__global__');\n table.getGlobalFacetedUniqueValues = () => {\n if (!table._getGlobalFacetedUniqueValues) {\n return new Map();\n }\n return table._getGlobalFacetedUniqueValues();\n };\n table._getGlobalFacetedMinMaxValues = table.options.getFacetedMinMaxValues && table.options.getFacetedMinMaxValues(table, '__global__');\n table.getGlobalFacetedMinMaxValues = () => {\n if (!table._getGlobalFacetedMinMaxValues) {\n return;\n }\n return table._getGlobalFacetedMinMaxValues();\n };\n }\n};\nfunction shouldAutoRemoveFilter(filterFn, value, column) {\n return (filterFn && filterFn.autoRemove ? filterFn.autoRemove(value, column) : false) || typeof value === 'undefined' || typeof value === 'string' && !value;\n}\n\nconst sum = (columnId, _leafRows, childRows) => {\n // It's faster to just add the aggregations together instead of\n // process leaf nodes individually\n return childRows.reduce((sum, next) => {\n const nextValue = next.getValue(columnId);\n return sum + (typeof nextValue === 'number' ? nextValue : 0);\n }, 0);\n};\nconst min = (columnId, _leafRows, childRows) => {\n let min;\n childRows.forEach(row => {\n const value = row.getValue(columnId);\n if (value != null && (min > value || min === undefined && value >= value)) {\n min = value;\n }\n });\n return min;\n};\nconst max = (columnId, _leafRows, childRows) => {\n let max;\n childRows.forEach(row => {\n const value = row.getValue(columnId);\n if (value != null && (max < value || max === undefined && value >= value)) {\n max = value;\n }\n });\n return max;\n};\nconst extent = (columnId, _leafRows, childRows) => {\n let min;\n let max;\n childRows.forEach(row => {\n const value = row.getValue(columnId);\n if (value != null) {\n if (min === undefined) {\n if (value >= value) min = max = value;\n } else {\n if (min > value) min = value;\n if (max < value) max = value;\n }\n }\n });\n return [min, max];\n};\nconst mean = (columnId, leafRows) => {\n let count = 0;\n let sum = 0;\n leafRows.forEach(row => {\n let value = row.getValue(columnId);\n if (value != null && (value = +value) >= value) {\n ++count, sum += value;\n }\n });\n if (count) return sum / count;\n return;\n};\nconst median = (columnId, leafRows) => {\n if (!leafRows.length) {\n return;\n }\n const values = leafRows.map(row => row.getValue(columnId));\n if (!isNumberArray(values)) {\n return;\n }\n if (values.length === 1) {\n return values[0];\n }\n const mid = Math.floor(values.length / 2);\n const nums = values.sort((a, b) => a - b);\n return values.length % 2 !== 0 ? nums[mid] : (nums[mid - 1] + nums[mid]) / 2;\n};\nconst unique = (columnId, leafRows) => {\n return Array.from(new Set(leafRows.map(d => d.getValue(columnId))).values());\n};\nconst uniqueCount = (columnId, leafRows) => {\n return new Set(leafRows.map(d => d.getValue(columnId))).size;\n};\nconst count = (_columnId, leafRows) => {\n return leafRows.length;\n};\nconst aggregationFns = {\n sum,\n min,\n max,\n extent,\n mean,\n median,\n unique,\n uniqueCount,\n count\n};\n\n//\n\nconst Grouping = {\n getDefaultColumnDef: () => {\n return {\n aggregatedCell: props => {\n var _toString, _props$getValue;\n return (_toString = (_props$getValue = props.getValue()) == null || _props$getValue.toString == null ? void 0 : _props$getValue.toString()) != null ? _toString : null;\n },\n aggregationFn: 'auto'\n };\n },\n getInitialState: state => {\n return {\n grouping: [],\n ...state\n };\n },\n getDefaultOptions: table => {\n return {\n onGroupingChange: makeStateUpdater('grouping', table),\n groupedColumnMode: 'reorder'\n };\n },\n createColumn: (column, table) => {\n column.toggleGrouping = () => {\n table.setGrouping(old => {\n // Find any existing grouping for this column\n if (old != null && old.includes(column.id)) {\n return old.filter(d => d !== column.id);\n }\n return [...(old != null ? old : []), column.id];\n });\n };\n column.getCanGroup = () => {\n var _ref, _ref2, _ref3, _column$columnDef$ena;\n return (_ref = (_ref2 = (_ref3 = (_column$columnDef$ena = column.columnDef.enableGrouping) != null ? _column$columnDef$ena : true) != null ? _ref3 : table.options.enableGrouping) != null ? _ref2 : true) != null ? _ref : !!column.accessorFn;\n };\n column.getIsGrouped = () => {\n var _table$getState$group;\n return (_table$getState$group = table.getState().grouping) == null ? void 0 : _table$getState$group.includes(column.id);\n };\n column.getGroupedIndex = () => {\n var _table$getState$group2;\n return (_table$getState$group2 = table.getState().grouping) == null ? void 0 : _table$getState$group2.indexOf(column.id);\n };\n column.getToggleGroupingHandler = () => {\n const canGroup = column.getCanGroup();\n return () => {\n if (!canGroup) return;\n column.toggleGrouping();\n };\n };\n column.getAutoAggregationFn = () => {\n const firstRow = table.getCoreRowModel().flatRows[0];\n const value = firstRow == null ? void 0 : firstRow.getValue(column.id);\n if (typeof value === 'number') {\n return aggregationFns.sum;\n }\n if (Object.prototype.toString.call(value) === '[object Date]') {\n return aggregationFns.extent;\n }\n };\n column.getAggregationFn = () => {\n var _table$options$aggreg, _table$options$aggreg2;\n if (!column) {\n throw new Error();\n }\n return isFunction(column.columnDef.aggregationFn) ? column.columnDef.aggregationFn : column.columnDef.aggregationFn === 'auto' ? column.getAutoAggregationFn() : (_table$options$aggreg = (_table$options$aggreg2 = table.options.aggregationFns) == null ? void 0 : _table$options$aggreg2[column.columnDef.aggregationFn]) != null ? _table$options$aggreg : aggregationFns[column.columnDef.aggregationFn];\n };\n },\n createTable: table => {\n table.setGrouping = updater => table.options.onGroupingChange == null ? void 0 : table.options.onGroupingChange(updater);\n table.resetGrouping = defaultState => {\n var _table$initialState$g, _table$initialState;\n table.setGrouping(defaultState ? [] : (_table$initialState$g = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.grouping) != null ? _table$initialState$g : []);\n };\n table.getPreGroupedRowModel = () => table.getFilteredRowModel();\n table.getGroupedRowModel = () => {\n if (!table._getGroupedRowModel && table.options.getGroupedRowModel) {\n table._getGroupedRowModel = table.options.getGroupedRowModel(table);\n }\n if (table.options.manualGrouping || !table._getGroupedRowModel) {\n return table.getPreGroupedRowModel();\n }\n return table._getGroupedRowModel();\n };\n },\n createRow: (row, table) => {\n row.getIsGrouped = () => !!row.groupingColumnId;\n row.getGroupingValue = columnId => {\n if (row._groupingValuesCache.hasOwnProperty(columnId)) {\n return row._groupingValuesCache[columnId];\n }\n const column = table.getColumn(columnId);\n if (!(column != null && column.columnDef.getGroupingValue)) {\n return row.getValue(columnId);\n }\n row._groupingValuesCache[columnId] = column.columnDef.getGroupingValue(row.original);\n return row._groupingValuesCache[columnId];\n };\n row._groupingValuesCache = {};\n },\n createCell: (cell, column, row, table) => {\n cell.getIsGrouped = () => column.getIsGrouped() && column.id === row.groupingColumnId;\n cell.getIsPlaceholder = () => !cell.getIsGrouped() && column.getIsGrouped();\n cell.getIsAggregated = () => {\n var _row$subRows;\n return !cell.getIsGrouped() && !cell.getIsPlaceholder() && !!((_row$subRows = row.subRows) != null && _row$subRows.length);\n };\n }\n};\nfunction orderColumns(leafColumns, grouping, groupedColumnMode) {\n if (!(grouping != null && grouping.length) || !groupedColumnMode) {\n return leafColumns;\n }\n const nonGroupingColumns = leafColumns.filter(col => !grouping.includes(col.id));\n if (groupedColumnMode === 'remove') {\n return nonGroupingColumns;\n }\n const groupingColumns = grouping.map(g => leafColumns.find(col => col.id === g)).filter(Boolean);\n return [...groupingColumns, ...nonGroupingColumns];\n}\n\n//\n\nconst Ordering = {\n getInitialState: state => {\n return {\n columnOrder: [],\n ...state\n };\n },\n getDefaultOptions: table => {\n return {\n onColumnOrderChange: makeStateUpdater('columnOrder', table)\n };\n },\n createColumn: (column, table) => {\n column.getIndex = memo(position => [_getVisibleLeafColumns(table, position)], columns => columns.findIndex(d => d.id === column.id), getMemoOptions(table.options, 'debugColumns', 'getIndex'));\n column.getIsFirstColumn = position => {\n var _columns$;\n const columns = _getVisibleLeafColumns(table, position);\n return ((_columns$ = columns[0]) == null ? void 0 : _columns$.id) === column.id;\n };\n column.getIsLastColumn = position => {\n var _columns;\n const columns = _getVisibleLeafColumns(table, position);\n return ((_columns = columns[columns.length - 1]) == null ? void 0 : _columns.id) === column.id;\n };\n },\n createTable: table => {\n table.setColumnOrder = updater => table.options.onColumnOrderChange == null ? void 0 : table.options.onColumnOrderChange(updater);\n table.resetColumnOrder = defaultState => {\n var _table$initialState$c;\n table.setColumnOrder(defaultState ? [] : (_table$initialState$c = table.initialState.columnOrder) != null ? _table$initialState$c : []);\n };\n table._getOrderColumnsFn = memo(() => [table.getState().columnOrder, table.getState().grouping, table.options.groupedColumnMode], (columnOrder, grouping, groupedColumnMode) => columns => {\n // Sort grouped columns to the start of the column list\n // before the headers are built\n let orderedColumns = [];\n\n // If there is no order, return the normal columns\n if (!(columnOrder != null && columnOrder.length)) {\n orderedColumns = columns;\n } else {\n const columnOrderCopy = [...columnOrder];\n\n // If there is an order, make a copy of the columns\n const columnsCopy = [...columns];\n\n // And make a new ordered array of the columns\n\n // Loop over the columns and place them in order into the new array\n while (columnsCopy.length && columnOrderCopy.length) {\n const targetColumnId = columnOrderCopy.shift();\n const foundIndex = columnsCopy.findIndex(d => d.id === targetColumnId);\n if (foundIndex > -1) {\n orderedColumns.push(columnsCopy.splice(foundIndex, 1)[0]);\n }\n }\n\n // If there are any columns left, add them to the end\n orderedColumns = [...orderedColumns, ...columnsCopy];\n }\n return orderColumns(orderedColumns, grouping, groupedColumnMode);\n }, getMemoOptions(table.options, 'debugTable', '_getOrderColumnsFn'));\n }\n};\n\n//\n\nconst defaultPageIndex = 0;\nconst defaultPageSize = 10;\nconst getDefaultPaginationState = () => ({\n pageIndex: defaultPageIndex,\n pageSize: defaultPageSize\n});\nconst Pagination = {\n getInitialState: state => {\n return {\n ...state,\n pagination: {\n ...getDefaultPaginationState(),\n ...(state == null ? void 0 : state.pagination)\n }\n };\n },\n getDefaultOptions: table => {\n return {\n onPaginationChange: makeStateUpdater('pagination', table)\n };\n },\n createTable: table => {\n let registered = false;\n let queued = false;\n table._autoResetPageIndex = () => {\n var _ref, _table$options$autoRe;\n if (!registered) {\n table._queue(() => {\n registered = true;\n });\n return;\n }\n if ((_ref = (_table$options$autoRe = table.options.autoResetAll) != null ? _table$options$autoRe : table.options.autoResetPageIndex) != null ? _ref : !table.options.manualPagination) {\n if (queued) return;\n queued = true;\n table._queue(() => {\n table.resetPageIndex();\n queued = false;\n });\n }\n };\n table.setPagination = updater => {\n const safeUpdater = old => {\n let newState = functionalUpdate(updater, old);\n return newState;\n };\n return table.options.onPaginationChange == null ? void 0 : table.options.onPaginationChange(safeUpdater);\n };\n table.resetPagination = defaultState => {\n var _table$initialState$p;\n table.setPagination(defaultState ? getDefaultPaginationState() : (_table$initialState$p = table.initialState.pagination) != null ? _table$initialState$p : getDefaultPaginationState());\n };\n table.setPageIndex = updater => {\n table.setPagination(old => {\n let pageIndex = functionalUpdate(updater, old.pageIndex);\n const maxPageIndex = typeof table.options.pageCount === 'undefined' || table.options.pageCount === -1 ? Number.MAX_SAFE_INTEGER : table.options.pageCount - 1;\n pageIndex = Math.max(0, Math.min(pageIndex, maxPageIndex));\n return {\n ...old,\n pageIndex\n };\n });\n };\n table.resetPageIndex = defaultState => {\n var _table$initialState$p2, _table$initialState;\n table.setPageIndex(defaultState ? defaultPageIndex : (_table$initialState$p2 = (_table$initialState = table.initialState) == null || (_table$initialState = _table$initialState.pagination) == null ? void 0 : _table$initialState.pageIndex) != null ? _table$initialState$p2 : defaultPageIndex);\n };\n table.resetPageSize = defaultState => {\n var _table$initialState$p3, _table$initialState2;\n table.setPageSize(defaultState ? defaultPageSize : (_table$initialState$p3 = (_table$initialState2 = table.initialState) == null || (_table$initialState2 = _table$initialState2.pagination) == null ? void 0 : _table$initialState2.pageSize) != null ? _table$initialState$p3 : defaultPageSize);\n };\n table.setPageSize = updater => {\n table.setPagination(old => {\n const pageSize = Math.max(1, functionalUpdate(updater, old.pageSize));\n const topRowIndex = old.pageSize * old.pageIndex;\n const pageIndex = Math.floor(topRowIndex / pageSize);\n return {\n ...old,\n pageIndex,\n pageSize\n };\n });\n };\n table.setPageCount = updater => table.setPagination(old => {\n var _table$options$pageCo;\n let newPageCount = functionalUpdate(updater, (_table$options$pageCo = table.options.pageCount) != null ? _table$options$pageCo : -1);\n if (typeof newPageCount === 'number') {\n newPageCount = Math.max(-1, newPageCount);\n }\n return {\n ...old,\n pageCount: newPageCount\n };\n });\n table.getPageOptions = memo(() => [table.getPageCount()], pageCount => {\n let pageOptions = [];\n if (pageCount && pageCount > 0) {\n pageOptions = [...new Array(pageCount)].fill(null).map((_, i) => i);\n }\n return pageOptions;\n }, getMemoOptions(table.options, 'debugTable', 'getPageOptions'));\n table.getCanPreviousPage = () => table.getState().pagination.pageIndex > 0;\n table.getCanNextPage = () => {\n const {\n pageIndex\n } = table.getState().pagination;\n const pageCount = table.getPageCount();\n if (pageCount === -1) {\n return true;\n }\n if (pageCount === 0) {\n return false;\n }\n return pageIndex < pageCount - 1;\n };\n table.previousPage = () => {\n return table.setPageIndex(old => old - 1);\n };\n table.nextPage = () => {\n return table.setPageIndex(old => {\n return old + 1;\n });\n };\n table.getPrePaginationRowModel = () => table.getExpandedRowModel();\n table.getPaginationRowModel = () => {\n if (!table._getPaginationRowModel && table.options.getPaginationRowModel) {\n table._getPaginationRowModel = table.options.getPaginationRowModel(table);\n }\n if (table.options.manualPagination || !table._getPaginationRowModel) {\n return table.getPrePaginationRowModel();\n }\n return table._getPaginationRowModel();\n };\n table.getPageCount = () => {\n var _table$options$pageCo2;\n return (_table$options$pageCo2 = table.options.pageCount) != null ? _table$options$pageCo2 : Math.ceil(table.getPrePaginationRowModel().rows.length / table.getState().pagination.pageSize);\n };\n }\n};\n\n//\n\nconst getDefaultColumnPinningState = () => ({\n left: [],\n right: []\n});\nconst getDefaultRowPinningState = () => ({\n top: [],\n bottom: []\n});\nconst Pinning = {\n getInitialState: state => {\n return {\n columnPinning: getDefaultColumnPinningState(),\n rowPinning: getDefaultRowPinningState(),\n ...state\n };\n },\n getDefaultOptions: table => {\n return {\n onColumnPinningChange: makeStateUpdater('columnPinning', table),\n onRowPinningChange: makeStateUpdater('rowPinning', table)\n };\n },\n createColumn: (column, table) => {\n column.pin = position => {\n const columnIds = column.getLeafColumns().map(d => d.id).filter(Boolean);\n table.setColumnPinning(old => {\n var _old$left3, _old$right3;\n if (position === 'right') {\n var _old$left, _old$right;\n return {\n left: ((_old$left = old == null ? void 0 : old.left) != null ? _old$left : []).filter(d => !(columnIds != null && columnIds.includes(d))),\n right: [...((_old$right = old == null ? void 0 : old.right) != null ? _old$right : []).filter(d => !(columnIds != null && columnIds.includes(d))), ...columnIds]\n };\n }\n if (position === 'left') {\n var _old$left2, _old$right2;\n return {\n left: [...((_old$left2 = old == null ? void 0 : old.left) != null ? _old$left2 : []).filter(d => !(columnIds != null && columnIds.includes(d))), ...columnIds],\n right: ((_old$right2 = old == null ? void 0 : old.right) != null ? _old$right2 : []).filter(d => !(columnIds != null && columnIds.includes(d)))\n };\n }\n return {\n left: ((_old$left3 = old == null ? void 0 : old.left) != null ? _old$left3 : []).filter(d => !(columnIds != null && columnIds.includes(d))),\n right: ((_old$right3 = old == null ? void 0 : old.right) != null ? _old$right3 : []).filter(d => !(columnIds != null && columnIds.includes(d)))\n };\n });\n };\n column.getCanPin = () => {\n const leafColumns = column.getLeafColumns();\n return leafColumns.some(d => {\n var _d$columnDef$enablePi, _ref, _table$options$enable;\n return ((_d$columnDef$enablePi = d.columnDef.enablePinning) != null ? _d$columnDef$enablePi : true) && ((_ref = (_table$options$enable = table.options.enableColumnPinning) != null ? _table$options$enable : table.options.enablePinning) != null ? _ref : true);\n });\n };\n column.getIsPinned = () => {\n const leafColumnIds = column.getLeafColumns().map(d => d.id);\n const {\n left,\n right\n } = table.getState().columnPinning;\n const isLeft = leafColumnIds.some(d => left == null ? void 0 : left.includes(d));\n const isRight = leafColumnIds.some(d => right == null ? void 0 : right.includes(d));\n return isLeft ? 'left' : isRight ? 'right' : false;\n };\n column.getPinnedIndex = () => {\n var _table$getState$colum, _table$getState$colum2;\n const position = column.getIsPinned();\n return position ? (_table$getState$colum = (_table$getState$colum2 = table.getState().columnPinning) == null || (_table$getState$colum2 = _table$getState$colum2[position]) == null ? void 0 : _table$getState$colum2.indexOf(column.id)) != null ? _table$getState$colum : -1 : 0;\n };\n },\n createRow: (row, table) => {\n row.pin = (position, includeLeafRows, includeParentRows) => {\n const leafRowIds = includeLeafRows ? row.getLeafRows().map(_ref2 => {\n let {\n id\n } = _ref2;\n return id;\n }) : [];\n const parentRowIds = includeParentRows ? row.getParentRows().map(_ref3 => {\n let {\n id\n } = _ref3;\n return id;\n }) : [];\n const rowIds = new Set([...parentRowIds, row.id, ...leafRowIds]);\n table.setRowPinning(old => {\n var _old$top3, _old$bottom3;\n if (position === 'bottom') {\n var _old$top, _old$bottom;\n return {\n top: ((_old$top = old == null ? void 0 : old.top) != null ? _old$top : []).filter(d => !(rowIds != null && rowIds.has(d))),\n bottom: [...((_old$bottom = old == null ? void 0 : old.bottom) != null ? _old$bottom : []).filter(d => !(rowIds != null && rowIds.has(d))), ...Array.from(rowIds)]\n };\n }\n if (position === 'top') {\n var _old$top2, _old$bottom2;\n return {\n top: [...((_old$top2 = old == null ? void 0 : old.top) != null ? _old$top2 : []).filter(d => !(rowIds != null && rowIds.has(d))), ...Array.from(rowIds)],\n bottom: ((_old$bottom2 = old == null ? void 0 : old.bottom) != null ? _old$bottom2 : []).filter(d => !(rowIds != null && rowIds.has(d)))\n };\n }\n return {\n top: ((_old$top3 = old == null ? void 0 : old.top) != null ? _old$top3 : []).filter(d => !(rowIds != null && rowIds.has(d))),\n bottom: ((_old$bottom3 = old == null ? void 0 : old.bottom) != null ? _old$bottom3 : []).filter(d => !(rowIds != null && rowIds.has(d)))\n };\n });\n };\n row.getCanPin = () => {\n var _ref4;\n const {\n enableRowPinning,\n enablePinning\n } = table.options;\n if (typeof enableRowPinning === 'function') {\n return enableRowPinning(row);\n }\n return (_ref4 = enableRowPinning != null ? enableRowPinning : enablePinning) != null ? _ref4 : true;\n };\n row.getIsPinned = () => {\n const rowIds = [row.id];\n const {\n top,\n bottom\n } = table.getState().rowPinning;\n const isTop = rowIds.some(d => top == null ? void 0 : top.includes(d));\n const isBottom = rowIds.some(d => bottom == null ? void 0 : bottom.includes(d));\n return isTop ? 'top' : isBottom ? 'bottom' : false;\n };\n row.getPinnedIndex = () => {\n var _table$_getPinnedRows, _visiblePinnedRowIds$;\n const position = row.getIsPinned();\n if (!position) return -1;\n const visiblePinnedRowIds = (_table$_getPinnedRows = table._getPinnedRows(position)) == null ? void 0 : _table$_getPinnedRows.map(_ref5 => {\n let {\n id\n } = _ref5;\n return id;\n });\n return (_visiblePinnedRowIds$ = visiblePinnedRowIds == null ? void 0 : visiblePinnedRowIds.indexOf(row.id)) != null ? _visiblePinnedRowIds$ : -1;\n };\n row.getCenterVisibleCells = memo(() => [row._getAllVisibleCells(), table.getState().columnPinning.left, table.getState().columnPinning.right], (allCells, left, right) => {\n const leftAndRight = [...(left != null ? left : []), ...(right != null ? right : [])];\n return allCells.filter(d => !leftAndRight.includes(d.column.id));\n }, getMemoOptions(table.options, 'debugRows', 'getCenterVisibleCells'));\n row.getLeftVisibleCells = memo(() => [row._getAllVisibleCells(), table.getState().columnPinning.left,,], (allCells, left) => {\n const cells = (left != null ? left : []).map(columnId => allCells.find(cell => cell.column.id === columnId)).filter(Boolean).map(d => ({\n ...d,\n position: 'left'\n }));\n return cells;\n }, getMemoOptions(table.options, 'debugRows', 'getLeftVisibleCells'));\n row.getRightVisibleCells = memo(() => [row._getAllVisibleCells(), table.getState().columnPinning.right], (allCells, right) => {\n const cells = (right != null ? right : []).map(columnId => allCells.find(cell => cell.column.id === columnId)).filter(Boolean).map(d => ({\n ...d,\n position: 'right'\n }));\n return cells;\n }, getMemoOptions(table.options, 'debugRows', 'getRightVisibleCells'));\n },\n createTable: table => {\n table.setColumnPinning = updater => table.options.onColumnPinningChange == null ? void 0 : table.options.onColumnPinningChange(updater);\n table.resetColumnPinning = defaultState => {\n var _table$initialState$c, _table$initialState;\n return table.setColumnPinning(defaultState ? getDefaultColumnPinningState() : (_table$initialState$c = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.columnPinning) != null ? _table$initialState$c : getDefaultColumnPinningState());\n };\n table.getIsSomeColumnsPinned = position => {\n var _pinningState$positio;\n const pinningState = table.getState().columnPinning;\n if (!position) {\n var _pinningState$left, _pinningState$right;\n return Boolean(((_pinningState$left = pinningState.left) == null ? void 0 : _pinningState$left.length) || ((_pinningState$right = pinningState.right) == null ? void 0 : _pinningState$right.length));\n }\n return Boolean((_pinningState$positio = pinningState[position]) == null ? void 0 : _pinningState$positio.length);\n };\n table.getLeftLeafColumns = memo(() => [table.getAllLeafColumns(), table.getState().columnPinning.left], (allColumns, left) => {\n return (left != null ? left : []).map(columnId => allColumns.find(column => column.id === columnId)).filter(Boolean);\n }, getMemoOptions(table.options, 'debugColumns', 'getLeftLeafColumns'));\n table.getRightLeafColumns = memo(() => [table.getAllLeafColumns(), table.getState().columnPinning.right], (allColumns, right) => {\n return (right != null ? right : []).map(columnId => allColumns.find(column => column.id === columnId)).filter(Boolean);\n }, getMemoOptions(table.options, 'debugColumns', 'getRightLeafColumns'));\n table.getCenterLeafColumns = memo(() => [table.getAllLeafColumns(), table.getState().columnPinning.left, table.getState().columnPinning.right], (allColumns, left, right) => {\n const leftAndRight = [...(left != null ? left : []), ...(right != null ? right : [])];\n return allColumns.filter(d => !leftAndRight.includes(d.id));\n }, getMemoOptions(table.options, 'debugColumns', 'getCenterLeafColumns'));\n table.setRowPinning = updater => table.options.onRowPinningChange == null ? void 0 : table.options.onRowPinningChange(updater);\n table.resetRowPinning = defaultState => {\n var _table$initialState$r, _table$initialState2;\n return table.setRowPinning(defaultState ? getDefaultRowPinningState() : (_table$initialState$r = (_table$initialState2 = table.initialState) == null ? void 0 : _table$initialState2.rowPinning) != null ? _table$initialState$r : getDefaultRowPinningState());\n };\n table.getIsSomeRowsPinned = position => {\n var _pinningState$positio2;\n const pinningState = table.getState().rowPinning;\n if (!position) {\n var _pinningState$top, _pinningState$bottom;\n return Boolean(((_pinningState$top = pinningState.top) == null ? void 0 : _pinningState$top.length) || ((_pinningState$bottom = pinningState.bottom) == null ? void 0 : _pinningState$bottom.length));\n }\n return Boolean((_pinningState$positio2 = pinningState[position]) == null ? void 0 : _pinningState$positio2.length);\n };\n table._getPinnedRows = memo(position => [table.getRowModel().rows, table.getState().rowPinning[position], position], (visibleRows, pinnedRowIds, position) => {\n var _table$options$keepPi;\n const rows = ((_table$options$keepPi = table.options.keepPinnedRows) != null ? _table$options$keepPi : true) ?\n //get all rows that are pinned even if they would not be otherwise visible\n //account for expanded parent rows, but not pagination or filtering\n (pinnedRowIds != null ? pinnedRowIds : []).map(rowId => {\n const row = table.getRow(rowId, true);\n return row.getIsAllParentsExpanded() ? row : null;\n }) :\n //else get only visible rows that are pinned\n (pinnedRowIds != null ? pinnedRowIds : []).map(rowId => visibleRows.find(row => row.id === rowId));\n return rows.filter(Boolean).map(d => ({\n ...d,\n position\n }));\n }, getMemoOptions(table.options, 'debugRows', '_getPinnedRows'));\n table.getTopRows = () => table._getPinnedRows('top');\n table.getBottomRows = () => table._getPinnedRows('bottom');\n table.getCenterRows = memo(() => [table.getRowModel().rows, table.getState().rowPinning.top, table.getState().rowPinning.bottom], (allRows, top, bottom) => {\n const topAndBottom = new Set([...(top != null ? top : []), ...(bottom != null ? bottom : [])]);\n return allRows.filter(d => !topAndBottom.has(d.id));\n }, getMemoOptions(table.options, 'debugRows', 'getCenterRows'));\n }\n};\n\n//\n\nconst RowSelection = {\n getInitialState: state => {\n return {\n rowSelection: {},\n ...state\n };\n },\n getDefaultOptions: table => {\n return {\n onRowSelectionChange: makeStateUpdater('rowSelection', table),\n enableRowSelection: true,\n enableMultiRowSelection: true,\n enableSubRowSelection: true\n // enableGroupingRowSelection: false,\n // isAdditiveSelectEvent: (e: unknown) => !!e.metaKey,\n // isInclusiveSelectEvent: (e: unknown) => !!e.shiftKey,\n };\n },\n createTable: table => {\n table.setRowSelection = updater => table.options.onRowSelectionChange == null ? void 0 : table.options.onRowSelectionChange(updater);\n table.resetRowSelection = defaultState => {\n var _table$initialState$r;\n return table.setRowSelection(defaultState ? {} : (_table$initialState$r = table.initialState.rowSelection) != null ? _table$initialState$r : {});\n };\n table.toggleAllRowsSelected = value => {\n table.setRowSelection(old => {\n value = typeof value !== 'undefined' ? value : !table.getIsAllRowsSelected();\n const rowSelection = {\n ...old\n };\n const preGroupedFlatRows = table.getPreGroupedRowModel().flatRows;\n\n // We don't use `mutateRowIsSelected` here for performance reasons.\n // All of the rows are flat already, so it wouldn't be worth it\n if (value) {\n preGroupedFlatRows.forEach(row => {\n if (!row.getCanSelect()) {\n return;\n }\n rowSelection[row.id] = true;\n });\n } else {\n preGroupedFlatRows.forEach(row => {\n delete rowSelection[row.id];\n });\n }\n return rowSelection;\n });\n };\n table.toggleAllPageRowsSelected = value => table.setRowSelection(old => {\n const resolvedValue = typeof value !== 'undefined' ? value : !table.getIsAllPageRowsSelected();\n const rowSelection = {\n ...old\n };\n table.getRowModel().rows.forEach(row => {\n mutateRowIsSelected(rowSelection, row.id, resolvedValue, true, table);\n });\n return rowSelection;\n });\n\n // addRowSelectionRange: rowId => {\n // const {\n // rows,\n // rowsById,\n // options: { selectGroupingRows, selectSubRows },\n // } = table\n\n // const findSelectedRow = (rows: Row[]) => {\n // let found\n // rows.find(d => {\n // if (d.getIsSelected()) {\n // found = d\n // return true\n // }\n // const subFound = findSelectedRow(d.subRows || [])\n // if (subFound) {\n // found = subFound\n // return true\n // }\n // return false\n // })\n // return found\n // }\n\n // const firstRow = findSelectedRow(rows) || rows[0]\n // const lastRow = rowsById[rowId]\n\n // let include = false\n // const selectedRowIds = {}\n\n // const addRow = (row: Row) => {\n // mutateRowIsSelected(selectedRowIds, row.id, true, {\n // rowsById,\n // selectGroupingRows: selectGroupingRows!,\n // selectSubRows: selectSubRows!,\n // })\n // }\n\n // table.rows.forEach(row => {\n // const isFirstRow = row.id === firstRow.id\n // const isLastRow = row.id === lastRow.id\n\n // if (isFirstRow || isLastRow) {\n // if (!include) {\n // include = true\n // } else if (include) {\n // addRow(row)\n // include = false\n // }\n // }\n\n // if (include) {\n // addRow(row)\n // }\n // })\n\n // table.setRowSelection(selectedRowIds)\n // },\n table.getPreSelectedRowModel = () => table.getCoreRowModel();\n table.getSelectedRowModel = memo(() => [table.getState().rowSelection, table.getCoreRowModel()], (rowSelection, rowModel) => {\n if (!Object.keys(rowSelection).length) {\n return {\n rows: [],\n flatRows: [],\n rowsById: {}\n };\n }\n return selectRowsFn(table, rowModel);\n }, getMemoOptions(table.options, 'debugTable', 'getSelectedRowModel'));\n table.getFilteredSelectedRowModel = memo(() => [table.getState().rowSelection, table.getFilteredRowModel()], (rowSelection, rowModel) => {\n if (!Object.keys(rowSelection).length) {\n return {\n rows: [],\n flatRows: [],\n rowsById: {}\n };\n }\n return selectRowsFn(table, rowModel);\n }, getMemoOptions(table.options, 'debugTable', 'getFilteredSelectedRowModel'));\n table.getGroupedSelectedRowModel = memo(() => [table.getState().rowSelection, table.getSortedRowModel()], (rowSelection, rowModel) => {\n if (!Object.keys(rowSelection).length) {\n return {\n rows: [],\n flatRows: [],\n rowsById: {}\n };\n }\n return selectRowsFn(table, rowModel);\n }, getMemoOptions(table.options, 'debugTable', 'getGroupedSelectedRowModel'));\n\n ///\n\n // getGroupingRowCanSelect: rowId => {\n // const row = table.getRow(rowId)\n\n // if (!row) {\n // throw new Error()\n // }\n\n // if (typeof table.options.enableGroupingRowSelection === 'function') {\n // return table.options.enableGroupingRowSelection(row)\n // }\n\n // return table.options.enableGroupingRowSelection ?? false\n // },\n\n table.getIsAllRowsSelected = () => {\n const preGroupedFlatRows = table.getFilteredRowModel().flatRows;\n const {\n rowSelection\n } = table.getState();\n let isAllRowsSelected = Boolean(preGroupedFlatRows.length && Object.keys(rowSelection).length);\n if (isAllRowsSelected) {\n if (preGroupedFlatRows.some(row => row.getCanSelect() && !rowSelection[row.id])) {\n isAllRowsSelected = false;\n }\n }\n return isAllRowsSelected;\n };\n table.getIsAllPageRowsSelected = () => {\n const paginationFlatRows = table.getPaginationRowModel().flatRows.filter(row => row.getCanSelect());\n const {\n rowSelection\n } = table.getState();\n let isAllPageRowsSelected = !!paginationFlatRows.length;\n if (isAllPageRowsSelected && paginationFlatRows.some(row => !rowSelection[row.id])) {\n isAllPageRowsSelected = false;\n }\n return isAllPageRowsSelected;\n };\n table.getIsSomeRowsSelected = () => {\n var _table$getState$rowSe;\n const totalSelected = Object.keys((_table$getState$rowSe = table.getState().rowSelection) != null ? _table$getState$rowSe : {}).length;\n return totalSelected > 0 && totalSelected < table.getFilteredRowModel().flatRows.length;\n };\n table.getIsSomePageRowsSelected = () => {\n const paginationFlatRows = table.getPaginationRowModel().flatRows;\n return table.getIsAllPageRowsSelected() ? false : paginationFlatRows.filter(row => row.getCanSelect()).some(d => d.getIsSelected() || d.getIsSomeSelected());\n };\n table.getToggleAllRowsSelectedHandler = () => {\n return e => {\n table.toggleAllRowsSelected(e.target.checked);\n };\n };\n table.getToggleAllPageRowsSelectedHandler = () => {\n return e => {\n table.toggleAllPageRowsSelected(e.target.checked);\n };\n };\n },\n createRow: (row, table) => {\n row.toggleSelected = (value, opts) => {\n const isSelected = row.getIsSelected();\n table.setRowSelection(old => {\n var _opts$selectChildren;\n value = typeof value !== 'undefined' ? value : !isSelected;\n if (row.getCanSelect() && isSelected === value) {\n return old;\n }\n const selectedRowIds = {\n ...old\n };\n mutateRowIsSelected(selectedRowIds, row.id, value, (_opts$selectChildren = opts == null ? void 0 : opts.selectChildren) != null ? _opts$selectChildren : true, table);\n return selectedRowIds;\n });\n };\n row.getIsSelected = () => {\n const {\n rowSelection\n } = table.getState();\n return isRowSelected(row, rowSelection);\n };\n row.getIsSomeSelected = () => {\n const {\n rowSelection\n } = table.getState();\n return isSubRowSelected(row, rowSelection) === 'some';\n };\n row.getIsAllSubRowsSelected = () => {\n const {\n rowSelection\n } = table.getState();\n return isSubRowSelected(row, rowSelection) === 'all';\n };\n row.getCanSelect = () => {\n var _table$options$enable;\n if (typeof table.options.enableRowSelection === 'function') {\n return table.options.enableRowSelection(row);\n }\n return (_table$options$enable = table.options.enableRowSelection) != null ? _table$options$enable : true;\n };\n row.getCanSelectSubRows = () => {\n var _table$options$enable2;\n if (typeof table.options.enableSubRowSelection === 'function') {\n return table.options.enableSubRowSelection(row);\n }\n return (_table$options$enable2 = table.options.enableSubRowSelection) != null ? _table$options$enable2 : true;\n };\n row.getCanMultiSelect = () => {\n var _table$options$enable3;\n if (typeof table.options.enableMultiRowSelection === 'function') {\n return table.options.enableMultiRowSelection(row);\n }\n return (_table$options$enable3 = table.options.enableMultiRowSelection) != null ? _table$options$enable3 : true;\n };\n row.getToggleSelectedHandler = () => {\n const canSelect = row.getCanSelect();\n return e => {\n var _target;\n if (!canSelect) return;\n row.toggleSelected((_target = e.target) == null ? void 0 : _target.checked);\n };\n };\n }\n};\nconst mutateRowIsSelected = (selectedRowIds, id, value, includeChildren, table) => {\n var _row$subRows;\n const row = table.getRow(id, true);\n\n // const isGrouped = row.getIsGrouped()\n\n // if ( // TODO: enforce grouping row selection rules\n // !isGrouped ||\n // (isGrouped && table.options.enableGroupingRowSelection)\n // ) {\n if (value) {\n if (!row.getCanMultiSelect()) {\n Object.keys(selectedRowIds).forEach(key => delete selectedRowIds[key]);\n }\n if (row.getCanSelect()) {\n selectedRowIds[id] = true;\n }\n } else {\n delete selectedRowIds[id];\n }\n // }\n\n if (includeChildren && (_row$subRows = row.subRows) != null && _row$subRows.length && row.getCanSelectSubRows()) {\n row.subRows.forEach(row => mutateRowIsSelected(selectedRowIds, row.id, value, includeChildren, table));\n }\n};\nfunction selectRowsFn(table, rowModel) {\n const rowSelection = table.getState().rowSelection;\n const newSelectedFlatRows = [];\n const newSelectedRowsById = {};\n\n // Filters top level and nested rows\n const recurseRows = function (rows, depth) {\n return rows.map(row => {\n var _row$subRows2;\n const isSelected = isRowSelected(row, rowSelection);\n if (isSelected) {\n newSelectedFlatRows.push(row);\n newSelectedRowsById[row.id] = row;\n }\n if ((_row$subRows2 = row.subRows) != null && _row$subRows2.length) {\n row = {\n ...row,\n subRows: recurseRows(row.subRows)\n };\n }\n if (isSelected) {\n return row;\n }\n }).filter(Boolean);\n };\n return {\n rows: recurseRows(rowModel.rows),\n flatRows: newSelectedFlatRows,\n rowsById: newSelectedRowsById\n };\n}\nfunction isRowSelected(row, selection) {\n var _selection$row$id;\n return (_selection$row$id = selection[row.id]) != null ? _selection$row$id : false;\n}\nfunction isSubRowSelected(row, selection, table) {\n var _row$subRows3;\n if (!((_row$subRows3 = row.subRows) != null && _row$subRows3.length)) return false;\n let allChildrenSelected = true;\n let someSelected = false;\n row.subRows.forEach(subRow => {\n // Bail out early if we know both of these\n if (someSelected && !allChildrenSelected) {\n return;\n }\n if (subRow.getCanSelect()) {\n if (isRowSelected(subRow, selection)) {\n someSelected = true;\n } else {\n allChildrenSelected = false;\n }\n }\n\n // Check row selection of nested subrows\n if (subRow.subRows && subRow.subRows.length) {\n const subRowChildrenSelected = isSubRowSelected(subRow, selection);\n if (subRowChildrenSelected === 'all') {\n someSelected = true;\n } else if (subRowChildrenSelected === 'some') {\n someSelected = true;\n allChildrenSelected = false;\n } else {\n allChildrenSelected = false;\n }\n }\n });\n return allChildrenSelected ? 'all' : someSelected ? 'some' : false;\n}\n\nconst reSplitAlphaNumeric = /([0-9]+)/gm;\nconst alphanumeric = (rowA, rowB, columnId) => {\n return compareAlphanumeric(toString(rowA.getValue(columnId)).toLowerCase(), toString(rowB.getValue(columnId)).toLowerCase());\n};\nconst alphanumericCaseSensitive = (rowA, rowB, columnId) => {\n return compareAlphanumeric(toString(rowA.getValue(columnId)), toString(rowB.getValue(columnId)));\n};\n\n// The text filter is more basic (less numeric support)\n// but is much faster\nconst text = (rowA, rowB, columnId) => {\n return compareBasic(toString(rowA.getValue(columnId)).toLowerCase(), toString(rowB.getValue(columnId)).toLowerCase());\n};\n\n// The text filter is more basic (less numeric support)\n// but is much faster\nconst textCaseSensitive = (rowA, rowB, columnId) => {\n return compareBasic(toString(rowA.getValue(columnId)), toString(rowB.getValue(columnId)));\n};\nconst datetime = (rowA, rowB, columnId) => {\n const a = rowA.getValue(columnId);\n const b = rowB.getValue(columnId);\n\n // Can handle nullish values\n // Use > and < because == (and ===) doesn't work with\n // Date objects (would require calling getTime()).\n return a > b ? 1 : a < b ? -1 : 0;\n};\nconst basic = (rowA, rowB, columnId) => {\n return compareBasic(rowA.getValue(columnId), rowB.getValue(columnId));\n};\n\n// Utils\n\nfunction compareBasic(a, b) {\n return a === b ? 0 : a > b ? 1 : -1;\n}\nfunction toString(a) {\n if (typeof a === 'number') {\n if (isNaN(a) || a === Infinity || a === -Infinity) {\n return '';\n }\n return String(a);\n }\n if (typeof a === 'string') {\n return a;\n }\n return '';\n}\n\n// Mixed sorting is slow, but very inclusive of many edge cases.\n// It handles numbers, mixed alphanumeric combinations, and even\n// null, undefined, and Infinity\nfunction compareAlphanumeric(aStr, bStr) {\n // Split on number groups, but keep the delimiter\n // Then remove falsey split values\n const a = aStr.split(reSplitAlphaNumeric).filter(Boolean);\n const b = bStr.split(reSplitAlphaNumeric).filter(Boolean);\n\n // While\n while (a.length && b.length) {\n const aa = a.shift();\n const bb = b.shift();\n const an = parseInt(aa, 10);\n const bn = parseInt(bb, 10);\n const combo = [an, bn].sort();\n\n // Both are string\n if (isNaN(combo[0])) {\n if (aa > bb) {\n return 1;\n }\n if (bb > aa) {\n return -1;\n }\n continue;\n }\n\n // One is a string, one is a number\n if (isNaN(combo[1])) {\n return isNaN(an) ? -1 : 1;\n }\n\n // Both are numbers\n if (an > bn) {\n return 1;\n }\n if (bn > an) {\n return -1;\n }\n }\n return a.length - b.length;\n}\n\n// Exports\n\nconst sortingFns = {\n alphanumeric,\n alphanumericCaseSensitive,\n text,\n textCaseSensitive,\n datetime,\n basic\n};\n\n//\n\nconst Sorting = {\n getInitialState: state => {\n return {\n sorting: [],\n ...state\n };\n },\n getDefaultColumnDef: () => {\n return {\n sortingFn: 'auto',\n sortUndefined: 1\n };\n },\n getDefaultOptions: table => {\n return {\n onSortingChange: makeStateUpdater('sorting', table),\n isMultiSortEvent: e => {\n return e.shiftKey;\n }\n };\n },\n createColumn: (column, table) => {\n column.getAutoSortingFn = () => {\n const firstRows = table.getFilteredRowModel().flatRows.slice(10);\n let isString = false;\n for (const row of firstRows) {\n const value = row == null ? void 0 : row.getValue(column.id);\n if (Object.prototype.toString.call(value) === '[object Date]') {\n return sortingFns.datetime;\n }\n if (typeof value === 'string') {\n isString = true;\n if (value.split(reSplitAlphaNumeric).length > 1) {\n return sortingFns.alphanumeric;\n }\n }\n }\n if (isString) {\n return sortingFns.text;\n }\n return sortingFns.basic;\n };\n column.getAutoSortDir = () => {\n const firstRow = table.getFilteredRowModel().flatRows[0];\n const value = firstRow == null ? void 0 : firstRow.getValue(column.id);\n if (typeof value === 'string') {\n return 'asc';\n }\n return 'desc';\n };\n column.getSortingFn = () => {\n var _table$options$sortin, _table$options$sortin2;\n if (!column) {\n throw new Error();\n }\n return isFunction(column.columnDef.sortingFn) ? column.columnDef.sortingFn : column.columnDef.sortingFn === 'auto' ? column.getAutoSortingFn() : (_table$options$sortin = (_table$options$sortin2 = table.options.sortingFns) == null ? void 0 : _table$options$sortin2[column.columnDef.sortingFn]) != null ? _table$options$sortin : sortingFns[column.columnDef.sortingFn];\n };\n column.toggleSorting = (desc, multi) => {\n // if (column.columns.length) {\n // column.columns.forEach((c, i) => {\n // if (c.id) {\n // table.toggleColumnSorting(c.id, undefined, multi || !!i)\n // }\n // })\n // return\n // }\n\n // this needs to be outside of table.setSorting to be in sync with rerender\n const nextSortingOrder = column.getNextSortingOrder();\n const hasManualValue = typeof desc !== 'undefined' && desc !== null;\n table.setSorting(old => {\n // Find any existing sorting for this column\n const existingSorting = old == null ? void 0 : old.find(d => d.id === column.id);\n const existingIndex = old == null ? void 0 : old.findIndex(d => d.id === column.id);\n let newSorting = [];\n\n // What should we do with this sort action?\n let sortAction;\n let nextDesc = hasManualValue ? desc : nextSortingOrder === 'desc';\n\n // Multi-mode\n if (old != null && old.length && column.getCanMultiSort() && multi) {\n if (existingSorting) {\n sortAction = 'toggle';\n } else {\n sortAction = 'add';\n }\n } else {\n // Normal mode\n if (old != null && old.length && existingIndex !== old.length - 1) {\n sortAction = 'replace';\n } else if (existingSorting) {\n sortAction = 'toggle';\n } else {\n sortAction = 'replace';\n }\n }\n\n // Handle toggle states that will remove the sorting\n if (sortAction === 'toggle') {\n // If we are \"actually\" toggling (not a manual set value), should we remove the sorting?\n if (!hasManualValue) {\n // Is our intention to remove?\n if (!nextSortingOrder) {\n sortAction = 'remove';\n }\n }\n }\n if (sortAction === 'add') {\n var _table$options$maxMul;\n newSorting = [...old, {\n id: column.id,\n desc: nextDesc\n }];\n // Take latest n columns\n newSorting.splice(0, newSorting.length - ((_table$options$maxMul = table.options.maxMultiSortColCount) != null ? _table$options$maxMul : Number.MAX_SAFE_INTEGER));\n } else if (sortAction === 'toggle') {\n // This flips (or sets) the\n newSorting = old.map(d => {\n if (d.id === column.id) {\n return {\n ...d,\n desc: nextDesc\n };\n }\n return d;\n });\n } else if (sortAction === 'remove') {\n newSorting = old.filter(d => d.id !== column.id);\n } else {\n newSorting = [{\n id: column.id,\n desc: nextDesc\n }];\n }\n return newSorting;\n });\n };\n column.getFirstSortDir = () => {\n var _ref, _column$columnDef$sor;\n const sortDescFirst = (_ref = (_column$columnDef$sor = column.columnDef.sortDescFirst) != null ? _column$columnDef$sor : table.options.sortDescFirst) != null ? _ref : column.getAutoSortDir() === 'desc';\n return sortDescFirst ? 'desc' : 'asc';\n };\n column.getNextSortingOrder = multi => {\n var _table$options$enable, _table$options$enable2;\n const firstSortDirection = column.getFirstSortDir();\n const isSorted = column.getIsSorted();\n if (!isSorted) {\n return firstSortDirection;\n }\n if (isSorted !== firstSortDirection && ((_table$options$enable = table.options.enableSortingRemoval) != null ? _table$options$enable : true) && (\n // If enableSortRemove, enable in general\n multi ? (_table$options$enable2 = table.options.enableMultiRemove) != null ? _table$options$enable2 : true : true) // If multi, don't allow if enableMultiRemove))\n ) {\n return false;\n }\n return isSorted === 'desc' ? 'asc' : 'desc';\n };\n column.getCanSort = () => {\n var _column$columnDef$ena, _table$options$enable3;\n return ((_column$columnDef$ena = column.columnDef.enableSorting) != null ? _column$columnDef$ena : true) && ((_table$options$enable3 = table.options.enableSorting) != null ? _table$options$enable3 : true) && !!column.accessorFn;\n };\n column.getCanMultiSort = () => {\n var _ref2, _column$columnDef$ena2;\n return (_ref2 = (_column$columnDef$ena2 = column.columnDef.enableMultiSort) != null ? _column$columnDef$ena2 : table.options.enableMultiSort) != null ? _ref2 : !!column.accessorFn;\n };\n column.getIsSorted = () => {\n var _table$getState$sorti;\n const columnSort = (_table$getState$sorti = table.getState().sorting) == null ? void 0 : _table$getState$sorti.find(d => d.id === column.id);\n return !columnSort ? false : columnSort.desc ? 'desc' : 'asc';\n };\n column.getSortIndex = () => {\n var _table$getState$sorti2, _table$getState$sorti3;\n return (_table$getState$sorti2 = (_table$getState$sorti3 = table.getState().sorting) == null ? void 0 : _table$getState$sorti3.findIndex(d => d.id === column.id)) != null ? _table$getState$sorti2 : -1;\n };\n column.clearSorting = () => {\n //clear sorting for just 1 column\n table.setSorting(old => old != null && old.length ? old.filter(d => d.id !== column.id) : []);\n };\n column.getToggleSortingHandler = () => {\n const canSort = column.getCanSort();\n return e => {\n if (!canSort) return;\n e.persist == null || e.persist();\n column.toggleSorting == null || column.toggleSorting(undefined, column.getCanMultiSort() ? table.options.isMultiSortEvent == null ? void 0 : table.options.isMultiSortEvent(e) : false);\n };\n };\n },\n createTable: table => {\n table.setSorting = updater => table.options.onSortingChange == null ? void 0 : table.options.onSortingChange(updater);\n table.resetSorting = defaultState => {\n var _table$initialState$s, _table$initialState;\n table.setSorting(defaultState ? [] : (_table$initialState$s = (_table$initialState = table.initialState) == null ? void 0 : _table$initialState.sorting) != null ? _table$initialState$s : []);\n };\n table.getPreSortedRowModel = () => table.getGroupedRowModel();\n table.getSortedRowModel = () => {\n if (!table._getSortedRowModel && table.options.getSortedRowModel) {\n table._getSortedRowModel = table.options.getSortedRowModel(table);\n }\n if (table.options.manualSorting || !table._getSortedRowModel) {\n return table.getPreSortedRowModel();\n }\n return table._getSortedRowModel();\n };\n }\n};\n\n//\n\nconst Visibility = {\n getInitialState: state => {\n return {\n columnVisibility: {},\n ...state\n };\n },\n getDefaultOptions: table => {\n return {\n onColumnVisibilityChange: makeStateUpdater('columnVisibility', table)\n };\n },\n createColumn: (column, table) => {\n column.toggleVisibility = value => {\n if (column.getCanHide()) {\n table.setColumnVisibility(old => ({\n ...old,\n [column.id]: value != null ? value : !column.getIsVisible()\n }));\n }\n };\n column.getIsVisible = () => {\n var _table$getState$colum, _table$getState$colum2;\n return (_table$getState$colum = (_table$getState$colum2 = table.getState().columnVisibility) == null ? void 0 : _table$getState$colum2[column.id]) != null ? _table$getState$colum : true;\n };\n column.getCanHide = () => {\n var _column$columnDef$ena, _table$options$enable;\n return ((_column$columnDef$ena = column.columnDef.enableHiding) != null ? _column$columnDef$ena : true) && ((_table$options$enable = table.options.enableHiding) != null ? _table$options$enable : true);\n };\n column.getToggleVisibilityHandler = () => {\n return e => {\n column.toggleVisibility == null || column.toggleVisibility(e.target.checked);\n };\n };\n },\n createRow: (row, table) => {\n row._getAllVisibleCells = memo(() => [row.getAllCells(), table.getState().columnVisibility], cells => {\n return cells.filter(cell => cell.column.getIsVisible());\n }, getMemoOptions(table.options, 'debugRows', '_getAllVisibleCells'));\n row.getVisibleCells = memo(() => [row.getLeftVisibleCells(), row.getCenterVisibleCells(), row.getRightVisibleCells()], (left, center, right) => [...left, ...center, ...right], getMemoOptions(table.options, 'debugRows', 'getVisibleCells'));\n },\n createTable: table => {\n const makeVisibleColumnsMethod = (key, getColumns) => {\n return memo(() => [getColumns(), getColumns().filter(d => d.getIsVisible()).map(d => d.id).join('_')], columns => {\n return columns.filter(d => d.getIsVisible == null ? void 0 : d.getIsVisible());\n }, getMemoOptions(table.options, 'debugColumns', key));\n };\n table.getVisibleFlatColumns = makeVisibleColumnsMethod('getVisibleFlatColumns', () => table.getAllFlatColumns());\n table.getVisibleLeafColumns = makeVisibleColumnsMethod('getVisibleLeafColumns', () => table.getAllLeafColumns());\n table.getLeftVisibleLeafColumns = makeVisibleColumnsMethod('getLeftVisibleLeafColumns', () => table.getLeftLeafColumns());\n table.getRightVisibleLeafColumns = makeVisibleColumnsMethod('getRightVisibleLeafColumns', () => table.getRightLeafColumns());\n table.getCenterVisibleLeafColumns = makeVisibleColumnsMethod('getCenterVisibleLeafColumns', () => table.getCenterLeafColumns());\n table.setColumnVisibility = updater => table.options.onColumnVisibilityChange == null ? void 0 : table.options.onColumnVisibilityChange(updater);\n table.resetColumnVisibility = defaultState => {\n var _table$initialState$c;\n table.setColumnVisibility(defaultState ? {} : (_table$initialState$c = table.initialState.columnVisibility) != null ? _table$initialState$c : {});\n };\n table.toggleAllColumnsVisible = value => {\n var _value;\n value = (_value = value) != null ? _value : !table.getIsAllColumnsVisible();\n table.setColumnVisibility(table.getAllLeafColumns().reduce((obj, column) => ({\n ...obj,\n [column.id]: !value ? !(column.getCanHide != null && column.getCanHide()) : value\n }), {}));\n };\n table.getIsAllColumnsVisible = () => !table.getAllLeafColumns().some(column => !(column.getIsVisible != null && column.getIsVisible()));\n table.getIsSomeColumnsVisible = () => table.getAllLeafColumns().some(column => column.getIsVisible == null ? void 0 : column.getIsVisible());\n table.getToggleAllColumnsVisibilityHandler = () => {\n return e => {\n var _target;\n table.toggleAllColumnsVisible((_target = e.target) == null ? void 0 : _target.checked);\n };\n };\n }\n};\nfunction _getVisibleLeafColumns(table, position) {\n return !position ? table.getVisibleLeafColumns() : position === 'center' ? table.getCenterVisibleLeafColumns() : position === 'left' ? table.getLeftVisibleLeafColumns() : table.getRightVisibleLeafColumns();\n}\n\nconst features = [Headers, Visibility, Ordering, Pinning, Filters, Sorting, Grouping, Expanding, Pagination, RowSelection, ColumnSizing];\n\n//\n\nfunction createTable(options) {\n var _options$initialState;\n if (options.debugAll || options.debugTable) {\n console.info('Creating Table Instance...');\n }\n let table = {\n _features: features\n };\n const defaultOptions = table._features.reduce((obj, feature) => {\n return Object.assign(obj, feature.getDefaultOptions == null ? void 0 : feature.getDefaultOptions(table));\n }, {});\n const mergeOptions = options => {\n if (table.options.mergeOptions) {\n return table.options.mergeOptions(defaultOptions, options);\n }\n return {\n ...defaultOptions,\n ...options\n };\n };\n const coreInitialState = {};\n let initialState = {\n ...coreInitialState,\n ...((_options$initialState = options.initialState) != null ? _options$initialState : {})\n };\n table._features.forEach(feature => {\n var _feature$getInitialSt;\n initialState = (_feature$getInitialSt = feature.getInitialState == null ? void 0 : feature.getInitialState(initialState)) != null ? _feature$getInitialSt : initialState;\n });\n const queued = [];\n let queuedTimeout = false;\n const coreInstance = {\n _features: features,\n options: {\n ...defaultOptions,\n ...options\n },\n initialState,\n _queue: cb => {\n queued.push(cb);\n if (!queuedTimeout) {\n queuedTimeout = true;\n\n // Schedule a microtask to run the queued callbacks after\n // the current call stack (render, etc) has finished.\n Promise.resolve().then(() => {\n while (queued.length) {\n queued.shift()();\n }\n queuedTimeout = false;\n }).catch(error => setTimeout(() => {\n throw error;\n }));\n }\n },\n reset: () => {\n table.setState(table.initialState);\n },\n setOptions: updater => {\n const newOptions = functionalUpdate(updater, table.options);\n table.options = mergeOptions(newOptions);\n },\n getState: () => {\n return table.options.state;\n },\n setState: updater => {\n table.options.onStateChange == null || table.options.onStateChange(updater);\n },\n _getRowId: (row, index, parent) => {\n var _table$options$getRow;\n return (_table$options$getRow = table.options.getRowId == null ? void 0 : table.options.getRowId(row, index, parent)) != null ? _table$options$getRow : `${parent ? [parent.id, index].join('.') : index}`;\n },\n getCoreRowModel: () => {\n if (!table._getCoreRowModel) {\n table._getCoreRowModel = table.options.getCoreRowModel(table);\n }\n return table._getCoreRowModel();\n },\n // The final calls start at the bottom of the model,\n // expanded rows, which then work their way up\n\n getRowModel: () => {\n return table.getPaginationRowModel();\n },\n //in next version, we should just pass in the row model as the optional 2nd arg\n getRow: (id, searchAll) => {\n let row = (searchAll ? table.getPrePaginationRowModel() : table.getRowModel()).rowsById[id];\n if (!row) {\n row = table.getCoreRowModel().rowsById[id];\n if (!row) {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error(`getRow could not find row with ID: ${id}`);\n }\n throw new Error();\n }\n }\n return row;\n },\n _getDefaultColumnDef: memo(() => [table.options.defaultColumn], defaultColumn => {\n var _defaultColumn;\n defaultColumn = (_defaultColumn = defaultColumn) != null ? _defaultColumn : {};\n return {\n header: props => {\n const resolvedColumnDef = props.header.column.columnDef;\n if (resolvedColumnDef.accessorKey) {\n return resolvedColumnDef.accessorKey;\n }\n if (resolvedColumnDef.accessorFn) {\n return resolvedColumnDef.id;\n }\n return null;\n },\n // footer: props => props.header.column.id,\n cell: props => {\n var _props$renderValue$to, _props$renderValue;\n return (_props$renderValue$to = (_props$renderValue = props.renderValue()) == null || _props$renderValue.toString == null ? void 0 : _props$renderValue.toString()) != null ? _props$renderValue$to : null;\n },\n ...table._features.reduce((obj, feature) => {\n return Object.assign(obj, feature.getDefaultColumnDef == null ? void 0 : feature.getDefaultColumnDef());\n }, {}),\n ...defaultColumn\n };\n }, getMemoOptions(options, 'debugColumns', '_getDefaultColumnDef')),\n _getColumnDefs: () => table.options.columns,\n getAllColumns: memo(() => [table._getColumnDefs()], columnDefs => {\n const recurseColumns = function (columnDefs, parent, depth) {\n if (depth === void 0) {\n depth = 0;\n }\n return columnDefs.map(columnDef => {\n const column = createColumn(table, columnDef, depth, parent);\n const groupingColumnDef = columnDef;\n column.columns = groupingColumnDef.columns ? recurseColumns(groupingColumnDef.columns, column, depth + 1) : [];\n return column;\n });\n };\n return recurseColumns(columnDefs);\n }, getMemoOptions(options, 'debugColumns', 'getAllColumns')),\n getAllFlatColumns: memo(() => [table.getAllColumns()], allColumns => {\n return allColumns.flatMap(column => {\n return column.getFlatColumns();\n });\n }, getMemoOptions(options, 'debugColumns', 'getAllFlatColumns')),\n _getAllFlatColumnsById: memo(() => [table.getAllFlatColumns()], flatColumns => {\n return flatColumns.reduce((acc, column) => {\n acc[column.id] = column;\n return acc;\n }, {});\n }, getMemoOptions(options, 'debugColumns', 'getAllFlatColumnsById')),\n getAllLeafColumns: memo(() => [table.getAllColumns(), table._getOrderColumnsFn()], (allColumns, orderColumns) => {\n let leafColumns = allColumns.flatMap(column => column.getLeafColumns());\n return orderColumns(leafColumns);\n }, getMemoOptions(options, 'debugColumns', 'getAllLeafColumns')),\n getColumn: columnId => {\n const column = table._getAllFlatColumnsById()[columnId];\n if (process.env.NODE_ENV !== 'production' && !column) {\n console.error(`[Table] Column with id '${columnId}' does not exist.`);\n }\n return column;\n }\n };\n Object.assign(table, coreInstance);\n for (let index = 0; index < table._features.length; index++) {\n const feature = table._features[index];\n feature == null || feature.createTable == null || feature.createTable(table);\n }\n return table;\n}\n\nfunction createCell(table, row, column, columnId) {\n const getRenderValue = () => {\n var _cell$getValue;\n return (_cell$getValue = cell.getValue()) != null ? _cell$getValue : table.options.renderFallbackValue;\n };\n const cell = {\n id: `${row.id}_${column.id}`,\n row,\n column,\n getValue: () => row.getValue(columnId),\n renderValue: getRenderValue,\n getContext: memo(() => [table, column, row, cell], (table, column, row, cell) => ({\n table,\n column,\n row,\n cell: cell,\n getValue: cell.getValue,\n renderValue: cell.renderValue\n }), getMemoOptions(table.options, 'debugCells', 'cell.getContext'))\n };\n table._features.forEach(feature => {\n feature.createCell == null || feature.createCell(cell, column, row, table);\n }, {});\n return cell;\n}\n\nconst createRow = (table, id, original, rowIndex, depth, subRows, parentId) => {\n let row = {\n id,\n index: rowIndex,\n original,\n depth,\n parentId,\n _valuesCache: {},\n _uniqueValuesCache: {},\n getValue: columnId => {\n if (row._valuesCache.hasOwnProperty(columnId)) {\n return row._valuesCache[columnId];\n }\n const column = table.getColumn(columnId);\n if (!(column != null && column.accessorFn)) {\n return undefined;\n }\n row._valuesCache[columnId] = column.accessorFn(row.original, rowIndex);\n return row._valuesCache[columnId];\n },\n getUniqueValues: columnId => {\n if (row._uniqueValuesCache.hasOwnProperty(columnId)) {\n return row._uniqueValuesCache[columnId];\n }\n const column = table.getColumn(columnId);\n if (!(column != null && column.accessorFn)) {\n return undefined;\n }\n if (!column.columnDef.getUniqueValues) {\n row._uniqueValuesCache[columnId] = [row.getValue(columnId)];\n return row._uniqueValuesCache[columnId];\n }\n row._uniqueValuesCache[columnId] = column.columnDef.getUniqueValues(row.original, rowIndex);\n return row._uniqueValuesCache[columnId];\n },\n renderValue: columnId => {\n var _row$getValue;\n return (_row$getValue = row.getValue(columnId)) != null ? _row$getValue : table.options.renderFallbackValue;\n },\n subRows: subRows != null ? subRows : [],\n getLeafRows: () => flattenBy(row.subRows, d => d.subRows),\n getParentRow: () => row.parentId ? table.getRow(row.parentId, true) : undefined,\n getParentRows: () => {\n let parentRows = [];\n let currentRow = row;\n while (true) {\n const parentRow = currentRow.getParentRow();\n if (!parentRow) break;\n parentRows.push(parentRow);\n currentRow = parentRow;\n }\n return parentRows.reverse();\n },\n getAllCells: memo(() => [table.getAllLeafColumns()], leafColumns => {\n return leafColumns.map(column => {\n return createCell(table, row, column, column.id);\n });\n }, getMemoOptions(table.options, 'debugRows', 'getAllCells')),\n _getAllCellsByColumnId: memo(() => [row.getAllCells()], allCells => {\n return allCells.reduce((acc, cell) => {\n acc[cell.column.id] = cell;\n return acc;\n }, {});\n }, getMemoOptions(table.options, 'debugRows', 'getAllCellsByColumnId'))\n };\n for (let i = 0; i < table._features.length; i++) {\n const feature = table._features[i];\n feature == null || feature.createRow == null || feature.createRow(row, table);\n }\n return row;\n};\n\n// type Person = {\n// firstName: string\n// lastName: string\n// age: number\n// visits: number\n// status: string\n// progress: number\n// createdAt: Date\n// nested: {\n// foo: [\n// {\n// bar: 'bar'\n// }\n// ]\n// bar: { subBar: boolean }[]\n// baz: {\n// foo: 'foo'\n// bar: {\n// baz: 'baz'\n// }\n// }\n// }\n// }\n\n// const test: DeepKeys = 'nested.foo.0.bar'\n// const test2: DeepKeys = 'nested.bar'\n\n// const helper = createColumnHelper()\n\n// helper.accessor('nested.foo', {\n// cell: info => info.getValue(),\n// })\n\n// helper.accessor('nested.foo.0.bar', {\n// cell: info => info.getValue(),\n// })\n\n// helper.accessor('nested.bar', {\n// cell: info => info.getValue(),\n// })\n\nfunction createColumnHelper() {\n return {\n accessor: (accessor, column) => {\n return typeof accessor === 'function' ? {\n ...column,\n accessorFn: accessor\n } : {\n ...column,\n accessorKey: accessor\n };\n },\n display: column => column,\n group: column => column\n };\n}\n\nfunction getCoreRowModel() {\n return table => memo(() => [table.options.data], data => {\n const rowModel = {\n rows: [],\n flatRows: [],\n rowsById: {}\n };\n const accessRows = function (originalRows, depth, parentRow) {\n if (depth === void 0) {\n depth = 0;\n }\n const rows = [];\n for (let i = 0; i < originalRows.length; i++) {\n // This could be an expensive check at scale, so we should move it somewhere else, but where?\n // if (!id) {\n // if (process.env.NODE_ENV !== 'production') {\n // throw new Error(`getRowId expected an ID, but got ${id}`)\n // }\n // }\n\n // Make the row\n const row = createRow(table, table._getRowId(originalRows[i], i, parentRow), originalRows[i], i, depth, undefined, parentRow == null ? void 0 : parentRow.id);\n\n // Keep track of every row in a flat array\n rowModel.flatRows.push(row);\n // Also keep track of every row by its ID\n rowModel.rowsById[row.id] = row;\n // Push table row into parent\n rows.push(row);\n\n // Get the original subrows\n if (table.options.getSubRows) {\n var _row$originalSubRows;\n row.originalSubRows = table.options.getSubRows(originalRows[i], i);\n\n // Then recursively access them\n if ((_row$originalSubRows = row.originalSubRows) != null && _row$originalSubRows.length) {\n row.subRows = accessRows(row.originalSubRows, depth + 1, row);\n }\n }\n }\n return rows;\n };\n rowModel.rows = accessRows(data);\n return rowModel;\n }, getMemoOptions(table.options, 'debugTable', 'getRowModel', () => table._autoResetPageIndex()));\n}\n\nfunction filterRows(rows, filterRowImpl, table) {\n if (table.options.filterFromLeafRows) {\n return filterRowModelFromLeafs(rows, filterRowImpl, table);\n }\n return filterRowModelFromRoot(rows, filterRowImpl, table);\n}\nfunction filterRowModelFromLeafs(rowsToFilter, filterRow, table) {\n var _table$options$maxLea;\n const newFilteredFlatRows = [];\n const newFilteredRowsById = {};\n const maxDepth = (_table$options$maxLea = table.options.maxLeafRowFilterDepth) != null ? _table$options$maxLea : 100;\n const recurseFilterRows = function (rowsToFilter, depth) {\n if (depth === void 0) {\n depth = 0;\n }\n const rows = [];\n\n // Filter from children up first\n for (let i = 0; i < rowsToFilter.length; i++) {\n var _row$subRows;\n let row = rowsToFilter[i];\n const newRow = createRow(table, row.id, row.original, row.index, row.depth, undefined, row.parentId);\n newRow.columnFilters = row.columnFilters;\n if ((_row$subRows = row.subRows) != null && _row$subRows.length && depth < maxDepth) {\n newRow.subRows = recurseFilterRows(row.subRows, depth + 1);\n row = newRow;\n if (filterRow(row) && !newRow.subRows.length) {\n rows.push(row);\n newFilteredRowsById[row.id] = row;\n newFilteredFlatRows.push(row);\n continue;\n }\n if (filterRow(row) || newRow.subRows.length) {\n rows.push(row);\n newFilteredRowsById[row.id] = row;\n newFilteredFlatRows.push(row);\n continue;\n }\n } else {\n row = newRow;\n if (filterRow(row)) {\n rows.push(row);\n newFilteredRowsById[row.id] = row;\n newFilteredFlatRows.push(row);\n }\n }\n }\n return rows;\n };\n return {\n rows: recurseFilterRows(rowsToFilter),\n flatRows: newFilteredFlatRows,\n rowsById: newFilteredRowsById\n };\n}\nfunction filterRowModelFromRoot(rowsToFilter, filterRow, table) {\n var _table$options$maxLea2;\n const newFilteredFlatRows = [];\n const newFilteredRowsById = {};\n const maxDepth = (_table$options$maxLea2 = table.options.maxLeafRowFilterDepth) != null ? _table$options$maxLea2 : 100;\n\n // Filters top level and nested rows\n const recurseFilterRows = function (rowsToFilter, depth) {\n if (depth === void 0) {\n depth = 0;\n }\n // Filter from parents downward first\n\n const rows = [];\n\n // Apply the filter to any subRows\n for (let i = 0; i < rowsToFilter.length; i++) {\n let row = rowsToFilter[i];\n const pass = filterRow(row);\n if (pass) {\n var _row$subRows2;\n if ((_row$subRows2 = row.subRows) != null && _row$subRows2.length && depth < maxDepth) {\n const newRow = createRow(table, row.id, row.original, row.index, row.depth, undefined, row.parentId);\n newRow.subRows = recurseFilterRows(row.subRows, depth + 1);\n row = newRow;\n }\n rows.push(row);\n newFilteredFlatRows.push(row);\n newFilteredRowsById[row.id] = row;\n }\n }\n return rows;\n };\n return {\n rows: recurseFilterRows(rowsToFilter),\n flatRows: newFilteredFlatRows,\n rowsById: newFilteredRowsById\n };\n}\n\nfunction getFilteredRowModel() {\n return table => memo(() => [table.getPreFilteredRowModel(), table.getState().columnFilters, table.getState().globalFilter], (rowModel, columnFilters, globalFilter) => {\n if (!rowModel.rows.length || !(columnFilters != null && columnFilters.length) && !globalFilter) {\n for (let i = 0; i < rowModel.flatRows.length; i++) {\n rowModel.flatRows[i].columnFilters = {};\n rowModel.flatRows[i].columnFiltersMeta = {};\n }\n return rowModel;\n }\n const resolvedColumnFilters = [];\n const resolvedGlobalFilters = [];\n (columnFilters != null ? columnFilters : []).forEach(d => {\n var _filterFn$resolveFilt;\n const column = table.getColumn(d.id);\n if (!column) {\n return;\n }\n const filterFn = column.getFilterFn();\n if (!filterFn) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${column.id}.`);\n }\n return;\n }\n resolvedColumnFilters.push({\n id: d.id,\n filterFn,\n resolvedValue: (_filterFn$resolveFilt = filterFn.resolveFilterValue == null ? void 0 : filterFn.resolveFilterValue(d.value)) != null ? _filterFn$resolveFilt : d.value\n });\n });\n const filterableIds = columnFilters.map(d => d.id);\n const globalFilterFn = table.getGlobalFilterFn();\n const globallyFilterableColumns = table.getAllLeafColumns().filter(column => column.getCanGlobalFilter());\n if (globalFilter && globalFilterFn && globallyFilterableColumns.length) {\n filterableIds.push('__global__');\n globallyFilterableColumns.forEach(column => {\n var _globalFilterFn$resol;\n resolvedGlobalFilters.push({\n id: column.id,\n filterFn: globalFilterFn,\n resolvedValue: (_globalFilterFn$resol = globalFilterFn.resolveFilterValue == null ? void 0 : globalFilterFn.resolveFilterValue(globalFilter)) != null ? _globalFilterFn$resol : globalFilter\n });\n });\n }\n let currentColumnFilter;\n let currentGlobalFilter;\n\n // Flag the prefiltered row model with each filter state\n for (let j = 0; j < rowModel.flatRows.length; j++) {\n const row = rowModel.flatRows[j];\n row.columnFilters = {};\n if (resolvedColumnFilters.length) {\n for (let i = 0; i < resolvedColumnFilters.length; i++) {\n currentColumnFilter = resolvedColumnFilters[i];\n const id = currentColumnFilter.id;\n\n // Tag the row with the column filter state\n row.columnFilters[id] = currentColumnFilter.filterFn(row, id, currentColumnFilter.resolvedValue, filterMeta => {\n row.columnFiltersMeta[id] = filterMeta;\n });\n }\n }\n if (resolvedGlobalFilters.length) {\n for (let i = 0; i < resolvedGlobalFilters.length; i++) {\n currentGlobalFilter = resolvedGlobalFilters[i];\n const id = currentGlobalFilter.id;\n // Tag the row with the first truthy global filter state\n if (currentGlobalFilter.filterFn(row, id, currentGlobalFilter.resolvedValue, filterMeta => {\n row.columnFiltersMeta[id] = filterMeta;\n })) {\n row.columnFilters.__global__ = true;\n break;\n }\n }\n if (row.columnFilters.__global__ !== true) {\n row.columnFilters.__global__ = false;\n }\n }\n }\n const filterRowsImpl = row => {\n // Horizontally filter rows through each column\n for (let i = 0; i < filterableIds.length; i++) {\n if (row.columnFilters[filterableIds[i]] === false) {\n return false;\n }\n }\n return true;\n };\n\n // Filter final rows using all of the active filters\n return filterRows(rowModel.rows, filterRowsImpl, table);\n }, getMemoOptions(table.options, 'debugTable', 'getFilteredRowModel', () => table._autoResetPageIndex()));\n}\n\nfunction getFacetedRowModel() {\n return (table, columnId) => memo(() => [table.getPreFilteredRowModel(), table.getState().columnFilters, table.getState().globalFilter, table.getFilteredRowModel()], (preRowModel, columnFilters, globalFilter) => {\n if (!preRowModel.rows.length || !(columnFilters != null && columnFilters.length) && !globalFilter) {\n return preRowModel;\n }\n const filterableIds = [...columnFilters.map(d => d.id).filter(d => d !== columnId), globalFilter ? '__global__' : undefined].filter(Boolean);\n const filterRowsImpl = row => {\n // Horizontally filter rows through each column\n for (let i = 0; i < filterableIds.length; i++) {\n if (row.columnFilters[filterableIds[i]] === false) {\n return false;\n }\n }\n return true;\n };\n return filterRows(preRowModel.rows, filterRowsImpl, table);\n }, getMemoOptions(table.options, 'debugTable', 'getFacetedRowModel'));\n}\n\nfunction getFacetedUniqueValues() {\n return (table, columnId) => memo(() => {\n var _table$getColumn;\n return [(_table$getColumn = table.getColumn(columnId)) == null ? void 0 : _table$getColumn.getFacetedRowModel()];\n }, facetedRowModel => {\n if (!facetedRowModel) return new Map();\n let facetedUniqueValues = new Map();\n for (let i = 0; i < facetedRowModel.flatRows.length; i++) {\n const values = facetedRowModel.flatRows[i].getUniqueValues(columnId);\n for (let j = 0; j < values.length; j++) {\n const value = values[j];\n if (facetedUniqueValues.has(value)) {\n var _facetedUniqueValues$;\n facetedUniqueValues.set(value, ((_facetedUniqueValues$ = facetedUniqueValues.get(value)) != null ? _facetedUniqueValues$ : 0) + 1);\n } else {\n facetedUniqueValues.set(value, 1);\n }\n }\n }\n return facetedUniqueValues;\n }, getMemoOptions(table.options, 'debugTable', `getFacetedUniqueValues_${columnId}`));\n}\n\nfunction getFacetedMinMaxValues() {\n return (table, columnId) => memo(() => {\n var _table$getColumn;\n return [(_table$getColumn = table.getColumn(columnId)) == null ? void 0 : _table$getColumn.getFacetedRowModel()];\n }, facetedRowModel => {\n var _facetedRowModel$flat;\n if (!facetedRowModel) return undefined;\n const firstValue = (_facetedRowModel$flat = facetedRowModel.flatRows[0]) == null ? void 0 : _facetedRowModel$flat.getUniqueValues(columnId);\n if (typeof firstValue === 'undefined') {\n return undefined;\n }\n let facetedMinMaxValues = [firstValue, firstValue];\n for (let i = 0; i < facetedRowModel.flatRows.length; i++) {\n const values = facetedRowModel.flatRows[i].getUniqueValues(columnId);\n for (let j = 0; j < values.length; j++) {\n const value = values[j];\n if (value < facetedMinMaxValues[0]) {\n facetedMinMaxValues[0] = value;\n } else if (value > facetedMinMaxValues[1]) {\n facetedMinMaxValues[1] = value;\n }\n }\n }\n return facetedMinMaxValues;\n }, getMemoOptions(table.options, 'debugTable', 'getFacetedMinMaxValues'));\n}\n\nfunction getSortedRowModel() {\n return table => memo(() => [table.getState().sorting, table.getPreSortedRowModel()], (sorting, rowModel) => {\n if (!rowModel.rows.length || !(sorting != null && sorting.length)) {\n return rowModel;\n }\n const sortingState = table.getState().sorting;\n const sortedFlatRows = [];\n\n // Filter out sortings that correspond to non existing columns\n const availableSorting = sortingState.filter(sort => {\n var _table$getColumn;\n return (_table$getColumn = table.getColumn(sort.id)) == null ? void 0 : _table$getColumn.getCanSort();\n });\n const columnInfoById = {};\n availableSorting.forEach(sortEntry => {\n const column = table.getColumn(sortEntry.id);\n if (!column) return;\n columnInfoById[sortEntry.id] = {\n sortUndefined: column.columnDef.sortUndefined,\n invertSorting: column.columnDef.invertSorting,\n sortingFn: column.getSortingFn()\n };\n });\n const sortData = rows => {\n // This will also perform a stable sorting using the row index\n // if needed.\n const sortedData = rows.map(row => ({\n ...row\n }));\n sortedData.sort((rowA, rowB) => {\n for (let i = 0; i < availableSorting.length; i += 1) {\n var _sortEntry$desc;\n const sortEntry = availableSorting[i];\n const columnInfo = columnInfoById[sortEntry.id];\n const isDesc = (_sortEntry$desc = sortEntry == null ? void 0 : sortEntry.desc) != null ? _sortEntry$desc : false;\n let sortInt = 0;\n\n // All sorting ints should always return in ascending order\n if (columnInfo.sortUndefined) {\n const aValue = rowA.getValue(sortEntry.id);\n const bValue = rowB.getValue(sortEntry.id);\n const aUndefined = aValue === undefined;\n const bUndefined = bValue === undefined;\n if (aUndefined || bUndefined) {\n sortInt = aUndefined && bUndefined ? 0 : aUndefined ? columnInfo.sortUndefined : -columnInfo.sortUndefined;\n }\n }\n if (sortInt === 0) {\n sortInt = columnInfo.sortingFn(rowA, rowB, sortEntry.id);\n }\n\n // If sorting is non-zero, take care of desc and inversion\n if (sortInt !== 0) {\n if (isDesc) {\n sortInt *= -1;\n }\n if (columnInfo.invertSorting) {\n sortInt *= -1;\n }\n return sortInt;\n }\n }\n return rowA.index - rowB.index;\n });\n\n // If there are sub-rows, sort them\n sortedData.forEach(row => {\n var _row$subRows;\n sortedFlatRows.push(row);\n if ((_row$subRows = row.subRows) != null && _row$subRows.length) {\n row.subRows = sortData(row.subRows);\n }\n });\n return sortedData;\n };\n return {\n rows: sortData(rowModel.rows),\n flatRows: sortedFlatRows,\n rowsById: rowModel.rowsById\n };\n }, getMemoOptions(table.options, 'debugTable', 'getSortedRowModel', () => table._autoResetPageIndex()));\n}\n\nfunction getGroupedRowModel() {\n return table => memo(() => [table.getState().grouping, table.getPreGroupedRowModel()], (grouping, rowModel) => {\n if (!rowModel.rows.length || !grouping.length) {\n return rowModel;\n }\n\n // Filter the grouping list down to columns that exist\n const existingGrouping = grouping.filter(columnId => table.getColumn(columnId));\n const groupedFlatRows = [];\n const groupedRowsById = {};\n // const onlyGroupedFlatRows: Row[] = [];\n // const onlyGroupedRowsById: Record = {};\n // const nonGroupedFlatRows: Row[] = [];\n // const nonGroupedRowsById: Record = {};\n\n // Recursively group the data\n const groupUpRecursively = function (rows, depth, parentId) {\n if (depth === void 0) {\n depth = 0;\n }\n // Grouping depth has been been met\n // Stop grouping and simply rewrite thd depth and row relationships\n if (depth >= existingGrouping.length) {\n return rows.map(row => {\n row.depth = depth;\n groupedFlatRows.push(row);\n groupedRowsById[row.id] = row;\n if (row.subRows) {\n row.subRows = groupUpRecursively(row.subRows, depth + 1, row.id);\n }\n return row;\n });\n }\n const columnId = existingGrouping[depth];\n\n // Group the rows together for this level\n const rowGroupsMap = groupBy(rows, columnId);\n\n // Peform aggregations for each group\n const aggregatedGroupedRows = Array.from(rowGroupsMap.entries()).map((_ref, index) => {\n let [groupingValue, groupedRows] = _ref;\n let id = `${columnId}:${groupingValue}`;\n id = parentId ? `${parentId}>${id}` : id;\n\n // First, Recurse to group sub rows before aggregation\n const subRows = groupUpRecursively(groupedRows, depth + 1, id);\n\n // Flatten the leaf rows of the rows in this group\n const leafRows = depth ? flattenBy(groupedRows, row => row.subRows) : groupedRows;\n const row = createRow(table, id, leafRows[0].original, index, depth, undefined, parentId);\n Object.assign(row, {\n groupingColumnId: columnId,\n groupingValue,\n subRows,\n leafRows,\n getValue: columnId => {\n // Don't aggregate columns that are in the grouping\n if (existingGrouping.includes(columnId)) {\n if (row._valuesCache.hasOwnProperty(columnId)) {\n return row._valuesCache[columnId];\n }\n if (groupedRows[0]) {\n var _groupedRows$0$getVal;\n row._valuesCache[columnId] = (_groupedRows$0$getVal = groupedRows[0].getValue(columnId)) != null ? _groupedRows$0$getVal : undefined;\n }\n return row._valuesCache[columnId];\n }\n if (row._groupingValuesCache.hasOwnProperty(columnId)) {\n return row._groupingValuesCache[columnId];\n }\n\n // Aggregate the values\n const column = table.getColumn(columnId);\n const aggregateFn = column == null ? void 0 : column.getAggregationFn();\n if (aggregateFn) {\n row._groupingValuesCache[columnId] = aggregateFn(columnId, leafRows, groupedRows);\n return row._groupingValuesCache[columnId];\n }\n }\n });\n subRows.forEach(subRow => {\n groupedFlatRows.push(subRow);\n groupedRowsById[subRow.id] = subRow;\n // if (subRow.getIsGrouped?.()) {\n // onlyGroupedFlatRows.push(subRow);\n // onlyGroupedRowsById[subRow.id] = subRow;\n // } else {\n // nonGroupedFlatRows.push(subRow);\n // nonGroupedRowsById[subRow.id] = subRow;\n // }\n });\n return row;\n });\n return aggregatedGroupedRows;\n };\n const groupedRows = groupUpRecursively(rowModel.rows, 0);\n groupedRows.forEach(subRow => {\n groupedFlatRows.push(subRow);\n groupedRowsById[subRow.id] = subRow;\n // if (subRow.getIsGrouped?.()) {\n // onlyGroupedFlatRows.push(subRow);\n // onlyGroupedRowsById[subRow.id] = subRow;\n // } else {\n // nonGroupedFlatRows.push(subRow);\n // nonGroupedRowsById[subRow.id] = subRow;\n // }\n });\n return {\n rows: groupedRows,\n flatRows: groupedFlatRows,\n rowsById: groupedRowsById\n };\n }, getMemoOptions(table.options, 'debugTable', 'getGroupedRowModel', () => {\n table._queue(() => {\n table._autoResetExpanded();\n table._autoResetPageIndex();\n });\n }));\n}\nfunction groupBy(rows, columnId) {\n const groupMap = new Map();\n return rows.reduce((map, row) => {\n const resKey = `${row.getGroupingValue(columnId)}`;\n const previous = map.get(resKey);\n if (!previous) {\n map.set(resKey, [row]);\n } else {\n previous.push(row);\n }\n return map;\n }, groupMap);\n}\n\nfunction getExpandedRowModel() {\n return table => memo(() => [table.getState().expanded, table.getPreExpandedRowModel(), table.options.paginateExpandedRows], (expanded, rowModel, paginateExpandedRows) => {\n if (!rowModel.rows.length || expanded !== true && !Object.keys(expanded != null ? expanded : {}).length) {\n return rowModel;\n }\n if (!paginateExpandedRows) {\n // Only expand rows at this point if they are being paginated\n return rowModel;\n }\n return expandRows(rowModel);\n }, getMemoOptions(table.options, 'debugTable', 'getExpandedRowModel'));\n}\nfunction expandRows(rowModel) {\n const expandedRows = [];\n const handleRow = row => {\n var _row$subRows;\n expandedRows.push(row);\n if ((_row$subRows = row.subRows) != null && _row$subRows.length && row.getIsExpanded()) {\n row.subRows.forEach(handleRow);\n }\n };\n rowModel.rows.forEach(handleRow);\n return {\n rows: expandedRows,\n flatRows: rowModel.flatRows,\n rowsById: rowModel.rowsById\n };\n}\n\nfunction getPaginationRowModel(opts) {\n return table => memo(() => [table.getState().pagination, table.getPrePaginationRowModel(), table.options.paginateExpandedRows ? undefined : table.getState().expanded], (pagination, rowModel) => {\n if (!rowModel.rows.length) {\n return rowModel;\n }\n const {\n pageSize,\n pageIndex\n } = pagination;\n let {\n rows,\n flatRows,\n rowsById\n } = rowModel;\n const pageStart = pageSize * pageIndex;\n const pageEnd = pageStart + pageSize;\n rows = rows.slice(pageStart, pageEnd);\n let paginatedRowModel;\n if (!table.options.paginateExpandedRows) {\n paginatedRowModel = expandRows({\n rows,\n flatRows,\n rowsById\n });\n } else {\n paginatedRowModel = {\n rows,\n flatRows,\n rowsById\n };\n }\n paginatedRowModel.flatRows = [];\n const handleRow = row => {\n paginatedRowModel.flatRows.push(row);\n if (row.subRows.length) {\n row.subRows.forEach(handleRow);\n }\n };\n paginatedRowModel.rows.forEach(handleRow);\n return paginatedRowModel;\n }, getMemoOptions(table.options, 'debugTable', 'getPaginationRowModel'));\n}\n\nexport { ColumnSizing, Expanding, Filters, Grouping, Headers, Ordering, Pagination, Pinning, RowSelection, Sorting, Visibility, _getVisibleLeafColumns, aggregationFns, buildHeaderGroups, createCell, createColumn, createColumnHelper, createRow, createTable, defaultColumnSizing, expandRows, filterFns, flattenBy, functionalUpdate, getCoreRowModel, getExpandedRowModel, getFacetedMinMaxValues, getFacetedRowModel, getFacetedUniqueValues, getFilteredRowModel, getGroupedRowModel, getMemoOptions, getPaginationRowModel, getSortedRowModel, isFunction, isNumberArray, isRowSelected, isSubRowSelected, makeStateUpdater, memo, noop, orderColumns, passiveEventSupported, reSplitAlphaNumeric, selectRowsFn, shouldAutoRemoveFilter, sortingFns };\n//# sourceMappingURL=index.mjs.map\n","/**\n * react-table\n *\n * Copyright (c) TanStack\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nimport * as React from 'react';\nimport { createTable } from '@tanstack/table-core';\nexport * from '@tanstack/table-core';\n\n//\n\n/**\n * If rendering headers, cells, or footers with custom markup, use flexRender instead of `cell.getValue()` or `cell.renderValue()`.\n */\nfunction flexRender(Comp, props) {\n return !Comp ? null : isReactComponent(Comp) ? /*#__PURE__*/React.createElement(Comp, props) : Comp;\n}\nfunction isReactComponent(component) {\n return isClassComponent(component) || typeof component === 'function' || isExoticComponent(component);\n}\nfunction isClassComponent(component) {\n return typeof component === 'function' && (() => {\n const proto = Object.getPrototypeOf(component);\n return proto.prototype && proto.prototype.isReactComponent;\n })();\n}\nfunction isExoticComponent(component) {\n return typeof component === 'object' && typeof component.$$typeof === 'symbol' && ['react.memo', 'react.forward_ref'].includes(component.$$typeof.description);\n}\nfunction useReactTable(options) {\n // Compose in the generic options to the user options\n const resolvedOptions = {\n state: {},\n // Dummy state\n onStateChange: () => {},\n // noop\n renderFallbackValue: null,\n ...options\n };\n\n // Create a new table and store it in state\n const [tableRef] = React.useState(() => ({\n current: createTable(resolvedOptions)\n }));\n\n // By default, manage table state here using the table's initial state\n const [state, setState] = React.useState(() => tableRef.current.initialState);\n\n // Compose the default state above with any user state. This will allow the user\n // to only control a subset of the state if desired.\n tableRef.current.setOptions(prev => ({\n ...prev,\n ...options,\n state: {\n ...state,\n ...options.state\n },\n // Similarly, we'll maintain both our internal state and any user-provided\n // state.\n onStateChange: updater => {\n setState(updater);\n options.onStateChange == null || options.onStateChange(updater);\n }\n }));\n return tableRef.current;\n}\n\nexport { flexRender, useReactTable };\n//# sourceMappingURL=index.mjs.map\n","var global$1 = (typeof global !== \"undefined\" ? global :\n typeof self !== \"undefined\" ? self :\n typeof window !== \"undefined\" ? window : {});\n\nvar lookup = [];\nvar revLookup = [];\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;\nvar inited = false;\nfunction init () {\n inited = true;\n var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n for (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i];\n revLookup[code.charCodeAt(i)] = i;\n }\n\n revLookup['-'.charCodeAt(0)] = 62;\n revLookup['_'.charCodeAt(0)] = 63;\n}\n\nfunction toByteArray (b64) {\n if (!inited) {\n init();\n }\n var i, j, l, tmp, placeHolders, arr;\n var len = b64.length;\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // the number of equal signs (place holders)\n // if there are two placeholders, than the two characters before it\n // represent one byte\n // if there is only one, then the three characters before it represent 2 bytes\n // this is just a cheap hack to not do indexOf twice\n placeHolders = b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0;\n\n // base64 is 4/3 + up to two characters of the original data\n arr = new Arr(len * 3 / 4 - placeHolders);\n\n // if there are placeholders, only get up to the last complete 4 chars\n l = placeHolders > 0 ? len - 4 : len;\n\n var L = 0;\n\n for (i = 0, j = 0; i < l; i += 4, j += 3) {\n tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)];\n arr[L++] = (tmp >> 16) & 0xFF;\n arr[L++] = (tmp >> 8) & 0xFF;\n arr[L++] = tmp & 0xFF;\n }\n\n if (placeHolders === 2) {\n tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4);\n arr[L++] = tmp & 0xFF;\n } else if (placeHolders === 1) {\n tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2);\n arr[L++] = (tmp >> 8) & 0xFF;\n arr[L++] = tmp & 0xFF;\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp;\n var output = [];\n for (var i = start; i < end; i += 3) {\n tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]);\n output.push(tripletToBase64(tmp));\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n if (!inited) {\n init();\n }\n var tmp;\n var len = uint8.length;\n var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes\n var output = '';\n var parts = [];\n var maxChunkLength = 16383; // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)));\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1];\n output += lookup[tmp >> 2];\n output += lookup[(tmp << 4) & 0x3F];\n output += '==';\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + (uint8[len - 1]);\n output += lookup[tmp >> 10];\n output += lookup[(tmp >> 4) & 0x3F];\n output += lookup[(tmp << 2) & 0x3F];\n output += '=';\n }\n\n parts.push(output);\n\n return parts.join('')\n}\n\nfunction read (buffer, offset, isLE, mLen, nBytes) {\n var e, m;\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var nBits = -7;\n var i = isLE ? (nBytes - 1) : 0;\n var d = isLE ? -1 : 1;\n var s = buffer[offset + i];\n\n i += d;\n\n e = s & ((1 << (-nBits)) - 1);\n s >>= (-nBits);\n nBits += eLen;\n for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1);\n e >>= (-nBits);\n nBits += mLen;\n for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias;\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen);\n e = e - eBias;\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nfunction write (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c;\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0);\n var i = isLE ? 0 : (nBytes - 1);\n var d = isLE ? 1 : -1;\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0;\n\n value = Math.abs(value);\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0;\n e = eMax;\n } else {\n e = Math.floor(Math.log(value) / Math.LN2);\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--;\n c *= 2;\n }\n if (e + eBias >= 1) {\n value += rt / c;\n } else {\n value += rt * Math.pow(2, 1 - eBias);\n }\n if (value * c >= 2) {\n e++;\n c /= 2;\n }\n\n if (e + eBias >= eMax) {\n m = 0;\n e = eMax;\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * Math.pow(2, mLen);\n e = e + eBias;\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);\n e = 0;\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m;\n eLen += mLen;\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128;\n}\n\nvar toString = {}.toString;\n\nvar isArray = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n\nvar INSPECT_MAX_BYTES = 50;\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global$1.TYPED_ARRAY_SUPPORT !== undefined\n ? global$1.TYPED_ARRAY_SUPPORT\n : true;\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nkMaxLength();\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length);\n that.__proto__ = Buffer.prototype;\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length);\n }\n that.length = length;\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192; // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype;\n return arr\n};\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n};\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype;\n Buffer.__proto__ = Uint8Array;\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) ;\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size);\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n};\n\nfunction allocUnsafe (that, size) {\n assertSize(size);\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0);\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0;\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n};\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n};\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8';\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0;\n that = createBuffer(that, length);\n\n var actual = that.write(string, encoding);\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual);\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0;\n that = createBuffer(that, length);\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255;\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength; // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array);\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset);\n } else {\n array = new Uint8Array(array, byteOffset, length);\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array;\n that.__proto__ = Buffer.prototype;\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array);\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (internalIsBuffer(obj)) {\n var len = checked(obj.length) | 0;\n that = createBuffer(that, len);\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len);\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\nBuffer.isBuffer = isBuffer;\nfunction internalIsBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!internalIsBuffer(a) || !internalIsBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n};\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n};\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i;\n if (length === undefined) {\n length = 0;\n for (i = 0; i < list.length; ++i) {\n length += list[i].length;\n }\n }\n\n var buffer = Buffer.allocUnsafe(length);\n var pos = 0;\n for (i = 0; i < list.length; ++i) {\n var buf = list[i];\n if (!internalIsBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos);\n pos += buf.length;\n }\n return buffer\n};\n\nfunction byteLength (string, encoding) {\n if (internalIsBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string;\n }\n\n var len = string.length;\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false;\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n}\nBuffer.byteLength = byteLength;\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false;\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0;\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length;\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0;\n start >>>= 0;\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8';\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase();\n loweredCase = true;\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true;\n\nfunction swap (b, n, m) {\n var i = b[n];\n b[n] = b[m];\n b[m] = i;\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length;\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1);\n }\n return this\n};\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length;\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3);\n swap(this, i + 1, i + 2);\n }\n return this\n};\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length;\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7);\n swap(this, i + 1, i + 6);\n swap(this, i + 2, i + 5);\n swap(this, i + 3, i + 4);\n }\n return this\n};\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0;\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n};\n\nBuffer.prototype.equals = function equals (b) {\n if (!internalIsBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n};\n\nBuffer.prototype.inspect = function inspect () {\n var str = '';\n var max = INSPECT_MAX_BYTES;\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ');\n if (this.length > max) str += ' ... ';\n }\n return ''\n};\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!internalIsBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0;\n }\n if (end === undefined) {\n end = target ? target.length : 0;\n }\n if (thisStart === undefined) {\n thisStart = 0;\n }\n if (thisEnd === undefined) {\n thisEnd = this.length;\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0;\n end >>>= 0;\n thisStart >>>= 0;\n thisEnd >>>= 0;\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart;\n var y = end - start;\n var len = Math.min(x, y);\n\n var thisCopy = this.slice(thisStart, thisEnd);\n var targetCopy = target.slice(start, end);\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i];\n y = targetCopy[i];\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n};\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset;\n byteOffset = 0;\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff;\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000;\n }\n byteOffset = +byteOffset; // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1);\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset;\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1;\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0;\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding);\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (internalIsBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF; // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1;\n var arrLength = arr.length;\n var valLength = val.length;\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase();\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2;\n arrLength /= 2;\n valLength /= 2;\n byteOffset /= 2;\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i;\n if (dir) {\n var foundIndex = -1;\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i;\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex;\n foundIndex = -1;\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;\n for (i = byteOffset; i >= 0; i--) {\n var found = true;\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false;\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n};\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n};\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n};\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0;\n var remaining = buf.length - offset;\n if (!length) {\n length = remaining;\n } else {\n length = Number(length);\n if (length > remaining) {\n length = remaining;\n }\n }\n\n // must be an even number of digits\n var strLen = string.length;\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2;\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16);\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed;\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8';\n length = this.length;\n offset = 0;\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset;\n length = this.length;\n offset = 0;\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0;\n if (isFinite(length)) {\n length = length | 0;\n if (encoding === undefined) encoding = 'utf8';\n } else {\n encoding = length;\n length = undefined;\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset;\n if (length === undefined || length > remaining) length = remaining;\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8';\n\n var loweredCase = false;\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n};\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n};\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return fromByteArray(buf)\n } else {\n return fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end);\n var res = [];\n\n var i = start;\n while (i < end) {\n var firstByte = buf[i];\n var codePoint = null;\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1;\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint;\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte;\n }\n break\n case 2:\n secondByte = buf[i + 1];\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F);\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint;\n }\n }\n break\n case 3:\n secondByte = buf[i + 1];\n thirdByte = buf[i + 2];\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F);\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint;\n }\n }\n break\n case 4:\n secondByte = buf[i + 1];\n thirdByte = buf[i + 2];\n fourthByte = buf[i + 3];\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F);\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint;\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD;\n bytesPerSequence = 1;\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000;\n res.push(codePoint >>> 10 & 0x3FF | 0xD800);\n codePoint = 0xDC00 | codePoint & 0x3FF;\n }\n\n res.push(codePoint);\n i += bytesPerSequence;\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000;\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length;\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = '';\n var i = 0;\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n );\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = '';\n end = Math.min(buf.length, end);\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F);\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = '';\n end = Math.min(buf.length, end);\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i]);\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length;\n\n if (!start || start < 0) start = 0;\n if (!end || end < 0 || end > len) end = len;\n\n var out = '';\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i]);\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end);\n var res = '';\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length;\n start = ~~start;\n end = end === undefined ? len : ~~end;\n\n if (start < 0) {\n start += len;\n if (start < 0) start = 0;\n } else if (start > len) {\n start = len;\n }\n\n if (end < 0) {\n end += len;\n if (end < 0) end = 0;\n } else if (end > len) {\n end = len;\n }\n\n if (end < start) end = start;\n\n var newBuf;\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end);\n newBuf.__proto__ = Buffer.prototype;\n } else {\n var sliceLen = end - start;\n newBuf = new Buffer(sliceLen, undefined);\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start];\n }\n }\n\n return newBuf\n};\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) checkOffset(offset, byteLength, this.length);\n\n var val = this[offset];\n var mul = 1;\n var i = 0;\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul;\n }\n\n return val\n};\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length);\n }\n\n var val = this[offset + --byteLength];\n var mul = 1;\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul;\n }\n\n return val\n};\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length);\n return this[offset]\n};\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length);\n return this[offset] | (this[offset + 1] << 8)\n};\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length);\n return (this[offset] << 8) | this[offset + 1]\n};\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n};\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n};\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) checkOffset(offset, byteLength, this.length);\n\n var val = this[offset];\n var mul = 1;\n var i = 0;\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul;\n }\n mul *= 0x80;\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n\n return val\n};\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) checkOffset(offset, byteLength, this.length);\n\n var i = byteLength;\n var mul = 1;\n var val = this[offset + --i];\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul;\n }\n mul *= 0x80;\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n\n return val\n};\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length);\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n};\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length);\n var val = this[offset] | (this[offset + 1] << 8);\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n};\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length);\n var val = this[offset + 1] | (this[offset] << 8);\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n};\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n};\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n};\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n return read(this, offset, true, 23, 4)\n};\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n return read(this, offset, false, 23, 4)\n};\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length);\n return read(this, offset, true, 52, 8)\n};\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length);\n return read(this, offset, false, 52, 8)\n};\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!internalIsBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1;\n checkInt(this, value, offset, byteLength, maxBytes, 0);\n }\n\n var mul = 1;\n var i = 0;\n this[offset] = value & 0xFF;\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF;\n }\n\n return offset + byteLength\n};\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1;\n checkInt(this, value, offset, byteLength, maxBytes, 0);\n }\n\n var i = byteLength - 1;\n var mul = 1;\n this[offset + i] = value & 0xFF;\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF;\n }\n\n return offset + byteLength\n};\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0);\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);\n this[offset] = (value & 0xff);\n return offset + 1\n};\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1;\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8;\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff);\n this[offset + 1] = (value >>> 8);\n } else {\n objectWriteUInt16(this, value, offset, true);\n }\n return offset + 2\n};\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8);\n this[offset + 1] = (value & 0xff);\n } else {\n objectWriteUInt16(this, value, offset, false);\n }\n return offset + 2\n};\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1;\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff;\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24);\n this[offset + 2] = (value >>> 16);\n this[offset + 1] = (value >>> 8);\n this[offset] = (value & 0xff);\n } else {\n objectWriteUInt32(this, value, offset, true);\n }\n return offset + 4\n};\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24);\n this[offset + 1] = (value >>> 16);\n this[offset + 2] = (value >>> 8);\n this[offset + 3] = (value & 0xff);\n } else {\n objectWriteUInt32(this, value, offset, false);\n }\n return offset + 4\n};\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1);\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit);\n }\n\n var i = 0;\n var mul = 1;\n var sub = 0;\n this[offset] = value & 0xFF;\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1;\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF;\n }\n\n return offset + byteLength\n};\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1);\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit);\n }\n\n var i = byteLength - 1;\n var mul = 1;\n var sub = 0;\n this[offset + i] = value & 0xFF;\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1;\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF;\n }\n\n return offset + byteLength\n};\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80);\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);\n if (value < 0) value = 0xff + value + 1;\n this[offset] = (value & 0xff);\n return offset + 1\n};\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff);\n this[offset + 1] = (value >>> 8);\n } else {\n objectWriteUInt16(this, value, offset, true);\n }\n return offset + 2\n};\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8);\n this[offset + 1] = (value & 0xff);\n } else {\n objectWriteUInt16(this, value, offset, false);\n }\n return offset + 2\n};\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff);\n this[offset + 1] = (value >>> 8);\n this[offset + 2] = (value >>> 16);\n this[offset + 3] = (value >>> 24);\n } else {\n objectWriteUInt32(this, value, offset, true);\n }\n return offset + 4\n};\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);\n if (value < 0) value = 0xffffffff + value + 1;\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24);\n this[offset + 1] = (value >>> 16);\n this[offset + 2] = (value >>> 8);\n this[offset + 3] = (value & 0xff);\n } else {\n objectWriteUInt32(this, value, offset, false);\n }\n return offset + 4\n};\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4);\n }\n write(buf, value, offset, littleEndian, 23, 4);\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n};\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n};\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8);\n }\n write(buf, value, offset, littleEndian, 52, 8);\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n};\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n};\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0;\n if (!end && end !== 0) end = this.length;\n if (targetStart >= target.length) targetStart = target.length;\n if (!targetStart) targetStart = 0;\n if (end > 0 && end < start) end = start;\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length;\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start;\n }\n\n var len = end - start;\n var i;\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start];\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start];\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n );\n }\n\n return len\n};\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start;\n start = 0;\n end = this.length;\n } else if (typeof end === 'string') {\n encoding = end;\n end = this.length;\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0);\n if (code < 256) {\n val = code;\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255;\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0;\n end = end === undefined ? this.length : end >>> 0;\n\n if (!val) val = 0;\n\n var i;\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val;\n }\n } else {\n var bytes = internalIsBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString());\n var len = bytes.length;\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len];\n }\n }\n\n return this\n};\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g;\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '');\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '=';\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity;\n var codePoint;\n var length = string.length;\n var leadSurrogate = null;\n var bytes = [];\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i);\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint;\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n leadSurrogate = codePoint;\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n }\n\n leadSurrogate = null;\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint);\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n );\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n );\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n );\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = [];\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF);\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo;\n var byteArray = [];\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i);\n hi = c >> 8;\n lo = c % 256;\n byteArray.push(lo);\n byteArray.push(hi);\n }\n\n return byteArray\n}\n\n\nfunction base64ToBytes (str) {\n return toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i];\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n\n\n// the following is from is-buffer, also by Feross Aboukhadijeh and with same lisence\n// The _isBuffer check is for Safari 5-7 support, because it's missing\n// Object.prototype.constructor. Remove this eventually\nfunction isBuffer(obj) {\n return obj != null && (!!obj._isBuffer || isFastBuffer(obj) || isSlowBuffer(obj))\n}\n\nfunction isFastBuffer (obj) {\n return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n\n// For Node v0.10 support. Remove this eventually.\nfunction isSlowBuffer (obj) {\n return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isFastBuffer(obj.slice(0, 0))\n}\n\n// Lodash implementation of `get`\n\nconst charCodeOfDot = '.'.charCodeAt(0);\nconst reEscapeChar = /\\\\(\\\\)?/g;\nconst rePropName = RegExp(\n // Match anything that isn't a dot or bracket.\n '[^.[\\\\]]+' + '|' +\n // Or match property names within brackets.\n '\\\\[(?:' +\n // Match a non-string expression.\n '([^\"\\'][^[]*)' + '|' +\n // Or match strings (supports escaping characters).\n '([\"\\'])((?:(?!\\\\2)[^\\\\\\\\]|\\\\\\\\.)*?)\\\\2' +\n ')\\\\]'+ '|' +\n // Or match \"\" as the space between consecutive dots or empty brackets.\n '(?=(?:\\\\.|\\\\[\\\\])(?:\\\\.|\\\\[\\\\]|$))'\n , 'g');\nconst reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/;\nconst reIsPlainProp = /^\\w*$/;\nconst getTag = function(value){\n return Object.prototype.toString.call(value);\n};\nconst isSymbol = function(value){\n const type = typeof value;\n return type === 'symbol' || (type === 'object' && value && getTag(value) === '[object Symbol]');\n};\nconst isKey = function(value, object){\n if(Array.isArray(value)){\n return false;\n }\n const type = typeof value;\n if(type === 'number' || type === 'symbol' || type === 'boolean' || !value || isSymbol(value)){\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n};\nconst stringToPath = function(string){\n const result = [];\n if(string.charCodeAt(0) === charCodeOfDot){\n result.push('');\n }\n string.replace(rePropName, function(match, expression, quote, subString){\n let key = match;\n if(quote){\n key = subString.replace(reEscapeChar, '$1');\n }else if(expression){\n key = expression.trim();\n }\n result.push(key);\n });\n return result;\n};\nconst castPath = function(value, object){\n if(Array.isArray(value)){\n return value;\n } else {\n return isKey(value, object) ? [value] : stringToPath(value);\n }\n};\nconst toKey = function(value){\n if(typeof value === 'string' || isSymbol(value))\n return value;\n const result = `${value}`;\n // eslint-disable-next-line\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n};\nconst get = function(object, path){\n path = castPath(path, object);\n let index = 0;\n const length = path.length;\n while(object != null && index < length){\n object = object[toKey(path[index++])];\n }\n return (index && index === length) ? object : undefined;\n};\n\nconst is_object = function(obj){\n return typeof obj === 'object' && obj !== null && ! Array.isArray(obj);\n};\n\nconst normalize_columns = function(columns){\n if(columns === undefined || columns === null){\n return [undefined, undefined];\n }\n if(typeof columns !== 'object'){\n return [Error('Invalid option \"columns\": expect an array or an object')];\n }\n if(!Array.isArray(columns)){\n const newcolumns = [];\n for(const k in columns){\n newcolumns.push({\n key: k,\n header: columns[k]\n });\n }\n columns = newcolumns;\n }else {\n const newcolumns = [];\n for(const column of columns){\n if(typeof column === 'string'){\n newcolumns.push({\n key: column,\n header: column\n });\n }else if(typeof column === 'object' && column !== null && !Array.isArray(column)){\n if(!column.key){\n return [Error('Invalid column definition: property \"key\" is required')];\n }\n if(column.header === undefined){\n column.header = column.key;\n }\n newcolumns.push(column);\n }else {\n return [Error('Invalid column definition: expect a string or an object')];\n }\n }\n columns = newcolumns;\n }\n return [undefined, columns];\n};\n\nclass CsvError extends Error {\n constructor(code, message, ...contexts) {\n if(Array.isArray(message)) message = message.join(' ');\n super(message);\n if(Error.captureStackTrace !== undefined){\n Error.captureStackTrace(this, CsvError);\n }\n this.code = code;\n for(const context of contexts){\n for(const key in context){\n const value = context[key];\n this[key] = isBuffer(value) ? value.toString() : value == null ? value : JSON.parse(JSON.stringify(value));\n }\n }\n }\n}\n\nconst underscore = function(str){\n return str.replace(/([A-Z])/g, function(_, match){\n return '_' + match.toLowerCase();\n });\n};\n\nconst normalize_options = function(opts) {\n const options = {};\n // Merge with user options\n for(const opt in opts){\n options[underscore(opt)] = opts[opt];\n }\n // Normalize option `bom`\n if(options.bom === undefined || options.bom === null || options.bom === false){\n options.bom = false;\n }else if(options.bom !== true){\n return [new CsvError('CSV_OPTION_BOOLEAN_INVALID_TYPE', [\n 'option `bom` is optional and must be a boolean value,',\n `got ${JSON.stringify(options.bom)}`\n ])];\n }\n // Normalize option `delimiter`\n if(options.delimiter === undefined || options.delimiter === null){\n options.delimiter = ',';\n }else if(isBuffer(options.delimiter)){\n options.delimiter = options.delimiter.toString();\n }else if(typeof options.delimiter !== 'string'){\n return [new CsvError('CSV_OPTION_DELIMITER_INVALID_TYPE', [\n 'option `delimiter` must be a buffer or a string,',\n `got ${JSON.stringify(options.delimiter)}`\n ])];\n }\n // Normalize option `quote`\n if(options.quote === undefined || options.quote === null){\n options.quote = '\"';\n }else if(options.quote === true){\n options.quote = '\"';\n }else if(options.quote === false){\n options.quote = '';\n }else if (isBuffer(options.quote)){\n options.quote = options.quote.toString();\n }else if(typeof options.quote !== 'string'){\n return [new CsvError('CSV_OPTION_QUOTE_INVALID_TYPE', [\n 'option `quote` must be a boolean, a buffer or a string,',\n `got ${JSON.stringify(options.quote)}`\n ])];\n }\n // Normalize option `quoted`\n if(options.quoted === undefined || options.quoted === null){\n options.quoted = false;\n }\n // Normalize option `escape_formulas`\n if(options.escape_formulas === undefined || options.escape_formulas === null){\n options.escape_formulas = false;\n }else if(typeof options.escape_formulas !== 'boolean'){\n return [new CsvError('CSV_OPTION_ESCAPE_FORMULAS_INVALID_TYPE', [\n 'option `escape_formulas` must be a boolean,',\n `got ${JSON.stringify(options.escape_formulas)}`\n ])];\n }\n // Normalize option `quoted_empty`\n if(options.quoted_empty === undefined || options.quoted_empty === null){\n options.quoted_empty = undefined;\n }\n // Normalize option `quoted_match`\n if(options.quoted_match === undefined || options.quoted_match === null || options.quoted_match === false){\n options.quoted_match = null;\n }else if(!Array.isArray(options.quoted_match)){\n options.quoted_match = [options.quoted_match];\n }\n if(options.quoted_match){\n for(const quoted_match of options.quoted_match){\n const isString = typeof quoted_match === 'string';\n const isRegExp = quoted_match instanceof RegExp;\n if(!isString && !isRegExp){\n return [Error(`Invalid Option: quoted_match must be a string or a regex, got ${JSON.stringify(quoted_match)}`)];\n }\n }\n }\n // Normalize option `quoted_string`\n if(options.quoted_string === undefined || options.quoted_string === null){\n options.quoted_string = false;\n }\n // Normalize option `eof`\n if(options.eof === undefined || options.eof === null){\n options.eof = true;\n }\n // Normalize option `escape`\n if(options.escape === undefined || options.escape === null){\n options.escape = '\"';\n }else if(isBuffer(options.escape)){\n options.escape = options.escape.toString();\n }else if(typeof options.escape !== 'string'){\n return [Error(`Invalid Option: escape must be a buffer or a string, got ${JSON.stringify(options.escape)}`)];\n }\n if (options.escape.length > 1){\n return [Error(`Invalid Option: escape must be one character, got ${options.escape.length} characters`)];\n }\n // Normalize option `header`\n if(options.header === undefined || options.header === null){\n options.header = false;\n }\n // Normalize option `columns`\n const [errColumns, columns] = normalize_columns(options.columns);\n if(errColumns !== undefined) return [errColumns];\n options.columns = columns;\n // Normalize option `quoted`\n if(options.quoted === undefined || options.quoted === null){\n options.quoted = false;\n }\n // Normalize option `cast`\n if(options.cast === undefined || options.cast === null){\n options.cast = {};\n }\n // Normalize option cast.bigint\n if(options.cast.bigint === undefined || options.cast.bigint === null){\n // Cast boolean to string by default\n options.cast.bigint = value => '' + value;\n }\n // Normalize option cast.boolean\n if(options.cast.boolean === undefined || options.cast.boolean === null){\n // Cast boolean to string by default\n options.cast.boolean = value => value ? '1' : '';\n }\n // Normalize option cast.date\n if(options.cast.date === undefined || options.cast.date === null){\n // Cast date to timestamp string by default\n options.cast.date = value => '' + value.getTime();\n }\n // Normalize option cast.number\n if(options.cast.number === undefined || options.cast.number === null){\n // Cast number to string using native casting by default\n options.cast.number = value => '' + value;\n }\n // Normalize option cast.object\n if(options.cast.object === undefined || options.cast.object === null){\n // Stringify object as JSON by default\n options.cast.object = value => JSON.stringify(value);\n }\n // Normalize option cast.string\n if(options.cast.string === undefined || options.cast.string === null){\n // Leave string untouched\n options.cast.string = function(value){return value;};\n }\n // Normalize option `on_record`\n if(options.on_record !== undefined && typeof options.on_record !== 'function'){\n return [Error(`Invalid Option: \"on_record\" must be a function.`)];\n }\n // Normalize option `record_delimiter`\n if(options.record_delimiter === undefined || options.record_delimiter === null){\n options.record_delimiter = '\\n';\n }else if(isBuffer(options.record_delimiter)){\n options.record_delimiter = options.record_delimiter.toString();\n }else if(typeof options.record_delimiter !== 'string'){\n return [Error(`Invalid Option: record_delimiter must be a buffer or a string, got ${JSON.stringify(options.record_delimiter)}`)];\n }\n switch(options.record_delimiter){\n case 'unix':\n options.record_delimiter = \"\\n\";\n break;\n case 'mac':\n options.record_delimiter = \"\\r\";\n break;\n case 'windows':\n options.record_delimiter = \"\\r\\n\";\n break;\n case 'ascii':\n options.record_delimiter = \"\\u001e\";\n break;\n case 'unicode':\n options.record_delimiter = \"\\u2028\";\n break;\n }\n return [undefined, options];\n};\n\nconst bom_utf8 = Buffer.from([239, 187, 191]);\n\nconst stringifier = function(options, state, info){\n return {\n options: options,\n state: state,\n info: info,\n __transform: function(chunk, push){\n // Chunk validation\n if(!Array.isArray(chunk) && typeof chunk !== 'object'){\n return Error(`Invalid Record: expect an array or an object, got ${JSON.stringify(chunk)}`);\n }\n // Detect columns from the first record\n if(this.info.records === 0){\n if(Array.isArray(chunk)){\n if(this.options.header === true && this.options.columns === undefined){\n return Error('Undiscoverable Columns: header option requires column option or object records');\n }\n }else if(this.options.columns === undefined){\n const [err, columns] = normalize_columns(Object.keys(chunk));\n if(err) return;\n this.options.columns = columns;\n }\n }\n // Emit the header\n if(this.info.records === 0){\n this.bom(push);\n const err = this.headers(push);\n if(err) return err;\n }\n // Emit and stringify the record if an object or an array\n try{\n // this.emit('record', chunk, this.info.records);\n if(this.options.on_record){\n this.options.on_record(chunk, this.info.records);\n }\n }catch(err){\n return err;\n }\n // Convert the record into a string\n let err, chunk_string;\n if(this.options.eof){\n [err, chunk_string] = this.stringify(chunk);\n if(err) return err;\n if(chunk_string === undefined){\n return;\n }else {\n chunk_string = chunk_string + this.options.record_delimiter;\n }\n }else {\n [err, chunk_string] = this.stringify(chunk);\n if(err) return err;\n if(chunk_string === undefined){\n return;\n }else {\n if(this.options.header || this.info.records){\n chunk_string = this.options.record_delimiter + chunk_string;\n }\n }\n }\n // Emit the csv\n this.info.records++;\n push(chunk_string);\n },\n stringify: function(chunk, chunkIsHeader=false){\n if(typeof chunk !== 'object'){\n return [undefined, chunk];\n }\n const {columns} = this.options;\n const record = [];\n // Record is an array\n if(Array.isArray(chunk)){\n // We are getting an array but the user has specified output columns. In\n // this case, we respect the columns indexes\n if(columns){\n chunk.splice(columns.length);\n }\n // Cast record elements\n for(let i=0; i {\n if(typeof quoted_match === 'string'){\n return value.indexOf(quoted_match) !== -1;\n }else {\n return quoted_match.test(value);\n }\n });\n quotedMatch = quotedMatch && quotedMatch.length > 0;\n const shouldQuote = quotedMatch || true === quoted_empty ||\n (true === quoted_string && false !== quoted_empty);\n if(shouldQuote === true){\n value = quote + value + quote;\n }\n csvrecord += value;\n }else if(value){\n if(typeof value !== 'string'){\n return [Error(`Formatter must return a string, null or undefined, got ${JSON.stringify(value)}`)];\n }\n const containsdelimiter = delimiter.length && value.indexOf(delimiter) >= 0;\n const containsQuote = (quote !== '') && value.indexOf(quote) >= 0;\n const containsEscape = value.indexOf(escape) >= 0 && (escape !== quote);\n const containsRecordDelimiter = value.indexOf(record_delimiter) >= 0;\n const quotedString = quoted_string && typeof field === 'string';\n let quotedMatch = quoted_match && quoted_match.filter(quoted_match => {\n if(typeof quoted_match === 'string'){\n return value.indexOf(quoted_match) !== -1;\n }else {\n return quoted_match.test(value);\n }\n });\n quotedMatch = quotedMatch && quotedMatch.length > 0;\n // See https://github.com/adaltas/node-csv/pull/387\n // More about CSV injection or formula injection, when websites embed\n // untrusted input inside CSV files:\n // https://owasp.org/www-community/attacks/CSV_Injection\n // http://georgemauer.net/2017/10/07/csv-injection.html\n // Apple Numbers unicode normalization is empirical from testing\n if (escape_formulas) {\n switch (value[0]) {\n case '=':\n case '+':\n case '-':\n case '@':\n case '\\t':\n case '\\r':\n case '\\uFF1D': // Unicode '='\n case '\\uFF0B': // Unicode '+'\n case '\\uFF0D': // Unicode '-'\n case '\\uFF20': // Unicode '@'\n value = `'${value}`;\n break;\n }\n }\n const shouldQuote = containsQuote === true || containsdelimiter || containsRecordDelimiter || quoted || quotedString || quotedMatch;\n if(shouldQuote === true && containsEscape === true){\n const regexp = escape === '\\\\'\n ? new RegExp(escape + escape, 'g')\n : new RegExp(escape, 'g');\n value = value.replace(regexp, escape + escape);\n }\n if(containsQuote === true){\n const regexp = new RegExp(quote,'g');\n value = value.replace(regexp, escape + quote);\n }\n if(shouldQuote === true){\n value = quote + value + quote;\n }\n csvrecord += value;\n }else if(quoted_empty === true || (field === '' && quoted_string === true && quoted_empty !== false)){\n csvrecord += quote + quote;\n }\n if(i !== record.length - 1){\n csvrecord += delimiter;\n }\n }\n return [undefined, csvrecord];\n },\n bom: function(push){\n if(this.options.bom !== true){\n return;\n }\n push(bom_utf8);\n },\n headers: function(push){\n if(this.options.header === false){\n return;\n }\n if(this.options.columns === undefined){\n return;\n }\n let err;\n let headers = this.options.columns.map(column => column.header);\n if(this.options.eof){\n [err, headers] = this.stringify(headers, true);\n headers += this.options.record_delimiter;\n }else {\n [err, headers] = this.stringify(headers);\n }\n if(err) return err;\n push(headers);\n },\n __cast: function(value, context){\n const type = typeof value;\n try{\n if(type === 'string'){ // Fine for 99% of the cases\n return [undefined, this.options.cast.string(value, context)];\n }else if(type === 'bigint'){\n return [undefined, this.options.cast.bigint(value, context)];\n }else if(type === 'number'){\n return [undefined, this.options.cast.number(value, context)];\n }else if(type === 'boolean'){\n return [undefined, this.options.cast.boolean(value, context)];\n }else if(value instanceof Date){\n return [undefined, this.options.cast.date(value, context)];\n }else if(type === 'object' && value !== null){\n return [undefined, this.options.cast.object(value, context)];\n }else {\n return [undefined, value, value];\n }\n }catch(err){\n return [err];\n }\n }\n };\n};\n\nconst stringify = function(records, opts={}){\n const data = [];\n const [err, options] = normalize_options(opts);\n if(err !== undefined) throw err;\n const state = {\n stop: false\n };\n // Information\n const info = {\n records: 0\n };\n const api = stringifier(options, state, info);\n for(const record of records){\n const err = api.__transform(record, function(record){\n data.push(record);\n });\n if(err !== undefined) throw err;\n }\n if(data.length === 0){\n api.bom((d) => {\n data.push(d);\n });\n const err = api.headers((headers) => {\n data.push(headers);\n });\n if(err !== undefined) throw err;\n }\n return data.join('');\n};\n\nexport { stringify };\n","import tableStyles from \"./BaseTable.module.css\";\nimport Filter from \"./BaseTableFilter\";\nimport {\n ColumnDef,\n Header,\n HeaderGroup,\n PaginationInitialTableState,\n Table as ReactTable,\n SortingTableState,\n VisibilityTableState,\n flexRender,\n getCoreRowModel,\n getFacetedMinMaxValues,\n getFacetedRowModel,\n getFacetedUniqueValues,\n getFilteredRowModel,\n getPaginationRowModel,\n getSortedRowModel,\n useReactTable,\n} from \"@tanstack/react-table\";\nimport { stringify } from \"csv-stringify/browser/esm/sync\";\nimport {\n Button,\n ButtonGroup,\n ButtonToolbar,\n Dropdown,\n OverlayTrigger,\n SplitButton,\n Table,\n Tooltip,\n} from \"react-bootstrap\";\nimport { useLocation } from \"react-router-dom\";\n\nfunction MyTooltip(message: string) {\n return {message};\n}\n\nconst exportToCSV = (table: ReactTable, exportFileName: string) => {\n const { rows } = table.getCoreRowModel();\n\n const headerRows = table.getHeaderGroups().map((headerGroup: HeaderGroup) => {\n return headerGroup.headers.map((header: Header) => {\n return header.column.columnDef.header;\n });\n });\n\n const csvData = rows.map((row: any) => {\n return row.getVisibleCells().map((cell: any) => {\n return cell.getValue();\n });\n });\n console.log(headerRows, csvData);\n const csv = stringify([...headerRows, ...csvData]);\n const fileType = \"csv\";\n const blob = new Blob([csv], {\n type: `text/${fileType};charset=utf8;`,\n });\n\n // spoof a download\n const link = document.createElement(\"a\");\n link.download = exportFileName;\n link.href = URL.createObjectURL(blob);\n\n // Ensure the link isn't visible to the user or cause layout shifts.\n link.setAttribute(\"visibility\", \"hidden\");\n\n // Add to document body, click and remove it.\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n};\n\n// function strToKey(keyString: string, ob: object) {\n// return keyString.split(\".\").reduce(function (p: any, prop: any) {\n// return p[prop];\n// }, ob);\n// }\n\ntype tableInitialState = SortingTableState & VisibilityTableState & PaginationInitialTableState;\n\nexport interface BaseTableProps extends Partial {\n isLoading?: boolean;\n isFetching?: boolean;\n debugTable?: boolean;\n striped?: boolean;\n data?: any;\n error?: boolean;\n hover?: boolean;\n columns: ColumnDef[];\n asyncExpandFunction?: any;\n initialState?: tableInitialState;\n exportFileName?: String;\n}\n\ninterface _BaseTableProps extends BaseTableProps {\n table: ReactTable;\n}\n\nconst BaseTable = ({\n // isLoading = false,\n isFetching = false,\n debugTable = false,\n data = [],\n // error = false,\n columns,\n // asyncExpandFunction = undefined,\n striped = false,\n hover = false,\n initialState = undefined,\n exportFileName = undefined,\n}: BaseTableProps) => {\n const table = useReactTable({\n data,\n columns,\n // Pipeline\n getCoreRowModel: getCoreRowModel(),\n getFilteredRowModel: getFilteredRowModel(),\n getSortedRowModel: getSortedRowModel(),\n getPaginationRowModel: getPaginationRowModel(),\n getFacetedRowModel: getFacetedRowModel(),\n getFacetedUniqueValues: getFacetedUniqueValues(),\n getFacetedMinMaxValues: getFacetedMinMaxValues(),\n //\n debugTable: debugTable,\n // state: initialState,\n });\n\n return (\n <_baseTable\n {...{\n table,\n data,\n columns,\n isFetching,\n debugTable,\n initialState,\n striped,\n hover,\n exportFileName,\n }}\n />\n );\n};\n\nfunction _baseTable({\n table,\n isFetching = false,\n striped = false,\n hover = false,\n debugTable = false,\n exportFileName = undefined,\n}: _BaseTableProps) {\n const { rows } = table.getRowModel();\n const location = useLocation();\n const fileName =\n typeof exportFileName !== \"undefined\" ? exportFileName : `ExportedData_${location.pathname}`;\n return (\n <>\n \n \n {table.getHeaderGroups().map((headerGroup: HeaderGroup) => (\n <>\n \n {headerGroup.headers.map((header: Header) => {\n return (\n \n );\n })}\n \n \n {headerGroup.headers.map((header) => {\n return (\n \n );\n })}\n \n \n ))}\n \n \n {rows.map((row) => {\n return (\n \n {row.getVisibleCells().map((cell) => {\n return (\n \n );\n })}\n \n );\n })}\n \n
\n {header.isPlaceholder ? null : (\n \n {header.column.getCanSort() ? (\n
\n {{\n asc: ,\n desc: ,\n }[header.column.getIsSorted() as string] ?? (\n \n )}\n
\n ) : null}\n
\n {flexRender(header.column.columnDef.header, header.getContext())}\n
\n \n )}\n
\n {header.column.getCanFilter() && rows.length >= 0 ? (\n \n ) : (\n <>\n )}\n
\n {flexRender(cell.column.columnDef.cell, cell.getContext())}\n
\n
\n \n \n {isFetching ? (\n \n \n \n ) : (\n \n \n \n )}\n {\" \"}\n \n\n \n \n table.setPageIndex(0)}\n disabled={!table.getCanPreviousPage()}\n >\n \n {\" \"}\n table.previousPage()}\n disabled={!table.getCanPreviousPage()}\n >\n \n {\" \"}\n table.nextPage()}\n disabled={!table.getCanNextPage()}\n >\n \n \n table.setPageIndex(table.getPageCount() - 1)}\n disabled={!table.getCanNextPage()}\n >\n \n \n \n\n \n {\" \"}\n \n {[10, 50, 100, 1000000].map((_pageSize) => (\n {\n console.log(eventKey.target.id);\n table.setPageSize(Number(eventKey.target.id));\n }}\n >\n Show {_pageSize}\n \n ))}\n \n \n \n
\n {debugTable && (\n
\n
{table.getRowModel().rows.length} Rows
\n
{JSON.stringify(table.getState(), null, 2)}
\n
\n )}\n \n );\n}\n// export all the base table modules\n\nexport default BaseTable; // Export the table\n","import BaseTable from \"../Tables/BaseTable/BaseTable\";\nimport { createColumnHelper } from \"@tanstack/react-table\";\n\ntype Character = {\n character_name: string;\n corporation_name: string;\n alliance_name: string;\n};\n\ntype BaseItemType = {\n id: number;\n name: string;\n cat: string;\n};\n\ntype AssetType = {\n character: Character;\n item: BaseItemType;\n location: BaseItemType;\n active: boolean;\n quantity: number;\n};\n\nconst CharacterAssetTable = ({ data, isFetching }: { data: any; isFetching: boolean }) => {\n const columnHelper = createColumnHelper();\n\n const columns = [\n columnHelper.accessor(\"character.character_name\", {\n header: \"Character\",\n }),\n columnHelper.accessor(\"item.name\", {\n header: \"Type\",\n }),\n columnHelper.accessor(\"item.cat\", {\n header: \"Category\",\n }),\n columnHelper.accessor(\"quantity\", {\n header: \"Quantity\",\n }),\n columnHelper.accessor(\"location.name\", {\n header: \"Location\",\n }),\n ];\n\n return ;\n};\n\nexport default CharacterAssetTable;\n","import CharacterAssetLocationSelect from \"../../Components/Character/CharacterAssetLocationSelect\";\nimport CharacterAssetTable from \"../../Components/Character/CharacterAssetsTable\";\nimport { loadAssetList } from \"../../api/character\";\nimport { useState } from \"react\";\nimport { Card } from \"react-bootstrap\";\nimport { useQuery } from \"react-query\";\nimport { useParams } from \"react-router-dom\";\n\nconst CharacterAssets = () => {\n const { characterID } = useParams();\n\n const [location_id, setLocation] = useState(0);\n\n const { data, isFetching } = useQuery({\n queryKey: [\"assetList\", characterID, location_id],\n queryFn: () => loadAssetList(Number(characterID), location_id),\n refetchOnWindowFocus: false,\n initialData: { characters: [], main: undefined, headers: [] },\n });\n\n return (\n <>\n Location Filter\n
\n \n
\n \n \n );\n};\n\nexport default CharacterAssets;\n","import { postAccountRefresh } from \"../api/character\";\nimport styles from \"./RefreshAccountButton.module.css\";\nimport Button from \"react-bootstrap/Button\";\nimport { useQuery } from \"react-query\";\nimport { useParams } from \"react-router-dom\";\n\nexport const RefreshCharButton = () => {\n const { characterID } = useParams();\n\n const { refetch, isFetching } = useQuery(\n \"my_key\",\n () => {\n return postAccountRefresh(characterID ? Number(characterID) : 0);\n },\n {\n refetchOnWindowFocus: false,\n enabled: false, // disable this query from automatically running\n }\n );\n async function refreshChar() {\n return await refetch();\n }\n\n return (\n \n );\n};\n","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n","var core = module.exports = { version: '2.6.12' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n","module.exports = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n","// optional / simple context binding\nvar aFunction = require('./_a-function');\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","var isObject = require('./_is-object');\nmodule.exports = function (it) {\n if (!isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n","var isObject = require('./_is-object');\nvar document = require('./_global').document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return is ? document.createElement(it) : {};\n};\n","module.exports = !require('./_descriptors') && !require('./_fails')(function () {\n return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n","// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","var anObject = require('./_an-object');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar toPrimitive = require('./_to-primitive');\nvar dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","var dP = require('./_object-dp');\nvar createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n","var global = require('./_global');\nvar core = require('./_core');\nvar ctx = require('./_ctx');\nvar hide = require('./_hide');\nvar has = require('./_has');\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var IS_WRAP = type & $export.W;\n var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n var expProto = exports[PROTOTYPE];\n var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];\n var key, own, out;\n if (IS_GLOBAL) source = name;\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n if (own && has(exports, key)) continue;\n // export native or passed\n out = own ? target[key] : source[key];\n // prevent global pollution for namespaces\n exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]\n // bind timers to global for call from export context\n : IS_BIND && own ? ctx(out, global)\n // wrap global constructors for prevent change them in library\n : IS_WRAP && target[key] == out ? (function (C) {\n var F = function (a, b, c) {\n if (this instanceof C) {\n switch (arguments.length) {\n case 0: return new C();\n case 1: return new C(a);\n case 2: return new C(a, b);\n } return new C(a, b, c);\n } return C.apply(this, arguments);\n };\n F[PROTOTYPE] = C[PROTOTYPE];\n return F;\n // make static versions for prototype methods\n })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%\n if (IS_PROTO) {\n (exports.virtual || (exports.virtual = {}))[key] = out;\n // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%\n if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);\n }\n }\n};\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library`\nmodule.exports = $export;\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = require('./_cof');\n// eslint-disable-next-line no-prototype-builtins\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n","// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = require('./_iobject');\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return IObject(defined(it));\n};\n","// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\nmodule.exports = function (it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n","// 7.1.15 ToLength\nvar toInteger = require('./_to-integer');\nvar min = Math.min;\nmodule.exports = function (it) {\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n","var toInteger = require('./_to-integer');\nvar max = Math.max;\nvar min = Math.min;\nmodule.exports = function (index, length) {\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};\n","// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = require('./_to-iobject');\nvar toLength = require('./_to-length');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nmodule.exports = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n","var core = require('./_core');\nvar global = require('./_global');\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || (global[SHARED] = {});\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: core.version,\n mode: require('./_library') ? 'pure' : 'global',\n copyright: '© 2020 Denis Pushkarev (zloirock.ru)'\n});\n","var id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n","var shared = require('./_shared')('keys');\nvar uid = require('./_uid');\nmodule.exports = function (key) {\n return shared[key] || (shared[key] = uid(key));\n};\n","var has = require('./_has');\nvar toIObject = require('./_to-iobject');\nvar arrayIndexOf = require('./_array-includes')(false);\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\n\nmodule.exports = function (object, names) {\n var O = toIObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};\n","// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n","// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = require('./_object-keys-internal');\nvar enumBugKeys = require('./_enum-bug-keys');\n\nmodule.exports = Object.keys || function keys(O) {\n return $keys(O, enumBugKeys);\n};\n","exports.f = Object.getOwnPropertySymbols;\n","exports.f = {}.propertyIsEnumerable;\n","// 7.1.13 ToObject(argument)\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return Object(defined(it));\n};\n","'use strict';\n// 19.1.2.1 Object.assign(target, source, ...)\nvar DESCRIPTORS = require('./_descriptors');\nvar getKeys = require('./_object-keys');\nvar gOPS = require('./_object-gops');\nvar pIE = require('./_object-pie');\nvar toObject = require('./_to-object');\nvar IObject = require('./_iobject');\nvar $assign = Object.assign;\n\n// should work with symbols and should have deterministic property order (V8 bug)\nmodule.exports = !$assign || require('./_fails')(function () {\n var A = {};\n var B = {};\n // eslint-disable-next-line no-undef\n var S = Symbol();\n var K = 'abcdefghijklmnopqrst';\n A[S] = 7;\n K.split('').forEach(function (k) { B[k] = k; });\n return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars\n var T = toObject(target);\n var aLen = arguments.length;\n var index = 1;\n var getSymbols = gOPS.f;\n var isEnum = pIE.f;\n while (aLen > index) {\n var S = IObject(arguments[index++]);\n var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) {\n key = keys[j++];\n if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key];\n }\n } return T;\n} : $assign;\n","// 19.1.3.1 Object.assign(target, source)\nvar $export = require('./_export');\n\n$export($export.S + $export.F, 'Object', { assign: require('./_object-assign') });\n","require('../../modules/es6.object.assign');\nmodule.exports = require('../../modules/_core').Object.assign;\n","import _Object$assign from \"core-js/library/fn/object/assign.js\";\nfunction _extends() {\n return _extends = _Object$assign ? _Object$assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, _extends.apply(null, arguments);\n}\nexport { _extends as default };","var dP = require('./_object-dp');\nvar anObject = require('./_an-object');\nvar getKeys = require('./_object-keys');\n\nmodule.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = getKeys(Properties);\n var length = keys.length;\n var i = 0;\n var P;\n while (length > i) dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};\n","var document = require('./_global').document;\nmodule.exports = document && document.documentElement;\n","// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = require('./_an-object');\nvar dPs = require('./_object-dps');\nvar enumBugKeys = require('./_enum-bug-keys');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar Empty = function () { /* empty */ };\nvar PROTOTYPE = 'prototype';\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = require('./_dom-create')('iframe');\n var i = enumBugKeys.length;\n var lt = '<';\n var gt = '>';\n var iframeDocument;\n iframe.style.display = 'none';\n require('./_html').appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];\n return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty();\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : dPs(result, Properties);\n};\n","var $export = require('./_export');\n// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\n$export($export.S, 'Object', { create: require('./_object-create') });\n","require('../../modules/es6.object.create');\nvar $Object = require('../../modules/_core').Object;\nmodule.exports = function create(P, D) {\n return $Object.create(P, D);\n};\n","var pIE = require('./_object-pie');\nvar createDesc = require('./_property-desc');\nvar toIObject = require('./_to-iobject');\nvar toPrimitive = require('./_to-primitive');\nvar has = require('./_has');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nexports.f = require('./_descriptors') ? gOPD : function getOwnPropertyDescriptor(O, P) {\n O = toIObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return gOPD(O, P);\n } catch (e) { /* empty */ }\n if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);\n};\n","// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nvar isObject = require('./_is-object');\nvar anObject = require('./_an-object');\nvar check = function (O, proto) {\n anObject(O);\n if (!isObject(proto) && proto !== null) throw TypeError(proto + \": can't set as prototype!\");\n};\nmodule.exports = {\n set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n function (test, buggy, set) {\n try {\n set = require('./_ctx')(Function.call, require('./_object-gopd').f(Object.prototype, '__proto__').set, 2);\n set(test, []);\n buggy = !(test instanceof Array);\n } catch (e) { buggy = true; }\n return function setPrototypeOf(O, proto) {\n check(O, proto);\n if (buggy) O.__proto__ = proto;\n else set(O, proto);\n return O;\n };\n }({}, false) : undefined),\n check: check\n};\n","// 19.1.3.19 Object.setPrototypeOf(O, proto)\nvar $export = require('./_export');\n$export($export.S, 'Object', { setPrototypeOf: require('./_set-proto').set });\n","require('../../modules/es6.object.set-prototype-of');\nmodule.exports = require('../../modules/_core').Object.setPrototypeOf;\n","import _Object$setPrototypeOf from \"core-js/library/fn/object/set-prototype-of.js\";\nfunction _setPrototypeOf(t, e) {\n return _setPrototypeOf = _Object$setPrototypeOf ? _Object$setPrototypeOf.bind() : function (t, e) {\n return t.__proto__ = e, t;\n }, _setPrototypeOf(t, e);\n}\nexport { _setPrototypeOf as default };","import _Object$create from \"core-js/library/fn/object/create.js\";\nimport setPrototypeOf from \"./setPrototypeOf.js\";\nfunction _inheritsLoose(t, o) {\n t.prototype = _Object$create(o.prototype), t.prototype.constructor = t, setPrototypeOf(t, o);\n}\nexport { _inheritsLoose as default };","function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (e.indexOf(n) >= 0) continue;\n t[n] = r[n];\n }\n return t;\n}\nexport { _objectWithoutPropertiesLoose as default };","var DESCRIPTORS = require('./_descriptors');\nvar getKeys = require('./_object-keys');\nvar toIObject = require('./_to-iobject');\nvar isEnum = require('./_object-pie').f;\nmodule.exports = function (isEntries) {\n return function (it) {\n var O = toIObject(it);\n var keys = getKeys(O);\n var length = keys.length;\n var i = 0;\n var result = [];\n var key;\n while (length > i) {\n key = keys[i++];\n if (!DESCRIPTORS || isEnum.call(O, key)) {\n result.push(isEntries ? [key, O[key]] : O[key]);\n }\n }\n return result;\n };\n};\n","// https://github.com/tc39/proposal-object-values-entries\nvar $export = require('./_export');\nvar $entries = require('./_object-to-array')(true);\n\n$export($export.S, 'Object', {\n entries: function entries(it) {\n return $entries(it);\n }\n});\n","require('../../modules/es7.object.entries');\nmodule.exports = require('../../modules/_core').Object.entries;\n","module.exports = require(\"core-js/library/fn/object/entries\");","import _Object$entries from \"@babel/runtime-corejs2/core-js/object/entries\";\nimport _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\n// TODO: The publicly exposed parts of this should be in lib/BootstrapUtils.\nimport invariant from 'invariant';\nimport PropTypes from 'prop-types';\nimport { SIZE_MAP } from './StyleConfig';\n\nfunction curry(fn) {\n return function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var last = args[args.length - 1];\n\n if (typeof last === 'function') {\n return fn.apply(void 0, args);\n }\n\n return function (Component) {\n return fn.apply(void 0, args.concat([Component]));\n };\n };\n}\n\nexport function prefix(props, variant) {\n var bsClass = (props.bsClass || '').trim();\n !(bsClass != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'A `bsClass` prop is required for this component') : invariant(false) : void 0;\n return bsClass + (variant ? \"-\" + variant : '');\n}\nexport var bsClass = curry(function (defaultClass, Component) {\n var propTypes = Component.propTypes || (Component.propTypes = {});\n var defaultProps = Component.defaultProps || (Component.defaultProps = {});\n propTypes.bsClass = PropTypes.string;\n defaultProps.bsClass = defaultClass;\n return Component;\n});\nexport var bsStyles = curry(function (styles, defaultStyle, Component) {\n if (typeof defaultStyle !== 'string') {\n Component = defaultStyle;\n defaultStyle = undefined;\n }\n\n var existing = Component.STYLES || [];\n var propTypes = Component.propTypes || {};\n styles.forEach(function (style) {\n if (existing.indexOf(style) === -1) {\n existing.push(style);\n }\n });\n var propType = PropTypes.oneOf(existing); // expose the values on the propType function for documentation\n\n Component.STYLES = existing;\n propType._values = existing;\n Component.propTypes = _extends({}, propTypes, {\n bsStyle: propType\n });\n\n if (defaultStyle !== undefined) {\n var defaultProps = Component.defaultProps || (Component.defaultProps = {});\n defaultProps.bsStyle = defaultStyle;\n }\n\n return Component;\n});\nexport var bsSizes = curry(function (sizes, defaultSize, Component) {\n if (typeof defaultSize !== 'string') {\n Component = defaultSize;\n defaultSize = undefined;\n }\n\n var existing = Component.SIZES || [];\n var propTypes = Component.propTypes || {};\n sizes.forEach(function (size) {\n if (existing.indexOf(size) === -1) {\n existing.push(size);\n }\n });\n var values = [];\n existing.forEach(function (size) {\n var mappedSize = SIZE_MAP[size];\n\n if (mappedSize && mappedSize !== size) {\n values.push(mappedSize);\n }\n\n values.push(size);\n });\n var propType = PropTypes.oneOf(values);\n propType._values = values; // expose the values on the propType function for documentation\n\n Component.SIZES = existing;\n Component.propTypes = _extends({}, propTypes, {\n bsSize: propType\n });\n\n if (defaultSize !== undefined) {\n if (!Component.defaultProps) {\n Component.defaultProps = {};\n }\n\n Component.defaultProps.bsSize = defaultSize;\n }\n\n return Component;\n});\nexport function getClassSet(props) {\n var _classes;\n\n var classes = (_classes = {}, _classes[prefix(props)] = true, _classes);\n\n if (props.bsSize) {\n var bsSize = SIZE_MAP[props.bsSize] || props.bsSize;\n classes[prefix(props, bsSize)] = true;\n }\n\n if (props.bsStyle) {\n classes[prefix(props, props.bsStyle)] = true;\n }\n\n return classes;\n}\n\nfunction getBsProps(props) {\n return {\n bsClass: props.bsClass,\n bsSize: props.bsSize,\n bsStyle: props.bsStyle,\n bsRole: props.bsRole\n };\n}\n\nfunction isBsProp(propName) {\n return propName === 'bsClass' || propName === 'bsSize' || propName === 'bsStyle' || propName === 'bsRole';\n}\n\nexport function splitBsProps(props) {\n var elementProps = {};\n\n _Object$entries(props).forEach(function (_ref) {\n var propName = _ref[0],\n propValue = _ref[1];\n\n if (!isBsProp(propName)) {\n elementProps[propName] = propValue;\n }\n });\n\n return [getBsProps(props), elementProps];\n}\nexport function splitBsPropsAndOmit(props, omittedPropNames) {\n var isOmittedProp = {};\n omittedPropNames.forEach(function (propName) {\n isOmittedProp[propName] = true;\n });\n var elementProps = {};\n\n _Object$entries(props).forEach(function (_ref2) {\n var propName = _ref2[0],\n propValue = _ref2[1];\n\n if (!isBsProp(propName) && !isOmittedProp[propName]) {\n elementProps[propName] = propValue;\n }\n });\n\n return [getBsProps(props), elementProps];\n}\n/**\n * Add a style variant to a Component. Mutates the propTypes of the component\n * in order to validate the new variant.\n */\n\nexport function addStyle(Component) {\n for (var _len2 = arguments.length, styleVariant = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n styleVariant[_key2 - 1] = arguments[_key2];\n }\n\n bsStyles(styleVariant)(Component);\n}\nexport var _curry = curry;","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { bsClass, prefix, splitBsProps } from './utils/bootstrapUtils';\nvar propTypes = {\n /**\n * Sets image as responsive image\n */\n responsive: PropTypes.bool,\n\n /**\n * Sets image shape as rounded\n */\n rounded: PropTypes.bool,\n\n /**\n * Sets image shape as circle\n */\n circle: PropTypes.bool,\n\n /**\n * Sets image shape as thumbnail\n */\n thumbnail: PropTypes.bool\n};\nvar defaultProps = {\n responsive: false,\n rounded: false,\n circle: false,\n thumbnail: false\n};\n\nvar Image =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Image, _React$Component);\n\n function Image() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = Image.prototype;\n\n _proto.render = function render() {\n var _classes;\n\n var _this$props = this.props,\n responsive = _this$props.responsive,\n rounded = _this$props.rounded,\n circle = _this$props.circle,\n thumbnail = _this$props.thumbnail,\n className = _this$props.className,\n props = _objectWithoutPropertiesLoose(_this$props, [\"responsive\", \"rounded\", \"circle\", \"thumbnail\", \"className\"]);\n\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n\n var classes = (_classes = {}, _classes[prefix(bsProps, 'responsive')] = responsive, _classes[prefix(bsProps, 'rounded')] = rounded, _classes[prefix(bsProps, 'circle')] = circle, _classes[prefix(bsProps, 'thumbnail')] = thumbnail, _classes);\n return React.createElement(\"img\", _extends({}, elementProps, {\n className: classNames(className, classes)\n }));\n };\n\n return Image;\n}(React.Component);\n\nImage.propTypes = propTypes;\nImage.defaultProps = defaultProps;\nexport default bsClass('img', Image);","import React, { useState } from 'react';\nimport { Button, Image, Table, Glyphicon, ButtonToolbar, ButtonGroup, SplitButton, MenuItem, OverlayTrigger, Popover, Tooltip } from 'react-bootstrap';\nimport { useReactTable, getCoreRowModel, getFilteredRowModel, getSortedRowModel, getPaginationRowModel, getFacetedRowModel, getFacetedUniqueValues, getFacetedMinMaxValues, flexRender } from '@tanstack/react-table';\nimport Select from 'react-select';\n\nfunction ZKillButton(props) {\n return (React.createElement(Button, { target: \"_blank\", rel: \"noopener noreferrer\", disabled: props.character_name ? false : true, alt: \"zKillboard\", href: `https://zkillboard.com/search/${props.character_name}/` },\n React.createElement(\"span\", { className: \"fa-stack fas\", style: { lineHeight: \"1em\", height: \"1em\", width: \"1em\" } },\n React.createElement(\"i\", { className: \"fas fa-sort-down\" }),\n React.createElement(\"i\", { className: \"fas fa-minus fa-stack-1x\", style: { top: \"-3px\" } }))));\n}\n\nfunction EveWhoButton(props) {\n return (React.createElement(Button, { target: \"_blank\", rel: \"noopener noreferrer\", disabled: props.character_id ? false : true, alt: \"Eve Who\", href: `https://evewho.com/character/${props.character_id}/` },\n React.createElement(\"i\", { className: \"fas fa-user\" })));\n}\n\nconst CharacterPortrait = (props) => {\n return (React.createElement(Image, { height: props.height && props.height, width: props.width && props.width, style: props.style && props.style, src: `https://images.evetech.net/characters/${props.character_id}/portrait?size=${props.size}` }));\n};\nconst CorporationLogo = (props) => {\n return (React.createElement(Image, { height: props.height && props.height, width: props.width && props.width, style: props.style && props.style, src: `https://images.evetech.net/corporations/${props.corporation_id}/logo?size=${props.size}` }));\n};\nconst AllianceLogo = (props) => {\n return (React.createElement(Image, { height: props.height && props.height, width: props.width && props.width, style: props.style && props.style, src: `https://images.evetech.net/alliances/${props.alliance_id}/logo?size=${props.size}` }));\n};\nconst TypeIcon = (props) => {\n return (React.createElement(Image, { height: props.height && props.height, width: props.width && props.width, style: props.style && props.style, src: `https://images.evetech.net/types/${props.type_id}/${props.size > 64 ? \"render\" : \"icon\"}?size=${props.size}` }));\n};\n\nfunction styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nvar css_248z$1 = \".Loader-module_flexContainer__GlMdi {\\n margin-top: 150px;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n align-content: center;\\n flex-wrap: wrap;\\n flex-direction: row;\\n}\\n\\n@keyframes Loader-module_shake__1mapc {\\n 10%,\\n 90% {\\n transform: translate3d(-1px, 0, 0);\\n }\\n\\n 20%,\\n 80% {\\n transform: translate3d(2px, 0, 0);\\n }\\n\\n 30%,\\n 50%,\\n 70% {\\n transform: translate3d(-4px, 0, 0);\\n }\\n\\n 40%,\\n 60% {\\n transform: translate3d(4px, 0, 0);\\n }\\n}\\n\\n.Loader-module_errorAnim__h3bUy {\\n animation: Loader-module_shake__1mapc 0.82s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;\\n animation-iteration-count: infinite;\\n}\\n\\n.Loader-module_ldsDualRing__EJnqD {\\n display: inline-block;\\n width: 80px;\\n height: 80px;\\n}\\n\\n.Loader-module_ldsDualRing__EJnqD:after {\\n content: \\\" \\\";\\n display: block;\\n width: 64px;\\n height: 64px;\\n margin: 8px;\\n border-radius: 50%;\\n border-width: 6px;\\n border-style: solid;\\n border-left-color: inherit;\\n border-top-color: transparent;\\n border-right-color: inherit;\\n border-bottom-color: transparent;\\n animation: Loader-module_lds-dual-ring__4SWmn 1.2s linear infinite;\\n}\\n\\n@keyframes Loader-module_lds-dual-ring__4SWmn {\\n 0% {\\n transform: rotate(0deg);\\n }\\n 100% {\\n transform: rotate(360deg);\\n }\\n}\\n\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkxvYWRlci5tb2R1bGUuY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsaUJBQWlCO0VBQ2pCLGFBQWE7RUFDYixtQkFBbUI7RUFDbkIsdUJBQXVCO0VBQ3ZCLHFCQUFxQjtFQUNyQixlQUFlO0VBQ2YsbUJBQW1CO0FBQ3JCOztBQUVBO0VBQ0U7O0lBRUUsa0NBQWtDO0VBQ3BDOztFQUVBOztJQUVFLGlDQUFpQztFQUNuQzs7RUFFQTs7O0lBR0Usa0NBQWtDO0VBQ3BDOztFQUVBOztJQUVFLGlDQUFpQztFQUNuQztBQUNGOztBQUVBO0VBQ0UscUZBQWdFO0VBQ2hFLG1DQUFtQztBQUNyQzs7QUFFQTtFQUNFLHFCQUFxQjtFQUNyQixXQUFXO0VBQ1gsWUFBWTtBQUNkOztBQUVBO0VBQ0UsWUFBWTtFQUNaLGNBQWM7RUFDZCxXQUFXO0VBQ1gsWUFBWTtFQUNaLFdBQVc7RUFDWCxrQkFBa0I7RUFDbEIsaUJBQWlCO0VBQ2pCLG1CQUFtQjtFQUNuQiwwQkFBMEI7RUFDMUIsNkJBQTZCO0VBQzdCLDJCQUEyQjtFQUMzQixnQ0FBZ0M7RUFDaEMsa0VBQTZDO0FBQy9DOztBQUVBO0VBQ0U7SUFDRSx1QkFBdUI7RUFDekI7RUFDQTtJQUNFLHlCQUF5QjtFQUMzQjtBQUNGIiwiZmlsZSI6IkxvYWRlci5tb2R1bGUuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmZsZXhDb250YWluZXIge1xuICBtYXJnaW4tdG9wOiAxNTBweDtcbiAgZGlzcGxheTogZmxleDtcbiAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG4gIGFsaWduLWNvbnRlbnQ6IGNlbnRlcjtcbiAgZmxleC13cmFwOiB3cmFwO1xuICBmbGV4LWRpcmVjdGlvbjogcm93O1xufVxuXG5Aa2V5ZnJhbWVzIHNoYWtlIHtcbiAgMTAlLFxuICA5MCUge1xuICAgIHRyYW5zZm9ybTogdHJhbnNsYXRlM2QoLTFweCwgMCwgMCk7XG4gIH1cblxuICAyMCUsXG4gIDgwJSB7XG4gICAgdHJhbnNmb3JtOiB0cmFuc2xhdGUzZCgycHgsIDAsIDApO1xuICB9XG5cbiAgMzAlLFxuICA1MCUsXG4gIDcwJSB7XG4gICAgdHJhbnNmb3JtOiB0cmFuc2xhdGUzZCgtNHB4LCAwLCAwKTtcbiAgfVxuXG4gIDQwJSxcbiAgNjAlIHtcbiAgICB0cmFuc2Zvcm06IHRyYW5zbGF0ZTNkKDRweCwgMCwgMCk7XG4gIH1cbn1cblxuLmVycm9yQW5pbSB7XG4gIGFuaW1hdGlvbjogc2hha2UgMC44MnMgY3ViaWMtYmV6aWVyKDAuMzYsIDAuMDcsIDAuMTksIDAuOTcpIGJvdGg7XG4gIGFuaW1hdGlvbi1pdGVyYXRpb24tY291bnQ6IGluZmluaXRlO1xufVxuXG4ubGRzRHVhbFJpbmcge1xuICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XG4gIHdpZHRoOiA4MHB4O1xuICBoZWlnaHQ6IDgwcHg7XG59XG5cbi5sZHNEdWFsUmluZzphZnRlciB7XG4gIGNvbnRlbnQ6IFwiIFwiO1xuICBkaXNwbGF5OiBibG9jaztcbiAgd2lkdGg6IDY0cHg7XG4gIGhlaWdodDogNjRweDtcbiAgbWFyZ2luOiA4cHg7XG4gIGJvcmRlci1yYWRpdXM6IDUwJTtcbiAgYm9yZGVyLXdpZHRoOiA2cHg7XG4gIGJvcmRlci1zdHlsZTogc29saWQ7XG4gIGJvcmRlci1sZWZ0LWNvbG9yOiBpbmhlcml0O1xuICBib3JkZXItdG9wLWNvbG9yOiB0cmFuc3BhcmVudDtcbiAgYm9yZGVyLXJpZ2h0LWNvbG9yOiBpbmhlcml0O1xuICBib3JkZXItYm90dG9tLWNvbG9yOiB0cmFuc3BhcmVudDtcbiAgYW5pbWF0aW9uOiBsZHMtZHVhbC1yaW5nIDEuMnMgbGluZWFyIGluZmluaXRlO1xufVxuXG5Aa2V5ZnJhbWVzIGxkcy1kdWFsLXJpbmcge1xuICAwJSB7XG4gICAgdHJhbnNmb3JtOiByb3RhdGUoMGRlZyk7XG4gIH1cbiAgMTAwJSB7XG4gICAgdHJhbnNmb3JtOiByb3RhdGUoMzYwZGVnKTtcbiAgfVxufVxuIl19 */\";\nvar styles = {\"flexContainer\":\"Loader-module_flexContainer__GlMdi\",\"errorAnim\":\"Loader-module_errorAnim__h3bUy\",\"shake\":\"Loader-module_shake__1mapc\",\"ldsDualRing\":\"Loader-module_ldsDualRing__EJnqD\",\"lds-dual-ring\":\"Loader-module_lds-dual-ring__4SWmn\"};\nstyleInject(css_248z$1);\n\nconst PanelLoader = (props = { title: \"Loading...\" }) => {\n return (React.createElement(\"div\", { className: styles.flexContainer },\n React.createElement(\"div\", { className: \"text-center\" },\n React.createElement(\"div\", null,\n React.createElement(\"div\", { className: styles.ldsDualRing })),\n React.createElement(\"h3\", null, props.title && props.title),\n React.createElement(\"p\", null, props.message && props.message))));\n};\nconst ErrorLoader = (props = { title: \"Error Loading Component\" }) => {\n return (React.createElement(\"div\", { className: styles.flexContainer },\n React.createElement(\"div\", { className: \"text-center\" },\n React.createElement(\"div\", { className: styles.errorAnim },\n React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: \"100\", height: \"100\", fill: \"currentColor\", className: \"bi bi-exclamation-triangle\", viewBox: \"0 0 16 16\" },\n React.createElement(\"path\", { d: \"M7.938 2.016A.13.13 0 0 1 8.002 2a.13.13 0 0 1 .063.016.146.146 0 0 1 .054.057l6.857 11.667c.036.06.035.124.002.183a.163.163 0 0 1-.054.06.116.116 0 0 1-.066.017H1.146a.115.115 0 0 1-.066-.017.163.163 0 0 1-.054-.06.176.176 0 0 1 .002-.183L7.884 2.073a.147.147 0 0 1 .054-.057zm1.044-.45a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566z\" }),\n React.createElement(\"path\", { d: \"M7.002 12a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 5.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995z\" }))),\n React.createElement(\"h3\", null, props.title && props.title),\n React.createElement(\"p\", null, props.message && props.message),\n React.createElement(\"p\", null))));\n};\n\nvar css_248z = \"@keyframes BaseTable-module_spin__lpdYb {\\n from {\\n transform: rotate(0deg);\\n }\\n to {\\n transform: rotate(359deg);\\n }\\n}\\n\\n.BaseTable-module_glyphiconRefreshAnimate__HIIZm {\\n -animation: BaseTable-module_spin__lpdYb 2s infinite linear;\\n -ms-animation: BaseTable-module_spin__lpdYb 2s infinite linear;\\n -webkit-animation: BaseTable-module_spin__lpdYb 2s infinite linear;\\n -moz-animation: BaseTable-module_spin__lpdYb 2s infinite linear;\\n}\\n\\n.BaseTable-module_filterBtn__ODmli{\\n color: hsl(0, 0%, 50%) !important;\\n margin-top: 2px !important;\\n min-height: 38px !important;\\n background-color: white !important;\\n border-color: hsl(0, 0%, 80%) !important;\\n border-top-left-radius: 4px !important;\\n border-bottom-left-radius: 4px !important;\\n border-right: 0 !important;\\n border-width: 1px !important;\\n font-weight: bold !important;\\n display: flex !important;\\n font-size: 15px !important;\\n font-family: \\\"Lato\\\",\\\"Helvetica Neue\\\",Helvetica,Arial,sans-serif !important;\\n}\\n\\n.BaseTable-module_filterToggle__tmPmV{\\n stroke: hsl(0, 0%, 80%) !important;\\n fill: hsl(0, 0%, 80%) !important;\\n stroke-width: 0;\\n padding-top: 8px !important;\\n margin-top: 2px !important;\\n min-height: 38px !important;\\n background-color: white !important;\\n border-color: hsl(0, 0%, 80%) !important;\\n border-top-right-radius: 4px !important;\\n border-bottom-right-radius: 4px !important;\\n border-left: 0 !important;\\n border-width: 1px !important;\\n display: flex !important;\\n font-size: 15px !important;\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkJhc2VUYWJsZS5tb2R1bGUuY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0U7SUFDRSx1QkFBdUI7RUFDekI7RUFDQTtJQUNFLHlCQUF5QjtFQUMzQjtBQUNGOztBQUVBO0VBQ0UsMkRBQW1DO0VBQ25DLDhEQUFzQztFQUN0QyxrRUFBMEM7RUFDMUMsK0RBQXVDO0FBQ3pDOztBQUVBO0VBQ0UsaUNBQWlDO0VBQ2pDLDBCQUEwQjtFQUMxQiwyQkFBMkI7RUFDM0Isa0NBQWtDO0VBQ2xDLHdDQUF3QztFQUN4QyxzQ0FBc0M7RUFDdEMseUNBQXlDO0VBQ3pDLDBCQUEwQjtFQUMxQiw0QkFBNEI7RUFDNUIsNEJBQTRCO0VBQzVCLHdCQUF3QjtFQUN4QiwwQkFBMEI7RUFDMUIsMEVBQTBFO0FBQzVFOztBQUVBO0VBQ0Usa0NBQWtDO0VBQ2xDLGdDQUFnQztFQUNoQyxlQUFlO0VBQ2YsMkJBQTJCO0VBQzNCLDBCQUEwQjtFQUMxQiwyQkFBMkI7RUFDM0Isa0NBQWtDO0VBQ2xDLHdDQUF3QztFQUN4Qyx1Q0FBdUM7RUFDdkMsMENBQTBDO0VBQzFDLHlCQUF5QjtFQUN6Qiw0QkFBNEI7RUFDNUIsd0JBQXdCO0VBQ3hCLDBCQUEwQjtBQUM1QiIsImZpbGUiOiJCYXNlVGFibGUubW9kdWxlLmNzcyIsInNvdXJjZXNDb250ZW50IjpbIkBrZXlmcmFtZXMgc3BpbiB7XG4gIGZyb20ge1xuICAgIHRyYW5zZm9ybTogcm90YXRlKDBkZWcpO1xuICB9XG4gIHRvIHtcbiAgICB0cmFuc2Zvcm06IHJvdGF0ZSgzNTlkZWcpO1xuICB9XG59XG5cbi5nbHlwaGljb25SZWZyZXNoQW5pbWF0ZSB7XG4gIC1hbmltYXRpb246IHNwaW4gMnMgaW5maW5pdGUgbGluZWFyO1xuICAtbXMtYW5pbWF0aW9uOiBzcGluIDJzIGluZmluaXRlIGxpbmVhcjtcbiAgLXdlYmtpdC1hbmltYXRpb246IHNwaW4gMnMgaW5maW5pdGUgbGluZWFyO1xuICAtbW96LWFuaW1hdGlvbjogc3BpbiAycyBpbmZpbml0ZSBsaW5lYXI7XG59XG5cbi5maWx0ZXJCdG57XG4gIGNvbG9yOiBoc2woMCwgMCUsIDUwJSkgIWltcG9ydGFudDtcbiAgbWFyZ2luLXRvcDogMnB4ICFpbXBvcnRhbnQ7XG4gIG1pbi1oZWlnaHQ6IDM4cHggIWltcG9ydGFudDtcbiAgYmFja2dyb3VuZC1jb2xvcjogd2hpdGUgIWltcG9ydGFudDtcbiAgYm9yZGVyLWNvbG9yOiBoc2woMCwgMCUsIDgwJSkgIWltcG9ydGFudDtcbiAgYm9yZGVyLXRvcC1sZWZ0LXJhZGl1czogNHB4ICFpbXBvcnRhbnQ7XG4gIGJvcmRlci1ib3R0b20tbGVmdC1yYWRpdXM6IDRweCAhaW1wb3J0YW50O1xuICBib3JkZXItcmlnaHQ6IDAgIWltcG9ydGFudDtcbiAgYm9yZGVyLXdpZHRoOiAxcHggIWltcG9ydGFudDtcbiAgZm9udC13ZWlnaHQ6IGJvbGQgIWltcG9ydGFudDtcbiAgZGlzcGxheTogZmxleCAhaW1wb3J0YW50O1xuICBmb250LXNpemU6IDE1cHggIWltcG9ydGFudDtcbiAgZm9udC1mYW1pbHk6IFwiTGF0b1wiLFwiSGVsdmV0aWNhIE5ldWVcIixIZWx2ZXRpY2EsQXJpYWwsc2Fucy1zZXJpZiAhaW1wb3J0YW50O1xufVxuXG4uZmlsdGVyVG9nZ2xle1xuICBzdHJva2U6IGhzbCgwLCAwJSwgODAlKSAhaW1wb3J0YW50O1xuICBmaWxsOiBoc2woMCwgMCUsIDgwJSkgIWltcG9ydGFudDtcbiAgc3Ryb2tlLXdpZHRoOiAwO1xuICBwYWRkaW5nLXRvcDogOHB4ICFpbXBvcnRhbnQ7XG4gIG1hcmdpbi10b3A6IDJweCAhaW1wb3J0YW50O1xuICBtaW4taGVpZ2h0OiAzOHB4ICFpbXBvcnRhbnQ7XG4gIGJhY2tncm91bmQtY29sb3I6IHdoaXRlICFpbXBvcnRhbnQ7XG4gIGJvcmRlci1jb2xvcjogaHNsKDAsIDAlLCA4MCUpICFpbXBvcnRhbnQ7XG4gIGJvcmRlci10b3AtcmlnaHQtcmFkaXVzOiA0cHggIWltcG9ydGFudDtcbiAgYm9yZGVyLWJvdHRvbS1yaWdodC1yYWRpdXM6IDRweCAhaW1wb3J0YW50O1xuICBib3JkZXItbGVmdDogMCAhaW1wb3J0YW50O1xuICBib3JkZXItd2lkdGg6IDFweCAhaW1wb3J0YW50O1xuICBkaXNwbGF5OiBmbGV4ICFpbXBvcnRhbnQ7XG4gIGZvbnQtc2l6ZTogMTVweCAhaW1wb3J0YW50O1xufSJdfQ== */\";\nvar tableStyles = {\"glyphiconRefreshAnimate\":\"BaseTable-module_glyphiconRefreshAnimate__HIIZm\",\"spin\":\"BaseTable-module_spin__lpdYb\",\"filterBtn\":\"BaseTable-module_filterBtn__ODmli\",\"filterToggle\":\"BaseTable-module_filterToggle__tmPmV\"};\nstyleInject(css_248z);\n\nconst colourStyles = {\n option: (styles) => {\n return {\n ...styles,\n color: \"black\",\n };\n },\n};\n\nfunction MyTooltip(message) {\n return React.createElement(Tooltip, { id: \"character_tooltip\" }, message);\n}\nconst BaseTable = ({ isLoading, isFetching, debugTable, data, error, columns, asyncExpandFunction, striped, hover, initialState = {}, rowClasses = (row) => {\n return \"\";\n}, }) => {\n const table = useReactTable({\n data,\n columns,\n // Pipeline\n getCoreRowModel: getCoreRowModel(),\n getFilteredRowModel: getFilteredRowModel(),\n getSortedRowModel: getSortedRowModel(),\n getPaginationRowModel: getPaginationRowModel(),\n getFacetedRowModel: getFacetedRowModel(),\n getFacetedUniqueValues: getFacetedUniqueValues(),\n getFacetedMinMaxValues: getFacetedMinMaxValues(),\n //\n debugTable: debugTable,\n state: initialState,\n });\n if (isLoading)\n return (React.createElement(React.Fragment, null,\n React.createElement(\"hr\", null),\n React.createElement(PanelLoader, { title: \"Loading Data\", message: \"Please Wait\" })));\n if (error)\n return (React.createElement(React.Fragment, null,\n React.createElement(\"hr\", null),\n React.createElement(ErrorLoader, { title: \"Error Loading from API\", message: \"Try Again Later\" })));\n return (React.createElement(_baseTable, { ...{\n table,\n data,\n columns,\n isFetching,\n debugTable,\n initialState,\n striped,\n hover,\n rowClasses,\n } }));\n};\nfunction _baseTable({ table, data, columns, isFetching, striped = false, hover = false, debugTable = false, initialState = {}, rowClasses = (row) => {\n return \"\";\n}, }) {\n return (React.createElement(React.Fragment, null,\n React.createElement(Table, { ...{ striped, hover } },\n React.createElement(\"thead\", null, table.getHeaderGroups().map((headerGroup) => (React.createElement(React.Fragment, null,\n React.createElement(\"tr\", { key: `name-${headerGroup.id}` }, headerGroup.headers.map((header) => {\n return (React.createElement(\"th\", { key: header.id, colSpan: header.colSpan }, header.isPlaceholder ? null : (React.createElement(\"div\", { ...{\n className: header.column.getCanSort()\n ? \"cursor-pointer select-none\"\n : \"\",\n onClick: header.column.getToggleSortingHandler(),\n } },\n flexRender(header.column.columnDef.header, header.getContext()),\n header.column.getCanSort() ? (React.createElement(React.Fragment, null, {\n asc: (React.createElement(Glyphicon, { className: \"pull-right\", glyph: \"sort-by-attributes\" })),\n desc: (React.createElement(Glyphicon, { className: \"pull-right\", glyph: \"sort-by-attributes-alt\" })),\n }[header.column.getIsSorted()] ?? (React.createElement(Glyphicon, { className: \"pull-right\", glyph: \"sort\" })))) : null))));\n })),\n React.createElement(\"tr\", { key: `filter-${headerGroup.id}` }, headerGroup.headers.map((header) => {\n return (React.createElement(\"th\", { key: header.id, colSpan: header.colSpan }, header.column.getCanFilter() ? (React.createElement(\"div\", null,\n React.createElement(Filter, { column: header.column, table: table }))) : (\"\")));\n })))))),\n React.createElement(\"tbody\", null, table.getRowModel().rows.map((row) => {\n return (React.createElement(\"tr\", { key: row.id, className: rowClasses(row.original) }, row.getVisibleCells().map((cell) => {\n return (React.createElement(\"td\", { key: cell.id, style: { verticalAlign: \"middle\" } }, flexRender(cell.column.columnDef.cell, cell.getContext())));\n })));\n }))),\n React.createElement(\"div\", { className: \"pagination pull-right\" },\n React.createElement(ButtonToolbar, null,\n React.createElement(ButtonGroup, null,\n React.createElement(Button, { bsStyle: \"success\", onClick: () => table.setPageIndex(0), disabled: !table.getCanPreviousPage() },\n React.createElement(Glyphicon, { glyph: \"step-backward\" })),\n \" \",\n React.createElement(Button, { bsStyle: \"success\", onClick: () => table.previousPage(), disabled: !table.getCanPreviousPage() },\n React.createElement(Glyphicon, { glyph: \"triangle-left\" })),\n \" \",\n React.createElement(Button, { bsStyle: \"success\", onClick: () => table.nextPage(), disabled: !table.getCanNextPage() },\n React.createElement(Glyphicon, { glyph: \"triangle-right\" })),\n \" \",\n React.createElement(Button, { bsStyle: \"success\", onClick: () => table.setPageIndex(table.getPageCount() - 1), disabled: !table.getCanNextPage() },\n React.createElement(Glyphicon, { glyph: \"step-forward\" }))),\n React.createElement(ButtonGroup, null,\n React.createElement(Button, { active: true, bsStyle: \"success\" }, \"Page Size:\"),\n \" \",\n React.createElement(SplitButton, { id: \"pageSizeDropdown\", bsStyle: \"success\", title: table.getState().pagination.pageSize }, [10, 50, 100, 1000000].map((_pageSize) => (React.createElement(MenuItem, { id: _pageSize, key: _pageSize, eventKey: _pageSize, value: _pageSize, onSelect: (eventKey, event) => {\n table.setPageSize(Number(eventKey));\n } },\n \"Show \",\n _pageSize))))))),\n React.createElement(\"div\", { className: \"pagination pull-left\" },\n React.createElement(ButtonGroup, null,\n React.createElement(Button, { active: true, bsStyle: \"info\" }, React.createElement(React.Fragment, null,\n table.getState().pagination.pageIndex + 1,\n \" of\",\n \" \",\n table.getPageCount())),\n \" \",\n isFetching ? (React.createElement(OverlayTrigger, { placement: \"bottom\", trigger: \"focus\", overlay: MyTooltip({ message: \"Refreshing Data\" }) },\n React.createElement(Button, { bsStyle: \"info\" },\n React.createElement(Glyphicon, { className: tableStyles.glyphiconRefreshAnimate, glyph: \"refresh\" })))) : (React.createElement(OverlayTrigger, { placement: \"bottom\", trigger: \"focus\", overlay: MyTooltip(\"Data Loaded: \" + new Date().toLocaleString()) },\n React.createElement(Button, { bsStyle: \"info\" },\n React.createElement(Glyphicon, { glyph: \"ok\" })))))),\n debugTable && (React.createElement(\"div\", { className: \"col-xs-12\" },\n React.createElement(\"div\", null,\n table.getRowModel().rows.length,\n \" Rows\"),\n React.createElement(\"pre\", null, JSON.stringify(table.getState(), null, 2))))));\n}\nfunction Filter({ column, table, }) {\n const [input, setInput] = useState(\"\");\n const firstValue = table\n .getPreFilteredRowModel()\n .flatRows[0]?.getValue(column.id);\n const isHTML = RegExp.prototype.test.bind(/(<([^>]+)>)/i);\n const selectOveride = { Menu: () => React.createElement(React.Fragment, null), IndicatorsContainer: () => React.createElement(React.Fragment, null) };\n const columnFilterValue = column.getFilterValue();\n const popoverNumber = (React.createElement(Popover, { id: \"popover-positioned-top\" },\n React.createElement(\"input\", { type: \"number\", value: columnFilterValue?.[0] ?? \"\", onChange: (e) => column.setFilterValue((old) => [\n e.target.value,\n old?.[1],\n ]), placeholder: `Min`, className: \"form-control\" }),\n React.createElement(\"p\", { className: \"text-center\" }, \"to\"),\n React.createElement(\"input\", { type: \"number\", value: columnFilterValue?.[1] ?? \"\", onChange: (e) => column.setFilterValue((old) => [\n old?.[0],\n e.target.value,\n ]), placeholder: `Max`, className: \"form-control\" })));\n if (typeof firstValue === \"number\") {\n let fromToNumber = columnFilterValue;\n return (React.createElement(OverlayTrigger, { trigger: \"click\", placement: \"bottom\", overlay: popoverNumber },\n React.createElement(ButtonGroup, { style: { display: \"flex\", width: \"100%\" } },\n React.createElement(Button, { className: tableStyles.filterBtn + \" btn-block\", bsStyle: \"primary\", bsSize: \"small\" },\n React.createElement(React.Fragment, null,\n typeof fromToNumber?.[0] === \"undefined\" ||\n fromToNumber?.[0] === \"\"\n ? \"-∞\"\n : fromToNumber?.[0],\n \" to \",\n typeof fromToNumber?.[1] === \"undefined\" ||\n fromToNumber?.[1] === \"\"\n ? \"∞\"\n : fromToNumber?.[1])),\n React.createElement(Button, { className: tableStyles.filterToggle, bsStyle: \"primary\", bsSize: \"small\" },\n React.createElement(\"svg\", { height: \"20\", width: \"20\", viewBox: \"0 0 20 20\", \"aria-hidden\": \"true\", focusable: \"false\" },\n React.createElement(\"path\", { d: \"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z\" }))))));\n }\n else if (typeof firstValue === \"boolean\") {\n return (React.createElement(Select, { styles: colourStyles, isClearable: true, onChange: (value, action) => {\n setInput(\"\");\n column.setFilterValue(value ? value.value : \"\");\n }, placeholder: `Filter...`, options: [\n { value: true, label: \"Pass\" },\n { value: false, label: \"Fail\" },\n ] }));\n }\n else if (typeof firstValue === \"object\") {\n return (React.createElement(Select, { styles: colourStyles, isClearable: true, onChange: (value, action) => {\n setInput(\"\");\n column.setFilterValue(value ? value.value : \"\");\n }, inputValue: input, onInputChange: (value, action) => {\n if (action.action === \"input-change\") {\n setInput(value);\n column.setFilterValue(value);\n }\n }, placeholder: `Search...`, className: \"\", options: [], components: selectOveride }));\n }\n else {\n const sortedUniqueValues = Array.from(column.getFacetedUniqueValues().keys()).sort();\n const selectOptions = sortedUniqueValues\n .slice(0, 50)\n .reduce((previousValue, currentValue) => {\n previousValue.push({ value: currentValue, label: currentValue });\n return previousValue;\n }, []);\n return (React.createElement(Select, { styles: colourStyles, isClearable: true, onChange: (value, action) => {\n setInput(\"\");\n column.setFilterValue(value ? value.value : \"\");\n }, inputValue: input, onInputChange: (value, action) => {\n if (action.action === \"input-change\") {\n setInput(value);\n column.setFilterValue(value);\n }\n }, placeholder: `Search...`, className: \"\", options: selectOptions, components: isHTML(firstValue) ? selectOveride : {} }));\n }\n}\n\nexport { AllianceLogo, BaseTable, CharacterPortrait, CorporationLogo, ErrorLoader, EveWhoButton, PanelLoader, TypeIcon, ZKillButton };\n//# sourceMappingURL=index.js.map\n","import { loadCharacterStatus } from \"../../api/character\";\nimport { RefreshCharButton } from \"../RefreshAccountButton\";\nimport {\n AllianceLogo,\n CharacterPortrait,\n CorporationLogo,\n} from \"@pvyparts/allianceauth-components\";\nimport { Card } from \"react-bootstrap\";\nimport Button from \"react-bootstrap/Button\";\nimport ButtonGroup from \"react-bootstrap/ButtonGroup\";\nimport OverlayTrigger from \"react-bootstrap/OverlayTrigger\";\nimport Tooltip from \"react-bootstrap/Tooltip\";\nimport { useQuery } from \"react-query\";\nimport { useParams } from \"react-router-dom\";\n\nfunction MyTooltip({ message }: { message: String }) {\n return {message};\n}\n\nconst CharHeader = () => {\n const { characterID } = useParams();\n const style = {\n borderRadius: `25%`,\n };\n\n const { data } = useQuery(\n [\"status\", characterID],\n () => loadCharacterStatus(characterID ? Number(characterID) : 0),\n {\n refetchOnWindowFocus: false,\n }\n );\n\n // const isk = data?.characters.reduce((p: number, c: any) => {\n // try {\n // return p + c.isk;\n // } catch (err) {\n // return p;\n // }\n // }, 0);\n // const sp = data?.characters.reduce((p: number, c: any) => {\n // try {\n // return p + c.sp;\n // } catch (err) {\n // return p;\n // }\n // }, 0);\n const bad_chars = data?.characters\n .filter((char: any) => !char.active)\n .map((char: any) => char.character.character_name);\n\n return (\n \n
\n \n

{data?.main.character_name}

\n \n
{data?.main.corporation_name}
\n {data?.main.alliance_id && (\n <>\n \n
{data?.main.alliance_name}
\n \n )}\n {/*

\n {sp ? (\n <>\n Total SP: {sp.toLocaleString()}
\n \n ) : (\n <>\n )}\n {isk ? (\n <>\n Total Isk: {isk.toLocaleString()}\n \n ) : (\n <>\n )}\n

*/}\n \n \n {data ? (\n bad_chars.length === 0 ? (\n \n \n \n ) : (\n \n \n \n )\n ) : (\n <>\n )}\n \n
\n
\n );\n};\n\nexport { CharHeader };\n","import { Nav } from \"react-bootstrap\";\nimport { NavDropdown } from \"react-bootstrap\";\nimport { LinkContainer } from \"react-router-bootstrap\";\n\nexport interface CharMenuItemProps {\n name: string;\n link: string;\n}\n\nexport interface CharCategoryProps {\n name: string;\n links: Array;\n}\n\nexport interface CharMenuProps extends Partial {\n isLoading: boolean;\n data: Array;\n error: boolean;\n characterID: string;\n}\n\nconst CharMenu = ({ data, characterID }: CharMenuProps) => {\n return (\n <>\n \n \n Overview\n \n \n \n \n Status\n \n \n \n \n Public Data\n \n \n {data &&\n data.map((cat: any) => {\n return (\n \n {cat.links.map((link: any) => {\n return (\n \n \n {link.name}\n \n \n );\n })}\n \n );\n })}\n \n );\n};\n\nexport default CharMenu;\n","import CharMenu from \"./CharMenu\";\nimport axios from \"axios\";\nimport ReactDOM from \"react-dom\";\nimport { useQuery } from \"react-query\";\nimport { useParams } from \"react-router-dom\";\n\nconst menuRoot = document.getElementById(\"nav-left\");\n\nconst CharMenuAsync = () => {\n let { characterID } = useParams();\n const { isLoading, error, data } = useQuery({\n queryKey: [\"Menu\"],\n queryFn: async () => {\n const api = await axios.get(`/audit/api/account/menu`);\n return api.data;\n },\n refetchOnWindowFocus: false,\n });\n if (!menuRoot) {\n return <>;\n }\n return ReactDOM.createPortal(\n ,\n menuRoot\n );\n};\n\nexport { CharMenuAsync };\n","import styles from \"./CharMenu.module.css\";\nimport React from \"react\";\nimport { Nav } from \"react-bootstrap\";\nimport ReactDOM from \"react-dom\";\nimport { useIsFetching } from \"react-query\";\nimport { LinkContainer } from \"react-router-bootstrap\";\n\nconst menuRoot = document.getElementById(\"nav-right\");\n\nconst CharMenuRight = () => {\n const isLoading = useIsFetching();\n const [innerHtmlEmptied, setInnerHtmlEmptied] = React.useState(false);\n\n React.useEffect(() => {\n if (!innerHtmlEmptied) {\n if (menuRoot) {\n menuRoot.innerHTML = \"\";\n setInnerHtmlEmptied(true);\n }\n }\n }, [innerHtmlEmptied]);\n\n if (!innerHtmlEmptied) return null;\n if (!menuRoot) {\n return <>;\n }\n return ReactDOM.createPortal(\n <>\n {isLoading ? (\n <>\n \n \n \n \n ) : (\n <>\n )}\n \n Add Character\n \n \n Account List\n \n {/* TODO Check perms for this */}\n \n \n \n \n \n ,\n menuRoot\n );\n};\n\nexport { CharMenuRight };\n","import { CharHeader } from \"../../Components/Character/CharacterHeader\";\nimport { CharMenuAsync } from \"../../Components/CharacterMenu/CharacterMenuAsync\";\nimport { CharMenuRight } from \"../../Components/CharacterMenu/CharacterMenuRight\";\nimport { Card, Col } from \"react-bootstrap\";\nimport { Outlet } from \"react-router-dom\";\n\nconst CharacterAudit = () => {\n return (\n <>\n \n \n \n \n \n {/* Render the Children here */}\n \n \n \n );\n};\n\nexport default CharacterAudit;\n","import Card from \"react-bootstrap/Card\";\nimport OverlayTrigger from \"react-bootstrap/OverlayTrigger\";\nimport Spinner from \"react-bootstrap/Spinner\";\nimport Tooltip from \"react-bootstrap/Tooltip\";\n\ntype IconStatusCardProps = {\n iconSrc: string;\n text?: string;\n cardVariant?:\n | \"primary\"\n | \"secondary\"\n | \"success\"\n | \"danger\"\n | \"warning\"\n | \"info\"\n | \"dark\"\n | \"light\";\n textVariant?:\n | \"primary\"\n | \"secondary\"\n | \"success\"\n | \"danger\"\n | \"warning\"\n | \"info\"\n | \"dark\"\n | \"light\"\n | \"muted\";\n borderVariant?: \"thick\";\n isLoading?: boolean;\n toolTipText?: string;\n};\n\nconst showOverlay = (toolTipText: string | undefined) => {\n return toolTipText ? (\n \n {toolTipText}\n \n ) : (\n <>\n );\n};\n\nexport const IconStatusDiv = ({\n iconSrc,\n text,\n textVariant,\n isLoading,\n toolTipText,\n}: IconStatusCardProps) => {\n return (\n \n \n \n {!isLoading ? (\n text &&
{text}
\n ) : (\n \n )}\n \n
\n );\n};\n\nexport const IconStatusCard = ({\n iconSrc,\n text,\n cardVariant,\n textVariant,\n isLoading,\n borderVariant,\n toolTipText,\n}: IconStatusCardProps) => {\n return (\n \n \n \n );\n};\n","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABCJJREFUeNrsWe1LU2EUvw/4dX+A61uQgSUYsyQTtkRC0PVGhBP6ErhVWNNtaZPl3XxNdEsFoY2+hS3IilIJK2oWZREXIxJiH/qW/gH7fO/tPCKktsE9d8992bo/GGPovc85v+d3znPOeTjOggULFixYsPC/gqh98Mev30n4cpjRqcP799Up/d8KtYtIklgWClBPgCjZTOpTTh8CJLHKpFEd04kAqdCfFjlCBPjeKNoXWfYi88xi3aEDGV0IEMV/ckCOEOI7VnMwy2Ifv3z/6UA6vwnrx3XJAatr6/Y8Ckgcr61m4vyntXUbvD+KPM6i9bXVOV0IAOMq97J/wlGzwCqK4f1ecKgS8Uga1hd0OwXy7H6KlfPvv35zyZLkkRHSh+1XvX6FyvjfdQRC7GVYOP9uVbDB8cqjpE9I1Fl/JKcrAXuOwExTw9EcCwJkWeJlmUPUFyTV1FAnFLMmixBYYeH86w+fXfBeF+KRbHNjfdGhpzYEqshfDRYt/+XMR5r1eYLTfpQF8RXqpCqvQJKiR95mi7OhaPlLsswTWbYhEl+q5WQjkyOXcAZj6c0Klf0kRvqtzc4Ow5shFlh49ZYWVJisT6vNKEsbDCVAhCOPEEzW51JnWpqzZUHA06VlDxQ8DkTcC+daT6VNMw8oBvMvXtqh4PEipR/TwhZDCIBCisY9quC5eLZ1oywISD957oHEh2lzhfbzp9Na2aMrAXOPn9m3Oz3F0oeCJ6SlTUzqgAeP5pXtKCFBWFDxKA0SZBqqrkKVZvZS+4WcKRQgyVJSqUdIeLY/+eCj4WEOAkSJK1WwIaCE7wgsBTDKAb4CXSNNeEHEqzYRtb65u8HZ5H0bOEOTo+KsT8fqVzsvCyWngAK7791WgOIaqetKp1CSIbAX07P3HJAYPRjp03LXiBzAPAQSM7NU+g85xFwfWmJfd9c1wQgCmCsAWlyvTFCXGqmg/7ohzjNXwERiCkpikkQ8kr0Z8HdwBoKZAu5MxPH3eYzHW4YSAM4HwSGU9MO9oWxZEDA8Nk4vNdow0o+E+5hnfbAjueP9cV0IiA2N2CRRNHSySzE4POoGOxzYKrFoAqDY4eGDmuxGByLMpQ8KdO74KehCwG0+BtIXXYhHhMEoz3y8BXbYd9lBiPYK6I8M2FRcamgy2QU7dladuZGh2IbmBOCvsrnU2Mgw88luuD9Cd79NbZeoioC+W2E38ipbGB8bTWu0+wFu9+2SoCkBod4++9aiOOlrMtkFW9x5cpC2CqBHHjiEkX4sPjmRY+18IBhyQ9/By0UOSlAEdPcEsJcamam7iQwrp/3dPXY6YIENKFh4wXqoPKO4Gbrh99PF5zjUlZbuEGamp32aKEASt+LezM5v5RvNegFINmZ3Hh3/KALEEhh9E0JHaxYsWLBgwYJS/BFgAE4Kq3N5izE5AAAAAElFTkSuQmCC\"","export default \"__VITE_ASSET__9LIjGFPr__\"","export default \"__VITE_ASSET__BqU_Xg4q__\"","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABztJREFUeNrsW2tsFFUUnm3rA8ICiZFQVCRSFoTSQLcVwWIXMErqlpjIH/wnwVaCxJg2RkiM5YdFSdEEpbGLwfgIGw2R4C6lEhYWUimPDhIeAltEQW35qW78sVtmxu8sdzfDMDM7d3Z3oI9JTmf2nDPn3u/cc8+59+62SBjhV9GoA0YdMOqAUQeM5KvkbjR6/upfbtz8LpfgY6yYogiB8iceiTvdF5fTDZ69ct3tcrk68OjRiOKKojRWlE2NDespoMhKkyzJHpCgITfJhn0OkGTJDxIMyHv64tUpwzoHyLKcTaUU1D98HSBJlOjchknJ5RreOQAREIQTBAMKV5d7HK0EtqpAt3jOjRfbMFzeW5lNERVBaK7xzrXU+WOnz7dB36fpiAh7zYvmz4lbbL8J+n7GGkAFaUL7MUemgCLLbYpL8ApKhkXPbbg3Wnl/UWV5c3fvWW/qPbYOeKaqIsrRfgPa96vaL8XzVtzrHXEAwtirw/by2KipqhAFGnV77fv0kueREz97axfMFx1wgKTHzoTuoWOnMBKuVVjpeUxHUrnlAKbnNtBBWCvBpYuqQ6r246xa3J0kiEVLWGchEyDZwe4TLVjQvIcw1Vvs3EbQ8RLRIshEx0P2yK6q/aiO7sCShVWiMw5Q5K1YtIRVC5jwspqnggeO9ngRnmYLHdtEdmE/NcfRVgC8ICjO5CL61ORYFTC6ug530yj5C1i1xOVLahrzadA0B+w7eIQ2LuTZWs0cpTkYRumJssWLULfsWRGjVCo4cHVGjjbgNoW1T33xoA+vaPICdphK4MXnaqO2HQBAHQaJjJyxihElKpr/okFyLMBiKtWOXx1tinKHGvW7LXTgcHP980ui3A7Y2xWh+ezh2uhIst7SFs5RMFpcU2MA74UwgvV62V6vHZOLBinKnQThZa+cSj7WKD0yWlrxwtKAJEkhHlugfnqP7lbbydY37giQ+bxs+o4dW4WwxxsBt9HL9curZCo3nBFgZ8RytNeo7ae9CNDZt2fbyxvJLZwBOGKPywGYt5Z4VuTZ3nPKHmcOkCzxrMhlmx3Ot73RKcDnAMnqLjCr3O4CKd/2OHOAbIlnRS7ZLFv5tjcaAZw5YGAI54CBfDggih2Gnx11BXWzL63zsV5X2E6RHXnfcUpUwCoQZnsFr6Zfu9Av4o3Dc9iWA9aueTWuPeTU1t83Xn8t8OlnO6ghOqPbCqcFlFsNu9lG6COTup3a8FDn2Tt6g0D22pi9OPSDzF76TDDEwHs1/YpZPSAt4g1JNal4pdvaO1rWNa6hPfgK+pKT7vgc0nuPUT/ktFES9eR0QS5q7EXRzirapRrY5J5uJbkmJRXP//En7eNu3hzc9Nb6daLVpJUtoa1f2xBPnx7Dfj308/oFKp8DdMqPhudj+UK0unvj2dkpiDTFQNbT85P0w57vI4lEol7g+H4gnxFga5R5SpqR7vGeHim0dw+BTxY0AuwsjrLp8Cxq9HR3fh4Y+/tvV1PgEXq+hYLguVs5wPEI+Da4q+7ypYvFeEx+DfAoBZ5kQXOAjQ1SNh2erK3WPXXyhPTLhQtjCPwXAF8J8IOFToJ2zgiy6fDs7dO64qmT0v7OfZEkrh0AP8/GyA/ZKSD29ko/7u9MgW8H+IocwBeiDHKXOp4y+M1XX469fu1aCvw2Bn5QyO0aShHw0pW+vok057G+9pXnOPL2lsKab2T1eEZRYqRnJlODB82jhy0AP4eNvDx+vGv27t0Tp7W2uumzEZGc9EhfK+NLgrIkqjYecT2e3o+cJJNRlrJHQAb8+wD/pGrkvTt3ThhTVlZCRFYubdx4x89rZgH8Q3V1D9DzbOiLK1f+bXsKYEMSZMBpdxYl3oebWwNvv7Mhw8PneB7LYAb8JoCfpQn7f2MxaSzA0/PDAEmWzqucUA7wxFdU+slccsCWDzbH02cDGn7Qzr4+iywD/l2An6mT8M4A7Fzcp7ARnoQ7IkQ4C34FwE9Sge/v7Eyc04kQR34naNMBKfAbAH6GScITAYosPMqcMBn3CZWV942ZPLkoDf5PgD+jA94xB0gmYS5lWQlOt5DtTwIcWXmMOeFBFfg/AL7XADx3FbAdAZzf/6lLY9IiHQPI/27ckAl4mugz8c3ec8gBclzvR03pw1cdWaaSDFqkasz5dNiniT5XZymRjjigffv2GICGVSMcVxR5F5OFIFN/mxuDLMATAQsA8nGW8IjiqkggPsmN3nX0HyYaGhpTvwcMBDpEC7IW+tMKkZlNH8BNZ3OfriuY80cQ9rXgl6n4v4If1ckFjv/HCMfVwv4YOmAZQM5QgYwB5CEVyKWQe1TyPsgjGieUCPf4ZVYBJno8xelsfxngDmjAdbHqMJM5gfS19orvYex0wCo8jRUvgdCjS11diWmLF99/7fjxwf0MrJb6IpHkhKlTixWXS/hu9ep/konEbfJ7fgq8mSUH5HoN6SkwIhwwONIdUOgI+F+AAQB611CDy6S9ZAAAAABJRU5ErkJggg==\"","import { IconStatusCard } from \"../../Components/Cards/IconStatusCard\";\nimport { loadCharacterStatus } from \"../../api/character\";\n// import Asteroid from \"../../../assets/asteroid_64.png\";\n// import NPC from \"../../../assets/npcbattleship_32.png\";\nimport Isk from \"../../assets/isk_128.png\";\nimport Omega from \"../../assets/omega_128.png\";\nimport Skills from \"../../assets/skillInjector_64.png\";\nimport Unknowns from \"../../assets/unknown_64.png\";\nimport styles from \"./AtAGlance.module.css\";\nimport { useQuery } from \"react-query\";\nimport { useParams } from \"react-router-dom\";\n\nexport const CharacterGlancesAccount = () => {\n const { characterID } = useParams();\n\n const { data, isLoading } = useQuery({\n queryKey: [\"glances\", \"account\", characterID],\n queryFn: () => loadCharacterStatus(characterID ? Number(characterID) : 0),\n refetchOnWindowFocus: false,\n });\n\n const isk = data?.characters?.reduce((p: number, c: any) => {\n try {\n return p + c.isk;\n } catch (err) {\n return p;\n }\n }, 0);\n\n const sp = data?.characters?.reduce((p: number, c: any) => {\n try {\n return p + c.sp;\n } catch (err) {\n return p;\n }\n }, 0);\n\n const bad_chars = data?.characters?.filter((char: any) => !char.active).length;\n\n const total_chars = data?.characters?.length;\n\n return (\n <>\n

Account at a Glance

\n
\n \n \n\n \n\n 0 ? \"danger\" : \"success\"}\n iconSrc={Unknowns}\n textVariant={bad_chars > 0 ? \"danger\" : \"success\"}\n text={bad_chars?.toLocaleString()}\n isLoading={isLoading}\n toolTipText=\"Count of all known alts not loading into audit\"\n />\n\n {/* \n */}\n
\n \n );\n};\n","import axios from \"axios\";\n\n// import Cookies from \"js-cookie\";\n\naxios.defaults.xsrfHeaderName = \"X-CSRFToken\";\n\nexport async function postCorporationRefresh() {\n return 1;\n}\n\nexport async function loadCorpGlanceAssetData(corporation_id: number) {\n const api = await axios.get(`/audit/api/corporation/${corporation_id}/glance/assets`);\n console.log(`get glance/assets in api ${corporation_id}`);\n return api.data;\n}\n\nexport async function loadCorpGlanceStatusData(corporation_id: number) {\n const api = await axios.get(`/audit/api/corporation/${corporation_id}/character/status`);\n console.log(`get glance/assets in api ${corporation_id}`);\n return api.data;\n}\n\nexport async function loadCorpGlanceActivityData(corporation_id: number) {\n const api = await axios.get(`/audit/api/corporation/${corporation_id}/glance/activities`);\n console.log(`get glance/activities in api ${corporation_id}`);\n return api.data;\n}\n\nexport async function loadCorpGlanceFactionData(corporation_id: number) {\n const api = await axios.get(`/audit/api/corporation/${corporation_id}/glance/faction`);\n console.log(`get glance/faction in api ${corporation_id}`);\n return api.data;\n}\n\nexport async function loadAllStructures() {\n const api = await axios.get(`/audit/api/corp/structures`);\n console.log(`get structures in api`);\n return api.data;\n}\n","export default \"__VITE_ASSET__aTUB1VTV__\"","export default \"__VITE_ASSET__DHvQjmPz__\"","export default \"__VITE_ASSET__DEheLcdU__\"","export default \"__VITE_ASSET__1_3lp11w__\"","export default \"__VITE_ASSET__Doz2tcoH__\"","export default \"__VITE_ASSET__COqC8tEM__\"","export default \"__VITE_ASSET__B2EHIfDt__\"","export default \"__VITE_ASSET__BgZrbr9S__\"","export default \"__VITE_ASSET__CbDrfS8S__\"","export default \"__VITE_ASSET__BxBhPtX7__\"","export default \"__VITE_ASSET__DfgmBsMx__\"","import { IconStatusCard } from \"../../Components/Cards/IconStatusCard\";\nimport { loadGlanceActivityData } from \"../../api/character\";\nimport { loadCorpGlanceActivityData } from \"../../api/corporation\";\nimport Asteroid from \"../../assets/asteroid_64.png\";\nimport Gas from \"../../assets/gas_64.png\";\nimport Ice from \"../../assets/ice_64.png\";\nimport Sansha from \"../../assets/incursion_2_64.png\";\nimport Industry from \"../../assets/industry_128.png\";\nimport Market from \"../../assets/market_128.png\";\nimport Missions from \"../../assets/missions_2_128.png\";\nimport Moons from \"../../assets/moonAsteroid_JackpotR32.png\";\nimport NPC from \"../../assets/npcbattleship_32.png\";\nimport Planet from \"../../assets/planet_128.png\";\nimport Triglavian from \"../../assets/triglavian_128.png\";\nimport styles from \"./AtAGlance.module.css\";\nimport Card from \"react-bootstrap/Card\";\nimport { useQuery } from \"react-query\";\nimport { useParams } from \"react-router-dom\";\n\nconst Activities = ({ data }: any) => {\n return (\n <>\n

Activity

\n
\n \n PvE\n\n
\n \n \n \n \n
\n
\n \n Economic\n\n
\n \n \n
\n
\n \n Mining\n\n
\n \n \n \n \n \n
\n
\n
\n \n );\n};\n\nexport const CharacterGlancesActivities = () => {\n const { characterID } = useParams();\n\n const { data } = useQuery({\n queryKey: [\"glances\", \"activities\", characterID],\n queryFn: () => loadGlanceActivityData(characterID ? Number(characterID) : 0),\n refetchOnWindowFocus: false,\n });\n\n return ;\n};\n\nexport const CorporationGlancesActivities = () => {\n const { data } = useQuery({\n queryKey: [\"glances\", \"corp\", \"activities\", 0],\n queryFn: () => loadCorpGlanceActivityData(0),\n refetchOnWindowFocus: false,\n });\n\n return ;\n};\n","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAOFJREFUeNpiYBgFo2AUUAD+//8/H4QH0nIYmD8glj99+vQ5CNPVEciWy8nJdaioqBQAuefp4gh0y4FCGUDMARQSoLkjcFmOJE87RxCynKaOINZymjiCVMup7ghyLMfmCCA3AJc6JkIGHT169OajR48eAJkLgPgHsQ5gZGT8AKQ2QrkGZDsACm6QYjkpgIlhgMGoA1gIKTAwMJA/c+ZMgrGxsQMZ5ttT7ABVVVUFIKUwICEAzEqMQKphWLeqGAmUZvupYgkjoyPZaeD27dvUiP8EaElKchpwhGoeBaOAZgAgwADRIPnv6gjUcQAAAABJRU5ErkJggg==\"","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAATVJREFUeNpiYBgFo4AC8P////kgPJCWw8D8AbH86dOnz0GYro5AtlxOTq5DRUWlAMg9TxdHoFsOFMoAYg6gkADNHYHLciR52jmCkOU0dQSxltPEEaRaTnVHELIcapEAIUcAuQG47GAi5IijR4/efPTo0QMgcwEQ/0C2AEjtB2FsjmBkZPwApDZCuQZkOwAKbuCw3ACK9+MKCUKAiYxogVsODJ0LIEyJI1gosdzGxgYUxBeA4v5AOgHqCEdo8FM3BHBZDsQbgBYmQtMIySFBlAOMjY1xWo6U6Mh2BN5suH379uOwGu/IkSPngcIN+LIVUjUNyoL90GzYQLYDYIAYy3G0FSh3ACmWY3MERQ4gx3J0R+BzACMhA4CJ6yF6giPVEVAzGshNiwEMlANqmDEKRsEwBQABBgAOibaZR7OUTgAAAABJRU5ErkJggg==\"","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAPZJREFUeNpiYBgFFID////PB+GBtBwG5g+I5U+fPn0OwnR1BLLlcnJyHSoqKgVA7nm6OALdcqBQBhBzAIUEaO4IXJYjydPOEYQsp6kjiLWcJo4g1XKqOoJcy6niCEotp9gR1LAcmyOA3AB0eSZcGo8ePXrz0aNHD4DMBUD8g1wHMDIyfgBSG6FcA6IdAAU3KLGcGIDTAdbW1uoWFhYcVMjGAkDKn9ya7jzUAIrj/8iRI+eBQg10cwQOywPoEhJUsZxcR1DVclIdQRPLiXUETS0n5Ai6WI7LEXS1HIcj6Gs5tmY53S1HdsSAWY4EAgbS8lFAMQAIMACyRj6cz5mg0AAAAABJRU5ErkJggg==\"","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAMVJREFUeNpiYBgFo2AUUAD+//8/H4QH0nIYmD8glj99+vQ5CNPVEciWy8nJdaioqBQAuefp4gh0y4FCGUDMARQSoLkjcFmOJE87RxCynKaOINZymjiCVMup7ghyLMfmCCA3AJc6JkIGHT169OajR48eAJkLgPgHsQ5gZGT8AKQ2QrkGZDsACm6QYjkpgIlhgMGoA1gIKTAwMJA/c+ZMgrGxsQMZ5ttT7ABVVVUFIKUwICEAzEqMQKphtOk1CkbBKKAlAAgwADz48ZFJ3SP6AAAAAElFTkSuQmCC\"","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAL1JREFUeNpiYBgFo2AUjIKhDP7//z8fhAfSchiYPyCWP3369DkI09URyJbLycl1qKioFAC55+niCHTLgUIZQMwBFBKguSNwWY4kTztHELKcEkcwEmM5kEoAsXfs2HHi8+fPP93c3E7w8/P/wKGFH4gLoOwFjIyMidTKauSC+RSFABAEALEBhbF4AYg3DMrSlJFAFOyniiWMjI645FgIab59+7YCFdwASsQLSHYA1OUJo9XuKBgFo2BYA4AAAwDuOPZAKdxOvgAAAABJRU5ErkJggg==\"","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAARxJREFUeNpiYBgFo4AC8P////kgPJCWw8D8AbH86dOnz0GYro5AtlxOTq5DRUWlAMg9TxdHoFsOFMoAYg6gkADNHYHLciR52jmCkOU0dQSxltPEEaRaTlVHkGs5VRxBqeUUO4IalmNzBJAbgC7PhEvj0aNHbz569OgBkLkAiH+Q6wBGRsYPQGojlGtAtAOg4AYllhMDmBgGGIw6gAWXhIGBgfyZM2cSjI2NHdCkJkATFtYUD6QKsEjZk5p18IHzUIvw5XmsAKisgagQAPqQEZviI0eO+FtbW4Oy0n6geY6wkIA6aD8o4IDZ94KNjc1GejTFzkN9Dfc50IHnoQ4PoFd78DzdLcfWKKW75ciOGDDLkUDAQFo+CigGAAEGAKzczqNJim5wAAAAAElFTkSuQmCC\"","export default \"__VITE_ASSET__ChL1k$F3__\"","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAARtJREFUeNpiYBgFRIL////P/088mE+suSzEWg6kEp49e/bi6NGjN/Gptba2VpeSkkoA6mFgZGRMpJrPnz59+lxOTq4DKJQBxA64sIWFhQdQ+XlSQ4IUyzmI0CdAsSPItZwqjqDUcoocQS3LiXUEEz7NbGxsL4DUAiD+QY2sDMxBBkAqgJQ8D3K5ADV8f+TIkfNAoQaiHEANR1BkOaWOoIrl5DqCqpaT6ghyLGcixSHAukBCVVU1gYRseQGIN9C1OKZKMTxaF4z4usBgQOsCNBcPTF1ADUdQXCJS4giqFcfkOIJUyxmJMRBI7YcmTlDRupGAFn+QWmCCu2BjY7ORWsUxckgQBKQEOyMJ7gCVBaCKSIJuFdEooAcACDAAVWOwQScYFDwAAAAASUVORK5CYII=\"","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAZ9JREFUeNrsV7FugzAQhQihjJkZWLtGYgHB0G7dwifQrWM/IVu7tX9A+gfNxJgFxBjGdKuQoBk7dqPn1qmQhWufTduFkyzHoNx7tu/eHYYxmcC6rks7dUtF/i0ROExJ27bHoiieMcTDMDxzHCcBH4ZpmldoAn3wIAge67p+gfVBloDv+/OyLG+JDxEJ7rE3TfPquu4dPLqGMVe4vgWMvex1jAquTGJM8CESsIz772ZDfyABR+98A+NdlwDc/xtMW7pcCglQO4wBLrLZf+vMRMCSiWCYbhT9P9AAVJZiAr5jIxdhK/Bx8RMJLgHP877BIS2rKIq2GOQ8z1dQDwjxHSGBEY0uy7KSiBH5DY728HjNCgiykhIRuqdCtBYSOJkOOK+cSxNgwZF9QcojwRKwOFJ8uvMKxhOmLxjqA8j8hW0kUkc2tHOmQJ3zBvQBl7zq1/MttFinNAtKcIwKHtXSLNsHSEmxbdtHndIMcbNUyiQmjxcqu9dOZSwJLLgpS4KmUNXrbLj6z8j3Zyr/6QcK5thNJI8YURnH2flkv20fAgwA/mRRRowKgjEAAAAASUVORK5CYII=\"","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJxJREFUeNpiYBgFo2AUjIKhDP7//z8fhAfSchiYPyCWP3369DkI09URyJbLycl1qKioFAC55+niCHTLgUIZQMwBFBKguSNwWY4kTztHELKcEkcwEmM5kEoAsXfs2HHi8+fPP93c3E7w8/P/wKGFH4gLoOwFjIyMidTKauSC+RSFABAEALEBhbF4AYg3jBbdo2AUjIJRMAoGJQAIMABD/+3i1WyW1AAAAABJRU5ErkJggg==\"","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAUhJREFUeNpiYBgFo2AUEAD///+f/598MJ+Q+SyELAdSCc+ePXtx9OjRm6Q43NraWl1KSioBaAYDIyNjIskOQLbc0tJy4aNHjx4A+TeIdYCFhQXH8ePH20FmEHIEzmB/+vTpczk5uQ6gUAYQc5ARfQJAfJ7Y6KCq5WQ7gpqWY3MEkBuALMeETQMowUHjfAEQ/6DUAcD4/wCkNkK5BgQdAAU3qGE5IcA00OXMqANYiEnBQKqATPMnQBMg2UUxyPL96CmXBOAPNMMRnyNwOsDY2BhuOTBbXrCxsdlIis1HjhzxB9YHIIfvBzmClELj//bt24+DCiMQG2jQeaBwA3oBQmJNCiqE+qEFUQNBB8AAJZbjqs6JdgA1LMfmCKIcQE3L0R2B7gBGbAqBqfYhkHkBiDdQu3UFNbuBkNoAGpY9AQyjYBSMAiQAEGAA489NnZ/6iiAAAAAASUVORK5CYII=\"","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAPhJREFUeNpiYBgFo2AUEAn+//8//z/xYD6x5rIQazmQSnj27NmLo0eP3sSn1traWl1KSioBqIeBkZExkWo+f/r06XM5ObkOoFAGEDvgwhYWFh5A5edJDQlSLOcgQp8AxY4g13KqOYISy7E5AsgNwKaGCZ8BoAT36NGjB0DmAiD+QaoDgInwA5DaCOUakOwAKLhBjuXEAqaBLl9GHTDgDmDElw3fv3//4e/fvw9EREQ+UGCHAggDc0QjkG4gqS4QFBQUwJV9qAVY8ORhRmwuHnYAXxrYT1WLGBkdSW4P3L59W4GKbkiAFulEpwFHqKZRMApGwfAGAAEGAJy+xoU1pcSFAAAAAElFTkSuQmCC\"","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAANxJREFUeNpiYBgFo2AUjAIiwf///+f/Jx7MJ9ZcFmItB1IJz549e3H06NGb+NRaW1urS0lJJQD1MDAyMiZSzedPnz59Licn1wEUygBiB1zYwsLCA6j8PKkhQYrlHEToE6DYEeRaTjVHUGI5NkcAuQHY1DDhMwCU4B49evQAyFwAxD9IdQAwEX4AUhuhXAOSHQAFN8ixnFjANNDly6gDBtwBjPiy4fv37z/8/fv3gYiIyAcK7FAAYWCOaATSDSTVBYKCggK4sg+1AAuePMyIzcWjYBSMglEw7ABAgAEAnPm+J1RtnyoAAAAASUVORK5CYII=\"","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAXlJREFUeNrsl7FugzAQQKMOKGPGTigDH+CxY8aO/gQm1DFjNjpWYsjYbskndOMHQF2QMlZiyYTSCSQG2o2eJbuyEOCYs8PSk04oPuT3wBgui8V/IKJt2wPLOeEiDrPAi6K4sLyphAx3XffF87wt/DzdRKILh6EnyCUMraxLDMGluj0JFdyqxLVwKxK6cKMSU+FGJLBwHYk71SSO43zB4Qj5g1nONE0JHOiUVy27ghXm6pMkOcHQs5YARsIIfKqEUbiuhDF4H0glMQYXNR2BVkfiGjir8e2sdcvPkGRMQgEnfA65pr3ulUJiDF6hnoe6rl8lic1QS9YD3wh4HMcfqJ2QZdlO6v38rkQP3BcnR1H0zmuP2G3oD0lw8BicGOkL4E7Qbwg+/75Hcs8K7JwgCI5G4SLyPH8Qayt/3cTzwOCU0jcY2kGubfWGpGmav1ZcwMuyrCT4vdXuOAzDNUh8ivWW+oatdXj37YdtWtAS7I/JLHAplhj4rwADAAc8Lmsu6N7iAAAAAElFTkSuQmCC\"","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAUhJREFUeNrslz0OgjAYhqmTo6MTEwcwYeUOduEAbo4egdHNI+DMpFNHHSCOcAUHorfArwlNKukP9gcXvuSLUJs+T4q+QBDMZVFd1+W0/wlnlf8F3rbti/akEjw8DMNjFEUHOK0nkRjCYWgPvYShlXcJEbwoijWF99/7k1DA6779SWjgrPxI6OBlWda0vUno4DCWQWMuE4QSdI6xAEDvKrggmHiJrBfIZIzFGJE4jt9pmhI43FRV1SRJcoXjBtbesi1GCO3g40znQN+YhO1voCOEPFjaSbb96zoPduKk2wGtACsRXBbFAzl7ARlcFcW8hJWACq6LYjbfRiBXwcdEMbeGcWEHUYznKJ6j2EoAohir4DIJJwKyKB7xtOwvin98ZHcbxSbvDc6i2PRvrBJAugXgPv+k937oi2mW9GsYxzEO7MvFGn7qI8AAjvv49jSDa0QAAAAASUVORK5CYII=\"","import { IconStatusDiv } from \"../../Components/Cards/IconStatusCard\";\nimport { loadGlanceAssetData } from \"../../api/character\";\nimport { loadCorpGlanceAssetData } from \"../../api/corporation\";\nimport Battlecruiser from \"../../assets/battleCruiser_32.png\";\nimport Battleship from \"../../assets/battleship_32.png\";\nimport Carrier from \"../../assets/carrier_32.png\";\nimport Cruiser from \"../../assets/cruiser_32.png\";\nimport Destroyer from \"../../assets/destroyer_32.png\";\nimport Dreadnought from \"../../assets/dreadnought_32.png\";\nimport Extractor from \"../../assets/extractor_64.png\";\nimport Fax from \"../../assets/forceAuxiliary_32.png\";\nimport Frieghter from \"../../assets/freighter_32.png\";\nimport Frigate from \"../../assets/frigate_32.png\";\nimport IndustrialCommand from \"../../assets/industrialCommand_32.png\";\nimport Industrial from \"../../assets/industrial_32.png\";\nimport MiningBarge from \"../../assets/miningBarge_32.png\";\nimport Injector from \"../../assets/skillInjector_64.png\";\nimport Supercarrier from \"../../assets/superCarrier_32.png\";\nimport Titan from \"../../assets/titan_32.png\";\nimport styles from \"./AtAGlance.module.css\";\nimport Card from \"react-bootstrap/Card\";\nimport { useQuery } from \"react-query\";\nimport { useParams } from \"react-router-dom\";\n\nexport const Assets = ({ data, isLoading }: any) => {\n return (\n <>\n

Assets

\n
\n \n Subcapital\n\n
\n \n \n \n \n \n
\n
\n \n Capital\n\n
\n \n \n \n \n \n
\n
\n \n Industrial\n\n
\n \n \n \n \n
\n
\n \n Notable\n\n
\n \n \n
\n
\n {/* \n
\n \n \n \n \n
\n
*/}\n
\n \n );\n};\n\nexport const CharacterGlancesAssets = () => {\n const { characterID } = useParams();\n\n const { data, isLoading } = useQuery({\n queryKey: [\"glances\", \"assets\", characterID],\n queryFn: () => loadGlanceAssetData(characterID ? Number(characterID) : 0),\n refetchOnWindowFocus: false,\n });\n console.log(data, isLoading);\n return ;\n};\n\nexport const CorporationGlancesAssets = () => {\n const { data, isLoading } = useQuery({\n queryKey: [\"glances\", \"corp\", \"assets\", 0],\n queryFn: () => loadCorpGlanceAssetData(0),\n refetchOnWindowFocus: false,\n });\n\n return ;\n};\n","export default \"__VITE_ASSET___vcKW$0U__\"","export default \"__VITE_ASSET__DTy1pRHE__\"","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAFiQAABYkBbWid+gAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAgKSURBVHic7VprcJTVGX7Ot7tBwm1qxXKTiwWlg3Rw0jFguEMCUYwkmJCBMJahE6SlhTEkTIVOBqd1jAHFJNxrRcp9B5rGhFDUJA4lBMpWISZgAyJyC1B1iGkue973nP7YXZtSlt1sdvfrjPvMnD9n3+c9z/t87377nfOt0FrjuwzDbAFmI2KA2QLMRsQAswWYjYgBZgswGxEDzBZgNiIGmC3AbEQMMFuA2QiHAaL+UmOi4/r1aH8J589/1fuTi9cTQinKg5AaUP/Z9cG1Fy7XMslD3Vp4kb+8FtGyWCv6S+2Fy6fPXrrUP5QaRTDPA86cudFDd2tJ1sL4aswjQw4BMD7+x6VPofVwAJ83PDp0eCrA98pRX18f5bREfwZgIATqxjwydDQA/dGnF5OgRY+2ntbicYMGtQZLc1A6wOFw2Bx1Db+R1m8aifmPTPS6O7cicq5lJjDT0GF1DWm+crXBNo+ZBjITFMm1ALQdsCjm9UrR7qimthuOuvMrq6qqrMHQ3mUDqurre5Ktx1FifpmIehIRiOSjJ2vPJgFAc7TtHSK6SURQzNk+0glJvMKVg67q1qZdAPDQ6bPPEdEw93wvYnq1+/39KxwOh9/3FW/okgEOh8MW1Y6DzBzLzOg4iHQOAEweOrSNiQqYGcT8eM1HZ6d7y1f98SdPMfMoZgYpejMmJkYCgFJqxZ35mWlCu+W+fV3thIANcDgctlZl3ckk45kI/zvkuGOO0+MBQLXojSypmYlA5MzxlpOlynbzb1vb/7UFAD48cXoKE/3krmtImmXp8b23u2JCQAa873D0aXbiMDGlub/fdx1SyhwAGD9+9Nes5e+ZCcQUX1X9tzF35qw4fuoJZjmJmaCYt8TGxjYBgNacfa81mCkD9/V8t6qqvmcgtfj1K1B+4kTv7ko9SMp4QABToMVCACP8yK+1UqOmTxx79v1jjsFC8wUAVgHsnjr+ifkdAz/460k7gOcAOJWQw+Lj4q4dqT71mEWpWr8KgT6ntXjbEOpDbdj+2U233YyLi/vGF8+/DmhFbyn1ekV8nIlfYaYRPq6KZwitVTYATI+L+YKZ9rq7IO1QRfUQT/ryiuofMlOK6+rTrvi4uGsAAKdc4ec6IOaRrChPsqoh2b62BejlT2l+GZA4OfZK/MQnZzFRBjE3kOuG5teQzPNL3js2AAAUcb573grQQk9+Bc4iZoOYNRGvBYDSiuMDSdG8zqxFrM5JVmkJk55M/tZEH+jUzSNx2sRdAHaVlx/tSxaOhdYWJdBoAOsAxHmhRQFYDiBn5rQJZ949UnkYwEwY4jAAlJcf7ass9FNXqC57JmFqvcustmUasHnTIiAqtYGXhEI/pbVkq6pJnjbty87UA3TSAA8SEyfcAlAKAMVlR2LYEN6KlwI4AK0PeCa0dL7GhhGdnBBfAwBOtC3VjO4AIAz12rdxJA8oYQwGdArubsRkrVVr8owZxYHU4EGXn6ZIqzWC7pgUuK0VCqNg2ZSUFP9frZj09IzKP5WVNQJAaWlpNGnrL9wf1cx5ZuZRT9yzTyWcAJBeUvLeACd4iTDwS2j06biKFngZwLNd0d+lvcDePx+KNbSquWO6VsOSPHd24gVffHtx6VINFAKA1mLO3OSnD3qNLSkZDjaKtcCojvMCiE2dPetkQAWgCw9Cdru9n5Zy+x0PPzuirRjrV/F2u4WJXnRzG86dOXXPVk5NSjoPah3LRHs6rknE7+zZU/KDQOsIqAO22+39LMqoBDDSlQVXhBIvZKSnlPmbY+f+A2laY5+LLhZnzE3Z6jd378EkbegN0BjknqqH05iyYEHyzU6UASCADlhTVWUVUq1i4g+I6eeKeRLaW0Z2pngAIEk57qt4g1qbdnSGm5GeUoL2lpGKeZJLA1Ww4fy13W63dK6aIJ8H+Is/7Ng9RUNXAIAWWP2zBfN/F3YRbphyJkjEOUwMJm6WzWIjAGzYseP7ZmgJuwFFW7ePZpYz3Zuet5Ysmfc1AIh22rhh27ZRvvjBRlBOVToDrZzZ7jMxUgZeB4BNmzY9rIRljoBuAbDwHvSgI6wdUFhYOIiJ04kYxLTvV5mZXwBAG+F5IrZIUvOKiooGhFNTWA1wKixnJhszQSnO98wr5Sx17+qi2kktC6emsP0K5OXl9RHWbpcB9NICR1a+uHxGx8/z162v1MBkALfBzodycnJ87uWDgbB1gBaWF5ipFzOB6T+bHg9IyXx3F/QhWDLDpSssHbBmzZooi63b5wD6A+Lvq19aGXM3Lb995dUzAB4DcOXBB+5/ODMzU4ZaW3g6wLBlMHN/94luvpcorYjXumMGNTbeSg+LtFAvIAQEkfSc9V+sqx1h9xZ79Wrf3UR0lYggmVaEWhsQBgNWrVo9i5l+5Lrz0xv796d6fTW2ZUumZJbr3feCH69alTvDW2ywEHIDJKtsd1t/GWW1vuUrvtlm28rMt10vUqSvN0ldRkgNyMpaOZaJJjARmGlDbm5uiy9OQW5uE0va4uZMy8rKejyUGkNqgNLS81Kj1dnWVuQvr90i3mQmJzNBASHtgpAZsGzZshFMPNu161PbCwoKbvnLLczLu6aYdzExWFLq0qVLh/hmBYaQGUBE40gxEZNqh1oXAD+fmDQxsdZ6bCg0AiF+EFq0aNEAm802dfPmzTsD4S9evPh5pdThbdu23Qi2Ng9MORH6f0LkX2JmCzAbEQPMFmA2IgaYLcBsRAwwW4DZiBhgtgCzETHAbAFm4ztvwL8Bjr5p8scs1bMAAAAASUVORK5CYII=\"","export default \"__VITE_ASSET__BZrGgydY__\"","export default \"__VITE_ASSET__B0Zl6HV2__\"","import { IconStatusCard, IconStatusDiv } from \"../../Components/Cards/IconStatusCard\";\nimport { loadGlanceFactionData } from \"../../api/character\";\nimport { loadCorpGlanceFactionData } from \"../../api/corporation\";\nimport Amarr from \"../../assets/amarr_128.png\";\nimport Cal from \"../../assets/caldari_128.png\";\nimport FW from \"../../assets/fw_64.png\";\nimport Gal from \"../../assets/gallente_128.png\";\nimport Min from \"../../assets/minmatar128.png\";\nimport styles from \"./AtAGlance.module.css\";\nimport Card from \"react-bootstrap/Card\";\nimport { useQuery } from \"react-query\";\nimport { useParams } from \"react-router-dom\";\n\nexport const Factions = ({ data }: any) => {\n return (\n <>\n

Affiliations

\n
\n \n Detected Militia\n
\n \n \n \n \n \n \n
\n
\n \n Loyalty Points\n\n
\n \n {data?.lp?.top_five?.map((lp_data: any) => {\n return (\n \n );\n })}\n
\n
\n
\n \n );\n};\n\nexport const CharacterGlancesFactions = () => {\n const { characterID } = useParams();\n\n const { data } = useQuery({\n queryKey: [\"glances\", \"faction\", characterID],\n queryFn: () => loadGlanceFactionData(characterID ? Number(characterID) : 0),\n refetchOnWindowFocus: false,\n });\n return ;\n};\n\nexport const CorporationGlancesFactions = () => {\n const { data } = useQuery({\n queryKey: [\"glances\", \"corp\", \"faction\", 0],\n queryFn: () => loadCorpGlanceFactionData(0),\n refetchOnWindowFocus: false,\n });\n return ;\n};\n","import { CharacterGlancesAccount } from \"../Glance/Account\";\nimport { CharacterGlancesActivities } from \"../Glance/Activities\";\nimport { CharacterGlancesAssets } from \"../Glance/Assets\";\nimport { CharacterGlancesFactions } from \"../Glance/Factions\";\n\nconst CharacterAtAGlance = () => {\n return (\n
\n {/* */}\n \n \n \n \n\n {/*

Character Status

*/}\n
\n );\n};\n\nexport default CharacterAtAGlance;\n","import CharacterAtAGlance from \"./CharacterAtAGlance\";\n\nconst CharacterOverview = () => {\n return (\n <>\n \n \n );\n};\n\nexport default CharacterOverview;\n","import React from \"react\";\nimport { Image } from \"react-bootstrap\";\n\ntype Sizes = 32 | 64 | 128 | 256 | 512;\n\nexport interface CharacterPortraitProps extends Partial {\n character_id?: number | string | undefined;\n size: Sizes;\n height?: number;\n width?: number;\n style?: Partial;\n className?: string;\n}\n\nexport const CharacterPortrait = (props: CharacterPortraitProps) => {\n return (\n \n );\n};\n\nexport interface CorporationLogoProps extends Partial {\n corporation_id?: number | string | undefined;\n size: Sizes;\n height?: number;\n width?: number;\n style?: Partial;\n}\n\nexport const CorporationLogo = (props: CorporationLogoProps) => {\n return (\n \n );\n};\n\nexport interface AllianceLogoProps extends Partial {\n alliance_id?: number | string | undefined;\n size: Sizes;\n height?: number;\n width?: number;\n style?: Partial;\n}\n\nexport const AllianceLogo = (props: AllianceLogoProps) => {\n return (\n \n );\n};\n\nexport interface TypeIconProps extends Partial {\n type_id?: number;\n size: Sizes;\n height?: number;\n width?: number;\n style?: Partial;\n}\n\nexport const TypeIcon = (props: TypeIconProps) => {\n return (\n 64 ? \"render\" : \"icon\"\n }?size=${props.size}`}\n />\n );\n};\n\nexport interface PortraitProps extends Partial {\n character: {\n character_id: number | string | undefined;\n corporation_id?: number | string | undefined;\n alliance_id?: number | string | undefined;\n faction_id?: number | string | undefined;\n };\n size: number;\n rounded_images?: boolean;\n style?: Partial;\n className?: string;\n}\n\nexport const CharacterAllegiancePortrait = (props: PortraitProps) => {\n const borderStyle = props.rounded_images\n ? {\n borderRadius: \"50%\",\n }\n : {};\n return (\n \n \n \n {props.character.faction_id ? (\n \n ) : (\n props.character.alliance_id && (\n \n )\n )}\n \n );\n};\n","import { CharacterAllegiancePortrait } from \"../EveImages/EveImages\";\nimport styles from \"./PortraitCard.module.css\";\nimport React from \"react\";\nimport { Card } from \"react-bootstrap\";\nimport Row from \"react-bootstrap/Row\";\n\nexport declare interface PortraitCardProps {\n children: React.ReactNode; // best, accepts everything React can render\n style?: React.CSSProperties; // to pass through style props\n bg?: string;\n border?: string;\n heading: string;\n isFetching?: boolean;\n headerIcon?: string;\n roundedImages?: string;\n character: any; //todo type from api?\n}\n\nexport function PortraitCard({\n children,\n character,\n style,\n bg,\n border,\n isFetching,\n headerIcon,\n heading,\n roundedImages,\n}: PortraitCardProps) {\n return (\n \n \n \n \n \n
{headerIcon && }
\n
{heading}
\n
\n {isFetching && }\n
\n
\n\n {headerIcon && <>}\n
\n {children}\n
\n \n );\n}\n","import { PortraitCard } from \"../Cards/PortraitCard\";\nimport { Table } from \"react-bootstrap\";\n\nconst CharacterPubDataPanels = ({ isFetching, data }: { isFetching: boolean; data: any }) => {\n if (!data) return

Loading

;\n\n return (\n
\n {data?.characters.map((char: any) => {\n const char_status = char.active ? \"success\" : \"warning\";\n return (\n \n
\n
\n \n \n \n \n \n \n \n
CorporationJoined
\n
\n \n \n {char.history?.map((h: any) => {\n return (\n \n \n \n \n );\n })}\n \n
{h.corporation.corporation_name}{h.start.slice(0, 10)}
\n
\n
\n
\n \n );\n })}\n
\n );\n};\n\nexport default CharacterPubDataPanels;\n","import CharacterPubDataPanels from \"../../Components/Character/CharacterPubDataPanels\";\nimport { loadPubData } from \"../../api/character\";\nimport { useQuery } from \"react-query\";\nimport { useParams } from \"react-router-dom\";\n\nconst CharacterPubData = () => {\n const { characterID } = useParams();\n\n const { data, isFetching } = useQuery(\n [\"pubdata\", characterID],\n () => loadPubData(characterID ? Number(characterID) : 0),\n {\n refetchOnWindowFocus: false,\n }\n );\n\n console.log(data);\n\n return (\n <>\n {/* */}\n \n \n );\n};\n\nexport default CharacterPubData;\n","import React, { JSXElementConstructor, ReactElement, useState } from \"react\";\nimport { Collapse } from \"react-bootstrap\";\nimport { Row } from \"react-bootstrap\";\n\nexport declare interface CollapseBlockProps {\n children: ReactElement>; // best, accepts everything React can render\n style?: React.CSSProperties; // to pass through style props\n heading: string;\n className?: string;\n id?: string;\n}\n\nexport function CollapseBlock({ heading, id, children, className }: CollapseBlockProps) {\n const [open, setOpen] = useState(false);\n return (\n <>\n \n
\n

{heading}

\n
\n
\n

\n setOpen(!open)}\n className={`text-right fas fa-chevron-${open ? \"up\" : \"down\"} fa-fw`}\n aria-controls=\"example-collapse-text\"\n aria-expanded={open}\n >\n

\n
\n \n \n
{children}
\n
\n \n );\n}\n","export default function dateParser(date) {\n const parsed = new Date(date);\n if (!Number.isNaN(parsed.valueOf())) {\n return parsed;\n }\n const parts = String(date).match(/\\d+/g);\n if (parts == null || parts.length <= 2) {\n return parsed;\n } else {\n const [firstP, secondP, ...restPs] = parts.map(x => parseInt(x));\n const correctedParts = [firstP, secondP - 1, ...restPs];\n const isoDate = new Date(Date.UTC(...correctedParts));\n return isoDate;\n }\n}","export default function defaultFormatter(value, _unit, suffix) {\n const unit = value !== 1 ? _unit + 's' : _unit;\n return value + ' ' + unit + ' ' + suffix;\n}","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport * as React from 'react';\nimport { useEffect, useState } from 'react';\nimport dateParser from './dateParser';\nimport defaultFormatter from './defaultFormatter';\n// Just some simple constants for readability\nconst MINUTE = 60;\nconst HOUR = MINUTE * 60;\nconst DAY = HOUR * 24;\nconst WEEK = DAY * 7;\nconst MONTH = DAY * 30;\nconst YEAR = DAY * 365;\nconst defaultNow = () => Date.now();\nexport default function TimeAgo({\n date,\n formatter = defaultFormatter,\n component = 'time',\n live = true,\n minPeriod = 0,\n maxPeriod = WEEK,\n title,\n now = defaultNow,\n ...passDownProps\n}) {\n const [timeNow, setTimeNow] = useState(now());\n useEffect(() => {\n if (!live) {\n return;\n }\n const tick = () => {\n const then = dateParser(date).valueOf();\n if (!then) {\n console.warn('[react-timeago] Invalid Date provided');\n return 0;\n }\n const seconds = Math.round(Math.abs(timeNow - then) / 1000);\n const unboundPeriod = seconds < MINUTE ? 1000 : seconds < HOUR ? 1000 * MINUTE : seconds < DAY ? 1000 * HOUR : 1000 * WEEK;\n const period = Math.min(Math.max(unboundPeriod, minPeriod * 1000), maxPeriod * 1000);\n if (period) {\n return setTimeout(() => {\n setTimeNow(now());\n }, period);\n }\n return 0;\n };\n const timeoutId = tick();\n return () => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n };\n }, [date, live, maxPeriod, minPeriod, now, timeNow]);\n const Komponent = component;\n const then = dateParser(date).valueOf();\n if (!then) {\n return null;\n }\n const seconds = Math.round(Math.abs(timeNow - then) / 1000);\n const suffix = then < timeNow ? 'ago' : 'from now';\n const [value, unit] = seconds < MINUTE ? [Math.round(seconds), 'second'] : seconds < HOUR ? [Math.round(seconds / MINUTE), 'minute'] : seconds < DAY ? [Math.round(seconds / HOUR), 'hour'] : seconds < WEEK ? [Math.round(seconds / DAY), 'day'] : seconds < MONTH ? [Math.round(seconds / WEEK), 'week'] : seconds < YEAR ? [Math.round(seconds / MONTH), 'month'] : [Math.round(seconds / YEAR), 'year'];\n const passDownTitle = typeof title === 'undefined' ? typeof date === 'string' ? date : dateParser(date).toISOString().substr(0, 16).replace('T', ' ') : title;\n const spreadProps = Komponent === 'time' ? {\n ...passDownProps,\n dateTime: dateParser(date).toISOString()\n } : passDownProps;\n const nextFormatter = defaultFormatter.bind(null, value, unit, suffix);\n return /*#__PURE__*/React.createElement(Komponent, _extends({}, spreadProps, {\n title: passDownTitle\n }), formatter(value, unit, suffix, then, nextFormatter, now));\n}","import { PortraitCard } from \"../Cards/PortraitCard\";\nimport { CollapseBlock } from \"../Helpers/CollapseBlock\";\nimport { Badge, Button, ButtonGroup, Card, Table } from \"react-bootstrap\";\nimport TimeAgo from \"react-timeago\";\n\nconst CharacterStatusPanels = ({ data, isFetching }: { data: any; isFetching: boolean }) => {\n return (\n
\n {data?.characters.map((char: any) => {\n const char_status = char.active ? \"success\" : \"warning\";\n return (\n \n
\n \n {char.character.corporation_name}\n
\n {char.character.alliance_name ? char.character.alliance_name :
}\n
\n\n \n Skill Points:{\" \"}\n {char.sp && char.sp.toLocaleString()}\n
\n Isk:{\" \"}\n ${char.isk && char.isk.toLocaleString()}\n
\n Location\n \n \n {char.location ? char.location : \"Unknown Location\"}\n \n
\n {char.ship ? char.ship : \"Unknown Ship\"}\n
\n \n \n \n zKill\n \n \n Eve Who\n \n \n DotLan\n \n \n \n \n
\n \n \n \n \n \n \n \n
UpdateLast Run
\n
\n \n \n {data?.headers.map((h: any) => {\n return (\n \n \n \n \n );\n })}\n \n
{h}\n {char.last_updates ? (\n char.last_updates[h] ? (\n \n ) : (\n \"Never\"\n )\n ) : (\n \"Never\"\n )}\n
\n
\n
\n \n
\n \n );\n })}\n
\n );\n};\n\nexport default CharacterStatusPanels;\n","import { CollapseBlock } from \"../Helpers/CollapseBlock\";\nimport BaseTable from \"../Tables/BaseTable/BaseTable\";\nimport { createColumnHelper } from \"@tanstack/react-table\";\nimport { Button, Table } from \"react-bootstrap\";\nimport TimeAgo from \"react-timeago\";\n\ntype Character = {\n character_name: string;\n corporation_name: string;\n alliance_name: string;\n};\n\ntype UpdateType = Record;\n\ntype CharacterType = {\n character: Character;\n isk: number;\n sp: number;\n active: boolean;\n last_updates: UpdateType;\n};\n\nconst UpdateTableRows = ({ values }: { values: UpdateType }) => {\n if (values) {\n return Object.keys(values)?.map((h: string) => {\n return (\n \n {h}\n \n {values ? values[h] ? : \"Never\" : \"Never\"}\n \n \n );\n });\n }\n};\n\nconst CharacterStatusTable = ({ data, isFetching }: { data: any; isFetching: boolean }) => {\n const columnHelper = createColumnHelper();\n\n const columns = [\n columnHelper.accessor(\"character.character_name\", {\n header: \"Character\",\n }),\n columnHelper.accessor(\"character.corporation_name\", {\n header: \"Corporation\",\n }),\n columnHelper.accessor(\"character.alliance_name\", {\n header: \"Alliance\",\n }),\n columnHelper.accessor(\"isk\", {\n header: \"Isk\",\n cell: (cell) => {\n return cell.getValue().toLocaleString();\n },\n }),\n columnHelper.accessor(\"sp\", {\n header: \"SP\",\n cell: (cell) => {\n return cell.getValue().toLocaleString();\n },\n }),\n columnHelper.accessor(\"active\", {\n header: \"Active\",\n cell: (cell) => {\n const isActive = cell.getValue();\n return (\n
\n \n
\n );\n },\n }),\n columnHelper.accessor(\"last_updates\", {\n header: \"Updates\",\n cell: (cell) => {\n return (\n \n <>\n \n \n \n \n \n \n \n
UpdateLast Run
\n
\n \n \n \n \n
\n
\n \n \n );\n },\n }),\n ];\n\n return ;\n};\n\nexport default CharacterStatusTable;\n","import CharacterStatusPanels from \"../../Components/Character/CharacterStatusPanels\";\nimport CharacterStatusTable from \"../../Components/Character/CharacterStatusTable\";\nimport { loadCharacterStatus } from \"../../api/character\";\nimport { useState } from \"react\";\nimport { Card, Form } from \"react-bootstrap\";\nimport { useQuery } from \"react-query\";\nimport { useParams } from \"react-router-dom\";\n\nconst CharacterStatus = () => {\n const { characterID } = useParams();\n const [table, setTable] = useState(false);\n const { data, isFetching } = useQuery({\n queryKey: [\"status\", characterID],\n queryFn: () => loadCharacterStatus(characterID ? Number(characterID) : 0),\n refetchOnWindowFocus: false,\n initialData: { characters: [], main: undefined, headers: [] },\n });\n\n return (\n <>\n \n
\n {\n setTable(event.target.checked);\n }}\n defaultChecked={table}\n />\n
\n
\n {table ? (\n \n ) : (\n <>\n \n \n )}\n \n );\n};\n\nexport default CharacterStatus;\n","import { IconStatusCard } from \"../../Components/Cards/IconStatusCard\";\nimport { loadCorpGlanceStatusData } from \"../../api/corporation\";\nimport Isk from \"../../assets/isk_128.png\";\nimport Omega from \"../../assets/omega_128.png\";\nimport Unknowns from \"../../assets/unknown_64.png\";\nimport styles from \"./AtAGlance.module.css\";\nimport { useQuery } from \"react-query\";\n\nexport const CorporationGlancesInfo = () => {\n const { data, isLoading } = useQuery({\n queryKey: [\"glances\", \"corporation\", \"status\", 0],\n queryFn: () => loadCorpGlanceStatusData(0),\n refetchOnWindowFocus: false,\n });\n\n return (\n <>\n

Corporation Members

\n
\n \n\n \n\n \n\n 0 ? \"danger\" : \"success\"}\n iconSrc={Unknowns}\n textVariant={data?.characters?.bad > 0 ? \"danger\" : \"success\"}\n text={data?.characters?.bad?.toLocaleString()}\n isLoading={isLoading}\n toolTipText=\"Count of all known characters or alts not loading into audit\"\n />\n\n {/* \n */}\n
\n \n );\n};\n","import { CorporationGlancesActivities } from \"../Glance/Activities\";\nimport { CorporationGlancesAssets } from \"../Glance/Assets\";\nimport { CorporationGlancesInfo } from \"../Glance/Corporation\";\nimport { CorporationGlancesFactions } from \"../Glance/Factions\";\n\nconst CorporationAtAGlance = () => {\n return (\n
\n {/* */}\n \n \n \n \n\n {/*

Character Status

*/}\n
\n );\n};\n\nexport default CorporationAtAGlance;\n","import { Nav } from \"react-bootstrap\";\nimport { NavDropdown } from \"react-bootstrap\";\nimport { LinkContainer } from \"react-router-bootstrap\";\n\nexport interface MenuItemProps {\n name: string;\n link: string;\n}\n\nexport interface CategoryProps {\n name: string;\n links: Array;\n}\n\nexport interface CorpMenuProps extends Partial {\n isLoading?: boolean;\n data?: Array | null;\n error?: boolean;\n}\n\nconst CorpMenu = (props: CorpMenuProps) => {\n console.log(props);\n return (\n <>\n \n \n Overview\n \n \n \n \n Structures\n \n \n \n \n Wallets\n \n \n \n \n Asset Overview\n \n \n \n \n Asset List\n \n \n \n \n Pocos\n \n \n \n \n Bridges\n \n \n Sov Upgrades\n \n \n\n {/* {data &&\n data.map((cat: CategoryProps) => {\n return (\n \n {cat.links.map((link: MenuItemProps) => {\n return (\n \n \n {link.name}\n \n \n );\n })}\n \n );\n })} */}\n \n );\n};\n\nexport default CorpMenu;\n","import CorpMenu from \"./CorpMenu\";\nimport ReactDOM from \"react-dom\";\n\nconst menuRoot = document.getElementById(\"nav-left\");\n\nconst CorpMenuPortal = () => {\n if (!menuRoot) {\n return <>;\n }\n return ReactDOM.createPortal(, menuRoot);\n};\n\nexport { CorpMenuPortal };\n","import { postCorporationRefresh } from \"../../api/corporation\";\nimport Button from \"react-bootstrap/Button\";\n// import { Checkbox, FormControl, Glyphicon, NavDropdown, NavItem } from \"react-bootstrap\";\nimport Form from \"react-bootstrap/Form\";\nimport Nav from \"react-bootstrap/Nav\";\nimport NavDropdown from \"react-bootstrap/NavDropdown\";\nimport { useMutation } from \"react-query\";\n\nfunction CorpAddToken() {\n const { mutate } = useMutation(postCorporationRefresh);\n\n return (\n <>\n \n {/* */}\n \n
\n \n
\n \n
Assets Enables LO Levels in Bridges
\n\n \n
Moons enable Active Observation Tracking
\n\n \n
Required for invoice module on holding corps
\n\n \n
Member Tracking enables the Last Login Tracking of characters for smart filters
\n\n \n\n
\n
\n \n \n \n {/*
*/}\n
\n mutate()}>\n \n \n \n );\n}\n\nexport default CorpAddToken;\n","import CorpAddToken from \"./CorpAddToken\";\nimport styles from \"./CorpMenu.module.css\";\nimport React from \"react\";\nimport { Nav } from \"react-bootstrap\";\nimport ReactDOM from \"react-dom\";\nimport { useIsFetching } from \"react-query\";\nimport { LinkContainer } from \"react-router-bootstrap\";\n\nconst menuRoot = document.getElementById(\"nav-right\");\n\nconst CorpMenuRight = () => {\n const isLoading = useIsFetching();\n const [innerHtmlEmptied, setInnerHtmlEmptied] = React.useState(false);\n\n React.useEffect(() => {\n if (!innerHtmlEmptied) {\n if (menuRoot) {\n menuRoot.innerHTML = \"\";\n setInnerHtmlEmptied(true);\n }\n }\n }, [innerHtmlEmptied]);\n\n if (!innerHtmlEmptied) return null;\n if (!menuRoot) {\n return <>;\n }\n return ReactDOM.createPortal(\n <>\n {isLoading ? (\n <>\n \n \n \n \n ) : (\n <>\n )}\n \n \n Corporations\n \n \n \n \n \n \n ,\n menuRoot\n );\n};\n\nexport { CorpMenuRight };\n","import { CorpMenuPortal } from \"../../Components/CorporationMenu/CorpMenuPortal\";\nimport { CorpMenuRight } from \"../../Components/CorporationMenu/CorpMenuRight\";\nimport { Card, Col } from \"react-bootstrap\";\nimport { Outlet } from \"react-router-dom\";\n\nconst CharacterAudit = () => {\n return (\n <>\n \n \n \n \n {/* Render the Children here */}\n \n \n \n );\n};\n\nexport default CharacterAudit;\n","var _excluded = [\"date\", \"verboseDate\", \"tooltip\", \"children\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React, { useMemo } from 'react';\nimport PropTypes from 'prop-types';\nexport default function Time(_ref, ref) {\n var date = _ref.date,\n verboseDate = _ref.verboseDate,\n tooltip = _ref.tooltip,\n children = _ref.children,\n rest = _objectWithoutProperties(_ref, _excluded);\n\n var isoString = useMemo(function () {\n return date.toISOString();\n }, [date]);\n return /*#__PURE__*/React.createElement(\"time\", _extends({\n ref: ref\n }, rest, {\n dateTime: isoString,\n title: tooltip ? verboseDate : undefined\n }), children);\n} // https://gitlab.com/catamphetamine/react-time-ago/-/issues/5\n//\n// Someone used this component with \"Material UI\"'s `` component,\n// and that component required `children` be `ref`-able.\n// https://github.com/mui-org/material-ui/blob/a9903917f919092f80d84075f39fb51d51f241f2/packages/mui-material/src/Tooltip/Tooltip.js#L494-L496\n// \n// That component seems to only be using that `ref-`ability to check whether \n// the `children` element qualifies for `:focus-visible` selector.\n// https://github.com/mui-org/material-ui/blob/a9903917f919092f80d84075f39fb51d51f241f2/packages/mui-utils/src/useIsFocusVisible.ts#L105\n//\n\nTime = /*#__PURE__*/React.forwardRef(Time);\nTime.propTypes = {\n date: PropTypes.instanceOf(Date).isRequired,\n verboseDate: PropTypes.string,\n tooltip: PropTypes.bool.isRequired,\n children: PropTypes.string.isRequired\n};\n//# sourceMappingURL=Time.js.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); }\n\n/**\r\n * Whether can use `Intl.DateTimeFormat` for these `locales`.\r\n * Returns the first suitable one.\r\n * @param {(string|string[])} locales\r\n * @return {?string} The first locale that can be used.\r\n */\nexport function intlDateTimeFormatSupportedLocale(locales) {\n /* istanbul ignore else */\n if (intlDateTimeFormatSupported()) {\n return Intl.DateTimeFormat.supportedLocalesOf(locales)[0];\n }\n}\n/**\r\n * Whether can use `Intl.DateTimeFormat`.\r\n * @return {boolean}\r\n */\n\nexport function intlDateTimeFormatSupported() {\n // Babel transforms `typeof` into some \"branches\"\n // so istanbul will show this as \"branch not covered\".\n\n /* istanbul ignore next */\n var isIntlAvailable = (typeof Intl === \"undefined\" ? \"undefined\" : _typeof(Intl)) === 'object';\n return isIntlAvailable && typeof Intl.DateTimeFormat === 'function';\n}\n//# sourceMappingURL=locale.js.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); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\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, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\n/**\r\n * A basic in-memory cache.\r\n *\r\n * import Cache from 'javascript-time-ago/Cache'\r\n * const cache = new Cache()\r\n * const object = cache.get('key1', 'key2', ...) || cache.put('key1', 'key2', ..., createObject())\r\n */\nvar Cache = /*#__PURE__*/function () {\n function Cache() {\n _classCallCheck(this, Cache);\n\n this.cache = {};\n }\n\n _createClass(Cache, [{\n key: \"get\",\n value: function get() {\n var cache = this.cache;\n\n for (var _len = arguments.length, keys = new Array(_len), _key = 0; _key < _len; _key++) {\n keys[_key] = arguments[_key];\n }\n\n for (var _i = 0, _keys = keys; _i < _keys.length; _i++) {\n var key = _keys[_i];\n\n if (_typeof(cache) !== 'object') {\n return;\n }\n\n cache = cache[key];\n }\n\n return cache;\n }\n }, {\n key: \"put\",\n value: function put() {\n for (var _len2 = arguments.length, keys = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n keys[_key2] = arguments[_key2];\n }\n\n var value = keys.pop();\n var lastKey = keys.pop();\n var cache = this.cache;\n\n for (var _i2 = 0, _keys2 = keys; _i2 < _keys2.length; _i2++) {\n var key = _keys2[_i2];\n\n if (_typeof(cache[key]) !== 'object') {\n cache[key] = {};\n }\n\n cache = cache[key];\n }\n\n return cache[lastKey] = value;\n }\n }]);\n\n return Cache;\n}();\n\nexport { Cache as default };\n//# sourceMappingURL=cache.js.map","import memoize from 'memoize-one';\nimport { intlDateTimeFormatSupported, intlDateTimeFormatSupportedLocale } from './locale.js';\nimport Cache from './cache.js';\nvar cache = new Cache();\nvar INTL_DATE_TIME_FORMAT_SUPPORTED = intlDateTimeFormatSupported();\n\nvar FALLBACK_VERBOSE_DATE_FORMATTER = function FALLBACK_VERBOSE_DATE_FORMATTER(date) {\n return date.toString();\n};\n/**\r\n * Returns a verbose date formatter.\r\n * \r\n * @param {string} locale - Date formatting locale\r\n * @param {object} format - Output format\r\n * @param {string} format.day - Day format\r\n * @param {string} format.month - Month format\r\n * @param {string} format.year - Year format\r\n * @param {string} format.weekday - Weekday format\r\n * @param {string} format.hour - Hour format\r\n * @param {string} format.minute - Minute format\r\n * @param {string} format.second - Second format\r\n *\r\n * @returns {Function} `(date) -> string`.\r\n */\n\n\nfunction getVerboseDateFormatter(locales, format) {\n // Fall back to `date.toString()` for old web browsers.\n // https://caniuse.com/#search=intl\n if (!INTL_DATE_TIME_FORMAT_SUPPORTED) {\n return FALLBACK_VERBOSE_DATE_FORMATTER;\n } // If none of the `locales` are supported\n // a default system locale will be used.\n\n\n var locale = resolveLocale(locales); // `Intl.DateTimeFormat` format caching key.\n // E.g. `\"{\"day\":\"numeric\",\"month\":\"short\",...}\"`.\n // Didn't benchmark what's faster:\n // creating a new `Intl.DateTimeFormat` instance\n // or stringifying a small JSON `format`.\n // Perhaps strigifying JSON `format` is faster.\n\n var formatFingerprint = JSON.stringify(format); // Get `Intl.DateTimeFormat` instance for these `locale` and `format`.\n // (`locale` can be `undefined`, hence the `String(locale)` conversion)\n\n var formatter = cache.get(String(locale), formatFingerprint) || cache.put(String(locale), formatFingerprint, new Intl.DateTimeFormat(locale, format)); // Return date formatter\n\n return function (date) {\n return formatter.format(date);\n };\n} // Even though `getVerboseDateFormatter()` function is called inside a\n// `useMemo()` hook, it's still invoked every time for different \n// `` elements on a page. There could be a lot of such\n// `` elements on a page. And `useMemo()` wouldn't speed up\n// the initial render. To work around that, simple argument-based memoization\n// is used.\n\n\nexport default memoize(getVerboseDateFormatter); // Caching locale resolving for optimizing pages \n// with a lot of `` elements (say, 100 or more).\n// `Intl.DateTimeFormat.supportedLocalesOf(locales)` is not instantaneous.\n// For example, it could be 25 milliseconds for 200 calls.\n\nvar resolvedLocales = {};\n/**\r\n * Resolves a list of possible locales to a single (\"best fit\") supported locale.\r\n * @param {string[]} locales\r\n * @return {string}\r\n */\n\nfunction resolveLocale(locales) {\n var localesFingerprint = locales.toString();\n\n if (resolvedLocales[localesFingerprint]) {\n return resolvedLocales[localesFingerprint];\n }\n\n return resolvedLocales[localesFingerprint] = intlDateTimeFormatSupportedLocale(locales);\n}\n//# sourceMappingURL=getVerboseDateFormatter.js.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); }\n\n/**\r\n * Converts value to a `Date`\r\n * @param {(number|Date)} value\r\n * @return {Date}\r\n */\nexport function getDate(value) {\n return isDate(value) ? value : new Date(value);\n}\n/**\r\n * Converts value to a timestamp.\r\n * @param {(number|Date)} value\r\n * @return {number}\r\n */\n\nexport function getTime(value) {\n return isDate(value) ? value.getTime() : value;\n}\n\nfunction isDate(object) {\n return object instanceof Date || isMockedDate(object);\n} // During testing via some testing libraries `Date`s aren't actually `Date`s.\n// https://github.com/catamphetamine/javascript-time-ago/issues/22\n\n\nexport function isMockedDate(object) {\n return _typeof(object) === 'object' && typeof object.getTime === 'function';\n}\n//# sourceMappingURL=date.js.map","import TimeAgo from 'javascript-time-ago';\nimport Cache from './cache.js';\nvar TimeAgoCache = new Cache();\nexport default function getTimeAgo(preferredLocales, _ref) {\n var polyfill = _ref.polyfill;\n // `TimeAgo` instance creation is (hypothetically) assumed\n // a lengthy operation so the instances are cached and reused.\n // https://gitlab.com/catamphetamine/react-time-ago/-/issues/1\n var key = String(preferredLocales) + ':' + String(polyfill);\n return TimeAgoCache.get(key) || TimeAgoCache.put(key, new TimeAgo(preferredLocales, {\n polyfill: polyfill\n }));\n}\n//# sourceMappingURL=getTimeAgo.js.map","// Generated by CoffeeScript 1.12.2\n(function() {\n var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime;\n\n if ((typeof performance !== \"undefined\" && performance !== null) && performance.now) {\n module.exports = function() {\n return performance.now();\n };\n } else if ((typeof process !== \"undefined\" && process !== null) && process.hrtime) {\n module.exports = function() {\n return (getNanoSeconds() - nodeLoadTime) / 1e6;\n };\n hrtime = process.hrtime;\n getNanoSeconds = function() {\n var hr;\n hr = hrtime();\n return hr[0] * 1e9 + hr[1];\n };\n moduleLoadTime = getNanoSeconds();\n upTime = process.uptime() * 1e9;\n nodeLoadTime = moduleLoadTime - upTime;\n } else if (Date.now) {\n module.exports = function() {\n return Date.now() - loadTime;\n };\n loadTime = Date.now();\n } else {\n module.exports = function() {\n return new Date().getTime() - loadTime;\n };\n loadTime = new Date().getTime();\n }\n\n}).call(this);\n\n//# sourceMappingURL=performance-now.js.map\n","var now = require('performance-now')\n , root = typeof window === 'undefined' ? global : window\n , vendors = ['moz', 'webkit']\n , suffix = 'AnimationFrame'\n , raf = root['request' + suffix]\n , caf = root['cancel' + suffix] || root['cancelRequest' + suffix]\n\nfor(var i = 0; !raf && i < vendors.length; i++) {\n raf = root[vendors[i] + 'Request' + suffix]\n caf = root[vendors[i] + 'Cancel' + suffix]\n || root[vendors[i] + 'CancelRequest' + suffix]\n}\n\n// Some versions of FF have rAF but not cAF\nif(!raf || !caf) {\n var last = 0\n , id = 0\n , queue = []\n , frameDuration = 1000 / 60\n\n raf = function(callback) {\n if(queue.length === 0) {\n var _now = now()\n , next = Math.max(0, frameDuration - (_now - last))\n last = next + _now\n setTimeout(function() {\n var cp = queue.slice(0)\n // Clear queue here to prevent\n // callbacks from appending listeners\n // to the current frame's queue\n queue.length = 0\n for(var i = 0; i < cp.length; i++) {\n if(!cp[i].cancelled) {\n try{\n cp[i].callback(last)\n } catch(e) {\n setTimeout(function() { throw e }, 0)\n }\n }\n }\n }, Math.round(next))\n }\n queue.push({\n handle: ++id,\n callback: callback,\n cancelled: false\n })\n return id\n }\n\n caf = function(handle) {\n for(var i = 0; i < queue.length; i++) {\n if(queue[i].handle === handle) {\n queue[i].cancelled = true\n }\n }\n }\n}\n\nmodule.exports = function(fn) {\n // Wrap in a new function to prevent\n // `cancel` potentially being assigned\n // to the native rAF function\n return raf.call(root, fn)\n}\nmodule.exports.cancel = function() {\n caf.apply(root, arguments)\n}\nmodule.exports.polyfill = function(object) {\n if (!object) {\n object = root;\n }\n object.requestAnimationFrame = raf\n object.cancelAnimationFrame = caf\n}\n","// \"Binary\" search in a sorted array.\nexport default function (array, test) {\n if (array.length === 0) {\n return 0;\n }\n\n var min = 0;\n var max = array.length - 1;\n var guess;\n\n while (min <= max) {\n guess = Math.floor((max + min) / 2);\n var result = test(array[guess]);\n\n if (result === 0) {\n return guess;\n } else if (result < 0) {\n min = guess + 1;\n\n if (min > max) {\n return min;\n }\n } else {\n max = guess - 1;\n\n if (max < min) {\n return min;\n }\n }\n } // return -1\n // return min\n\n}\n//# sourceMappingURL=binarySearch.js.map","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\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.\"); }\n\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); }\n\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; }\n\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; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\n// Manages the updates of all `` elements on a page.\n// The reasons for going with `requestAnimationFrame()`:\n// * `requestAnimationFrame` won't be called when a tab is in background.\n// * Chrome has bugs when handling `setTimeout()`: https://www.npmjs.com/package/request-animation-frame-timeout\n// `requestAnimationFrame()` polyfill for old browsers.\nimport requestAnimationFrame from 'raf';\nimport binarySearch from './helpers/binarySearch.js';\nexport default {\n instances: [],\n add: function add(instance) {\n var _this = this;\n\n var wasIdle = this.instances.length === 0;\n\n _add(this.instances, instance);\n\n if (wasIdle) {\n this.start();\n }\n\n return {\n stop: function stop() {\n remove(_this.instances, instance);\n\n if (_this.instances.length === 0) {\n _this.stop();\n }\n },\n forceUpdate: function forceUpdate() {\n updateInstance(instance, _this.instances);\n }\n };\n },\n tick: function tick() {\n var now = Date.now();\n\n while (true) {\n var instance = this.instances[0];\n\n if (now >= instance.nextUpdateTime) {\n updateInstance(instance, this.instances);\n } else {\n break;\n }\n }\n },\n scheduleNextTick: function scheduleNextTick() {\n var _this2 = this;\n\n this.scheduledTick = requestAnimationFrame(function () {\n _this2.tick();\n\n _this2.scheduleNextTick();\n });\n },\n start: function start() {\n this.scheduleNextTick();\n },\n stop: function stop() {\n requestAnimationFrame.cancel(this.scheduledTick);\n }\n};\n\nfunction _updateInstance(instance) {\n var _instance$getNextValu = instance.getNextValue(),\n _instance$getNextValu2 = _slicedToArray(_instance$getNextValu, 2),\n value = _instance$getNextValu2[0],\n nextUpdateTime = _instance$getNextValu2[1];\n\n instance.setValue(value);\n instance.nextUpdateTime = nextUpdateTime;\n}\n\nfunction updateInstance(instance, instances) {\n _updateInstance(instance);\n\n remove(instances, instance);\n\n _add(instances, instance);\n}\n\nfunction _add(instances, instance) {\n var i = findTargetIndex(instances, instance);\n instances.splice(i, 0, instance);\n}\n\nfunction remove(instances, instance) {\n var i = instances.indexOf(instance);\n instances.splice(i, 1);\n}\n\nfunction findTargetIndex(instances, instance) {\n var nextUpdateTime = instance.nextUpdateTime;\n return binarySearch(instances, function (instance) {\n if (instance.nextUpdateTime === nextUpdateTime) {\n return 0;\n } else if (instance.nextUpdateTime > nextUpdateTime) {\n return 1;\n } else {\n return -1;\n }\n });\n}\n//# sourceMappingURL=Updater.js.map","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\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.\"); }\n\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); }\n\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; }\n\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; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport { useEffect, useState, useRef, useCallback, useMemo } from 'react';\nimport TimeAgo from 'javascript-time-ago';\nimport getVerboseDateFormatter from './helpers/getVerboseDateFormatter.js';\nimport { getDate } from './helpers/date.js';\nimport getTimeAgo from './helpers/getTimeAgo.js';\nimport Updater from './Updater.js';\nexport default function useTimeAgo(_ref) {\n var date = _ref.date,\n future = _ref.future,\n locale = _ref.locale,\n locales = _ref.locales,\n timeStyle = _ref.timeStyle,\n round = _ref.round,\n minTimeLeft = _ref.minTimeLeft,\n formatVerboseDate = _ref.formatVerboseDate,\n _ref$verboseDateForma = _ref.verboseDateFormat,\n verboseDateFormat = _ref$verboseDateForma === void 0 ? DEFAULT_VERBOSE_DATE_FORMAT : _ref$verboseDateForma,\n updateInterval = _ref.updateInterval,\n _ref$tick = _ref.tick,\n tick = _ref$tick === void 0 ? true : _ref$tick,\n nowProperty = _ref.now,\n _ref$timeOffset = _ref.timeOffset,\n timeOffset = _ref$timeOffset === void 0 ? 0 : _ref$timeOffset,\n polyfill = _ref.polyfill;\n // Get the list of preferred locales.\n var preferredLocales = useMemo(function () {\n // Convert `locale` to `locales`.\n if (locale) {\n locales = [locale];\n } // Add `javascript-time-ago` default locale.\n\n\n return locales.concat(TimeAgo.getDefaultLocale());\n }, [locale, locales]); // Create `javascript-time-ago` formatter instance.\n\n var timeAgo = useMemo(function () {\n return getTimeAgo(preferredLocales, {\n polyfill: polyfill\n });\n }, [preferredLocales, polyfill]); // The date or timestamp that was passed.\n // Convert timestamp to `Date`.\n\n date = useMemo(function () {\n return getDate(date);\n }, [date]); // Formats the `date`.\n\n var formatDate = useCallback(function () {\n var now = (nowProperty || Date.now()) - timeOffset;\n var stopUpdates;\n\n if (future) {\n if (now >= date.getTime()) {\n now = date.getTime();\n stopUpdates = true;\n }\n }\n\n if (minTimeLeft !== undefined) {\n var maxNow = date.getTime() - minTimeLeft * 1000;\n\n if (now > maxNow) {\n now = maxNow;\n stopUpdates = true;\n }\n }\n\n var _timeAgo$format = timeAgo.format(date, timeStyle, {\n getTimeToNextUpdate: true,\n now: now,\n future: future,\n round: round\n }),\n _timeAgo$format2 = _slicedToArray(_timeAgo$format, 2),\n formattedDate = _timeAgo$format2[0],\n timeToNextUpdate = _timeAgo$format2[1];\n\n if (stopUpdates) {\n timeToNextUpdate = INFINITY;\n } else {\n // Legacy compatibility: there used to be an `updateInterval` property.\n // That was before `getTimeToNextUpdate` feature was introduced in `javascript-time-ago`.\n // A default interval of one minute is introduced because\n // `getTimeToNextUpdate` feature may theoretically return `undefined`.\n timeToNextUpdate = updateInterval || timeToNextUpdate || 60 * 1000; // A minute by default.\n }\n\n return [formattedDate, now + timeToNextUpdate];\n }, [date, future, timeStyle, updateInterval, round, minTimeLeft, timeAgo, nowProperty]);\n var formatDateRef = useRef();\n formatDateRef.current = formatDate;\n\n var _useMemo = useMemo(formatDate, []),\n _useMemo2 = _slicedToArray(_useMemo, 2),\n _formattedDate = _useMemo2[0],\n _nextUpdateTime = _useMemo2[1];\n\n var _useState = useState(_formattedDate),\n _useState2 = _slicedToArray(_useState, 2),\n formattedDate = _useState2[0],\n setFormattedDate = _useState2[1];\n\n var updater = useRef();\n useEffect(function () {\n if (tick) {\n updater.current = Updater.add({\n getNextValue: function getNextValue() {\n return formatDateRef.current();\n },\n setValue: setFormattedDate,\n nextUpdateTime: _nextUpdateTime\n });\n return function () {\n return updater.current.stop();\n };\n }\n }, [tick]);\n useEffect(function () {\n if (updater.current) {\n updater.current.forceUpdate();\n } else {\n var _formatDate = formatDate(),\n _formatDate2 = _slicedToArray(_formatDate, 1),\n _formattedDate2 = _formatDate2[0];\n\n setFormattedDate(_formattedDate2);\n }\n }, [formatDate]); // Create verbose date formatter for the tooltip text.\n\n var verboseDateFormatter = useMemo(function () {\n return getVerboseDateFormatter(preferredLocales, verboseDateFormat);\n }, [preferredLocales, verboseDateFormat]); // Format verbose date for the tooltip.\n\n var verboseDate = useMemo(function () {\n if (formatVerboseDate) {\n return formatVerboseDate(date);\n }\n\n return verboseDateFormatter(date);\n }, [date, formatVerboseDate, verboseDateFormatter]);\n return {\n date: date,\n formattedDate: formattedDate,\n verboseDate: verboseDate\n };\n} // A thousand years is practically a metaphor for \"infinity\"\n// in the context of this component.\n\nvar YEAR = 365 * 24 * 60 * 60 * 1000;\nvar INFINITY = 1000 * YEAR; // `Intl.DateTimeFormat` for verbose date.\n// Formatted date example: \"Thursday, December 20, 2012, 7:00:00 AM GMT+4\"\n\nvar DEFAULT_VERBOSE_DATE_FORMAT = {\n weekday: 'long',\n day: 'numeric',\n month: 'long',\n year: 'numeric',\n hour: 'numeric',\n minute: '2-digit',\n second: '2-digit' // timeZoneName: 'short'\n\n};\n//# sourceMappingURL=useTimeAgo.js.map","import PropTypes from 'prop-types';\nvar oneOfType = PropTypes.oneOfType,\n arrayOf = PropTypes.arrayOf,\n string = PropTypes.string,\n number = PropTypes.number,\n shape = PropTypes.shape,\n func = PropTypes.func; // The first step isn't required to define `minTime` or `test()`.\n\nvar step = oneOfType([shape({\n minTime: number,\n formatAs: string.isRequired\n}), shape({\n test: func,\n formatAs: string.isRequired\n}), shape({\n minTime: number,\n format: func.isRequired\n}), shape({\n test: func,\n format: func.isRequired\n})]); // Formatting style.\n\nexport var style = oneOfType([// Not using `oneOf()` here, because that way\n// this package wouldn't support some hypothetical\n// new styles added to `javascript-time-ago` in some future.\nstring, shape({\n steps: arrayOf(step).isRequired,\n labels: oneOfType([string, arrayOf(string)]).isRequired,\n round: string\n})]);\n//# sourceMappingURL=PropTypes.js.map","var _excluded = [\"date\", \"future\", \"timeStyle\", \"round\", \"minTimeLeft\", \"locale\", \"locales\", \"formatVerboseDate\", \"verboseDateFormat\", \"updateInterval\", \"tick\", \"now\", \"timeOffset\", \"polyfill\", \"tooltip\", \"component\", \"container\", \"wrapperComponent\", \"wrapperProps\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport Time from './Time.js';\nimport useTimeAgo from './useTimeAgo.js';\nimport { style as styleType } from './PropTypes.js';\n\nfunction ReactTimeAgo(_ref) {\n var dateProperty = _ref.date,\n future = _ref.future,\n timeStyle = _ref.timeStyle,\n round = _ref.round,\n minTimeLeft = _ref.minTimeLeft,\n locale = _ref.locale,\n _ref$locales = _ref.locales,\n locales = _ref$locales === void 0 ? [] : _ref$locales,\n formatVerboseDate = _ref.formatVerboseDate,\n verboseDateFormat = _ref.verboseDateFormat,\n updateInterval = _ref.updateInterval,\n tick = _ref.tick,\n nowProperty = _ref.now,\n timeOffset = _ref.timeOffset,\n polyfill = _ref.polyfill,\n _ref$tooltip = _ref.tooltip,\n tooltip = _ref$tooltip === void 0 ? true : _ref$tooltip,\n _ref$component = _ref.component,\n Component = _ref$component === void 0 ? Time : _ref$component,\n container = _ref.container,\n wrapperComponent = _ref.wrapperComponent,\n wrapperProps = _ref.wrapperProps,\n rest = _objectWithoutProperties(_ref, _excluded);\n\n var _useTimeAgo = useTimeAgo({\n date: dateProperty,\n future: future,\n timeStyle: timeStyle,\n round: round,\n minTimeLeft: minTimeLeft,\n locale: locale,\n locales: locales,\n formatVerboseDate: formatVerboseDate,\n verboseDateFormat: verboseDateFormat,\n updateInterval: updateInterval,\n tick: tick,\n now: nowProperty,\n timeOffset: timeOffset,\n polyfill: polyfill\n }),\n date = _useTimeAgo.date,\n verboseDate = _useTimeAgo.verboseDate,\n formattedDate = _useTimeAgo.formattedDate;\n\n var result = /*#__PURE__*/React.createElement(Component, _extends({\n date: date,\n verboseDate: verboseDate,\n tooltip: tooltip\n }, rest), formattedDate);\n var WrapperComponent = wrapperComponent || container;\n\n if (WrapperComponent) {\n return /*#__PURE__*/React.createElement(WrapperComponent, _extends({}, wrapperProps, {\n verboseDate: verboseDate\n }), result);\n }\n\n return result;\n}\n\nReactTimeAgo.propTypes = {\n // `date: Date` or `timestamp: number`.\n // E.g. `new Date()` or `1355972400000`.\n date: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired,\n // Preferred locale.\n // Is 'en' by default.\n // E.g. 'ru-RU'.\n locale: PropTypes.string,\n // Alternatively to `locale`, one could pass `locales`:\n // A list of preferred locales (ordered).\n // Will choose the first supported locale from the list.\n // E.g. `['ru-RU', 'en-GB']`.\n locales: PropTypes.arrayOf(PropTypes.string),\n // If set to `true`, then will stop at \"zero point\"\n // when going from future dates to past dates.\n // In other words, even if the `date` has passed,\n // it will still render as if `date` is `now`.\n future: PropTypes.bool,\n // Date/time formatting style.\n // See `javascript-time-ago` docs on \"Styles\" for more info.\n // E.g. 'round', 'round-minute', 'twitter', 'twitter-first-minute'.\n timeStyle: styleType,\n // `round` parameter of `javascript-time-ago`.\n // See `javascript-time-ago` docs on \"Rounding\" for more info.\n // Examples: \"round\", \"floor\".\n round: PropTypes.string,\n // If specified, the time won't \"tick\" past this threshold (in seconds).\n // For example, if `minTimeLeft` is `60 * 60`\n // then the time won't \"tick\" past \"in 1 hour\".\n minTimeLeft: PropTypes.number,\n // A React component to render the relative time label.\n // Receives properties:\n // * date: Date — The date.\n // * verboseDate: string — Formatted verbose date.\n // * tooltip: boolean — The `tooltip` property of `` component.\n // * children: string — The relative time label.\n // * All \"unknown\" properties that have been passed to `` are passed through to this component.\n component: PropTypes.elementType,\n // Whether to use HTML `tooltip` attribute to show a verbose date tooltip.\n // Is `true` by default.\n // Can be set to `false` to disable the native HTML `tooltip`.\n tooltip: PropTypes.bool,\n // Verbose date formatter.\n // By default it's `(date) => new Intl.DateTimeFormat(locale, {…}).format(date)`.\n formatVerboseDate: PropTypes.func,\n // `Intl.DateTimeFormat` format for formatting verbose date.\n // See `Intl.DateTimeFormat` docs for more info.\n verboseDateFormat: PropTypes.object,\n // (deprecated)\n // How often the component refreshes itself.\n // When not provided, will use `getNextTimeToUpdate()` feature\n // of `javascript-time-ago` styles to determine the update interval.\n updateInterval: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.shape({\n threshold: PropTypes.number,\n interval: PropTypes.number.isRequired\n }))]),\n // (deprecated).\n // Set to `false` to disable automatic refresh of the component.\n // Is `true` by default.\n // I guess no one actually turns auto-update off, so this parameter is deprecated.\n tick: PropTypes.bool,\n // Allows setting a custom baseline for relative time measurement.\n // https://gitlab.com/catamphetamine/react-time-ago/-/issues/4\n now: PropTypes.number,\n // Allows offsetting the `date` by an arbitrary amount of milliseconds.\n // https://gitlab.com/catamphetamine/react-time-ago/-/issues/4\n timeOffset: PropTypes.number,\n // Pass `false` to use native `Intl.RelativeTimeFormat` / `Intl.PluralRules`\n // instead of the polyfilled ones in `javascript-time-ago`.\n polyfill: PropTypes.bool,\n // (advanced)\n // A React Component to wrap the resulting `