@bynder/compact-view 5.2.1 → 5.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AccessToken.js +5 -0
- package/AccessToken2.js +176 -0
- package/AccessToken3.js +4 -0
- package/ActiveFilter.js +6 -5
- package/ActiveFilters.js +24 -24
- package/AddMedia.js +1 -1
- package/AdditionalInfo.js +18 -0
- package/Advanced.js +3 -3
- package/App.js +46 -43
- package/Arrow.js +14 -0
- package/AssetCard.js +32 -29
- package/AssetCardMetaproperties.js +14 -13
- package/AssetFilter.js +36 -35
- package/AssetFilterContext.js +3 -3
- package/AssetItem.js +14 -13
- package/AssetList.js +7 -7
- package/AssetTypeItem.js +13 -12
- package/Autocomplete_new.js +41 -37
- package/Axios2.js +136 -0
- package/AxiosError.js +54 -0
- package/AxiosHeaders.js +181 -0
- package/AxiosURLSearchParams.js +33 -0
- package/Badge.js +44 -0
- package/Baloon.js +42 -0
- package/BaseStyles.js +10 -0
- package/Blob.js +4 -0
- package/Box.js +22 -0
- package/Button.js +39 -0
- package/Button.styles.js +40 -0
- package/ButtonAction.js +3 -3
- package/ButtonLegacy.js +48 -0
- package/ButtonLegacy.styles.js +28 -0
- package/CancelToken.js +77 -0
- package/CanceledError.js +11 -0
- package/Card.js +84 -0
- package/CardSkeleton.js +15 -14
- package/Checkbox.js +85 -0
- package/Checkbox.styles.js +2 -2
- package/Checkmark.js +7 -0
- package/Chip.js +70 -40
- package/Chip2.js +42 -0
- package/CollectionCard.js +9 -8
- package/CollectionItem.js +15 -14
- package/CollectionList.js +2 -2
- package/CollectionView.js +2 -2
- package/CollectionsView.js +6 -6
- package/ColorHexInput.js +31 -0
- package/ColorPicker.js +66 -0
- package/ColorPickerSolid.js +20 -0
- package/ColorPickerWithOpacity.js +37 -0
- package/Combobox.js +61 -0
- package/ConcealedAction.js +16 -0
- package/ConnectButton.js +1 -1
- package/Container.js +14 -13
- package/Container2.js +31 -0
- package/Content.js +16 -0
- package/ContextAction.js +18 -17
- package/ContextActionButton.js +29 -0
- package/ControlGroup.js +32 -0
- package/DOMFunctions.js +27 -0
- package/Dat.js +62 -50
- package/DatDropdownItem.js +20 -19
- package/DesignSystemContext.js +4 -4
- package/DesignSystemProvider.js +29 -0
- package/DirectionSelect.js +16 -15
- package/Divider.js +21 -0
- package/DomainInput.js +15 -14
- package/DragRange.js +25 -0
- package/DragSelect.js +11 -11
- package/Dropdown.js +12 -11
- package/Dropdown2.js +169 -0
- package/DropdownContent.js +2 -2
- package/DropdownListItem.js +3 -3
- package/Enum.js +12 -0
- package/ErrorMessage.js +20 -19
- package/FieldSelect.js +4 -4
- package/FilePlaceholder.js +19 -0
- package/FileSelector.js +11 -10
- package/Flex.js +21 -0
- package/FontPicker.js +104 -0
- package/Footer.js +16 -0
- package/Form.js +23 -0
- package/FormData.js +4 -0
- package/Frame.js +64 -0
- package/Group.js +17 -0
- package/Group2.js +26 -0
- package/Header2.js +43 -0
- package/Header22.js +15 -0
- package/HelperText.js +26 -0
- package/HorizontalScroll.js +4 -4
- package/HttpHandler.js +74 -0
- package/HttpResponse.js +85 -0
- package/HttpStatusCode.js +71 -0
- package/IconPlaceholder.js +18 -0
- package/Image.js +19 -0
- package/Images.js +30 -0
- package/Indicator.js +74 -0
- package/InfiniteScroll.js +8 -8
- package/InlineBanner.js +51 -0
- package/Input.js +109 -0
- package/Input.styles.js +71 -0
- package/InputContainer.js +9 -0
- package/InputField.js +74 -0
- package/InputRow.js +18 -0
- package/Inspector.js +34 -0
- package/InteractiveIcon.js +28 -0
- package/InterceptorManager.js +58 -0
- package/Item.js +107 -0
- package/Item2.js +14 -0
- package/Item4.js +190 -0
- package/Label.js +33 -0
- package/LeftArrow.js +3 -3
- package/List.js +25 -0
- package/ListItem.js +11 -0
- package/ListItem2.js +58 -0
- package/ListItem4.js +37 -0
- package/MetapropertyFilterContent.js +2 -2
- package/MetapropertyOption.js +2 -3
- package/Middleware.js +49 -0
- package/Middleware2.js +49 -0
- package/Modal.js +2 -2
- package/Modal2.js +31 -0
- package/ModalBase.js +117 -0
- package/ModalBase.styles.js +75 -0
- package/ModalConfirmation.js +8 -0
- package/NoResults.js +16 -15
- package/OffsetContext.js +9 -0
- package/Oops.js +1 -1
- package/OpacityInput.js +17 -0
- package/Option_new.js +19 -18
- package/Overlay.js +35 -0
- package/Parser.js +131 -0
- package/Prefixer.js +187 -0
- package/Radio.js +78 -0
- package/RadioGroup.js +25 -0
- package/RangeInput.js +41 -0
- package/RefreshingSpinner.js +3 -3
- package/ReportModal.js +16 -14
- package/RequestHandler.js +119 -0
- package/RightArrow.js +4 -4
- package/Row.js +16 -0
- package/SearchInput.js +15 -15
- package/SearchInput2.js +46 -0
- package/SectionTitle.js +17 -0
- package/Select.js +49 -0
- package/SelectButtonText.js +16 -0
- package/SelectedItemContainer.js +11 -10
- package/SelectedItems.js +2 -2
- package/SelectionFooter.js +8 -7
- package/Serializer.js +27 -0
- package/ShadowRootInternal.js +17 -17
- package/Sidebar.js +17 -0
- package/Skeleton.js +6 -6
- package/Slider.constants.js +6 -0
- package/Slider.js +128 -0
- package/SmartFilterContent.js +2 -2
- package/SmartFilterSelect_new.js +2 -2
- package/Smartfilters_new.js +53 -50
- package/Spinner.js +2 -2
- package/Spinner2.js +15 -0
- package/StatefulAssetList.js +15 -15
- package/Stats.js +16 -0
- package/StatsItem.js +23 -0
- package/Status.js +32 -0
- package/Switch.js +82 -0
- package/SwitchNLS.js +26 -23
- package/Tabs2.js +10 -0
- package/TagItem.js +8 -8
- package/Tags.js +9 -9
- package/Text2.js +11 -0
- package/Text22.js +18 -0
- package/Text4.js +18 -0
- package/Textarea.js +92 -0
- package/Theming.js +4 -4
- package/Thumb.js +28 -0
- package/Thumbnail.js +91 -0
- package/Tokenizer.js +147 -0
- package/Toolbar.js +13 -12
- package/Tooltip.js +2 -2
- package/Tooltip2.js +111 -0
- package/TruncatedText.js +34 -0
- package/URLSearchParams.js +5 -0
- package/Utility.js +56 -0
- package/ViewSwitch.js +8 -7
- package/_check_private_redeclaration.js +7 -0
- package/_class_apply_descriptor_get.js +6 -0
- package/_class_apply_descriptor_set.js +11 -0
- package/_class_extract_field_descriptor.js +7 -0
- package/_class_private_field_get.js +9 -0
- package/_class_private_field_init.js +7 -0
- package/_class_private_field_set.js +9 -0
- package/_commonjsHelpers.js +6 -0
- package/adapters.js +53 -0
- package/api.js +25 -0
- package/api2.js +40 -0
- package/api3.js +406 -0
- package/applyScopeDataToEvent.js +83 -0
- package/applyScopeDataToEvent2.js +55 -0
- package/asset.type.js +9 -9
- package/autocomplete.js +2 -2
- package/axios.js +46 -0
- package/base.js +57 -0
- package/baseclient.js +498 -0
- package/bind.js +8 -0
- package/browser.js +44 -0
- package/buildFullPath.js +9 -0
- package/buildURL.js +23 -0
- package/bundle.esm.js +81 -0
- package/calculateContainerMaxHeight.js +12 -0
- package/calculateNodeHeight.js +35 -0
- package/carrier.js +13 -0
- package/chain.js +8 -0
- package/checkGlobals.js +13 -0
- package/checks.js +178 -0
- package/chunk-6HYIRFX2.js +1 -0
- package/cleanUrl.js +11 -0
- package/client.js +76 -0
- package/clientreport.js +15 -0
- package/clsx.js +17 -0
- package/colorTransforms.js +12 -0
- package/combineMetaproperties.js +1 -1
- package/combineURLs.js +6 -0
- package/composeSignals.js +30 -0
- package/constants.js +2 -12
- package/constants2.js +82 -0
- package/constants3.js +14 -0
- package/constants4.js +8 -0
- package/constants5.js +4 -0
- package/constants6.js +4 -0
- package/context.js +12 -0
- package/context10.js +12 -0
- package/context2.js +9 -0
- package/context3.js +12 -0
- package/context6.js +5 -0
- package/cookieStore.js +116 -0
- package/cookies.js +32 -0
- package/core.js +42 -0
- package/currentScopes.js +9 -0
- package/data.js +4 -0
- package/de_DE.json.js +18 -0
- package/debug-build.js +4 -0
- package/debug-build2.js +4 -0
- package/debug-build3.js +4 -0
- package/debug-build4.js +4 -0
- package/debug-build5.js +4 -0
- package/debug-build6.js +4 -0
- package/decorators.js +37 -0
- package/defaultScopes.js +12 -0
- package/devUtils.js +20 -0
- package/dispatchRequest.js +31 -0
- package/doc.js +26 -0
- package/domHelpers.js +15 -0
- package/dsn.js +54 -0
- package/dynamicSamplingContext.js +34 -0
- package/dynamicSamplingContext2.js +34 -0
- package/emotion-unitless.esm.js +52 -0
- package/en_US.json.js +23 -0
- package/englishText-12403056.js +6 -0
- package/env.js +6 -0
- package/envelope.js +113 -0
- package/envelope2.js +23 -0
- package/envelope3.js +24 -0
- package/error.js +9 -0
- package/errors.js +33 -0
- package/errors2.js +55 -0
- package/es_ES.json.js +18 -0
- package/es_MX.json.js +18 -0
- package/eventProcessors.js +27 -0
- package/eventProcessors2.js +23 -0
- package/eventbuilder.js +128 -0
- package/exports.js +11 -0
- package/exports2.js +16 -0
- package/exports3.js +8 -0
- package/fetch.js +44 -0
- package/fetch2.js +141 -0
- package/filterAssets.js +1 -1
- package/fixFontSpaceInUrl.js +8 -0
- package/focusWithoutScrolling.js +45 -0
- package/forceHiddenStyles.js +19 -0
- package/formDataToJSON.js +31 -0
- package/fr_FR.json.js +18 -0
- package/getAbsoluteUrl.js +13 -0
- package/getAsset.js +1 -1
- package/getAssetCounts.js +1 -1
- package/getAssets.js +2 -2
- package/getCallFrame.js +12 -0
- package/getCollections.js +1 -1
- package/getFilterOptions.js +1 -1
- package/getFilters.js +1 -1
- package/getFilters_new.js +1 -1
- package/getRequestCookies.js +40 -0
- package/getRootSpan.js +6 -0
- package/getRootSpan2.js +6 -0
- package/getSimilarityAssets.js +1 -1
- package/getSizingData.js +45 -0
- package/getStatusCodeColor.js +6 -0
- package/getThumbPosition.js +6 -0
- package/getTimestamp.js +7 -0
- package/getUseLayerOptions.js +49 -0
- package/handlers.js +92 -6
- package/handlers2.js +6 -0
- package/helpers.js +3 -4
- package/helpers2.js +6 -0
- package/hexFromPercentage.js +7 -0
- package/http.js +17 -0
- package/hub.js +446 -0
- package/hub2.js +442 -0
- package/immer.js +472 -0
- package/import.js +7 -0
- package/index-esm.js +10781 -0
- package/index-esm2.js +138 -0
- package/index-esm3.js +131 -0
- package/index.browser.js +11 -0
- package/index.module.js +57 -0
- package/index.module2.js +72 -0
- package/index.module3.js +57 -0
- package/index10.js +20 -0
- package/index102.js +273 -0
- package/index11.js +18 -0
- package/index112.js +29 -0
- package/index12.js +38 -0
- package/index13.js +2432 -0
- package/index14.js +558 -0
- package/index15.js +58 -0
- package/index16.js +4 -0
- package/index17.js +89 -0
- package/index18.js +9 -0
- package/index19.js +62 -0
- package/index20.js +15 -0
- package/index21.js +11 -0
- package/index22.js +42 -0
- package/index23.js +9 -0
- package/index24.js +10 -0
- package/index25.js +7 -0
- package/index26.js +12 -0
- package/index27.js +11 -0
- package/index28.js +639 -0
- package/index29.js +76 -0
- package/index3.js +5 -53
- package/index30.js +7 -0
- package/index31.js +22 -0
- package/index32.js +2 -0
- package/index33.js +7 -0
- package/index34.js +20 -0
- package/index35.js +8 -0
- package/index36.js +4 -0
- package/index37.js +13 -0
- package/index38.js +13 -0
- package/index39.js +15 -0
- package/index4.js +1684 -17
- package/index40.js +13 -0
- package/index41.js +21 -0
- package/index42.js +66 -0
- package/index43.js +8 -0
- package/index44.js +57 -0
- package/index45.js +69 -0
- package/index46.js +33 -0
- package/index47.js +13 -0
- package/index48.js +123 -0
- package/index49.js +88 -0
- package/index5.js +27 -0
- package/index50.js +10 -0
- package/index51.js +13 -0
- package/index52.js +16 -0
- package/index53.js +16 -0
- package/index54.js +9 -0
- package/index55.js +9 -0
- package/index56.js +17 -0
- package/index57.js +31 -0
- package/index58.js +18 -0
- package/index6.js +315 -0
- package/index7.js +4 -0
- package/index72.js +228 -0
- package/index8.js +5051 -0
- package/index82.js +8 -0
- package/index9.js +55 -0
- package/index92.js +12 -0
- package/integration.js +38 -0
- package/is.js +77 -0
- package/is2.js +14 -0
- package/is3.js +14 -0
- package/isAbsoluteURL.js +6 -0
- package/isAbsoluteUrl2.js +6 -0
- package/isAxiosError.js +7 -0
- package/isCancel.js +6 -0
- package/isIterable.js +6 -0
- package/isStringEqual.js +6 -0
- package/isURLSameOrigin.js +8 -0
- package/isValidHexValue.js +6 -0
- package/isVirtualEvent.js +11 -0
- package/iso.js +38 -0
- package/it_IT.json.js +18 -0
- package/itemContext.js +5 -0
- package/ja_JP.json.js +18 -0
- package/ko_KR.json.js +18 -0
- package/localStorageHelper.js +32 -0
- package/localStorageHelper2.js +4 -0
- package/localization.js +46 -0
- package/logger2.js +56 -0
- package/logger3.js +56 -0
- package/logger4.js +56 -0
- package/makeHexWithOpacity.js +12 -0
- package/makeInternalTokens.js +22 -0
- package/matchRequestUrl.js +23 -0
- package/memo.js +25 -0
- package/merge.js +13 -0
- package/mergeConfig.js +70 -0
- package/mergeProps.js +22 -0
- package/mergeRefs.js +9 -0
- package/middleware.js +177 -0
- package/middleware2.js +177 -0
- package/misc.js +58 -0
- package/misc2.js +28 -0
- package/misc3.js +24 -0
- package/nl_NL.json.js +18 -0
- package/normalize.js +97 -0
- package/normalizePath.js +11 -0
- package/normalizeResponse.js +1 -1
- package/normalizeRows.js +10 -0
- package/notify.js +52 -0
- package/null.js +4 -0
- package/object.js +110 -0
- package/object2.js +39 -0
- package/object3.js +17 -0
- package/opacityPercentageFromHex.js +9 -0
- package/openLink.js +27 -0
- package/package.json +1 -1
- package/packageVersion.js +4 -0
- package/parse.js +9 -0
- package/parse2.js +44 -0
- package/parseHeaders.js +30 -0
- package/parseProtocol.js +7 -0
- package/pl_PL.json.js +18 -0
- package/platform.js +42 -0
- package/prepareEvent.js +141 -0
- package/prepareEvent2.js +5 -0
- package/prepareEvent3.js +5 -0
- package/progressEventReducer.js +35 -0
- package/promisebuffer.js +44 -0
- package/propagationContext.js +11 -0
- package/pt_BR.json.js +18 -0
- package/ratelimit.js +37 -0
- package/react.js +19 -0
- package/react2.js +19 -0
- package/regexes.js +51 -0
- package/registries.js +41 -0
- package/resolveConfig.js +33 -0
- package/ru_RU.json.js +18 -0
- package/runAfterTransition.js +35 -0
- package/schemas.js +368 -0
- package/schemas2.js +691 -0
- package/scope.js +412 -0
- package/scope2.js +407 -0
- package/scope3.js +348 -0
- package/sdk-DhxX43BH.js +4813 -0
- package/sdkMetadata.js +15 -0
- package/serializeRequest.js +12 -0
- package/serializeResponse.js +14 -0
- package/session.js +57 -0
- package/session2.js +57 -0
- package/session3.js +16 -0
- package/settle.js +14 -0
- package/shadowdom.js +13 -0
- package/shadowdom2.js +13 -0
- package/spanOnScope.js +12 -0
- package/spanUtils.js +31 -0
- package/spanUtils2.js +31 -0
- package/speedometer.js +19 -0
- package/spread.js +8 -0
- package/stack-parsers.js +48 -0
- package/stackStrategy.js +98 -0
- package/stacktrace.js +49 -0
- package/state.js +106 -0
- package/store/useDatStore.d.ts +11 -8
- package/string.js +6 -0
- package/styled-components.browser.esm.js +530 -0
- package/styles.js +55 -0
- package/styles2.js +17 -0
- package/supports.js +6 -0
- package/syncpromise.js +121 -0
- package/syncpromise2.js +109 -0
- package/textSelection.js +33 -0
- package/textStyles.js +20 -0
- package/theme.js +238 -0
- package/themeContainers.js +20 -0
- package/themes3.js +26 -0
- package/throttle.js +15 -0
- package/time.js +24 -0
- package/time2.js +24 -0
- package/time3.js +24 -0
- package/toFormData.js +85 -0
- package/toPublicUrl.js +9 -0
- package/toURLEncodedForm.js +13 -0
- package/token.js +236 -0
- package/tokenExpirationHelper.js +48 -0
- package/tokenExpirationHelper2.js +4 -0
- package/tokensAndThemes.js +92 -0
- package/tr_TR.json.js +18 -0
- package/trackStream.js +63 -0
- package/transformData.js +13 -0
- package/transitional.js +8 -0
- package/trimMetapropertyValue.js +1 -1
- package/tslib.es6.js +18 -0
- package/typeof.js +11 -0
- package/urlHelper.js +15 -0
- package/urlHelper2.js +4 -0
- package/useAutoHeight.js +25 -0
- package/useDatStore.js +31 -27
- package/useEffectEvent.js +18 -0
- package/useFocus.js +30 -0
- package/useFocusRing.js +34 -0
- package/useFocusVisible.js +92 -0
- package/useFocusWithin.js +57 -0
- package/useFonts.js +118 -0
- package/useGlobalListeners.js +34 -0
- package/useGroupContext.js +10 -0
- package/useHover.js +79 -0
- package/useId.js +8 -0
- package/useId2.js +17 -0
- package/useKeyDown.js +14 -0
- package/useLayoutEffect.js +6 -0
- package/useOrderingStore.js +6 -6
- package/usePress.js +359 -0
- package/useRouterStore.js +6 -6
- package/useScrollHighlightedIntoView.js +24 -0
- package/useSearchStore.js +5 -5
- package/useSimilaritySearchStore.js +6 -6
- package/useSyncRef.js +12 -0
- package/useTranslate.js +13 -0
- package/useZIndex.js +9 -0
- package/userfeedback.js +28 -0
- package/util.js +265 -0
- package/utils/fixFontSpaceInUrl.d.ts +1 -0
- package/utils.js +26 -44
- package/utils2.js +43 -45
- package/utils3.js +50 -0
- package/utils4.js +12 -0
- package/utils5.js +71 -0
- package/utils6.js +222 -0
- package/utils7.js +9 -0
- package/utils8.js +70 -0
- package/validator.js +54 -0
- package/vanilla.js +14 -0
- package/vanilla2.js +14 -0
- package/version.js +4 -0
- package/version2.js +4 -0
- package/version3.js +4 -0
- package/versionContext.js +9 -0
- package/versions.js +8 -0
- package/worldwide.js +19 -0
- package/worldwide2.js +15 -0
- package/worldwide3.js +10 -0
- package/xhr.js +71 -0
- package/zh_CN.json.js +18 -0
- package/zh_TW.json.js +18 -0
package/sdkMetadata.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SDK_VERSION as m } from "./version.js";
|
|
2
|
+
function p(t, e, n = [e], r = "npm") {
|
|
3
|
+
const a = t._metadata || {};
|
|
4
|
+
a.sdk || (a.sdk = {
|
|
5
|
+
name: `sentry.javascript.${e}`,
|
|
6
|
+
packages: n.map((s) => ({
|
|
7
|
+
name: `${r}:@sentry/${s}`,
|
|
8
|
+
version: m
|
|
9
|
+
})),
|
|
10
|
+
version: m
|
|
11
|
+
}), t._metadata = a;
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
p as applySdkMetadata
|
|
15
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import r from "./index-esm2.js";
|
|
2
|
+
const { message: a } = r;
|
|
3
|
+
async function u(t) {
|
|
4
|
+
const s = t.clone(), o = await s.text(), e = s.status || 200, n = s.statusText || a[e] || "OK";
|
|
5
|
+
return {
|
|
6
|
+
status: e,
|
|
7
|
+
statusText: n,
|
|
8
|
+
headers: Object.fromEntries(s.headers.entries()),
|
|
9
|
+
body: o
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
u as serializeResponse
|
|
14
|
+
};
|
package/session.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { timestampInSeconds as a } from "./time.js";
|
|
2
|
+
import { uuid4 as e } from "./misc.js";
|
|
3
|
+
import { dropUndefinedKeys as m } from "./object.js";
|
|
4
|
+
function l(r) {
|
|
5
|
+
const i = a(), d = {
|
|
6
|
+
sid: e(),
|
|
7
|
+
init: !0,
|
|
8
|
+
timestamp: i,
|
|
9
|
+
started: i,
|
|
10
|
+
duration: 0,
|
|
11
|
+
status: "ok",
|
|
12
|
+
errors: 0,
|
|
13
|
+
ignoreDuration: !1,
|
|
14
|
+
toJSON: () => t(d)
|
|
15
|
+
};
|
|
16
|
+
return r && u(d, r), d;
|
|
17
|
+
}
|
|
18
|
+
function u(r, i = {}) {
|
|
19
|
+
if (i.user && (!r.ipAddress && i.user.ip_address && (r.ipAddress = i.user.ip_address), !r.did && !i.did && (r.did = i.user.id || i.user.email || i.user.username)), r.timestamp = i.timestamp || a(), i.abnormal_mechanism && (r.abnormal_mechanism = i.abnormal_mechanism), i.ignoreDuration && (r.ignoreDuration = i.ignoreDuration), i.sid && (r.sid = i.sid.length === 32 ? i.sid : e()), i.init !== void 0 && (r.init = i.init), !r.did && i.did && (r.did = `${i.did}`), typeof i.started == "number" && (r.started = i.started), r.ignoreDuration)
|
|
20
|
+
r.duration = void 0;
|
|
21
|
+
else if (typeof i.duration == "number")
|
|
22
|
+
r.duration = i.duration;
|
|
23
|
+
else {
|
|
24
|
+
const d = r.timestamp - r.started;
|
|
25
|
+
r.duration = d >= 0 ? d : 0;
|
|
26
|
+
}
|
|
27
|
+
i.release && (r.release = i.release), i.environment && (r.environment = i.environment), !r.ipAddress && i.ipAddress && (r.ipAddress = i.ipAddress), !r.userAgent && i.userAgent && (r.userAgent = i.userAgent), typeof i.errors == "number" && (r.errors = i.errors), i.status && (r.status = i.status);
|
|
28
|
+
}
|
|
29
|
+
function g(r, i) {
|
|
30
|
+
let d = {};
|
|
31
|
+
r.status === "ok" && (d = { status: "exited" }), u(r, d);
|
|
32
|
+
}
|
|
33
|
+
function t(r) {
|
|
34
|
+
return m({
|
|
35
|
+
sid: `${r.sid}`,
|
|
36
|
+
init: r.init,
|
|
37
|
+
// Make sure that sec is converted to ms for date constructor
|
|
38
|
+
started: new Date(r.started * 1e3).toISOString(),
|
|
39
|
+
timestamp: new Date(r.timestamp * 1e3).toISOString(),
|
|
40
|
+
status: r.status,
|
|
41
|
+
errors: r.errors,
|
|
42
|
+
did: typeof r.did == "number" || typeof r.did == "string" ? `${r.did}` : void 0,
|
|
43
|
+
duration: r.duration,
|
|
44
|
+
abnormal_mechanism: r.abnormal_mechanism,
|
|
45
|
+
attrs: {
|
|
46
|
+
release: r.release,
|
|
47
|
+
environment: r.environment,
|
|
48
|
+
ip_address: r.ipAddress,
|
|
49
|
+
user_agent: r.userAgent
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
export {
|
|
54
|
+
g as closeSession,
|
|
55
|
+
l as makeSession,
|
|
56
|
+
u as updateSession
|
|
57
|
+
};
|
package/session2.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { timestampInSeconds as a } from "./time2.js";
|
|
2
|
+
import { uuid4 as e } from "./misc2.js";
|
|
3
|
+
import { dropUndefinedKeys as m } from "./object2.js";
|
|
4
|
+
function l(r) {
|
|
5
|
+
const i = a(), d = {
|
|
6
|
+
sid: e(),
|
|
7
|
+
init: !0,
|
|
8
|
+
timestamp: i,
|
|
9
|
+
started: i,
|
|
10
|
+
duration: 0,
|
|
11
|
+
status: "ok",
|
|
12
|
+
errors: 0,
|
|
13
|
+
ignoreDuration: !1,
|
|
14
|
+
toJSON: () => t(d)
|
|
15
|
+
};
|
|
16
|
+
return r && u(d, r), d;
|
|
17
|
+
}
|
|
18
|
+
function u(r, i = {}) {
|
|
19
|
+
if (i.user && (!r.ipAddress && i.user.ip_address && (r.ipAddress = i.user.ip_address), !r.did && !i.did && (r.did = i.user.id || i.user.email || i.user.username)), r.timestamp = i.timestamp || a(), i.abnormal_mechanism && (r.abnormal_mechanism = i.abnormal_mechanism), i.ignoreDuration && (r.ignoreDuration = i.ignoreDuration), i.sid && (r.sid = i.sid.length === 32 ? i.sid : e()), i.init !== void 0 && (r.init = i.init), !r.did && i.did && (r.did = `${i.did}`), typeof i.started == "number" && (r.started = i.started), r.ignoreDuration)
|
|
20
|
+
r.duration = void 0;
|
|
21
|
+
else if (typeof i.duration == "number")
|
|
22
|
+
r.duration = i.duration;
|
|
23
|
+
else {
|
|
24
|
+
const d = r.timestamp - r.started;
|
|
25
|
+
r.duration = d >= 0 ? d : 0;
|
|
26
|
+
}
|
|
27
|
+
i.release && (r.release = i.release), i.environment && (r.environment = i.environment), !r.ipAddress && i.ipAddress && (r.ipAddress = i.ipAddress), !r.userAgent && i.userAgent && (r.userAgent = i.userAgent), typeof i.errors == "number" && (r.errors = i.errors), i.status && (r.status = i.status);
|
|
28
|
+
}
|
|
29
|
+
function g(r, i) {
|
|
30
|
+
let d = {};
|
|
31
|
+
r.status === "ok" && (d = { status: "exited" }), u(r, d);
|
|
32
|
+
}
|
|
33
|
+
function t(r) {
|
|
34
|
+
return m({
|
|
35
|
+
sid: `${r.sid}`,
|
|
36
|
+
init: r.init,
|
|
37
|
+
// Make sure that sec is converted to ms for date constructor
|
|
38
|
+
started: new Date(r.started * 1e3).toISOString(),
|
|
39
|
+
timestamp: new Date(r.timestamp * 1e3).toISOString(),
|
|
40
|
+
status: r.status,
|
|
41
|
+
errors: r.errors,
|
|
42
|
+
did: typeof r.did == "number" || typeof r.did == "string" ? `${r.did}` : void 0,
|
|
43
|
+
duration: r.duration,
|
|
44
|
+
abnormal_mechanism: r.abnormal_mechanism,
|
|
45
|
+
attrs: {
|
|
46
|
+
release: r.release,
|
|
47
|
+
environment: r.environment,
|
|
48
|
+
ip_address: r.ipAddress,
|
|
49
|
+
user_agent: r.userAgent
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
export {
|
|
54
|
+
g as closeSession,
|
|
55
|
+
l as makeSession,
|
|
56
|
+
u as updateSession
|
|
57
|
+
};
|
package/session3.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { timestampInSeconds as a } from "./time3.js";
|
|
2
|
+
import { uuid4 as u } from "./misc3.js";
|
|
3
|
+
function p(d, r = {}) {
|
|
4
|
+
if (r.user && (!d.ipAddress && r.user.ip_address && (d.ipAddress = r.user.ip_address), !d.did && !r.did && (d.did = r.user.id || r.user.email || r.user.username)), d.timestamp = r.timestamp || a(), r.abnormal_mechanism && (d.abnormal_mechanism = r.abnormal_mechanism), r.ignoreDuration && (d.ignoreDuration = r.ignoreDuration), r.sid && (d.sid = r.sid.length === 32 ? r.sid : u()), r.init !== void 0 && (d.init = r.init), !d.did && r.did && (d.did = `${r.did}`), typeof r.started == "number" && (d.started = r.started), d.ignoreDuration)
|
|
5
|
+
d.duration = void 0;
|
|
6
|
+
else if (typeof r.duration == "number")
|
|
7
|
+
d.duration = r.duration;
|
|
8
|
+
else {
|
|
9
|
+
const i = d.timestamp - d.started;
|
|
10
|
+
d.duration = i >= 0 ? i : 0;
|
|
11
|
+
}
|
|
12
|
+
r.release && (d.release = r.release), r.environment && (d.environment = r.environment), !d.ipAddress && r.ipAddress && (d.ipAddress = r.ipAddress), !d.userAgent && r.userAgent && (d.userAgent = r.userAgent), typeof r.errors == "number" && (d.errors = r.errors), r.status && (d.status = r.status);
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
p as updateSession
|
|
16
|
+
};
|
package/settle.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import a from "./AxiosError.js";
|
|
2
|
+
function E(i, f, t) {
|
|
3
|
+
const u = t.config.validateStatus;
|
|
4
|
+
!t.status || !u || u(t.status) ? i(t) : f(new a(
|
|
5
|
+
"Request failed with status code " + t.status,
|
|
6
|
+
[a.ERR_BAD_REQUEST, a.ERR_BAD_RESPONSE][Math.floor(t.status / 100) - 4],
|
|
7
|
+
t.config,
|
|
8
|
+
t.request,
|
|
9
|
+
t
|
|
10
|
+
));
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
E as default
|
|
14
|
+
};
|
package/shadowdom.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
function r(t) {
|
|
2
|
+
return t ? t.getRootNode() instanceof ShadowRoot : !1;
|
|
3
|
+
}
|
|
4
|
+
function i(t) {
|
|
5
|
+
if (!t || !r(t))
|
|
6
|
+
return;
|
|
7
|
+
const o = t?.getRootNode();
|
|
8
|
+
return Array.from(o.children).find((e) => e.tagName !== "STYLE");
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
i as getFirstShadowElement,
|
|
12
|
+
r as isInShadow
|
|
13
|
+
};
|
package/shadowdom2.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
function r(t) {
|
|
2
|
+
return t ? t.getRootNode() instanceof ShadowRoot : !1;
|
|
3
|
+
}
|
|
4
|
+
function i(t) {
|
|
5
|
+
if (!t || !r(t))
|
|
6
|
+
return;
|
|
7
|
+
const o = t?.getRootNode();
|
|
8
|
+
return Array.from(o.children).find((e) => e.tagName !== "STYLE");
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
i as getFirstShadowElement,
|
|
12
|
+
r as isInShadow
|
|
13
|
+
};
|
package/spanOnScope.js
ADDED
package/spanUtils.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { dropUndefinedKeys as c } from "./object.js";
|
|
2
|
+
const u = 1;
|
|
3
|
+
function _(n) {
|
|
4
|
+
const { spanId: t, traceId: o } = n.spanContext(), { data: e, op: r, parent_span_id: a, status: s, tags: p, origin: i } = f(n);
|
|
5
|
+
return c({
|
|
6
|
+
data: e,
|
|
7
|
+
op: r,
|
|
8
|
+
parent_span_id: a,
|
|
9
|
+
span_id: t,
|
|
10
|
+
status: s,
|
|
11
|
+
tags: p,
|
|
12
|
+
trace_id: o,
|
|
13
|
+
origin: i
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function f(n) {
|
|
17
|
+
return d(n) ? n.getSpanJSON() : typeof n.toJSON == "function" ? n.toJSON() : {};
|
|
18
|
+
}
|
|
19
|
+
function d(n) {
|
|
20
|
+
return typeof n.getSpanJSON == "function";
|
|
21
|
+
}
|
|
22
|
+
function g(n) {
|
|
23
|
+
const { traceFlags: t } = n.spanContext();
|
|
24
|
+
return !!(t & u);
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
u as TRACE_FLAG_SAMPLED,
|
|
28
|
+
g as spanIsSampled,
|
|
29
|
+
f as spanToJSON,
|
|
30
|
+
_ as spanToTraceContext
|
|
31
|
+
};
|
package/spanUtils2.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { dropUndefinedKeys as c } from "./object2.js";
|
|
2
|
+
const u = 1;
|
|
3
|
+
function _(n) {
|
|
4
|
+
const { spanId: t, traceId: o } = n.spanContext(), { data: e, op: r, parent_span_id: a, status: s, tags: p, origin: i } = f(n);
|
|
5
|
+
return c({
|
|
6
|
+
data: e,
|
|
7
|
+
op: r,
|
|
8
|
+
parent_span_id: a,
|
|
9
|
+
span_id: t,
|
|
10
|
+
status: s,
|
|
11
|
+
tags: p,
|
|
12
|
+
trace_id: o,
|
|
13
|
+
origin: i
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function f(n) {
|
|
17
|
+
return d(n) ? n.getSpanJSON() : typeof n.toJSON == "function" ? n.toJSON() : {};
|
|
18
|
+
}
|
|
19
|
+
function d(n) {
|
|
20
|
+
return typeof n.getSpanJSON == "function";
|
|
21
|
+
}
|
|
22
|
+
function g(n) {
|
|
23
|
+
const { traceFlags: t } = n.spanContext();
|
|
24
|
+
return !!(t & u);
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
u as TRACE_FLAG_SAMPLED,
|
|
28
|
+
g as spanIsSampled,
|
|
29
|
+
f as spanToJSON,
|
|
30
|
+
_ as spanToTraceContext
|
|
31
|
+
};
|
package/speedometer.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
function y(t, n) {
|
|
2
|
+
t = t || 10;
|
|
3
|
+
const c = new Array(t), o = new Array(t);
|
|
4
|
+
let e = 0, r = 0, i;
|
|
5
|
+
return n = n !== void 0 ? n : 1e3, function(h) {
|
|
6
|
+
const d = Date.now(), a = o[r];
|
|
7
|
+
i || (i = d), c[e] = h, o[e] = d;
|
|
8
|
+
let f = r, u = 0;
|
|
9
|
+
for (; f !== e; )
|
|
10
|
+
u += c[f++], f = f % t;
|
|
11
|
+
if (e = (e + 1) % t, e === r && (r = (r + 1) % t), d - i < n)
|
|
12
|
+
return;
|
|
13
|
+
const w = a && d - a;
|
|
14
|
+
return w ? Math.round(u * 1e3 / w) : void 0;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
y as default
|
|
19
|
+
};
|
package/spread.js
ADDED
package/stack-parsers.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { createStackParser as d } from "./stacktrace.js";
|
|
2
|
+
const c = "?", f = 30, x = 40, u = 50;
|
|
3
|
+
function o(n, e, i, t) {
|
|
4
|
+
const s = {
|
|
5
|
+
filename: n,
|
|
6
|
+
function: e,
|
|
7
|
+
in_app: !0
|
|
8
|
+
// All browser frames are considered in_app
|
|
9
|
+
};
|
|
10
|
+
return i !== void 0 && (s.lineno = i), t !== void 0 && (s.colno = t), s;
|
|
11
|
+
}
|
|
12
|
+
const l = /^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i, S = /\((\S*)(?::(\d+))(?::(\d+))\)/, v = (n) => {
|
|
13
|
+
const e = l.exec(n);
|
|
14
|
+
if (e) {
|
|
15
|
+
if (e[2] && e[2].indexOf("eval") === 0) {
|
|
16
|
+
const a = S.exec(e[2]);
|
|
17
|
+
a && (e[2] = a[1], e[3] = a[2], e[4] = a[3]);
|
|
18
|
+
}
|
|
19
|
+
const [t, s] = r(e[1] || c, e[2]);
|
|
20
|
+
return o(s, t, e[3] ? +e[3] : void 0, e[4] ? +e[4] : void 0);
|
|
21
|
+
}
|
|
22
|
+
}, E = [f, v], O = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i, R = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i, k = (n) => {
|
|
23
|
+
const e = O.exec(n);
|
|
24
|
+
if (e) {
|
|
25
|
+
if (e[3] && e[3].indexOf(" > eval") > -1) {
|
|
26
|
+
const a = R.exec(e[3]);
|
|
27
|
+
a && (e[1] = e[1] || "eval", e[3] = a[1], e[4] = a[2], e[5] = "");
|
|
28
|
+
}
|
|
29
|
+
let t = e[3], s = e[1] || c;
|
|
30
|
+
return [s, t] = r(s, t), o(t, s, e[4] ? +e[4] : void 0, e[5] ? +e[5] : void 0);
|
|
31
|
+
}
|
|
32
|
+
}, P = [u, k], b = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i, g = (n) => {
|
|
33
|
+
const e = b.exec(n);
|
|
34
|
+
return e ? o(e[2], e[1] || c, +e[3], e[4] ? +e[4] : void 0) : void 0;
|
|
35
|
+
}, m = [x, g], p = [E, P, m], h = d(...p), r = (n, e) => {
|
|
36
|
+
const i = n.indexOf("safari-extension") !== -1, t = n.indexOf("safari-web-extension") !== -1;
|
|
37
|
+
return i || t ? [
|
|
38
|
+
n.indexOf("@") !== -1 ? n.split("@")[0] : c,
|
|
39
|
+
i ? `safari-extension:${e}` : `safari-web-extension:${e}`
|
|
40
|
+
] : [n, e];
|
|
41
|
+
};
|
|
42
|
+
export {
|
|
43
|
+
E as chromeStackLineParser,
|
|
44
|
+
p as defaultStackLineParsers,
|
|
45
|
+
h as defaultStackParser,
|
|
46
|
+
P as geckoStackLineParser,
|
|
47
|
+
m as winjsStackLineParser
|
|
48
|
+
};
|
package/stackStrategy.js
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { getDefaultCurrentScope as p, getDefaultIsolationScope as S } from "./defaultScopes.js";
|
|
2
|
+
import { Scope as s } from "./scope3.js";
|
|
3
|
+
import { isThenable as a } from "./is3.js";
|
|
4
|
+
import { getMainCarrier as h, getSentryCarrier as u } from "./carrier.js";
|
|
5
|
+
class l {
|
|
6
|
+
constructor(t, n) {
|
|
7
|
+
let c;
|
|
8
|
+
t ? c = t : c = new s();
|
|
9
|
+
let o;
|
|
10
|
+
n ? o = n : o = new s(), this._stack = [{ scope: c }], this._isolationScope = o;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Fork a scope for the stack.
|
|
14
|
+
*/
|
|
15
|
+
withScope(t) {
|
|
16
|
+
const n = this._pushScope();
|
|
17
|
+
let c;
|
|
18
|
+
try {
|
|
19
|
+
c = t(n);
|
|
20
|
+
} catch (o) {
|
|
21
|
+
throw this._popScope(), o;
|
|
22
|
+
}
|
|
23
|
+
return a(c) ? c.then(
|
|
24
|
+
(o) => (this._popScope(), o),
|
|
25
|
+
(o) => {
|
|
26
|
+
throw this._popScope(), o;
|
|
27
|
+
}
|
|
28
|
+
) : (this._popScope(), c);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Get the client of the stack.
|
|
32
|
+
*/
|
|
33
|
+
getClient() {
|
|
34
|
+
return this.getStackTop().client;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Returns the scope of the top stack.
|
|
38
|
+
*/
|
|
39
|
+
getScope() {
|
|
40
|
+
return this.getStackTop().scope;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Get the isolation scope for the stack.
|
|
44
|
+
*/
|
|
45
|
+
getIsolationScope() {
|
|
46
|
+
return this._isolationScope;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Returns the topmost scope layer in the order domain > local > process.
|
|
50
|
+
*/
|
|
51
|
+
getStackTop() {
|
|
52
|
+
return this._stack[this._stack.length - 1];
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Push a scope to the stack.
|
|
56
|
+
*/
|
|
57
|
+
_pushScope() {
|
|
58
|
+
const t = this.getScope().clone();
|
|
59
|
+
return this._stack.push({
|
|
60
|
+
client: this.getClient(),
|
|
61
|
+
scope: t
|
|
62
|
+
}), t;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Pop a scope from the stack.
|
|
66
|
+
*/
|
|
67
|
+
_popScope() {
|
|
68
|
+
return this._stack.length <= 1 ? !1 : !!this._stack.pop();
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
function r() {
|
|
72
|
+
const e = h(), t = u(e);
|
|
73
|
+
return t.stack = t.stack || new l(p(), S());
|
|
74
|
+
}
|
|
75
|
+
function g(e) {
|
|
76
|
+
return r().withScope(e);
|
|
77
|
+
}
|
|
78
|
+
function f(e, t) {
|
|
79
|
+
const n = r();
|
|
80
|
+
return n.withScope(() => (n.getStackTop().scope = e, t(e)));
|
|
81
|
+
}
|
|
82
|
+
function i(e) {
|
|
83
|
+
return r().withScope(() => e(r().getIsolationScope()));
|
|
84
|
+
}
|
|
85
|
+
function y() {
|
|
86
|
+
return {
|
|
87
|
+
withIsolationScope: i,
|
|
88
|
+
withScope: g,
|
|
89
|
+
withSetScope: f,
|
|
90
|
+
withSetIsolationScope: (e, t) => i(t),
|
|
91
|
+
getCurrentScope: () => r().getScope(),
|
|
92
|
+
getIsolationScope: () => r().getIsolationScope()
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
export {
|
|
96
|
+
l as AsyncContextStack,
|
|
97
|
+
y as getStackAsyncContextStrategy
|
|
98
|
+
};
|
package/stacktrace.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
const l = /\(error: (.*)\)/, p = /captureMessage|captureException/;
|
|
2
|
+
function A(...n) {
|
|
3
|
+
const e = n.sort((t, o) => t[0] - o[0]).map((t) => t[1]);
|
|
4
|
+
return (t, o = 0) => {
|
|
5
|
+
const c = [], a = t.split(`
|
|
6
|
+
`);
|
|
7
|
+
for (let s = o; s < a.length; s++) {
|
|
8
|
+
const r = a[s];
|
|
9
|
+
if (r.length > 1024)
|
|
10
|
+
continue;
|
|
11
|
+
const f = l.test(r) ? r.replace(l, "$1") : r;
|
|
12
|
+
if (!f.match(/\S*Error: /)) {
|
|
13
|
+
for (const E of e) {
|
|
14
|
+
const u = E(f);
|
|
15
|
+
if (u) {
|
|
16
|
+
c.push(u);
|
|
17
|
+
break;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
if (c.length >= 50)
|
|
21
|
+
break;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return R(c);
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
function R(n) {
|
|
28
|
+
if (!n.length)
|
|
29
|
+
return [];
|
|
30
|
+
const e = Array.from(n);
|
|
31
|
+
return /sentryWrapped/.test(e[e.length - 1].function || "") && e.pop(), e.reverse(), p.test(e[e.length - 1].function || "") && (e.pop(), p.test(e[e.length - 1].function || "") && e.pop()), e.slice(0, 50).map((t) => ({
|
|
32
|
+
...t,
|
|
33
|
+
filename: t.filename || e[e.length - 1].filename,
|
|
34
|
+
function: t.function || "?"
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
const i = "<anonymous>";
|
|
38
|
+
function m(n) {
|
|
39
|
+
try {
|
|
40
|
+
return !n || typeof n != "function" ? i : n.name || i;
|
|
41
|
+
} catch {
|
|
42
|
+
return i;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
export {
|
|
46
|
+
A as createStackParser,
|
|
47
|
+
m as getFunctionName,
|
|
48
|
+
R as stripSentryFramesAndReverse
|
|
49
|
+
};
|
package/state.js
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
const l = {
|
|
2
|
+
isOpen: !1,
|
|
3
|
+
isOpenedWithKeyboard: !1,
|
|
4
|
+
items: [],
|
|
5
|
+
highlightedItemId: "",
|
|
6
|
+
hasSearch: !1,
|
|
7
|
+
keepHighlight: !1
|
|
8
|
+
};
|
|
9
|
+
function p(e, i) {
|
|
10
|
+
if (i.type === "open")
|
|
11
|
+
return {
|
|
12
|
+
...e,
|
|
13
|
+
isOpen: !0
|
|
14
|
+
};
|
|
15
|
+
if (i.type === "close")
|
|
16
|
+
return {
|
|
17
|
+
...l
|
|
18
|
+
};
|
|
19
|
+
if (i.type === "toggle")
|
|
20
|
+
return {
|
|
21
|
+
...l,
|
|
22
|
+
isOpen: !e.isOpen
|
|
23
|
+
};
|
|
24
|
+
if (i.type === "toggle-from-keyboard")
|
|
25
|
+
return {
|
|
26
|
+
...l,
|
|
27
|
+
isOpen: !e.isOpen,
|
|
28
|
+
isOpenedWithKeyboard: !e.isOpen
|
|
29
|
+
// this is not a typo, it should be synced with isOpen
|
|
30
|
+
};
|
|
31
|
+
if (i.type === "highlight-current-item") {
|
|
32
|
+
const h = e.items.find((r) => r.isSelected);
|
|
33
|
+
return e.hasSearch && h ? {
|
|
34
|
+
...e,
|
|
35
|
+
highlightedItemId: h.id
|
|
36
|
+
} : e.isOpenedWithKeyboard && e.items.length ? {
|
|
37
|
+
...e,
|
|
38
|
+
highlightedItemId: e.items[0].id
|
|
39
|
+
} : e;
|
|
40
|
+
}
|
|
41
|
+
if (i.type === "highlight-item")
|
|
42
|
+
return {
|
|
43
|
+
...e,
|
|
44
|
+
highlightedItemId: i.payload,
|
|
45
|
+
keepHighlight: !0
|
|
46
|
+
};
|
|
47
|
+
if (i.type === "highlight-previous") {
|
|
48
|
+
if (e.items.length === 0)
|
|
49
|
+
return e;
|
|
50
|
+
const h = e.items.find((t) => t.id === e.highlightedItemId)?.parentId, r = e.items.filter((t) => t.parentId === h && !t.isDisabled), d = r.findIndex((t) => t.id === e.highlightedItemId), g = d === 0, I = r.length - 1, n = d === -1 || g ? r[I].id : r[d - 1].id;
|
|
51
|
+
return {
|
|
52
|
+
...e,
|
|
53
|
+
highlightedItemId: n
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
if (i.type === "highlight-next") {
|
|
57
|
+
if (e.items.length === 0)
|
|
58
|
+
return e;
|
|
59
|
+
const h = e.items.find((n) => n.id === e.highlightedItemId)?.parentId, r = e.items.filter((n) => n.parentId === h && !n.isDisabled), d = r.findIndex((n) => n.id === e.highlightedItemId), g = d === r.length - 1, I = d === -1 || g ? r[0].id : r[d + 1].id;
|
|
60
|
+
return {
|
|
61
|
+
...e,
|
|
62
|
+
highlightedItemId: I
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
if (i.type === "highlight-submenu") {
|
|
66
|
+
const h = e.highlightedItemId, r = e.items.find((d) => d.parentId === h);
|
|
67
|
+
return {
|
|
68
|
+
...e,
|
|
69
|
+
highlightedItemId: r.id
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
if (i.type === "add-item") {
|
|
73
|
+
const h = i.payload;
|
|
74
|
+
return e.items.find((d) => d.id === h.id) ? e : {
|
|
75
|
+
...e,
|
|
76
|
+
items: [...e.items, h]
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
if (i.type === "purge-menu-items") {
|
|
80
|
+
const h = i.payload, r = e.items.filter((d) => d.parentId !== h);
|
|
81
|
+
return {
|
|
82
|
+
...e,
|
|
83
|
+
items: r,
|
|
84
|
+
highlightedItemId: e.keepHighlight ? e.highlightedItemId : "",
|
|
85
|
+
keepHighlight: !1
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
if (i.type === "keep-highlight")
|
|
89
|
+
return {
|
|
90
|
+
...e,
|
|
91
|
+
keepHighlight: !0
|
|
92
|
+
};
|
|
93
|
+
if (i.type === "set-search-presence")
|
|
94
|
+
return {
|
|
95
|
+
...e,
|
|
96
|
+
hasSearch: !0
|
|
97
|
+
};
|
|
98
|
+
m("Unexpected action: ", i);
|
|
99
|
+
}
|
|
100
|
+
function m(e, i) {
|
|
101
|
+
throw new Error(e + i);
|
|
102
|
+
}
|
|
103
|
+
export {
|
|
104
|
+
l as initialState,
|
|
105
|
+
p as reducer
|
|
106
|
+
};
|
package/store/useDatStore.d.ts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { Asset } from '../views/asset/asset.type';
|
|
2
2
|
import { Transformation } from '../Dat/types';
|
|
3
3
|
type datState = {
|
|
4
|
-
|
|
4
|
+
assetId: string;
|
|
5
5
|
assetName: string;
|
|
6
|
+
closeDat: () => void;
|
|
7
|
+
datUrl: string;
|
|
6
8
|
datExtension: string;
|
|
9
|
+
openDat: (url: string, asset: Asset, name: string) => void;
|
|
7
10
|
transformation: Transformation;
|
|
11
|
+
reset: () => void;
|
|
8
12
|
resetTransformation: () => void;
|
|
9
13
|
setTransformation: (transformation?: Transformation) => void;
|
|
10
|
-
openDat: (url: string, asset: Asset, name: string) => void;
|
|
11
|
-
closeDat: () => void;
|
|
12
|
-
reset: () => void;
|
|
13
14
|
};
|
|
14
15
|
export declare const useDatStore: import('zustand').UseBoundStore<Omit<import('zustand').StoreApi<datState>, "setState" | "devtools"> & {
|
|
15
16
|
setState(partial: datState | Partial<datState> | ((state: datState) => datState | Partial<datState>), replace?: false | undefined, action?: (string | {
|
|
@@ -49,15 +50,16 @@ export declare const useDatSelectors: {
|
|
|
49
50
|
};
|
|
50
51
|
} & {
|
|
51
52
|
use: {
|
|
52
|
-
|
|
53
|
+
assetId: () => string;
|
|
53
54
|
assetName: () => string;
|
|
55
|
+
closeDat: () => () => void;
|
|
56
|
+
datUrl: () => string;
|
|
54
57
|
datExtension: () => string;
|
|
58
|
+
openDat: () => (url: string, asset: Asset, name: string) => void;
|
|
55
59
|
transformation: () => Transformation;
|
|
60
|
+
reset: () => () => void;
|
|
56
61
|
resetTransformation: () => () => void;
|
|
57
62
|
setTransformation: () => (transformation?: Transformation) => void;
|
|
58
|
-
openDat: () => (url: string, asset: Asset, name: string) => void;
|
|
59
|
-
closeDat: () => () => void;
|
|
60
|
-
reset: () => () => void;
|
|
61
63
|
};
|
|
62
64
|
};
|
|
63
65
|
export declare const useDat: () => {
|
|
@@ -69,5 +71,6 @@ export declare const useDat: () => {
|
|
|
69
71
|
closeDat: () => void;
|
|
70
72
|
openDat: (url: string, asset: Asset, name: string) => void;
|
|
71
73
|
reset: () => void;
|
|
74
|
+
assetId: string;
|
|
72
75
|
};
|
|
73
76
|
export {};
|