vviinn-widgets 2.7.2 → 2.8.0
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/dist/components/Handler.js +270 -0
- package/dist/components/NonEmptyArray.js +5699 -0
- package/dist/components/cropper-handler.js +6 -0
- package/dist/components/cropper-handler2.js +39 -0
- package/dist/{cjs/customized-slots-06ca4007.js → components/customized-slots.js} +3 -6
- package/dist/components/highlight-box.js +6 -0
- package/dist/components/highlight-box2.js +52 -0
- package/dist/components/image-cropper.js +6 -0
- package/dist/components/image-cropper2.js +138 -0
- package/dist/components/imageSearch.store.js +10686 -0
- package/dist/components/index.js +1 -0
- package/dist/{esm/index-443468c7.js → components/index2.js} +2 -2
- package/dist/components/index3.js +130 -0
- package/dist/components/recommendations-sidebar.js +101 -0
- package/dist/components/resizer.worker.js +11 -0
- package/dist/components/search-filters.js +6 -0
- package/dist/components/search-filters2.js +89 -0
- package/dist/components/tracking.worker.js +11 -0
- package/dist/components/vviinn-carousel.js +6 -0
- package/dist/components/vviinn-carousel2.js +235 -0
- package/dist/components/vviinn-detected-object.js +6 -0
- package/dist/components/vviinn-detected-object2.js +67 -0
- package/dist/components/vviinn-empty-results.js +6 -0
- package/dist/components/vviinn-empty-results2.js +35 -0
- package/dist/components/vviinn-error.js +6 -0
- package/dist/components/vviinn-error2.js +28 -0
- package/dist/components/vviinn-example-image.js +6 -0
- package/dist/components/vviinn-example-image2.js +57 -0
- package/dist/components/vviinn-example-images.js +6 -0
- package/dist/components/vviinn-example-images2.js +53 -0
- package/dist/components/vviinn-image-selector.js +6 -0
- package/dist/components/vviinn-image-selector2.js +135 -0
- package/dist/components/vviinn-image-view.js +6 -0
- package/dist/components/vviinn-image-view2.js +95 -0
- package/dist/components/vviinn-modal.js +6 -0
- package/dist/components/vviinn-modal2.js +46 -0
- package/dist/components/vviinn-onboarding-card-1.js +6 -0
- package/dist/components/vviinn-onboarding-card-12.js +34 -0
- package/dist/components/vviinn-onboarding-card-2.js +6 -0
- package/dist/components/vviinn-onboarding-card-22.js +34 -0
- package/dist/components/vviinn-onboarding-card-3.js +6 -0
- package/dist/components/vviinn-onboarding-card-32.js +34 -0
- package/dist/components/vviinn-onboarding.js +6 -0
- package/dist/components/vviinn-onboarding2.js +63 -0
- package/dist/components/vviinn-overlay.js +6 -0
- package/dist/components/vviinn-overlay2.js +28 -0
- package/dist/components/vviinn-overlayed-modal.js +6 -0
- package/dist/components/vviinn-overlayed-modal2.js +45 -0
- package/dist/components/vviinn-preloader.js +6 -0
- package/dist/components/vviinn-preloader2.js +34 -0
- package/dist/components/vviinn-privacy-badge.js +6 -0
- package/dist/components/vviinn-privacy-badge2.js +33 -0
- package/dist/components/vviinn-product-card.js +6 -0
- package/dist/components/vviinn-product-card2.js +216 -0
- package/dist/components/vviinn-recommendations-sidebar.js +6 -0
- package/dist/components/vviinn-server-error.js +6 -0
- package/dist/components/vviinn-server-error2.js +35 -0
- package/dist/components/vviinn-slide.js +6 -0
- package/dist/components/vviinn-slide2.js +28 -0
- package/dist/components/vviinn-slider.js +6 -0
- package/dist/components/vviinn-slider2.js +159 -0
- package/dist/components/vviinn-teaser.js +6 -0
- package/dist/components/vviinn-teaser2.js +33 -0
- package/dist/components/vviinn-vpr-button.js +93 -0
- package/dist/components/vviinn-vpr-vidget.js +3360 -0
- package/dist/components/vviinn-vpr-widget.js +6 -0
- package/dist/components/vviinn-vps-button.js +224 -0
- package/dist/components/vviinn-vps-widget.js +6 -0
- package/dist/components/vviinn-vps-widget2.js +350 -0
- package/dist/components/vviinn-wrong-format.js +6 -0
- package/dist/components/vviinn-wrong-format2.js +35 -0
- package/dist/types/components/vviinn-product-card/vviinn-product-card.d.ts +1 -0
- package/dist/types/components/vviinn-vpr-button/stories/lol.d.ts +2 -0
- package/dist/types/components/vviinn-vpr-button/stories/vviinn-vpr-button.stories.d.ts +1 -1
- package/dist/vviinn-widgets/Array-bdfc75db.js +4870 -0
- package/dist/vviinn-widgets/Handler-edcb46f4.js +1422 -0
- package/dist/vviinn-widgets/NonEmptyArray-947ab7b3.js +4411 -0
- package/dist/{esm/app-globals-865bc7a7.js → vviinn-widgets/app-globals-c0aa8ec3.js} +922 -10
- package/dist/vviinn-widgets/cropper-handler.entry.js +23 -0
- package/dist/vviinn-widgets/css-shim-f0027935.js +4 -0
- package/dist/{esm/customized-slots-96902edf.js → vviinn-widgets/customized-slots-5c1c623a.js} +1 -1
- package/dist/vviinn-widgets/dom-db0073f0.js +73 -0
- package/dist/vviinn-widgets/highlight-box.entry.js +41 -0
- package/dist/{collection/components/image-search/image-view/image-cropper/image-cropper.js → vviinn-widgets/image-cropper.entry.js} +33 -70
- package/dist/{cjs/index-df6896e2.js → vviinn-widgets/imageSearch.store-0eed9a5c.js} +11598 -15320
- package/dist/{esm/index-2fdd499d.js → vviinn-widgets/imageSearch.store-b28bddb0.js} +11971 -15281
- package/dist/{collection/components/vviinn-icons/index.js → vviinn-widgets/index-44058ea2.js} +14 -11
- package/dist/vviinn-widgets/index-6c6de682.js +3857 -0
- package/dist/vviinn-widgets/index-de3e14da.js +3010 -0
- package/dist/vviinn-widgets/index.esm.js +1 -0
- package/dist/vviinn-widgets/number-171db649.js +1499 -0
- package/dist/vviinn-widgets/search-filters.entry.js +76 -0
- package/dist/vviinn-widgets/shadow-css-c1fdfa9f.js +389 -0
- package/dist/{collection/components/vviinn-carousel/vviinn-carousel.js → vviinn-widgets/vviinn-carousel.entry.js} +18 -113
- package/dist/vviinn-widgets/vviinn-detected-object.entry.js +54 -0
- package/dist/vviinn-widgets/vviinn-empty-results.entry.js +16 -0
- package/dist/vviinn-widgets/vviinn-error.entry.js +15 -0
- package/dist/vviinn-widgets/vviinn-example-image.entry.js +38 -0
- package/dist/vviinn-widgets/vviinn-example-images.entry.js +28 -0
- package/dist/vviinn-widgets/vviinn-image-selector.entry.js +31 -0
- package/dist/vviinn-widgets/vviinn-image-view.entry.js +55 -0
- package/dist/vviinn-widgets/vviinn-modal.entry.js +30 -0
- package/dist/vviinn-widgets/vviinn-onboarding-card-1.entry.js +21 -0
- package/dist/vviinn-widgets/vviinn-onboarding-card-2.entry.js +21 -0
- package/dist/vviinn-widgets/vviinn-onboarding-card-3.entry.js +21 -0
- package/dist/vviinn-widgets/vviinn-onboarding.entry.js +20 -0
- package/dist/vviinn-widgets/vviinn-overlay.entry.js +15 -0
- package/dist/vviinn-widgets/vviinn-overlayed-modal.entry.js +18 -0
- package/dist/vviinn-widgets/vviinn-preloader.entry.js +25 -0
- package/dist/vviinn-widgets/vviinn-privacy-badge.entry.js +20 -0
- package/dist/vviinn-widgets/vviinn-product-card.entry.js +188 -0
- package/dist/{esm → vviinn-widgets}/vviinn-recommendations-sidebar.entry.js +2 -2
- package/dist/vviinn-widgets/vviinn-server-error.entry.js +16 -0
- package/dist/vviinn-widgets/vviinn-slide.entry.js +15 -0
- package/dist/vviinn-widgets/vviinn-slider.entry.js +120 -0
- package/dist/vviinn-widgets/vviinn-teaser.entry.js +20 -0
- package/dist/{esm → vviinn-widgets}/vviinn-vpr-button.entry.js +2 -2
- package/dist/vviinn-widgets/vviinn-vpr-widget.entry.js +4588 -0
- package/dist/{esm → vviinn-widgets}/vviinn-vps-button.entry.js +3 -3
- package/dist/vviinn-widgets/vviinn-vps-widget.entry.js +170 -0
- package/dist/vviinn-widgets/vviinn-widgets.css +6 -1
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +125 -1
- package/dist/vviinn-widgets/vviinn-wrong-format.entry.js +16 -0
- package/package.json +8 -2
- package/www/build/p-06c76b5e.js +1 -0
- package/www/build/p-07e16d04.js +15 -0
- package/{dist/vviinn-widgets/p-a6e0710f.entry.js → www/build/p-44bc50de.entry.js} +1 -1
- package/www/build/p-510922c6.js +1 -0
- package/www/build/p-57ce8de3.css +1 -0
- package/www/build/p-591cb193.entry.js +1 -0
- package/www/build/p-6b9d242e.js +1 -0
- package/www/build/p-880bccf1.js +1 -0
- package/www/build/p-b0ada114.entry.js +1 -0
- package/www/build/p-b7be7c70.entry.js +1 -0
- package/{dist/vviinn-widgets/p-166970f3.js → www/build/p-ea8dea5c.js} +1 -1
- package/www/build/vviinn-widgets.css +1 -1
- package/www/build/vviinn-widgets.esm.js +1 -1
- package/www/index.html +32261 -1
- package/www/sw.js +66 -0
- package/dist/cjs/app-globals-8db3bcbe.js +0 -6912
- package/dist/cjs/cropper-handler_27.cjs.entry.js +0 -1135
- package/dist/cjs/index-3c3ab815.js +0 -1354
- package/dist/cjs/index-f66cd8d1.js +0 -39
- package/dist/cjs/index.cjs.js +0 -2
- package/dist/cjs/loader.cjs.js +0 -23
- package/dist/cjs/vviinn-carousel_2.cjs.entry.js +0 -1001
- package/dist/cjs/vviinn-recommendations-sidebar.cjs.entry.js +0 -65
- package/dist/cjs/vviinn-vpr-button.cjs.entry.js +0 -49
- package/dist/cjs/vviinn-vps-button.cjs.entry.js +0 -43
- package/dist/cjs/vviinn-widgets.cjs.js +0 -21
- package/dist/collection/Image/error.js +0 -14
- package/dist/collection/Image/form.js +0 -5
- package/dist/collection/Image/fromFile.js +0 -18
- package/dist/collection/Image/imageToB64.js +0 -9
- package/dist/collection/Image/index.js +0 -0
- package/dist/collection/Image/renderPromise.js +0 -6
- package/dist/collection/Image/resizeImage.js +0 -28
- package/dist/collection/Image/sizing.js +0 -39
- package/dist/collection/Image/toFile.js +0 -17
- package/dist/collection/analytics/GAnalytics.js +0 -32
- package/dist/collection/analytics/GeneralAnalytics.js +0 -9
- package/dist/collection/analytics/GtagAnalytics.js +0 -35
- package/dist/collection/analytics/ProductAnalytics.js +0 -1
- package/dist/collection/campaign/Campaign.js +0 -8
- package/dist/collection/campaign/CampaignService.js +0 -5
- package/dist/collection/campaign/VCSCampaign.js +0 -1
- package/dist/collection/campaign/VCSCampaignResponse.js +0 -1
- package/dist/collection/campaign/VCSCampaignService.js +0 -7
- package/dist/collection/campaign/VPRCampaignResponse.js +0 -1
- package/dist/collection/campaign/VPRCampaignService.js +0 -7
- package/dist/collection/collection-manifest.json +0 -43
- package/dist/collection/components/customized-slots.js +0 -47
- package/dist/collection/components/image-search/image-view/highlight-box/highlight-box.css +0 -71
- package/dist/collection/components/image-search/image-view/highlight-box/highlight-box.js +0 -25
- package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.css +0 -49
- package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.js +0 -64
- package/dist/collection/components/image-search/image-view/image-cropper/image-cropper.css +0 -33
- package/dist/collection/components/image-search/search-filters/search-filters.css +0 -120
- package/dist/collection/components/image-search/search-filters/search-filters.js +0 -125
- package/dist/collection/components/vviinn-carousel/vviinn-carousel.css +0 -142
- package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.css +0 -7
- package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.js +0 -36
- package/dist/collection/components/vviinn-error/vviinn-error.css +0 -38
- package/dist/collection/components/vviinn-error/vviinn-error.js +0 -18
- package/dist/collection/components/vviinn-error/vviinn-server-error/vviinn-server-error.css +0 -3
- package/dist/collection/components/vviinn-error/vviinn-server-error/vviinn-server-error.js +0 -34
- package/dist/collection/components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.css +0 -3
- package/dist/collection/components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.js +0 -34
- package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.css +0 -34
- package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.js +0 -129
- package/dist/collection/components/vviinn-example-images/vviinn-example-images.css +0 -19
- package/dist/collection/components/vviinn-example-images/vviinn-example-images.js +0 -80
- package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.css +0 -25
- package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.js +0 -64
- package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.css +0 -47
- package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.js +0 -100
- package/dist/collection/components/vviinn-image-view/vviinn-image-view.css +0 -31
- package/dist/collection/components/vviinn-image-view/vviinn-image-view.js +0 -61
- package/dist/collection/components/vviinn-modal/vviinn-modal.css +0 -105
- package/dist/collection/components/vviinn-modal/vviinn-modal.js +0 -98
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/onboarding-card.css +0 -41
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-1/vviinn-onboarding-card-1.js +0 -26
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-2/vviinn-onboarding-card-2.js +0 -26
- package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-3/vviinn-onboarding-card-3.js +0 -26
- package/dist/collection/components/vviinn-onboarding/vviinn-onboarding.css +0 -58
- package/dist/collection/components/vviinn-onboarding/vviinn-onboarding.js +0 -28
- package/dist/collection/components/vviinn-overlay/vviinn-overlay.css +0 -33
- package/dist/collection/components/vviinn-overlay/vviinn-overlay.js +0 -15
- package/dist/collection/components/vviinn-overlayed-modal/vviinn-overlayed-modal.css +0 -29
- package/dist/collection/components/vviinn-overlayed-modal/vviinn-overlayed-modal.js +0 -71
- package/dist/collection/components/vviinn-preloader/vviinn-preloader.css +0 -37
- package/dist/collection/components/vviinn-preloader/vviinn-preloader.js +0 -20
- package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.css +0 -19
- package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.js +0 -27
- package/dist/collection/components/vviinn-product-card/render-helpers.js +0 -32
- package/dist/collection/components/vviinn-product-card/stories/args.js +0 -73
- package/dist/collection/components/vviinn-product-card/stories/decorators.js +0 -51
- package/dist/collection/components/vviinn-product-card/stories/vviinn-product-card.stories.js +0 -105
- package/dist/collection/components/vviinn-product-card/vviinn-product-card.css +0 -95
- package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +0 -462
- package/dist/collection/components/vviinn-slider/arrow.js +0 -11
- package/dist/collection/components/vviinn-slider/vviinn-slide/vviinn-slide.css +0 -4
- package/dist/collection/components/vviinn-slider/vviinn-slide/vviinn-slide.js +0 -15
- package/dist/collection/components/vviinn-slider/vviinn-slider.css +0 -109
- package/dist/collection/components/vviinn-slider/vviinn-slider.js +0 -181
- package/dist/collection/components/vviinn-teaser/vviinn-teaser.css +0 -14
- package/dist/collection/components/vviinn-teaser/vviinn-teaser.js +0 -29
- package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.css +0 -238
- package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.js +0 -220
- package/dist/collection/components/vviinn-vpr-button/stories/args.js +0 -213
- package/dist/collection/components/vviinn-vpr-button/stories/vviinn-vpr-button.stories.js +0 -91
- package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.css +0 -35
- package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.js +0 -179
- package/dist/collection/components/vviinn-vpr-widget/stories/args.js +0 -197
- package/dist/collection/components/vviinn-vpr-widget/stories/decorators.js +0 -29
- package/dist/collection/components/vviinn-vpr-widget/stories/vviinn-vpr-widget.stories.js +0 -211
- package/dist/collection/components/vviinn-vpr-widget/token-helpers.js +0 -11
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +0 -510
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-widget.css +0 -79
- package/dist/collection/components/vviinn-vps-button/stories/vviinn-vps-button.stories.js +0 -35
- package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.css +0 -3
- package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +0 -195
- package/dist/collection/components/vviinn-vps-widget/stories/vviinn-vps-widget.stories.js +0 -37
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.css +0 -350
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +0 -375
- package/dist/collection/cropper/Cropper.js +0 -1
- package/dist/collection/cropper/Handler.js +0 -61
- package/dist/collection/dom/index.js +0 -3
- package/dist/collection/error.js +0 -14
- package/dist/collection/file/index.js +0 -4
- package/dist/collection/geometry/Clip.js +0 -14
- package/dist/collection/geometry/Point.js +0 -32
- package/dist/collection/geometry/Rectangle.js +0 -95
- package/dist/collection/geometry/RectangleAlt.js +0 -1
- package/dist/collection/geometry/Sized.js +0 -8
- package/dist/collection/global.js +0 -19
- package/dist/collection/index.js +0 -1
- package/dist/collection/interfaces/generated.js +0 -5
- package/dist/collection/interfaces/recommendation.js +0 -1
- package/dist/collection/network/apiClient.js +0 -9
- package/dist/collection/network/ion/File.js +0 -14
- package/dist/collection/network/ion/Form.js +0 -64
- package/dist/collection/network/ion/Link.js +0 -8
- package/dist/collection/network/ion/ValueObject.js +0 -23
- package/dist/collection/network/request.js +0 -19
- package/dist/collection/network/utils.js +0 -37
- package/dist/collection/openApi/index.js +0 -27
- package/dist/collection/recommendation/events.js +0 -1
- package/dist/collection/recommendation/recommendation.js +0 -1
- package/dist/collection/searchSession/searchSession.js +0 -31
- package/dist/collection/sentry.js +0 -14
- package/dist/collection/slider/GridMode.js +0 -1
- package/dist/collection/store/file-processing.js +0 -13
- package/dist/collection/store/imageSearch.store.js +0 -133
- package/dist/collection/store/store.js +0 -3
- package/dist/collection/store/tracking.store.js +0 -3
- package/dist/collection/stories/Button.js +0 -21
- package/dist/collection/stories/Button.stories.js +0 -42
- package/dist/collection/stories/Header.js +0 -45
- package/dist/collection/stories/Header.stories.js +0 -15
- package/dist/collection/stories/Page.js +0 -61
- package/dist/collection/stories/Page.stories.js +0 -19
- package/dist/collection/stories/assets/code-brackets.svg +0 -1
- package/dist/collection/stories/assets/colors.svg +0 -1
- package/dist/collection/stories/assets/comments.svg +0 -1
- package/dist/collection/stories/assets/direction.svg +0 -1
- package/dist/collection/stories/assets/flow.svg +0 -1
- package/dist/collection/stories/assets/plugin.svg +0 -1
- package/dist/collection/stories/assets/repo.svg +0 -1
- package/dist/collection/stories/assets/stackalt.svg +0 -1
- package/dist/collection/stories/image-selector.stories.js +0 -6
- package/dist/collection/stories/image-view.stories.js +0 -6
- package/dist/collection/stories/modal.stories.js +0 -12
- package/dist/collection/stories/onboarding.stories.js +0 -11
- package/dist/collection/stories/overlay.stories.js +0 -5
- package/dist/collection/stories/overlayedModal.stories.js +0 -8
- package/dist/collection/stories/privacy-badge.stories.js +0 -11
- package/dist/collection/stories/slider.stories.js +0 -17
- package/dist/collection/stories/teaser.stories.js +0 -5
- package/dist/collection/stories/vps-widget.stories.js +0 -47
- package/dist/collection/stories/vviinn-product.stories.js +0 -19
- package/dist/collection/tracking/event.js +0 -3
- package/dist/collection/tracking/filter.js +0 -5
- package/dist/collection/tracking/index.js +0 -13
- package/dist/collection/tracking/models.js +0 -6
- package/dist/collection/tracking/product.js +0 -18
- package/dist/collection/tracking/search.js +0 -5
- package/dist/collection/tracking/widget.js +0 -10
- package/dist/collection/utils/collections/collectionsUtils.js +0 -5
- package/dist/collection/utils/either.js +0 -3
- package/dist/collection/utils/enum/enumUtils.js +0 -3
- package/dist/collection/utils/event/Events.js +0 -1
- package/dist/collection/utils/number/index.js +0 -4
- package/dist/collection/utils/option/option.js +0 -4
- package/dist/collection/utils/semigroup/semigroupDiff.js +0 -6
- package/dist/collection/utils/token/tokenUtils.js +0 -9
- package/dist/esm/cropper-handler_27.entry.js +0 -1105
- package/dist/esm/index-51f71d18.js +0 -1323
- package/dist/esm/index.js +0 -1
- package/dist/esm/loader.js +0 -19
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/esm/vviinn-carousel_2.entry.js +0 -996
- package/dist/esm/vviinn-widgets.js +0 -19
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- package/dist/loader/cdn.js +0 -3
- package/dist/loader/index.cjs.js +0 -3
- package/dist/loader/index.d.ts +0 -12
- package/dist/loader/index.es2017.js +0 -3
- package/dist/loader/index.js +0 -4
- package/dist/loader/package.json +0 -10
- package/dist/vviinn-widgets/p-2dd35f19.entry.js +0 -1
- package/dist/vviinn-widgets/p-3469b71a.js +0 -1
- package/dist/vviinn-widgets/p-40bea5b5.entry.js +0 -1
- package/dist/vviinn-widgets/p-465d043d.js +0 -15
- package/dist/vviinn-widgets/p-59bd2a99.js +0 -1
- package/dist/vviinn-widgets/p-74ed36af.entry.js +0 -1
- package/dist/vviinn-widgets/p-9def6b8b.entry.js +0 -1
- package/dist/vviinn-widgets/p-cd995515.js +0 -1
- package/www/build/p-166970f3.js +0 -1
- package/www/build/p-2dd35f19.entry.js +0 -1
- package/www/build/p-3469b71a.js +0 -1
- package/www/build/p-40bea5b5.entry.js +0 -1
- package/www/build/p-465d043d.js +0 -15
- package/www/build/p-59bd2a99.js +0 -1
- package/www/build/p-61933b75.js +0 -1
- package/www/build/p-74ed36af.entry.js +0 -1
- package/www/build/p-9def6b8b.entry.js +0 -1
- package/www/build/p-a67898be.css +0 -1
- package/www/build/p-a6e0710f.entry.js +0 -1
- package/www/build/p-cd995515.js +0 -1
- package/www/favicon.ico +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as Env } from './index-
|
|
1
|
+
import { E as Env } from './index-de3e14da.js';
|
|
2
2
|
|
|
3
3
|
/*! *****************************************************************************
|
|
4
4
|
Copyright (c) Microsoft Corporation.
|
|
@@ -52,6 +52,68 @@ function __rest(s, e) {
|
|
|
52
52
|
return t;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
+
function __decorate(decorators, target, key, desc) {
|
|
56
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
57
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
58
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
59
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function __param(paramIndex, decorator) {
|
|
63
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function __metadata(metadataKey, metadataValue) {
|
|
67
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
71
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
72
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
73
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
74
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
75
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
76
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function __generator(thisArg, body) {
|
|
81
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
82
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
83
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
84
|
+
function step(op) {
|
|
85
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
86
|
+
while (_) try {
|
|
87
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
88
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
89
|
+
switch (op[0]) {
|
|
90
|
+
case 0: case 1: t = op; break;
|
|
91
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
92
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
93
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
94
|
+
default:
|
|
95
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
96
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
97
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
98
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
99
|
+
if (t[2]) _.ops.pop();
|
|
100
|
+
_.trys.pop(); continue;
|
|
101
|
+
}
|
|
102
|
+
op = body.call(thisArg, _);
|
|
103
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
104
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function __createBinding(o, m, k, k2) {
|
|
109
|
+
if (k2 === undefined) k2 = k;
|
|
110
|
+
o[k2] = m[k];
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function __exportStar(m, exports) {
|
|
114
|
+
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
115
|
+
}
|
|
116
|
+
|
|
55
117
|
function __values(o) {
|
|
56
118
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
57
119
|
if (m) return m.call(o);
|
|
@@ -85,8 +147,91 @@ function __spread() {
|
|
|
85
147
|
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
86
148
|
ar = ar.concat(__read(arguments[i]));
|
|
87
149
|
return ar;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
function __spreadArrays() {
|
|
153
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
154
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
155
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
156
|
+
r[k] = a[j];
|
|
157
|
+
return r;
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
function __await(v) {
|
|
161
|
+
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
165
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
166
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
167
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
168
|
+
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
169
|
+
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
|
170
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
171
|
+
function fulfill(value) { resume("next", value); }
|
|
172
|
+
function reject(value) { resume("throw", value); }
|
|
173
|
+
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
function __asyncDelegator(o) {
|
|
177
|
+
var i, p;
|
|
178
|
+
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
179
|
+
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
function __asyncValues(o) {
|
|
183
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
184
|
+
var m = o[Symbol.asyncIterator], i;
|
|
185
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
186
|
+
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
187
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
function __makeTemplateObject(cooked, raw) {
|
|
191
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
192
|
+
return cooked;
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
function __importStar(mod) {
|
|
196
|
+
if (mod && mod.__esModule) return mod;
|
|
197
|
+
var result = {};
|
|
198
|
+
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
199
|
+
result.default = mod;
|
|
200
|
+
return result;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
function __importDefault(mod) {
|
|
204
|
+
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
function __classPrivateFieldGet(receiver, privateMap) {
|
|
208
|
+
if (!privateMap.has(receiver)) {
|
|
209
|
+
throw new TypeError("attempted to get private field on non-instance");
|
|
210
|
+
}
|
|
211
|
+
return privateMap.get(receiver);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
function __classPrivateFieldSet(receiver, privateMap, value) {
|
|
215
|
+
if (!privateMap.has(receiver)) {
|
|
216
|
+
throw new TypeError("attempted to set private field on non-instance");
|
|
217
|
+
}
|
|
218
|
+
privateMap.set(receiver, value);
|
|
219
|
+
return value;
|
|
88
220
|
}
|
|
89
221
|
|
|
222
|
+
/** Console logging verbosity for the SDK. */
|
|
223
|
+
var LogLevel;
|
|
224
|
+
(function (LogLevel) {
|
|
225
|
+
/** No logs will be generated. */
|
|
226
|
+
LogLevel[LogLevel["None"] = 0] = "None";
|
|
227
|
+
/** Only SDK internal errors will be logged. */
|
|
228
|
+
LogLevel[LogLevel["Error"] = 1] = "Error";
|
|
229
|
+
/** Information useful for debugging the SDK will be logged. */
|
|
230
|
+
LogLevel[LogLevel["Debug"] = 2] = "Debug";
|
|
231
|
+
/** All SDK actions will be logged. */
|
|
232
|
+
LogLevel[LogLevel["Verbose"] = 3] = "Verbose";
|
|
233
|
+
})(LogLevel || (LogLevel = {}));
|
|
234
|
+
|
|
90
235
|
/**
|
|
91
236
|
* Session Status
|
|
92
237
|
*/
|
|
@@ -204,6 +349,14 @@ var Status;
|
|
|
204
349
|
Status.fromHttpCode = fromHttpCode;
|
|
205
350
|
})(Status || (Status = {}));
|
|
206
351
|
|
|
352
|
+
var TransactionSamplingMethod;
|
|
353
|
+
(function (TransactionSamplingMethod) {
|
|
354
|
+
TransactionSamplingMethod["Explicit"] = "explicitly_set";
|
|
355
|
+
TransactionSamplingMethod["Sampler"] = "client_sampler";
|
|
356
|
+
TransactionSamplingMethod["Rate"] = "client_rate";
|
|
357
|
+
TransactionSamplingMethod["Inheritance"] = "inheritance";
|
|
358
|
+
})(TransactionSamplingMethod || (TransactionSamplingMethod = {}));
|
|
359
|
+
|
|
207
360
|
var Outcome;
|
|
208
361
|
(function (Outcome) {
|
|
209
362
|
Outcome["BeforeSend"] = "before_send";
|
|
@@ -249,6 +402,36 @@ function dynamicRequire(mod, request) {
|
|
|
249
402
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
250
403
|
return mod.require(request);
|
|
251
404
|
}
|
|
405
|
+
/**
|
|
406
|
+
* Helper for dynamically loading module that should work with linked dependencies.
|
|
407
|
+
* The problem is that we _should_ be using `require(require.resolve(moduleName, { paths: [cwd()] }))`
|
|
408
|
+
* However it's _not possible_ to do that with Webpack, as it has to know all the dependencies during
|
|
409
|
+
* build time. `require.resolve` is also not available in any other way, so we cannot create,
|
|
410
|
+
* a fake helper like we do with `dynamicRequire`.
|
|
411
|
+
*
|
|
412
|
+
* We always prefer to use local package, thus the value is not returned early from each `try/catch` block.
|
|
413
|
+
* That is to mimic the behavior of `require.resolve` exactly.
|
|
414
|
+
*
|
|
415
|
+
* @param moduleName module name to require
|
|
416
|
+
* @returns possibly required module
|
|
417
|
+
*/
|
|
418
|
+
function loadModule(moduleName) {
|
|
419
|
+
var mod;
|
|
420
|
+
try {
|
|
421
|
+
mod = dynamicRequire(module, moduleName);
|
|
422
|
+
}
|
|
423
|
+
catch (e) {
|
|
424
|
+
// no-empty
|
|
425
|
+
}
|
|
426
|
+
try {
|
|
427
|
+
var cwd = dynamicRequire(module, 'process').cwd;
|
|
428
|
+
mod = dynamicRequire(module, cwd() + "/node_modules/" + moduleName);
|
|
429
|
+
}
|
|
430
|
+
catch (e) {
|
|
431
|
+
// no-empty
|
|
432
|
+
}
|
|
433
|
+
return mod;
|
|
434
|
+
}
|
|
252
435
|
|
|
253
436
|
/**
|
|
254
437
|
* NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,
|
|
@@ -826,6 +1009,44 @@ function truncate(str, max) {
|
|
|
826
1009
|
}
|
|
827
1010
|
return str.length <= max ? str : str.substr(0, max) + "...";
|
|
828
1011
|
}
|
|
1012
|
+
/**
|
|
1013
|
+
* This is basically just `trim_line` from
|
|
1014
|
+
* https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67
|
|
1015
|
+
*
|
|
1016
|
+
* @param str An object that contains serializable values
|
|
1017
|
+
* @param max Maximum number of characters in truncated string
|
|
1018
|
+
* @returns string Encoded
|
|
1019
|
+
*/
|
|
1020
|
+
function snipLine(line, colno) {
|
|
1021
|
+
var newLine = line;
|
|
1022
|
+
var ll = newLine.length;
|
|
1023
|
+
if (ll <= 150) {
|
|
1024
|
+
return newLine;
|
|
1025
|
+
}
|
|
1026
|
+
if (colno > ll) {
|
|
1027
|
+
// eslint-disable-next-line no-param-reassign
|
|
1028
|
+
colno = ll;
|
|
1029
|
+
}
|
|
1030
|
+
var start = Math.max(colno - 60, 0);
|
|
1031
|
+
if (start < 5) {
|
|
1032
|
+
start = 0;
|
|
1033
|
+
}
|
|
1034
|
+
var end = Math.min(start + 140, ll);
|
|
1035
|
+
if (end > ll - 5) {
|
|
1036
|
+
end = ll;
|
|
1037
|
+
}
|
|
1038
|
+
if (end === ll) {
|
|
1039
|
+
start = Math.max(end - 140, 0);
|
|
1040
|
+
}
|
|
1041
|
+
newLine = newLine.slice(start, end);
|
|
1042
|
+
if (start > 0) {
|
|
1043
|
+
newLine = "'{snip} " + newLine;
|
|
1044
|
+
}
|
|
1045
|
+
if (end < ll) {
|
|
1046
|
+
newLine += ' {snip}';
|
|
1047
|
+
}
|
|
1048
|
+
return newLine;
|
|
1049
|
+
}
|
|
829
1050
|
/**
|
|
830
1051
|
* Join values in array
|
|
831
1052
|
* @param input array of values to be joined together
|
|
@@ -867,6 +1088,22 @@ function isMatchingPattern(value, pattern) {
|
|
|
867
1088
|
}
|
|
868
1089
|
return false;
|
|
869
1090
|
}
|
|
1091
|
+
/**
|
|
1092
|
+
* Given a string, escape characters which have meaning in the regex grammar, such that the result is safe to feed to
|
|
1093
|
+
* `new RegExp()`.
|
|
1094
|
+
*
|
|
1095
|
+
* Based on https://github.com/sindresorhus/escape-string-regexp. Vendored to a) reduce the size by skipping the runtime
|
|
1096
|
+
* type-checking, and b) ensure it gets down-compiled for old versions of Node (the published package only supports Node
|
|
1097
|
+
* 12+).
|
|
1098
|
+
*
|
|
1099
|
+
* @param regexString The string to escape
|
|
1100
|
+
* @returns An version of the string with all special regex characters escaped
|
|
1101
|
+
*/
|
|
1102
|
+
function escapeStringForRegex(regexString) {
|
|
1103
|
+
// escape the hyphen separately so we can also replace it with a unicode literal hyphen, to avoid the problems
|
|
1104
|
+
// discussed in https://github.com/sindresorhus/escape-string-regexp/issues/20.
|
|
1105
|
+
return regexString.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&').replace(/-/g, '\\x2d');
|
|
1106
|
+
}
|
|
870
1107
|
|
|
871
1108
|
/**
|
|
872
1109
|
* Replace a method in an object with a wrapped version of itself.
|
|
@@ -1198,7 +1435,88 @@ function dropUndefinedKeys(val) {
|
|
|
1198
1435
|
}
|
|
1199
1436
|
return val;
|
|
1200
1437
|
}
|
|
1438
|
+
/**
|
|
1439
|
+
* Ensure that something is an object.
|
|
1440
|
+
*
|
|
1441
|
+
* Turns `undefined` and `null` into `String`s and all other primitives into instances of their respective wrapper
|
|
1442
|
+
* classes (String, Boolean, Number, etc.). Acts as the identity function on non-primitives.
|
|
1443
|
+
*
|
|
1444
|
+
* @param wat The subject of the objectification
|
|
1445
|
+
* @returns A version of `wat` which can safely be used with `Object` class methods
|
|
1446
|
+
*/
|
|
1447
|
+
function objectify(wat) {
|
|
1448
|
+
var objectified;
|
|
1449
|
+
switch (true) {
|
|
1450
|
+
case wat === undefined || wat === null:
|
|
1451
|
+
objectified = new String(wat);
|
|
1452
|
+
break;
|
|
1453
|
+
// Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason
|
|
1454
|
+
// those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as
|
|
1455
|
+
// an object in order to wrap it.
|
|
1456
|
+
case typeof wat === 'symbol' || typeof wat === 'bigint':
|
|
1457
|
+
objectified = Object(wat);
|
|
1458
|
+
break;
|
|
1459
|
+
// this will catch the remaining primitives: `String`, `Number`, and `Boolean`
|
|
1460
|
+
case isPrimitive(wat):
|
|
1461
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
1462
|
+
objectified = new wat.constructor(wat);
|
|
1463
|
+
break;
|
|
1464
|
+
// by process of elimination, at this point we know that `wat` must already be an object
|
|
1465
|
+
default:
|
|
1466
|
+
objectified = wat;
|
|
1467
|
+
break;
|
|
1468
|
+
}
|
|
1469
|
+
return objectified;
|
|
1470
|
+
}
|
|
1201
1471
|
|
|
1472
|
+
/**
|
|
1473
|
+
* Tells whether current environment supports ErrorEvent objects
|
|
1474
|
+
* {@link supportsErrorEvent}.
|
|
1475
|
+
*
|
|
1476
|
+
* @returns Answer to the given question.
|
|
1477
|
+
*/
|
|
1478
|
+
function supportsErrorEvent() {
|
|
1479
|
+
try {
|
|
1480
|
+
new ErrorEvent('');
|
|
1481
|
+
return true;
|
|
1482
|
+
}
|
|
1483
|
+
catch (e) {
|
|
1484
|
+
return false;
|
|
1485
|
+
}
|
|
1486
|
+
}
|
|
1487
|
+
/**
|
|
1488
|
+
* Tells whether current environment supports DOMError objects
|
|
1489
|
+
* {@link supportsDOMError}.
|
|
1490
|
+
*
|
|
1491
|
+
* @returns Answer to the given question.
|
|
1492
|
+
*/
|
|
1493
|
+
function supportsDOMError() {
|
|
1494
|
+
try {
|
|
1495
|
+
// Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':
|
|
1496
|
+
// 1 argument required, but only 0 present.
|
|
1497
|
+
// @ts-ignore It really needs 1 argument, not 0.
|
|
1498
|
+
new DOMError('');
|
|
1499
|
+
return true;
|
|
1500
|
+
}
|
|
1501
|
+
catch (e) {
|
|
1502
|
+
return false;
|
|
1503
|
+
}
|
|
1504
|
+
}
|
|
1505
|
+
/**
|
|
1506
|
+
* Tells whether current environment supports DOMException objects
|
|
1507
|
+
* {@link supportsDOMException}.
|
|
1508
|
+
*
|
|
1509
|
+
* @returns Answer to the given question.
|
|
1510
|
+
*/
|
|
1511
|
+
function supportsDOMException() {
|
|
1512
|
+
try {
|
|
1513
|
+
new DOMException('');
|
|
1514
|
+
return true;
|
|
1515
|
+
}
|
|
1516
|
+
catch (e) {
|
|
1517
|
+
return false;
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1202
1520
|
/**
|
|
1203
1521
|
* Tells whether current environment supports Fetch API
|
|
1204
1522
|
* {@link supportsFetch}.
|
|
@@ -1264,6 +1582,15 @@ function supportsNativeFetch() {
|
|
|
1264
1582
|
}
|
|
1265
1583
|
return result;
|
|
1266
1584
|
}
|
|
1585
|
+
/**
|
|
1586
|
+
* Tells whether current environment supports ReportingObserver API
|
|
1587
|
+
* {@link supportsReportingObserver}.
|
|
1588
|
+
*
|
|
1589
|
+
* @returns Answer to the given question.
|
|
1590
|
+
*/
|
|
1591
|
+
function supportsReportingObserver() {
|
|
1592
|
+
return 'ReportingObserver' in getGlobalObject();
|
|
1593
|
+
}
|
|
1267
1594
|
/**
|
|
1268
1595
|
* Tells whether current environment supports Referrer Policy API
|
|
1269
1596
|
* {@link supportsReferrerPolicy}.
|
|
@@ -1956,6 +2283,25 @@ function addExceptionMechanism(event, newMechanism) {
|
|
|
1956
2283
|
exceptionValue0.mechanism.data = mergedData;
|
|
1957
2284
|
}
|
|
1958
2285
|
}
|
|
2286
|
+
// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string
|
|
2287
|
+
var SEMVER_REGEXP = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;
|
|
2288
|
+
/**
|
|
2289
|
+
* Parses input into a SemVer interface
|
|
2290
|
+
* @param input string representation of a semver version
|
|
2291
|
+
*/
|
|
2292
|
+
function parseSemver(input) {
|
|
2293
|
+
var match = input.match(SEMVER_REGEXP) || [];
|
|
2294
|
+
var major = parseInt(match[1], 10);
|
|
2295
|
+
var minor = parseInt(match[2], 10);
|
|
2296
|
+
var patch = parseInt(match[3], 10);
|
|
2297
|
+
return {
|
|
2298
|
+
buildmetadata: match[5],
|
|
2299
|
+
major: isNaN(major) ? undefined : major,
|
|
2300
|
+
minor: isNaN(minor) ? undefined : minor,
|
|
2301
|
+
patch: isNaN(patch) ? undefined : patch,
|
|
2302
|
+
prerelease: match[4],
|
|
2303
|
+
};
|
|
2304
|
+
}
|
|
1959
2305
|
var defaultRetryAfter = 60 * 1000; // 60 seconds
|
|
1960
2306
|
/**
|
|
1961
2307
|
* Extracts Retry-After value from the request header or returns default value
|
|
@@ -1976,6 +2322,36 @@ function parseRetryAfterHeader(now, header) {
|
|
|
1976
2322
|
}
|
|
1977
2323
|
return defaultRetryAfter;
|
|
1978
2324
|
}
|
|
2325
|
+
/**
|
|
2326
|
+
* This function adds context (pre/post/line) lines to the provided frame
|
|
2327
|
+
*
|
|
2328
|
+
* @param lines string[] containing all lines
|
|
2329
|
+
* @param frame StackFrame that will be mutated
|
|
2330
|
+
* @param linesOfContext number of context lines we want to add pre/post
|
|
2331
|
+
*/
|
|
2332
|
+
function addContextToFrame(lines, frame, linesOfContext) {
|
|
2333
|
+
if (linesOfContext === void 0) { linesOfContext = 5; }
|
|
2334
|
+
var lineno = frame.lineno || 0;
|
|
2335
|
+
var maxLines = lines.length;
|
|
2336
|
+
var sourceLine = Math.max(Math.min(maxLines, lineno - 1), 0);
|
|
2337
|
+
frame.pre_context = lines
|
|
2338
|
+
.slice(Math.max(0, sourceLine - linesOfContext), sourceLine)
|
|
2339
|
+
.map(function (line) { return snipLine(line, 0); });
|
|
2340
|
+
frame.context_line = snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0);
|
|
2341
|
+
frame.post_context = lines
|
|
2342
|
+
.slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)
|
|
2343
|
+
.map(function (line) { return snipLine(line, 0); });
|
|
2344
|
+
}
|
|
2345
|
+
/**
|
|
2346
|
+
* Strip the query string and fragment off of a given URL or path (if present)
|
|
2347
|
+
*
|
|
2348
|
+
* @param urlPath Full URL or path, including possible query string and/or fragment
|
|
2349
|
+
* @returns URL or path without query string or fragment
|
|
2350
|
+
*/
|
|
2351
|
+
function stripUrlQueryAndFragment(urlPath) {
|
|
2352
|
+
// eslint-disable-next-line no-useless-escape
|
|
2353
|
+
return urlPath.split(/[\?#]/, 1)[0];
|
|
2354
|
+
}
|
|
1979
2355
|
/**
|
|
1980
2356
|
* Checks whether or not we've already captured the given exception (note: not an identical exception - the very object
|
|
1981
2357
|
* in question), and marks it captured if not.
|
|
@@ -2016,6 +2392,168 @@ function checkOrSetAlreadyCaught(exception) {
|
|
|
2016
2392
|
return false;
|
|
2017
2393
|
}
|
|
2018
2394
|
|
|
2395
|
+
// Slightly modified (no IE8 support, ES6) and transcribed to TypeScript
|
|
2396
|
+
// https://raw.githubusercontent.com/calvinmetcalf/rollup-plugin-node-builtins/master/src/es6/path.js
|
|
2397
|
+
/** JSDoc */
|
|
2398
|
+
function normalizeArray(parts, allowAboveRoot) {
|
|
2399
|
+
// if the path tries to go above the root, `up` ends up > 0
|
|
2400
|
+
var up = 0;
|
|
2401
|
+
for (var i = parts.length - 1; i >= 0; i--) {
|
|
2402
|
+
var last = parts[i];
|
|
2403
|
+
if (last === '.') {
|
|
2404
|
+
parts.splice(i, 1);
|
|
2405
|
+
}
|
|
2406
|
+
else if (last === '..') {
|
|
2407
|
+
parts.splice(i, 1);
|
|
2408
|
+
// eslint-disable-next-line no-plusplus
|
|
2409
|
+
up++;
|
|
2410
|
+
}
|
|
2411
|
+
else if (up) {
|
|
2412
|
+
parts.splice(i, 1);
|
|
2413
|
+
// eslint-disable-next-line no-plusplus
|
|
2414
|
+
up--;
|
|
2415
|
+
}
|
|
2416
|
+
}
|
|
2417
|
+
// if the path is allowed to go above the root, restore leading ..s
|
|
2418
|
+
if (allowAboveRoot) {
|
|
2419
|
+
// eslint-disable-next-line no-plusplus
|
|
2420
|
+
for (; up--; up) {
|
|
2421
|
+
parts.unshift('..');
|
|
2422
|
+
}
|
|
2423
|
+
}
|
|
2424
|
+
return parts;
|
|
2425
|
+
}
|
|
2426
|
+
// Split a filename into [root, dir, basename, ext], unix version
|
|
2427
|
+
// 'root' is just a slash, or nothing.
|
|
2428
|
+
var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^/]+?|)(\.[^./]*|))(?:[/]*)$/;
|
|
2429
|
+
/** JSDoc */
|
|
2430
|
+
function splitPath(filename) {
|
|
2431
|
+
var parts = splitPathRe.exec(filename);
|
|
2432
|
+
return parts ? parts.slice(1) : [];
|
|
2433
|
+
}
|
|
2434
|
+
// path.resolve([from ...], to)
|
|
2435
|
+
// posix version
|
|
2436
|
+
/** JSDoc */
|
|
2437
|
+
function resolve() {
|
|
2438
|
+
var args = [];
|
|
2439
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
2440
|
+
args[_i] = arguments[_i];
|
|
2441
|
+
}
|
|
2442
|
+
var resolvedPath = '';
|
|
2443
|
+
var resolvedAbsolute = false;
|
|
2444
|
+
for (var i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {
|
|
2445
|
+
var path = i >= 0 ? args[i] : '/';
|
|
2446
|
+
// Skip empty entries
|
|
2447
|
+
if (!path) {
|
|
2448
|
+
continue;
|
|
2449
|
+
}
|
|
2450
|
+
resolvedPath = path + "/" + resolvedPath;
|
|
2451
|
+
resolvedAbsolute = path.charAt(0) === '/';
|
|
2452
|
+
}
|
|
2453
|
+
// At this point the path should be resolved to a full absolute path, but
|
|
2454
|
+
// handle relative paths to be safe (might happen when process.cwd() fails)
|
|
2455
|
+
// Normalize the path
|
|
2456
|
+
resolvedPath = normalizeArray(resolvedPath.split('/').filter(function (p) { return !!p; }), !resolvedAbsolute).join('/');
|
|
2457
|
+
return (resolvedAbsolute ? '/' : '') + resolvedPath || '.';
|
|
2458
|
+
}
|
|
2459
|
+
/** JSDoc */
|
|
2460
|
+
function trim(arr) {
|
|
2461
|
+
var start = 0;
|
|
2462
|
+
for (; start < arr.length; start++) {
|
|
2463
|
+
if (arr[start] !== '') {
|
|
2464
|
+
break;
|
|
2465
|
+
}
|
|
2466
|
+
}
|
|
2467
|
+
var end = arr.length - 1;
|
|
2468
|
+
for (; end >= 0; end--) {
|
|
2469
|
+
if (arr[end] !== '') {
|
|
2470
|
+
break;
|
|
2471
|
+
}
|
|
2472
|
+
}
|
|
2473
|
+
if (start > end) {
|
|
2474
|
+
return [];
|
|
2475
|
+
}
|
|
2476
|
+
return arr.slice(start, end - start + 1);
|
|
2477
|
+
}
|
|
2478
|
+
// path.relative(from, to)
|
|
2479
|
+
// posix version
|
|
2480
|
+
/** JSDoc */
|
|
2481
|
+
function relative(from, to) {
|
|
2482
|
+
/* eslint-disable no-param-reassign */
|
|
2483
|
+
from = resolve(from).substr(1);
|
|
2484
|
+
to = resolve(to).substr(1);
|
|
2485
|
+
/* eslint-enable no-param-reassign */
|
|
2486
|
+
var fromParts = trim(from.split('/'));
|
|
2487
|
+
var toParts = trim(to.split('/'));
|
|
2488
|
+
var length = Math.min(fromParts.length, toParts.length);
|
|
2489
|
+
var samePartsLength = length;
|
|
2490
|
+
for (var i = 0; i < length; i++) {
|
|
2491
|
+
if (fromParts[i] !== toParts[i]) {
|
|
2492
|
+
samePartsLength = i;
|
|
2493
|
+
break;
|
|
2494
|
+
}
|
|
2495
|
+
}
|
|
2496
|
+
var outputParts = [];
|
|
2497
|
+
for (var i = samePartsLength; i < fromParts.length; i++) {
|
|
2498
|
+
outputParts.push('..');
|
|
2499
|
+
}
|
|
2500
|
+
outputParts = outputParts.concat(toParts.slice(samePartsLength));
|
|
2501
|
+
return outputParts.join('/');
|
|
2502
|
+
}
|
|
2503
|
+
// path.normalize(path)
|
|
2504
|
+
// posix version
|
|
2505
|
+
/** JSDoc */
|
|
2506
|
+
function normalizePath(path) {
|
|
2507
|
+
var isPathAbsolute = isAbsolute(path);
|
|
2508
|
+
var trailingSlash = path.substr(-1) === '/';
|
|
2509
|
+
// Normalize the path
|
|
2510
|
+
var normalizedPath = normalizeArray(path.split('/').filter(function (p) { return !!p; }), !isPathAbsolute).join('/');
|
|
2511
|
+
if (!normalizedPath && !isPathAbsolute) {
|
|
2512
|
+
normalizedPath = '.';
|
|
2513
|
+
}
|
|
2514
|
+
if (normalizedPath && trailingSlash) {
|
|
2515
|
+
normalizedPath += '/';
|
|
2516
|
+
}
|
|
2517
|
+
return (isPathAbsolute ? '/' : '') + normalizedPath;
|
|
2518
|
+
}
|
|
2519
|
+
// posix version
|
|
2520
|
+
/** JSDoc */
|
|
2521
|
+
function isAbsolute(path) {
|
|
2522
|
+
return path.charAt(0) === '/';
|
|
2523
|
+
}
|
|
2524
|
+
// posix version
|
|
2525
|
+
/** JSDoc */
|
|
2526
|
+
function join() {
|
|
2527
|
+
var args = [];
|
|
2528
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
2529
|
+
args[_i] = arguments[_i];
|
|
2530
|
+
}
|
|
2531
|
+
return normalizePath(args.join('/'));
|
|
2532
|
+
}
|
|
2533
|
+
/** JSDoc */
|
|
2534
|
+
function dirname(path) {
|
|
2535
|
+
var result = splitPath(path);
|
|
2536
|
+
var root = result[0];
|
|
2537
|
+
var dir = result[1];
|
|
2538
|
+
if (!root && !dir) {
|
|
2539
|
+
// No dirname whatsoever
|
|
2540
|
+
return '.';
|
|
2541
|
+
}
|
|
2542
|
+
if (dir) {
|
|
2543
|
+
// It has a dirname, strip trailing slash
|
|
2544
|
+
dir = dir.substr(0, dir.length - 1);
|
|
2545
|
+
}
|
|
2546
|
+
return root + dir;
|
|
2547
|
+
}
|
|
2548
|
+
/** JSDoc */
|
|
2549
|
+
function basename(path, ext) {
|
|
2550
|
+
var f = splitPath(path)[2];
|
|
2551
|
+
if (ext && f.substr(ext.length * -1) === ext) {
|
|
2552
|
+
f = f.substr(0, f.length - ext.length);
|
|
2553
|
+
}
|
|
2554
|
+
return f;
|
|
2555
|
+
}
|
|
2556
|
+
|
|
2019
2557
|
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
|
2020
2558
|
/** SyncPromise internal states */
|
|
2021
2559
|
var States;
|
|
@@ -2390,16 +2928,27 @@ var dateTimestampInSeconds = dateTimestampSource.nowSeconds.bind(dateTimestampSo
|
|
|
2390
2928
|
* See https://github.com/getsentry/sentry-javascript/issues/2590.
|
|
2391
2929
|
*/
|
|
2392
2930
|
var timestampInSeconds = timestampSource.nowSeconds.bind(timestampSource);
|
|
2931
|
+
// Re-exported with an old name for backwards-compatibility.
|
|
2932
|
+
var timestampWithMs = timestampInSeconds;
|
|
2933
|
+
/**
|
|
2934
|
+
* A boolean that is true when timestampInSeconds uses the Performance API to produce monotonic timestamps.
|
|
2935
|
+
*/
|
|
2936
|
+
var usingPerformanceAPI = platformPerformance !== undefined;
|
|
2937
|
+
/**
|
|
2938
|
+
* Internal helper to store what is the source of browserPerformanceTimeOrigin below. For debugging only.
|
|
2939
|
+
*/
|
|
2940
|
+
var _browserPerformanceTimeOriginMode;
|
|
2393
2941
|
/**
|
|
2394
2942
|
* The number of milliseconds since the UNIX epoch. This value is only usable in a browser, and only when the
|
|
2395
2943
|
* performance API is available.
|
|
2396
2944
|
*/
|
|
2397
|
-
(
|
|
2945
|
+
var browserPerformanceTimeOrigin = (function () {
|
|
2398
2946
|
// Unfortunately browsers may report an inaccurate time origin data, through either performance.timeOrigin or
|
|
2399
2947
|
// performance.timing.navigationStart, which results in poor results in performance data. We only treat time origin
|
|
2400
2948
|
// data as reliable if they are within a reasonable threshold of the current time.
|
|
2401
2949
|
var performance = getGlobalObject().performance;
|
|
2402
2950
|
if (!performance || !performance.now) {
|
|
2951
|
+
_browserPerformanceTimeOriginMode = 'none';
|
|
2403
2952
|
return undefined;
|
|
2404
2953
|
}
|
|
2405
2954
|
var threshold = 3600 * 1000;
|
|
@@ -2424,14 +2973,18 @@ var timestampInSeconds = timestampSource.nowSeconds.bind(timestampSource);
|
|
|
2424
2973
|
if (timeOriginIsReliable || navigationStartIsReliable) {
|
|
2425
2974
|
// Use the more reliable time origin
|
|
2426
2975
|
if (timeOriginDelta <= navigationStartDelta) {
|
|
2976
|
+
_browserPerformanceTimeOriginMode = 'timeOrigin';
|
|
2427
2977
|
return performance.timeOrigin;
|
|
2428
2978
|
}
|
|
2429
2979
|
else {
|
|
2980
|
+
_browserPerformanceTimeOriginMode = 'navigationStart';
|
|
2430
2981
|
return navigationStart;
|
|
2431
2982
|
}
|
|
2432
2983
|
}
|
|
2984
|
+
// Either both timeOrigin and navigationStart are skewed or neither is available, fallback to Date.
|
|
2985
|
+
_browserPerformanceTimeOriginMode = 'dateNow';
|
|
2433
2986
|
return dateNow;
|
|
2434
|
-
})
|
|
2987
|
+
})();
|
|
2435
2988
|
|
|
2436
2989
|
/**
|
|
2437
2990
|
* Absolute maximum number of breadcrumbs added to an event.
|
|
@@ -3425,6 +3978,17 @@ function getCurrentHub() {
|
|
|
3425
3978
|
// Return hub that lives on a global object
|
|
3426
3979
|
return getHubFromCarrier(registry);
|
|
3427
3980
|
}
|
|
3981
|
+
/**
|
|
3982
|
+
* Returns the active domain, if one exists
|
|
3983
|
+
* @deprecated No longer used; remove in v7
|
|
3984
|
+
* @returns The domain, or undefined if there is no active domain
|
|
3985
|
+
*/
|
|
3986
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
3987
|
+
function getActiveDomain() {
|
|
3988
|
+
logger.warn('Function `getActiveDomain` is deprecated and will be removed in a future version.');
|
|
3989
|
+
var sentry = getMainCarrier().__SENTRY__;
|
|
3990
|
+
return sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;
|
|
3991
|
+
}
|
|
3428
3992
|
/**
|
|
3429
3993
|
* Try to read the hub from an active domain, and fallback to the registry if one doesn't exist
|
|
3430
3994
|
* @returns discovered hub
|
|
@@ -3484,6 +4048,106 @@ function setHubOnCarrier(carrier, hub) {
|
|
|
3484
4048
|
return true;
|
|
3485
4049
|
}
|
|
3486
4050
|
|
|
4051
|
+
/**
|
|
4052
|
+
* @inheritdoc
|
|
4053
|
+
*/
|
|
4054
|
+
var SessionFlusher = /** @class */ (function () {
|
|
4055
|
+
function SessionFlusher(transport, attrs) {
|
|
4056
|
+
var _this = this;
|
|
4057
|
+
this.flushTimeout = 60;
|
|
4058
|
+
this._pendingAggregates = {};
|
|
4059
|
+
this._isEnabled = true;
|
|
4060
|
+
this._transport = transport;
|
|
4061
|
+
// Call to setInterval, so that flush is called every 60 seconds
|
|
4062
|
+
this._intervalId = setInterval(function () { return _this.flush(); }, this.flushTimeout * 1000);
|
|
4063
|
+
this._sessionAttrs = attrs;
|
|
4064
|
+
}
|
|
4065
|
+
/** Sends session aggregates to Transport */
|
|
4066
|
+
SessionFlusher.prototype.sendSessionAggregates = function (sessionAggregates) {
|
|
4067
|
+
if (!this._transport.sendSession) {
|
|
4068
|
+
logger.warn("Dropping session because custom transport doesn't implement sendSession");
|
|
4069
|
+
return;
|
|
4070
|
+
}
|
|
4071
|
+
void this._transport.sendSession(sessionAggregates).then(null, function (reason) {
|
|
4072
|
+
logger.error("Error while sending session: " + reason);
|
|
4073
|
+
});
|
|
4074
|
+
};
|
|
4075
|
+
/** Checks if `pendingAggregates` has entries, and if it does flushes them by calling `sendSessions` */
|
|
4076
|
+
SessionFlusher.prototype.flush = function () {
|
|
4077
|
+
var sessionAggregates = this.getSessionAggregates();
|
|
4078
|
+
if (sessionAggregates.aggregates.length === 0) {
|
|
4079
|
+
return;
|
|
4080
|
+
}
|
|
4081
|
+
this._pendingAggregates = {};
|
|
4082
|
+
this.sendSessionAggregates(sessionAggregates);
|
|
4083
|
+
};
|
|
4084
|
+
/** Massages the entries in `pendingAggregates` and returns aggregated sessions */
|
|
4085
|
+
SessionFlusher.prototype.getSessionAggregates = function () {
|
|
4086
|
+
var _this = this;
|
|
4087
|
+
var aggregates = Object.keys(this._pendingAggregates).map(function (key) {
|
|
4088
|
+
return _this._pendingAggregates[parseInt(key)];
|
|
4089
|
+
});
|
|
4090
|
+
var sessionAggregates = {
|
|
4091
|
+
attrs: this._sessionAttrs,
|
|
4092
|
+
aggregates: aggregates,
|
|
4093
|
+
};
|
|
4094
|
+
return dropUndefinedKeys(sessionAggregates);
|
|
4095
|
+
};
|
|
4096
|
+
/** JSDoc */
|
|
4097
|
+
SessionFlusher.prototype.close = function () {
|
|
4098
|
+
clearInterval(this._intervalId);
|
|
4099
|
+
this._isEnabled = false;
|
|
4100
|
+
this.flush();
|
|
4101
|
+
};
|
|
4102
|
+
/**
|
|
4103
|
+
* Wrapper function for _incrementSessionStatusCount that checks if the instance of SessionFlusher is enabled then
|
|
4104
|
+
* fetches the session status of the request from `Scope.getRequestSession().status` on the scope and passes them to
|
|
4105
|
+
* `_incrementSessionStatusCount` along with the start date
|
|
4106
|
+
*/
|
|
4107
|
+
SessionFlusher.prototype.incrementSessionStatusCount = function () {
|
|
4108
|
+
var _a, _b;
|
|
4109
|
+
if (!this._isEnabled) {
|
|
4110
|
+
return;
|
|
4111
|
+
}
|
|
4112
|
+
var scope = getCurrentHub().getScope();
|
|
4113
|
+
var requestSession = (_a = scope) === null || _a === void 0 ? void 0 : _a.getRequestSession();
|
|
4114
|
+
if (requestSession && requestSession.status) {
|
|
4115
|
+
this._incrementSessionStatusCount(requestSession.status, new Date());
|
|
4116
|
+
// This is not entirely necessarily but is added as a safe guard to indicate the bounds of a request and so in
|
|
4117
|
+
// case captureRequestSession is called more than once to prevent double count
|
|
4118
|
+
(_b = scope) === null || _b === void 0 ? void 0 : _b.setRequestSession(undefined);
|
|
4119
|
+
/* eslint-enable @typescript-eslint/no-unsafe-member-access */
|
|
4120
|
+
}
|
|
4121
|
+
};
|
|
4122
|
+
/**
|
|
4123
|
+
* Increments status bucket in pendingAggregates buffer (internal state) corresponding to status of
|
|
4124
|
+
* the session received
|
|
4125
|
+
*/
|
|
4126
|
+
SessionFlusher.prototype._incrementSessionStatusCount = function (status, date) {
|
|
4127
|
+
// Truncate minutes and seconds on Session Started attribute to have one minute bucket keys
|
|
4128
|
+
var sessionStartedTrunc = new Date(date).setSeconds(0, 0);
|
|
4129
|
+
this._pendingAggregates[sessionStartedTrunc] = this._pendingAggregates[sessionStartedTrunc] || {};
|
|
4130
|
+
// corresponds to aggregated sessions in one specific minute bucket
|
|
4131
|
+
// for example, {"started":"2021-03-16T08:00:00.000Z","exited":4, "errored": 1}
|
|
4132
|
+
var aggregationCounts = this._pendingAggregates[sessionStartedTrunc];
|
|
4133
|
+
if (!aggregationCounts.started) {
|
|
4134
|
+
aggregationCounts.started = new Date(sessionStartedTrunc).toISOString();
|
|
4135
|
+
}
|
|
4136
|
+
switch (status) {
|
|
4137
|
+
case RequestSessionStatus.Errored:
|
|
4138
|
+
aggregationCounts.errored = (aggregationCounts.errored || 0) + 1;
|
|
4139
|
+
return aggregationCounts.errored;
|
|
4140
|
+
case RequestSessionStatus.Ok:
|
|
4141
|
+
aggregationCounts.exited = (aggregationCounts.exited || 0) + 1;
|
|
4142
|
+
return aggregationCounts.exited;
|
|
4143
|
+
case RequestSessionStatus.Crashed:
|
|
4144
|
+
aggregationCounts.crashed = (aggregationCounts.crashed || 0) + 1;
|
|
4145
|
+
return aggregationCounts.crashed;
|
|
4146
|
+
}
|
|
4147
|
+
};
|
|
4148
|
+
return SessionFlusher;
|
|
4149
|
+
}());
|
|
4150
|
+
|
|
3487
4151
|
/**
|
|
3488
4152
|
* This calls a function on the current hub.
|
|
3489
4153
|
* @param method function to call on hub.
|
|
@@ -3523,6 +4187,104 @@ function captureException(exception, captureContext) {
|
|
|
3523
4187
|
syntheticException: syntheticException,
|
|
3524
4188
|
});
|
|
3525
4189
|
}
|
|
4190
|
+
/**
|
|
4191
|
+
* Captures a message event and sends it to Sentry.
|
|
4192
|
+
*
|
|
4193
|
+
* @param message The message to send to Sentry.
|
|
4194
|
+
* @param level Define the level of the message.
|
|
4195
|
+
* @returns The generated eventId.
|
|
4196
|
+
*/
|
|
4197
|
+
function captureMessage(message, captureContext) {
|
|
4198
|
+
var syntheticException;
|
|
4199
|
+
try {
|
|
4200
|
+
throw new Error(message);
|
|
4201
|
+
}
|
|
4202
|
+
catch (exception) {
|
|
4203
|
+
syntheticException = exception;
|
|
4204
|
+
}
|
|
4205
|
+
// This is necessary to provide explicit scopes upgrade, without changing the original
|
|
4206
|
+
// arity of the `captureMessage(message, level)` method.
|
|
4207
|
+
var level = typeof captureContext === 'string' ? captureContext : undefined;
|
|
4208
|
+
var context = typeof captureContext !== 'string' ? { captureContext: captureContext } : undefined;
|
|
4209
|
+
return callOnHub('captureMessage', message, level, __assign({ originalException: message, syntheticException: syntheticException }, context));
|
|
4210
|
+
}
|
|
4211
|
+
/**
|
|
4212
|
+
* Captures a manually created event and sends it to Sentry.
|
|
4213
|
+
*
|
|
4214
|
+
* @param event The event to send to Sentry.
|
|
4215
|
+
* @returns The generated eventId.
|
|
4216
|
+
*/
|
|
4217
|
+
function captureEvent(event) {
|
|
4218
|
+
return callOnHub('captureEvent', event);
|
|
4219
|
+
}
|
|
4220
|
+
/**
|
|
4221
|
+
* Callback to set context information onto the scope.
|
|
4222
|
+
* @param callback Callback function that receives Scope.
|
|
4223
|
+
*/
|
|
4224
|
+
function configureScope(callback) {
|
|
4225
|
+
callOnHub('configureScope', callback);
|
|
4226
|
+
}
|
|
4227
|
+
/**
|
|
4228
|
+
* Records a new breadcrumb which will be attached to future events.
|
|
4229
|
+
*
|
|
4230
|
+
* Breadcrumbs will be added to subsequent events to provide more context on
|
|
4231
|
+
* user's actions prior to an error or crash.
|
|
4232
|
+
*
|
|
4233
|
+
* @param breadcrumb The breadcrumb to record.
|
|
4234
|
+
*/
|
|
4235
|
+
function addBreadcrumb(breadcrumb) {
|
|
4236
|
+
callOnHub('addBreadcrumb', breadcrumb);
|
|
4237
|
+
}
|
|
4238
|
+
/**
|
|
4239
|
+
* Sets context data with the given name.
|
|
4240
|
+
* @param name of the context
|
|
4241
|
+
* @param context Any kind of data. This data will be normalized.
|
|
4242
|
+
*/
|
|
4243
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4244
|
+
function setContext(name, context) {
|
|
4245
|
+
callOnHub('setContext', name, context);
|
|
4246
|
+
}
|
|
4247
|
+
/**
|
|
4248
|
+
* Set an object that will be merged sent as extra data with the event.
|
|
4249
|
+
* @param extras Extras object to merge into current context.
|
|
4250
|
+
*/
|
|
4251
|
+
function setExtras(extras) {
|
|
4252
|
+
callOnHub('setExtras', extras);
|
|
4253
|
+
}
|
|
4254
|
+
/**
|
|
4255
|
+
* Set an object that will be merged sent as tags data with the event.
|
|
4256
|
+
* @param tags Tags context object to merge into current context.
|
|
4257
|
+
*/
|
|
4258
|
+
function setTags(tags) {
|
|
4259
|
+
callOnHub('setTags', tags);
|
|
4260
|
+
}
|
|
4261
|
+
/**
|
|
4262
|
+
* Set key:value that will be sent as extra data with the event.
|
|
4263
|
+
* @param key String of extra
|
|
4264
|
+
* @param extra Any kind of data. This data will be normalized.
|
|
4265
|
+
*/
|
|
4266
|
+
function setExtra(key, extra) {
|
|
4267
|
+
callOnHub('setExtra', key, extra);
|
|
4268
|
+
}
|
|
4269
|
+
/**
|
|
4270
|
+
* Set key:value that will be sent as tags data with the event.
|
|
4271
|
+
*
|
|
4272
|
+
* Can also be used to unset a tag, by passing `undefined`.
|
|
4273
|
+
*
|
|
4274
|
+
* @param key String key of tag
|
|
4275
|
+
* @param value Value of tag
|
|
4276
|
+
*/
|
|
4277
|
+
function setTag(key, value) {
|
|
4278
|
+
callOnHub('setTag', key, value);
|
|
4279
|
+
}
|
|
4280
|
+
/**
|
|
4281
|
+
* Updates user context information for future events.
|
|
4282
|
+
*
|
|
4283
|
+
* @param user User context object to be set in the current context. Pass `null` to unset the user.
|
|
4284
|
+
*/
|
|
4285
|
+
function setUser(user) {
|
|
4286
|
+
callOnHub('setUser', user);
|
|
4287
|
+
}
|
|
3526
4288
|
/**
|
|
3527
4289
|
* Creates a new scope with and executes the given operation within.
|
|
3528
4290
|
* The scope is automatically removed once the operation
|
|
@@ -3539,6 +4301,44 @@ function captureException(exception, captureContext) {
|
|
|
3539
4301
|
function withScope(callback) {
|
|
3540
4302
|
callOnHub('withScope', callback);
|
|
3541
4303
|
}
|
|
4304
|
+
/**
|
|
4305
|
+
* Calls a function on the latest client. Use this with caution, it's meant as
|
|
4306
|
+
* in "internal" helper so we don't need to expose every possible function in
|
|
4307
|
+
* the shim. It is not guaranteed that the client actually implements the
|
|
4308
|
+
* function.
|
|
4309
|
+
*
|
|
4310
|
+
* @param method The method to call on the client/client.
|
|
4311
|
+
* @param args Arguments to pass to the client/fontend.
|
|
4312
|
+
* @hidden
|
|
4313
|
+
*/
|
|
4314
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4315
|
+
function _callOnClient(method) {
|
|
4316
|
+
var args = [];
|
|
4317
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
4318
|
+
args[_i - 1] = arguments[_i];
|
|
4319
|
+
}
|
|
4320
|
+
callOnHub.apply(void 0, __spread(['_invokeClient', method], args));
|
|
4321
|
+
}
|
|
4322
|
+
/**
|
|
4323
|
+
* Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.
|
|
4324
|
+
*
|
|
4325
|
+
* A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a
|
|
4326
|
+
* new child span within the transaction or any span, call the respective `.startChild()` method.
|
|
4327
|
+
*
|
|
4328
|
+
* Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded.
|
|
4329
|
+
*
|
|
4330
|
+
* The transaction must be finished with a call to its `.finish()` method, at which point the transaction with all its
|
|
4331
|
+
* finished child spans will be sent to Sentry.
|
|
4332
|
+
*
|
|
4333
|
+
* @param context Properties of the new `Transaction`.
|
|
4334
|
+
* @param customSamplingContext Information given to the transaction sampling function (along with context-dependent
|
|
4335
|
+
* default values). See {@link Options.tracesSampler}.
|
|
4336
|
+
*
|
|
4337
|
+
* @returns The transaction which was just started
|
|
4338
|
+
*/
|
|
4339
|
+
function startTransaction(context, customSamplingContext) {
|
|
4340
|
+
return callOnHub('startTransaction', __assign({}, context), customSamplingContext);
|
|
4341
|
+
}
|
|
3542
4342
|
|
|
3543
4343
|
var SENTRY_API_VERSION = '7';
|
|
3544
4344
|
/**
|
|
@@ -4629,6 +5429,12 @@ var InboundFilters = /** @class */ (function () {
|
|
|
4629
5429
|
return InboundFilters;
|
|
4630
5430
|
}());
|
|
4631
5431
|
|
|
5432
|
+
const CoreIntegrations = /*#__PURE__*/Object.freeze({
|
|
5433
|
+
__proto__: null,
|
|
5434
|
+
FunctionToString: FunctionToString,
|
|
5435
|
+
InboundFilters: InboundFilters
|
|
5436
|
+
});
|
|
5437
|
+
|
|
4632
5438
|
/**
|
|
4633
5439
|
* This was originally forked from https://github.com/occ/TraceKit, but has since been
|
|
4634
5440
|
* largely modified and is now maintained as part of Sentry JS SDK.
|
|
@@ -5596,7 +6402,7 @@ function ignoreNextOnError() {
|
|
|
5596
6402
|
* @returns The wrapped function.
|
|
5597
6403
|
* @hidden
|
|
5598
6404
|
*/
|
|
5599
|
-
function wrap(fn, options, before) {
|
|
6405
|
+
function wrap$1(fn, options, before) {
|
|
5600
6406
|
if (options === void 0) { options = {}; }
|
|
5601
6407
|
if (typeof fn !== 'function') {
|
|
5602
6408
|
return fn;
|
|
@@ -5626,7 +6432,7 @@ function wrap(fn, options, before) {
|
|
|
5626
6432
|
before.apply(this, arguments);
|
|
5627
6433
|
}
|
|
5628
6434
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
|
|
5629
|
-
var wrappedArguments = args.map(function (arg) { return wrap(arg, options); });
|
|
6435
|
+
var wrappedArguments = args.map(function (arg) { return wrap$1(arg, options); });
|
|
5630
6436
|
if (fn.handleEvent) {
|
|
5631
6437
|
// Attempt to invoke user-land function
|
|
5632
6438
|
// NOTE: If you are a Sentry user, and you are seeing this stack frame, it
|
|
@@ -6000,7 +6806,7 @@ var TryCatch = /** @class */ (function () {
|
|
|
6000
6806
|
args[_i] = arguments[_i];
|
|
6001
6807
|
}
|
|
6002
6808
|
var originalCallback = args[0];
|
|
6003
|
-
args[0] = wrap(originalCallback, {
|
|
6809
|
+
args[0] = wrap$1(originalCallback, {
|
|
6004
6810
|
mechanism: {
|
|
6005
6811
|
data: { function: getFunctionName(original) },
|
|
6006
6812
|
handled: true,
|
|
@@ -6016,7 +6822,7 @@ var TryCatch = /** @class */ (function () {
|
|
|
6016
6822
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6017
6823
|
return function (callback) {
|
|
6018
6824
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
6019
|
-
return original.call(this, wrap(callback, {
|
|
6825
|
+
return original.call(this, wrap$1(callback, {
|
|
6020
6826
|
mechanism: {
|
|
6021
6827
|
data: {
|
|
6022
6828
|
function: 'requestAnimationFrame',
|
|
@@ -6042,7 +6848,7 @@ var TryCatch = /** @class */ (function () {
|
|
|
6042
6848
|
return function (eventName, fn, options) {
|
|
6043
6849
|
try {
|
|
6044
6850
|
if (typeof fn.handleEvent === 'function') {
|
|
6045
|
-
fn.handleEvent = wrap(fn.handleEvent.bind(fn), {
|
|
6851
|
+
fn.handleEvent = wrap$1(fn.handleEvent.bind(fn), {
|
|
6046
6852
|
mechanism: {
|
|
6047
6853
|
data: {
|
|
6048
6854
|
function: 'handleEvent',
|
|
@@ -6060,7 +6866,7 @@ var TryCatch = /** @class */ (function () {
|
|
|
6060
6866
|
}
|
|
6061
6867
|
return original.call(this, eventName,
|
|
6062
6868
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6063
|
-
wrap(fn, {
|
|
6869
|
+
wrap$1(fn, {
|
|
6064
6870
|
mechanism: {
|
|
6065
6871
|
data: {
|
|
6066
6872
|
function: 'addEventListener',
|
|
@@ -6137,7 +6943,7 @@ var TryCatch = /** @class */ (function () {
|
|
|
6137
6943
|
wrapOptions.mechanism.data.handler = getFunctionName(original.__sentry_original__);
|
|
6138
6944
|
}
|
|
6139
6945
|
// Otherwise wrap directly
|
|
6140
|
-
return wrap(original, wrapOptions);
|
|
6946
|
+
return wrap$1(original, wrapOptions);
|
|
6141
6947
|
});
|
|
6142
6948
|
}
|
|
6143
6949
|
});
|
|
@@ -6674,6 +7480,16 @@ var Dedupe = /** @class */ (function () {
|
|
|
6674
7480
|
return Dedupe;
|
|
6675
7481
|
}());
|
|
6676
7482
|
|
|
7483
|
+
const BrowserIntegrations = /*#__PURE__*/Object.freeze({
|
|
7484
|
+
__proto__: null,
|
|
7485
|
+
GlobalHandlers: GlobalHandlers,
|
|
7486
|
+
TryCatch: TryCatch,
|
|
7487
|
+
Breadcrumbs: Breadcrumbs,
|
|
7488
|
+
LinkedErrors: LinkedErrors,
|
|
7489
|
+
UserAgent: UserAgent,
|
|
7490
|
+
Dedupe: Dedupe
|
|
7491
|
+
});
|
|
7492
|
+
|
|
6677
7493
|
/**
|
|
6678
7494
|
* The Sentry Browser SDK Client.
|
|
6679
7495
|
*
|
|
@@ -6832,6 +7648,91 @@ function init(options) {
|
|
|
6832
7648
|
startSessionTracking();
|
|
6833
7649
|
}
|
|
6834
7650
|
}
|
|
7651
|
+
/**
|
|
7652
|
+
* Present the user with a report dialog.
|
|
7653
|
+
*
|
|
7654
|
+
* @param options Everything is optional, we try to fetch all info need from the global scope.
|
|
7655
|
+
*/
|
|
7656
|
+
function showReportDialog(options) {
|
|
7657
|
+
if (options === void 0) { options = {}; }
|
|
7658
|
+
var hub = getCurrentHub();
|
|
7659
|
+
var scope = hub.getScope();
|
|
7660
|
+
if (scope) {
|
|
7661
|
+
options.user = __assign(__assign({}, scope.getUser()), options.user);
|
|
7662
|
+
}
|
|
7663
|
+
if (!options.eventId) {
|
|
7664
|
+
options.eventId = hub.lastEventId();
|
|
7665
|
+
}
|
|
7666
|
+
var client = hub.getClient();
|
|
7667
|
+
if (client) {
|
|
7668
|
+
client.showReportDialog(options);
|
|
7669
|
+
}
|
|
7670
|
+
}
|
|
7671
|
+
/**
|
|
7672
|
+
* This is the getter for lastEventId.
|
|
7673
|
+
*
|
|
7674
|
+
* @returns The last event id of a captured event.
|
|
7675
|
+
*/
|
|
7676
|
+
function lastEventId() {
|
|
7677
|
+
return getCurrentHub().lastEventId();
|
|
7678
|
+
}
|
|
7679
|
+
/**
|
|
7680
|
+
* This function is here to be API compatible with the loader.
|
|
7681
|
+
* @hidden
|
|
7682
|
+
*/
|
|
7683
|
+
function forceLoad() {
|
|
7684
|
+
// Noop
|
|
7685
|
+
}
|
|
7686
|
+
/**
|
|
7687
|
+
* This function is here to be API compatible with the loader.
|
|
7688
|
+
* @hidden
|
|
7689
|
+
*/
|
|
7690
|
+
function onLoad(callback) {
|
|
7691
|
+
callback();
|
|
7692
|
+
}
|
|
7693
|
+
/**
|
|
7694
|
+
* Call `flush()` on the current client, if there is one. See {@link Client.flush}.
|
|
7695
|
+
*
|
|
7696
|
+
* @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause
|
|
7697
|
+
* the client to wait until all events are sent before resolving the promise.
|
|
7698
|
+
* @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it
|
|
7699
|
+
* doesn't (or if there's no client defined).
|
|
7700
|
+
*/
|
|
7701
|
+
function flush(timeout) {
|
|
7702
|
+
var client = getCurrentHub().getClient();
|
|
7703
|
+
if (client) {
|
|
7704
|
+
return client.flush(timeout);
|
|
7705
|
+
}
|
|
7706
|
+
logger.warn('Cannot flush events. No client defined.');
|
|
7707
|
+
return SyncPromise.resolve(false);
|
|
7708
|
+
}
|
|
7709
|
+
/**
|
|
7710
|
+
* Call `close()` on the current client, if there is one. See {@link Client.close}.
|
|
7711
|
+
*
|
|
7712
|
+
* @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this
|
|
7713
|
+
* parameter will cause the client to wait until all events are sent before disabling itself.
|
|
7714
|
+
* @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it
|
|
7715
|
+
* doesn't (or if there's no client defined).
|
|
7716
|
+
*/
|
|
7717
|
+
function close(timeout) {
|
|
7718
|
+
var client = getCurrentHub().getClient();
|
|
7719
|
+
if (client) {
|
|
7720
|
+
return client.close(timeout);
|
|
7721
|
+
}
|
|
7722
|
+
logger.warn('Cannot flush events and disable SDK. No client defined.');
|
|
7723
|
+
return SyncPromise.resolve(false);
|
|
7724
|
+
}
|
|
7725
|
+
/**
|
|
7726
|
+
* Wrap code within a try/catch block so the SDK is able to capture errors.
|
|
7727
|
+
*
|
|
7728
|
+
* @param fn A function to wrap.
|
|
7729
|
+
*
|
|
7730
|
+
* @returns The result of wrapped function call.
|
|
7731
|
+
*/
|
|
7732
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7733
|
+
function wrap(fn) {
|
|
7734
|
+
return wrap$1(fn)();
|
|
7735
|
+
}
|
|
6835
7736
|
/**
|
|
6836
7737
|
* Enable automatic Session Tracking for the initial page load.
|
|
6837
7738
|
*/
|
|
@@ -6873,6 +7774,17 @@ function startSessionTracking() {
|
|
|
6873
7774
|
});
|
|
6874
7775
|
}
|
|
6875
7776
|
|
|
7777
|
+
// TODO: Remove in the next major release and rely only on @sentry/core SDK_VERSION and SdkInfo metadata
|
|
7778
|
+
var SDK_NAME = 'sentry.javascript.browser';
|
|
7779
|
+
|
|
7780
|
+
var windowIntegrations = {};
|
|
7781
|
+
// This block is needed to add compatibility with the integrations packages when used with a CDN
|
|
7782
|
+
var _window = getGlobalObject();
|
|
7783
|
+
if (_window.Sentry && _window.Sentry.Integrations) {
|
|
7784
|
+
windowIntegrations = _window.Sentry.Integrations;
|
|
7785
|
+
}
|
|
7786
|
+
var INTEGRATIONS = __assign(__assign(__assign({}, windowIntegrations), CoreIntegrations), BrowserIntegrations);
|
|
7787
|
+
|
|
6876
7788
|
const getExeptionValues = (event) => { var _a, _b; return (_b = (_a = event === null || event === void 0 ? void 0 : event.exception) === null || _a === void 0 ? void 0 : _a.values) !== null && _b !== void 0 ? _b : []; };
|
|
6877
7789
|
const getExeptionStackFrames = (exeption) => { var _a, _b; return (_b = (_a = exeption === null || exeption === void 0 ? void 0 : exeption.stacktrace) === null || _a === void 0 ? void 0 : _a.frames) !== null && _b !== void 0 ? _b : []; };
|
|
6878
7790
|
const filterStackFrameByFilename = (query) => (frame) => {
|