@iblai/web-utils 1.11.7 → 1.11.9
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/auth/index.esm.js.map +1 -1
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/web-utils/src/__tests__/index.mobile.test.d.ts +7 -0
- package/dist/auth/web-utils/src/__tests__/index.web.test.d.ts +8 -0
- package/dist/auth/web-utils/src/constants/__tests__/chat.test.d.ts +1 -0
- package/dist/auth/web-utils/src/constants/chat.d.ts +8 -0
- package/dist/auth/web-utils/src/features/apple-restriction/__tests__/slice.test.d.ts +1 -0
- package/dist/auth/web-utils/src/features/apple-restriction/slice.d.ts +7 -0
- package/dist/auth/web-utils/src/features/chat/__tests__/slice.test.d.ts +1 -0
- package/dist/auth/web-utils/src/features/chat/slice.d.ts +164 -0
- package/dist/auth/web-utils/src/features/chat-input/__tests__/api-slice.test.d.ts +1 -0
- package/dist/auth/web-utils/src/features/chat-input/api-slice.d.ts +12 -0
- package/dist/auth/web-utils/src/features/csv/combine-csv.d.ts +35 -0
- package/dist/auth/web-utils/src/features/csv/index.d.ts +1 -0
- package/dist/auth/web-utils/src/features/files/__tests__/filesSlice.test.d.ts +1 -0
- package/dist/auth/web-utils/src/features/files/filesSlice.d.ts +23 -0
- package/dist/auth/web-utils/src/features/host-chat/__tests__/slice.test.d.ts +1 -0
- package/dist/auth/web-utils/src/features/host-chat/slice.d.ts +17 -0
- package/dist/auth/web-utils/src/features/index.d.ts +11 -0
- package/dist/auth/web-utils/src/features/monetization/__tests__/slice.test.d.ts +1 -0
- package/dist/auth/web-utils/src/features/monetization/slice.d.ts +16 -0
- package/dist/auth/web-utils/src/features/rbac/__tests__/rbac-slice.test.d.ts +1 -0
- package/dist/auth/web-utils/src/features/rbac/rbac-slice.d.ts +13 -0
- package/dist/auth/web-utils/src/features/subscription/__tests__/slice.test.d.ts +1 -0
- package/dist/auth/web-utils/src/features/subscription/constants.d.ts +12 -0
- package/dist/auth/web-utils/src/features/subscription/slice.d.ts +28 -0
- package/dist/auth/web-utils/src/features/top-banner/__tests__/slice.test.d.ts +1 -0
- package/dist/auth/web-utils/src/features/top-banner/slice.d.ts +24 -0
- package/dist/auth/web-utils/src/features/tracking/__tests__/time-tracker.test.d.ts +1 -0
- package/dist/auth/web-utils/src/features/tracking/examples.d.ts +4 -0
- package/dist/auth/web-utils/src/features/tracking/index.d.ts +6 -0
- package/dist/auth/web-utils/src/features/tracking/time-tracker.d.ts +29 -0
- package/dist/auth/web-utils/src/features/tracking/use-time-tracker-native.d.ts +14 -0
- package/dist/auth/web-utils/src/features/tracking/use-time-tracker.d.ts +14 -0
- package/dist/auth/web-utils/src/hoc/index.d.ts +2 -0
- package/dist/auth/web-utils/src/hoc/with-permissions.d.ts +44 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-accessing-public-route.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-cached-session-id.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-chat-file-upload.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-embed-mode.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-event-callback.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-event-listener.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-file-drag-drop.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-local-storage.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-mentor-settings.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-model-file-upload-capabilities.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-os.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-responsive.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-show-attachment.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-show-free-trial-dialog.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-show-voice-call.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-show-voice-recorder.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-timer.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-tokens.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-user-agreement.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-user.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-voice-chat.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-welcome-message.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/chat/__tests__/chat-history.utils.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/chat/chat-history.utils.d.ts +10 -0
- package/dist/auth/web-utils/src/hooks/chat/ollama-client.d.ts +57 -0
- package/dist/auth/web-utils/src/hooks/chat/use-advanced-chat.d.ts +61 -0
- package/dist/auth/web-utils/src/hooks/chat/use-advanced-chat.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/chat/use-chat-history.d.ts +17 -0
- package/dist/auth/web-utils/src/hooks/chat/use-chat-v2.d.ts +146 -0
- package/dist/auth/web-utils/src/hooks/chat/use-chat-v2.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/chat/use-chat.d.ts +53 -0
- package/dist/auth/web-utils/src/hooks/chat/use-get-chat-details.d.ts +14 -0
- package/dist/auth/web-utils/src/hooks/chat/use-get-chat-details.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/chat/use-mentor-tools.d.ts +24 -0
- package/dist/auth/web-utils/src/hooks/chat/use-mentor-tools.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/index.d.ts +42 -0
- package/dist/auth/web-utils/src/hooks/profile/use-profile-image-upload.d.ts +13 -0
- package/dist/auth/web-utils/src/hooks/profile/use-user-profile-update.d.ts +28 -0
- package/dist/auth/web-utils/src/hooks/stripe/__tests__/use-stripe-upgrade.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/stripe/use-stripe-upgrade.d.ts +14 -0
- package/dist/auth/web-utils/src/hooks/subscription/class-subscription-flow.d.ts +70 -0
- package/dist/auth/web-utils/src/hooks/subscription/constants.d.ts +4 -0
- package/dist/auth/web-utils/src/hooks/subscription/use-subscription-handler.d.ts +11 -0
- package/dist/auth/web-utils/src/hooks/subscription-v2/__tests__/use-402-error-check.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/subscription-v2/class-subscription-flow.d.ts +78 -0
- package/dist/auth/web-utils/src/hooks/subscription-v2/constants.d.ts +56 -0
- package/dist/auth/web-utils/src/hooks/subscription-v2/use-402-error-check.d.ts +22 -0
- package/dist/auth/web-utils/src/hooks/subscription-v2/use-external-pricing-plan.d.ts +7 -0
- package/dist/auth/web-utils/src/hooks/subscription-v2/use-subscription-handler.d.ts +71 -0
- package/dist/auth/web-utils/src/hooks/tenant-metadata/__tests__/config-loader.test.d.ts +10 -0
- package/dist/auth/web-utils/src/hooks/tenant-metadata/__tests__/use-tenant-metadata.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/tenant-metadata/config-loader.d.ts +41 -0
- package/dist/auth/web-utils/src/hooks/tenant-metadata/constants.d.ts +9 -0
- package/dist/auth/web-utils/src/hooks/tenant-metadata/index.d.ts +5 -0
- package/dist/auth/web-utils/src/hooks/tenant-metadata/types.d.ts +9 -0
- package/dist/auth/web-utils/src/hooks/tenant-metadata/use-tenant-metadata.d.ts +29 -0
- package/dist/auth/web-utils/src/hooks/use-accessing-public-route.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/use-cached-session-id.d.ts +8 -0
- package/dist/auth/web-utils/src/hooks/use-chat-file-upload.d.ts +17 -0
- package/dist/auth/web-utils/src/hooks/use-day-js.d.ts +7 -0
- package/dist/auth/web-utils/src/hooks/use-embed-mode.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/use-event-callback.d.ts +2 -0
- package/dist/auth/web-utils/src/hooks/use-event-listener.d.ts +6 -0
- package/dist/auth/web-utils/src/hooks/use-file-drag-drop.d.ts +15 -0
- package/dist/auth/web-utils/src/hooks/use-isomorphic-layout-effect.d.ts +2 -0
- package/dist/auth/web-utils/src/hooks/use-local-storage.d.ts +13 -0
- package/dist/auth/web-utils/src/hooks/use-mentor-settings.d.ts +46 -0
- package/dist/auth/web-utils/src/hooks/use-model-file-upload-capabilities.d.ts +21 -0
- package/dist/auth/web-utils/src/hooks/use-os.d.ts +8 -0
- package/dist/auth/web-utils/src/hooks/use-responsive.d.ts +13 -0
- package/dist/auth/web-utils/src/hooks/use-show-attachment.d.ts +7 -0
- package/dist/auth/web-utils/src/hooks/use-show-free-trial-dialog.d.ts +31 -0
- package/dist/auth/web-utils/src/hooks/use-show-voice-call.d.ts +7 -0
- package/dist/auth/web-utils/src/hooks/use-show-voice-recorder.d.ts +7 -0
- package/dist/auth/web-utils/src/hooks/use-tenant-switch-sync.d.ts +13 -0
- package/dist/auth/web-utils/src/hooks/use-timer.d.ts +7 -0
- package/dist/auth/web-utils/src/hooks/use-tokens.d.ts +2 -0
- package/dist/auth/web-utils/src/hooks/use-user-agreement.d.ts +18 -0
- package/dist/auth/web-utils/src/hooks/use-user.d.ts +23 -0
- package/dist/auth/web-utils/src/hooks/use-voice-chat.d.ts +11 -0
- package/dist/auth/web-utils/src/hooks/use-welcome-message.d.ts +16 -0
- package/dist/auth/web-utils/src/index.d.ts +8 -0
- package/dist/auth/web-utils/src/index.mobile.d.ts +86 -0
- package/dist/auth/web-utils/src/index.web.d.ts +142 -0
- package/dist/auth/web-utils/src/providers/__tests__/auth-provider.test.d.ts +1 -0
- package/dist/auth/web-utils/src/providers/__tests__/mentor-provider.test.d.ts +1 -0
- package/dist/auth/web-utils/src/providers/__tests__/service-worker-provider.test.d.ts +1 -0
- package/dist/auth/web-utils/src/providers/__tests__/tenant-provider.test.d.ts +1 -0
- package/dist/auth/web-utils/src/providers/auth-provider.d.ts +129 -0
- package/dist/auth/web-utils/src/providers/index.d.ts +4 -0
- package/dist/auth/web-utils/src/providers/mentor-provider.d.ts +44 -0
- package/dist/auth/web-utils/src/providers/service-worker-provider.d.ts +21 -0
- package/dist/auth/web-utils/src/providers/tenant-provider.d.ts +77 -0
- package/dist/auth/web-utils/src/services/__tests__/event-bus.test.d.ts +1 -0
- package/dist/auth/web-utils/src/services/__tests__/file-upload.test.d.ts +1 -0
- package/dist/auth/web-utils/src/services/__tests__/register-sw.test.d.ts +1 -0
- package/dist/auth/web-utils/src/services/event-bus.d.ts +6 -0
- package/dist/auth/web-utils/src/services/file-upload.d.ts +60 -0
- package/dist/auth/web-utils/src/services/index.d.ts +3 -0
- package/dist/auth/web-utils/src/services/register-sw.d.ts +71 -0
- package/dist/auth/web-utils/src/types/chat.d.ts +1 -0
- package/dist/auth/web-utils/src/types/file-upload.d.ts +62 -0
- package/dist/auth/web-utils/src/types/index.d.ts +68 -0
- package/dist/auth/web-utils/src/types/subscription.d.ts +40 -0
- package/dist/auth/web-utils/src/utils/__tests__/auth.test.d.ts +1 -0
- package/dist/auth/web-utils/src/utils/__tests__/constants.test.d.ts +1 -0
- package/dist/auth/web-utils/src/utils/__tests__/helpers.test.d.ts +1 -0
- package/dist/auth/web-utils/src/utils/__tests__/platform.test.d.ts +1 -0
- package/dist/auth/web-utils/src/utils/__tests__/tauri-api-cache.test.d.ts +1 -0
- package/dist/auth/web-utils/src/utils/__tests__/tenant-switch.test.d.ts +1 -0
- package/dist/auth/web-utils/src/utils/constants.d.ts +69 -0
- package/dist/auth/web-utils/src/utils/data/__tests__/advanced-tab.test.d.ts +1 -0
- package/dist/auth/web-utils/src/utils/data/advanced-tab.d.ts +62 -0
- package/dist/auth/web-utils/src/utils/helpers.d.ts +33 -0
- package/dist/auth/web-utils/src/utils/index.d.ts +6 -0
- package/dist/auth/web-utils/src/utils/platform.d.ts +9 -0
- package/dist/auth/web-utils/src/utils/tauri-api-cache.d.ts +19 -0
- package/dist/index.esm.js +581 -266
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +594 -279
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -2
- package/dist/web-utils/src/hooks/chat/use-advanced-chat.d.ts +4 -4
- package/dist/web-utils/src/hooks/subscription-v2/use-subscription-handler.d.ts +3 -3
- package/dist/web-utils/src/hooks/tenant-metadata/use-tenant-metadata.d.ts +3 -3
- package/dist/web-utils/src/hooks/use-isomorphic-layout-effect.d.ts +2 -2
- package/dist/web-utils/src/hooks/use-mentor-settings.d.ts +21 -21
- package/dist/web-utils/src/hooks/use-user-agreement.d.ts +3 -6
- package/dist/web-utils/tsconfig.tsbuildinfo +1 -0
- package/package.json +1 -2
- package/dist/data-layer/src/config.d.ts +0 -8
- package/dist/data-layer/src/constants.d.ts +0 -31
- package/dist/data-layer/src/core/index.d.ts +0 -11
- package/dist/data-layer/src/features/analytics/api-slice.d.ts +0 -3756
- package/dist/data-layer/src/features/analytics/constants.d.ts +0 -133
- package/dist/data-layer/src/features/analytics/custom-api-slice.d.ts +0 -311
- package/dist/data-layer/src/features/analytics/types.d.ts +0 -696
- package/dist/data-layer/src/features/api-keys/api-slice.d.ts +0 -702
- package/dist/data-layer/src/features/apps/api-slice.d.ts +0 -720
- package/dist/data-layer/src/features/artifacts/api-slice.d.ts +0 -1798
- package/dist/data-layer/src/features/artifacts/constants.d.ts +0 -42
- package/dist/data-layer/src/features/artifacts/types.d.ts +0 -37
- package/dist/data-layer/src/features/audit-logs/api-slice.d.ts +0 -268
- package/dist/data-layer/src/features/audit-logs/constants.d.ts +0 -11
- package/dist/data-layer/src/features/audit-logs/types.d.ts +0 -32
- package/dist/data-layer/src/features/auth/api-slice.d.ts +0 -639
- package/dist/data-layer/src/features/auth/constants.d.ts +0 -20
- package/dist/data-layer/src/features/auth/types.d.ts +0 -33
- package/dist/data-layer/src/features/billing/api-slice.d.ts +0 -359
- package/dist/data-layer/src/features/billing/constants.d.ts +0 -16
- package/dist/data-layer/src/features/billing/custom-api-slice.d.ts +0 -634
- package/dist/data-layer/src/features/billing/types.d.ts +0 -36
- package/dist/data-layer/src/features/call-configurations/api-slice.d.ts +0 -855
- package/dist/data-layer/src/features/call-configurations/constants.d.ts +0 -16
- package/dist/data-layer/src/features/call-configurations/types.d.ts +0 -49
- package/dist/data-layer/src/features/career/api-slice.d.ts +0 -3080
- package/dist/data-layer/src/features/catalog/api-slice.d.ts +0 -10260
- package/dist/data-layer/src/features/chat/api-slice.d.ts +0 -1977
- package/dist/data-layer/src/features/chat/constants.d.ts +0 -8
- package/dist/data-layer/src/features/chat/custom-api-slice.d.ts +0 -272
- package/dist/data-layer/src/features/chat-files/api-slice.d.ts +0 -185
- package/dist/data-layer/src/features/chat-files/types.d.ts +0 -32
- package/dist/data-layer/src/features/chat-history/api-slice.d.ts +0 -1528
- package/dist/data-layer/src/features/chat-privacy/api-slice.d.ts +0 -1398
- package/dist/data-layer/src/features/chat-privacy/constants.d.ts +0 -13
- package/dist/data-layer/src/features/claw/api-slice.d.ts +0 -5471
- package/dist/data-layer/src/features/claw/constants.d.ts +0 -126
- package/dist/data-layer/src/features/claw/types.d.ts +0 -275
- package/dist/data-layer/src/features/constants.d.ts +0 -3
- package/dist/data-layer/src/features/core/api-slice.d.ts +0 -6188
- package/dist/data-layer/src/features/core/constants.d.ts +0 -51
- package/dist/data-layer/src/features/core/custom-api-slice.d.ts +0 -1766
- package/dist/data-layer/src/features/core/custom-public-image-asset-api-slice.d.ts +0 -373
- package/dist/data-layer/src/features/core/types.d.ts +0 -73
- package/dist/data-layer/src/features/course-metadata/api-slice.d.ts +0 -1728
- package/dist/data-layer/src/features/course-metadata/types.d.ts +0 -179
- package/dist/data-layer/src/features/courses/api-slice.d.ts +0 -664
- package/dist/data-layer/src/features/courses/types.d.ts +0 -26
- package/dist/data-layer/src/features/credentials/api-slice.d.ts +0 -6360
- package/dist/data-layer/src/features/credentials/constants.d.ts +0 -36
- package/dist/data-layer/src/features/credentials/custom-api-slice.d.ts +0 -1839
- package/dist/data-layer/src/features/credentials/types.d.ts +0 -39
- package/dist/data-layer/src/features/custom-domain/api-slice.d.ts +0 -602
- package/dist/data-layer/src/features/custom-domain/constants.d.ts +0 -20
- package/dist/data-layer/src/features/custom-domain/types.d.ts +0 -46
- package/dist/data-layer/src/features/datasets/api-slice.d.ts +0 -439
- package/dist/data-layer/src/features/disclaimers/api-slice.d.ts +0 -912
- package/dist/data-layer/src/features/disclaimers/constants.d.ts +0 -27
- package/dist/data-layer/src/features/disclaimers/types.d.ts +0 -67
- package/dist/data-layer/src/features/edx-proctoring/api-slice.d.ts +0 -590
- package/dist/data-layer/src/features/edx-proctoring/constants.d.ts +0 -15
- package/dist/data-layer/src/features/edx-proctoring/types.d.ts +0 -61
- package/dist/data-layer/src/features/edx-sso/api-slice.d.ts +0 -334
- package/dist/data-layer/src/features/edx-sso/types.d.ts +0 -10
- package/dist/data-layer/src/features/llms/api-slice.d.ts +0 -373
- package/dist/data-layer/src/features/mcp/api-slice.d.ts +0 -2613
- package/dist/data-layer/src/features/mcp/constants.d.ts +0 -57
- package/dist/data-layer/src/features/mcp/types.d.ts +0 -176
- package/dist/data-layer/src/features/memory/api-slice.d.ts +0 -3462
- package/dist/data-layer/src/features/memory/constants.d.ts +0 -80
- package/dist/data-layer/src/features/memory/types.d.ts +0 -190
- package/dist/data-layer/src/features/mentor/api-slice.d.ts +0 -7984
- package/dist/data-layer/src/features/mentor/constants.d.ts +0 -45
- package/dist/data-layer/src/features/mentor/custom-api-slice.d.ts +0 -957
- package/dist/data-layer/src/features/mentor/privacy.d.ts +0 -61
- package/dist/data-layer/src/features/mentor/types.d.ts +0 -83
- package/dist/data-layer/src/features/mentor-categories/api-slice.d.ts +0 -785
- package/dist/data-layer/src/features/moderation-logs/api-slice.d.ts +0 -705
- package/dist/data-layer/src/features/monetization/constants.d.ts +0 -76
- package/dist/data-layer/src/features/monetization/custom-api-slice.d.ts +0 -5178
- package/dist/data-layer/src/features/monetization/types.d.ts +0 -229
- package/dist/data-layer/src/features/notifications/api-slice.d.ts +0 -1728
- package/dist/data-layer/src/features/notifications/constants.d.ts +0 -26
- package/dist/data-layer/src/features/notifications/custom-api-slice.d.ts +0 -996
- package/dist/data-layer/src/features/notifications/types.d.ts +0 -69
- package/dist/data-layer/src/features/per-learner/api-slice.d.ts +0 -1329
- package/dist/data-layer/src/features/periodic-agents/api-slice.d.ts +0 -2347
- package/dist/data-layer/src/features/platform/api-slice.d.ts +0 -2553
- package/dist/data-layer/src/features/platform/constants.d.ts +0 -17
- package/dist/data-layer/src/features/platform/custom-api-slice.d.ts +0 -493
- package/dist/data-layer/src/features/platform/types.d.ts +0 -61
- package/dist/data-layer/src/features/projects/api-slice.d.ts +0 -2026
- package/dist/data-layer/src/features/projects/constants.d.ts +0 -51
- package/dist/data-layer/src/features/projects/types.d.ts +0 -79
- package/dist/data-layer/src/features/prompts/api-slice.d.ts +0 -2464
- package/dist/data-layer/src/features/reports/api-slice.d.ts +0 -789
- package/dist/data-layer/src/features/retirement/api-slice.d.ts +0 -165
- package/dist/data-layer/src/features/retirement/constants.d.ts +0 -7
- package/dist/data-layer/src/features/retirement/types.d.ts +0 -3
- package/dist/data-layer/src/features/search/ai-search-api-slice.d.ts +0 -1413
- package/dist/data-layer/src/features/search/api-slice.d.ts +0 -2017
- package/dist/data-layer/src/features/search/constants.d.ts +0 -41
- package/dist/data-layer/src/features/search/types.d.ts +0 -161
- package/dist/data-layer/src/features/sessions/api-slice.d.ts +0 -969
- package/dist/data-layer/src/features/sessions/constants.d.ts +0 -3
- package/dist/data-layer/src/features/sessions/url.d.ts +0 -9
- package/dist/data-layer/src/features/skills/api-slice.d.ts +0 -1389
- package/dist/data-layer/src/features/stripe/api-slice.d.ts +0 -803
- package/dist/data-layer/src/features/stripe/constants.d.ts +0 -19
- package/dist/data-layer/src/features/stripe/types.d.ts +0 -19
- package/dist/data-layer/src/features/tenant/api-slice.d.ts +0 -832
- package/dist/data-layer/src/features/tenant/constants.d.ts +0 -11
- package/dist/data-layer/src/features/tenant/types.d.ts +0 -19
- package/dist/data-layer/src/features/tenant-logo/api-slice.d.ts +0 -349
- package/dist/data-layer/src/features/tenant-logo/constants.d.ts +0 -24
- package/dist/data-layer/src/features/tools/api-slice.d.ts +0 -417
- package/dist/data-layer/src/features/training-documents/api-slice.d.ts +0 -1523
- package/dist/data-layer/src/features/user/api-slice.d.ts +0 -2128
- package/dist/data-layer/src/features/user/constants.d.ts +0 -47
- package/dist/data-layer/src/features/user/types.d.ts +0 -134
- package/dist/data-layer/src/features/user-invitations/api-slice.d.ts +0 -762
- package/dist/data-layer/src/features/utils.d.ts +0 -94
- package/dist/data-layer/src/features/watched-groups/api-slice.d.ts +0 -2481
- package/dist/data-layer/src/features/watched-groups/constants.d.ts +0 -66
- package/dist/data-layer/src/features/watched-groups/types.d.ts +0 -143
- package/dist/data-layer/src/features/workflows/api-slice.d.ts +0 -2454
- package/dist/data-layer/src/features/workflows/constants.d.ts +0 -57
- package/dist/data-layer/src/features/workflows/types.d.ts +0 -130
- package/dist/data-layer/src/index.d.ts +0 -121
- package/dist/data-layer/src/reducers/index.d.ts +0 -2
- package/dist/data-layer/src/reducers/mentor.d.ts +0 -2
- package/dist/data-layer/src/reducers/skills.d.ts +0 -2
- package/dist/data-layer/src/services/StorageService.d.ts +0 -5
- package/dist/data-layer/src/utils/index.d.ts +0 -6
package/dist/index.js
CHANGED
|
@@ -9,20 +9,20 @@ var iblaiApi = require('@iblai/iblai-api');
|
|
|
9
9
|
var axios = require('axios');
|
|
10
10
|
|
|
11
11
|
function _interopNamespaceDefault(e) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
var n = Object.create(null);
|
|
13
|
+
if (e) {
|
|
14
|
+
Object.keys(e).forEach(function (k) {
|
|
15
|
+
if (k !== 'default') {
|
|
16
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return e[k]; }
|
|
20
|
+
});
|
|
21
|
+
}
|
|
20
22
|
});
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
n.default = e;
|
|
25
|
-
return Object.freeze(n);
|
|
23
|
+
}
|
|
24
|
+
n.default = e;
|
|
25
|
+
return Object.freeze(n);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
@@ -10407,7 +10407,7 @@ function MentorProvider({ children, fallback, onAuthSuccess, onAuthFailure, redi
|
|
|
10407
10407
|
* Returns the mentor object if found, undefined otherwise
|
|
10408
10408
|
*/
|
|
10409
10409
|
async function determineMentorToRedirectTo() {
|
|
10410
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
10410
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
10411
10411
|
setIsLoading(true);
|
|
10412
10412
|
try {
|
|
10413
10413
|
// Get the user's recent mentors
|
|
@@ -10442,9 +10442,9 @@ function MentorProvider({ children, fallback, onAuthSuccess, onAuthFailure, redi
|
|
|
10442
10442
|
console.log("[determineMentorToRedirectTo] starredMentors ", starredMentors);
|
|
10443
10443
|
if (starredMentors && starredMentors.length > 0) {
|
|
10444
10444
|
const starredMentor = starredMentors[0];
|
|
10445
|
-
|
|
10446
|
-
if (
|
|
10447
|
-
return starredMentor;
|
|
10445
|
+
const uniqueId = (_a = starredMentor === null || starredMentor === void 0 ? void 0 : starredMentor.unique_id) !== null && _a !== void 0 ? _a : starredMentor === null || starredMentor === void 0 ? void 0 : starredMentor.mentor;
|
|
10446
|
+
if (uniqueId) {
|
|
10447
|
+
return { ...starredMentor, unique_id: uniqueId };
|
|
10448
10448
|
}
|
|
10449
10449
|
}
|
|
10450
10450
|
console.log("[determineMentorToRedirectTo] recentMentors ", recentMentors);
|
|
@@ -10461,12 +10461,12 @@ function MentorProvider({ children, fallback, onAuthSuccess, onAuthFailure, redi
|
|
|
10461
10461
|
orderBy: "recently_accessed_at",
|
|
10462
10462
|
});
|
|
10463
10463
|
console.log("[determineMentorToRedirectTo] recentMentorsResult ", recentMentorsResult);
|
|
10464
|
-
recentMentors = ((
|
|
10464
|
+
recentMentors = ((_b = recentMentorsResult.data) === null || _b === void 0 ? void 0 : _b.results) || [];
|
|
10465
10465
|
// Check if we found recent mentors for the tenant
|
|
10466
10466
|
if (recentMentors.length > 0) {
|
|
10467
10467
|
console.log("found recent mentor", JSON.stringify({
|
|
10468
|
-
selectedMentorId: (
|
|
10469
|
-
mentorName: (
|
|
10468
|
+
selectedMentorId: (_c = recentMentors[0]) === null || _c === void 0 ? void 0 : _c.unique_id,
|
|
10469
|
+
mentorName: (_d = recentMentors[0]) === null || _d === void 0 ? void 0 : _d.name,
|
|
10470
10470
|
tenantKey,
|
|
10471
10471
|
}));
|
|
10472
10472
|
return recentMentors[0];
|
|
@@ -10482,7 +10482,7 @@ function MentorProvider({ children, fallback, onAuthSuccess, onAuthFailure, redi
|
|
|
10482
10482
|
limit: QUERY_LIMIT,
|
|
10483
10483
|
orderBy: "recently_accessed_at",
|
|
10484
10484
|
});
|
|
10485
|
-
const featuredMentors = ((
|
|
10485
|
+
const featuredMentors = ((_e = featuredMentorsResult.data) === null || _e === void 0 ? void 0 : _e.results) || [];
|
|
10486
10486
|
console.log("featured mentors fetched", {
|
|
10487
10487
|
count: featuredMentors.length,
|
|
10488
10488
|
mentorIds: featuredMentors.map((m) => m === null || m === void 0 ? void 0 : m.unique_id),
|
|
@@ -10526,8 +10526,8 @@ function MentorProvider({ children, fallback, onAuthSuccess, onAuthFailure, redi
|
|
|
10526
10526
|
}
|
|
10527
10527
|
// If no default mentor, select the first featured mentor
|
|
10528
10528
|
console.log("found first featured mentor", {
|
|
10529
|
-
mentorId: (
|
|
10530
|
-
mentorName: (
|
|
10529
|
+
mentorId: (_f = featuredMentors[0]) === null || _f === void 0 ? void 0 : _f.unique_id,
|
|
10530
|
+
mentorName: (_g = featuredMentors[0]) === null || _g === void 0 ? void 0 : _g.name,
|
|
10531
10531
|
});
|
|
10532
10532
|
return featuredMentors[0];
|
|
10533
10533
|
}
|
|
@@ -10542,7 +10542,7 @@ function MentorProvider({ children, fallback, onAuthSuccess, onAuthFailure, redi
|
|
|
10542
10542
|
limit: QUERY_LIMIT,
|
|
10543
10543
|
orderBy: "recently_accessed_at",
|
|
10544
10544
|
});
|
|
10545
|
-
const nonFeaturedMentors = ((
|
|
10545
|
+
const nonFeaturedMentors = ((_h = nonFeaturedMentorsResult.data) === null || _h === void 0 ? void 0 : _h.results) || [];
|
|
10546
10546
|
console.log("non-featured mentors fetched", {
|
|
10547
10547
|
count: nonFeaturedMentors.length,
|
|
10548
10548
|
mentorIds: nonFeaturedMentors.map((m) => m === null || m === void 0 ? void 0 : m.unique_id),
|
|
@@ -10550,8 +10550,8 @@ function MentorProvider({ children, fallback, onAuthSuccess, onAuthFailure, redi
|
|
|
10550
10550
|
// Check if we found non-featured mentors
|
|
10551
10551
|
if (nonFeaturedMentors.length > 0) {
|
|
10552
10552
|
console.log("found first non-featured mentor", {
|
|
10553
|
-
mentorId: (
|
|
10554
|
-
mentorName: (
|
|
10553
|
+
mentorId: (_j = nonFeaturedMentors[0]) === null || _j === void 0 ? void 0 : _j.unique_id,
|
|
10554
|
+
mentorName: (_k = nonFeaturedMentors[0]) === null || _k === void 0 ? void 0 : _k.name,
|
|
10555
10555
|
});
|
|
10556
10556
|
return nonFeaturedMentors[0];
|
|
10557
10557
|
}
|
|
@@ -10572,7 +10572,7 @@ function MentorProvider({ children, fallback, onAuthSuccess, onAuthFailure, redi
|
|
|
10572
10572
|
// @ts-expect-error - userId is passed but not in generated API types
|
|
10573
10573
|
userId: username,
|
|
10574
10574
|
});
|
|
10575
|
-
const seededMentorsDetails = (
|
|
10575
|
+
const seededMentorsDetails = (_l = seedMentorsResult.data) === null || _l === void 0 ? void 0 : _l.detail;
|
|
10576
10576
|
console.log("mentor seeding completed", {
|
|
10577
10577
|
success: !!seededMentorsDetails,
|
|
10578
10578
|
details: seededMentorsDetails,
|
|
@@ -10586,15 +10586,15 @@ function MentorProvider({ children, fallback, onAuthSuccess, onAuthFailure, redi
|
|
|
10586
10586
|
username,
|
|
10587
10587
|
limit: QUERY_LIMIT,
|
|
10588
10588
|
});
|
|
10589
|
-
const featuredMentorsAfterSeed = ((
|
|
10589
|
+
const featuredMentorsAfterSeed = ((_m = featuredMentorsAfterSeedResult.data) === null || _m === void 0 ? void 0 : _m.results) || [];
|
|
10590
10590
|
console.log("featured mentors after seeding", {
|
|
10591
10591
|
count: featuredMentorsAfterSeed.length,
|
|
10592
10592
|
mentorIds: featuredMentorsAfterSeed.map((m) => m === null || m === void 0 ? void 0 : m.unique_id),
|
|
10593
10593
|
});
|
|
10594
10594
|
if (featuredMentorsAfterSeed.length > 0) {
|
|
10595
10595
|
console.log("found seeded mentor", {
|
|
10596
|
-
mentorId: (
|
|
10597
|
-
mentorName: (
|
|
10596
|
+
mentorId: (_o = featuredMentorsAfterSeed[0]) === null || _o === void 0 ? void 0 : _o.unique_id,
|
|
10597
|
+
mentorName: (_p = featuredMentorsAfterSeed[0]) === null || _p === void 0 ? void 0 : _p.name,
|
|
10598
10598
|
});
|
|
10599
10599
|
return featuredMentorsAfterSeed[0];
|
|
10600
10600
|
}
|
|
@@ -14499,6 +14499,7 @@ function useAdvancedChat({ tenantKey, mentorId, username = ANONYMOUS_USERNAME, t
|
|
|
14499
14499
|
// `addUserMessage`) between the two `getChats` resolutions.
|
|
14500
14500
|
const startNewChatInFlightRef = React.useRef(false);
|
|
14501
14501
|
const startNewChat = React.useCallback(async () => {
|
|
14502
|
+
var _a, _b, _c;
|
|
14502
14503
|
// Reset all chat state
|
|
14503
14504
|
if (!showingSharedChat) {
|
|
14504
14505
|
dispatch(chatActions.resetChats(undefined));
|
|
@@ -14531,6 +14532,10 @@ function useAdvancedChat({ tenantKey, mentorId, username = ANONYMOUS_USERNAME, t
|
|
|
14531
14532
|
requestBody,
|
|
14532
14533
|
}).unwrap();
|
|
14533
14534
|
dispatch(chatActions.updateSessionIds(response.session_id));
|
|
14535
|
+
// The backend is the source of truth for which tools/artifacts are
|
|
14536
|
+
// enabled by default; seed the UI toggles from the create-session response.
|
|
14537
|
+
dispatch(chatActions.setTools((_b = (_a = response.tools) === null || _a === void 0 ? void 0 : _a.map((t) => t.slug).filter(Boolean)) !== null && _b !== void 0 ? _b : []));
|
|
14538
|
+
dispatch(chatActions.setArtifactsEnabled((_c = response.enable_artifacts) !== null && _c !== void 0 ? _c : false));
|
|
14534
14539
|
onStartNewChat === null || onStartNewChat === void 0 ? void 0 : onStartNewChat(response.session_id);
|
|
14535
14540
|
}
|
|
14536
14541
|
catch (error) {
|
|
@@ -14650,7 +14655,7 @@ function useAdvancedChat({ tenantKey, mentorId, username = ANONYMOUS_USERNAME, t
|
|
|
14650
14655
|
sendMessage,
|
|
14651
14656
|
]);
|
|
14652
14657
|
async function changeTab(tab) {
|
|
14653
|
-
var _a, _b, _c, _d;
|
|
14658
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
14654
14659
|
// while responding to a message, do not change the tab
|
|
14655
14660
|
if (streaming) {
|
|
14656
14661
|
errorHandler === null || errorHandler === void 0 ? void 0 : errorHandler("Cannot change tab while streaming");
|
|
@@ -14679,14 +14684,18 @@ function useAdvancedChat({ tenantKey, mentorId, username = ANONYMOUS_USERNAME, t
|
|
|
14679
14684
|
requestBody,
|
|
14680
14685
|
}).unwrap();
|
|
14681
14686
|
dispatch(chatActions.updateSessionIds(response.session_id));
|
|
14687
|
+
// The backend is the source of truth for which tools/artifacts are
|
|
14688
|
+
// enabled by default; seed the UI toggles from the create-session response.
|
|
14689
|
+
dispatch(chatActions.setTools((_b = (_a = response.tools) === null || _a === void 0 ? void 0 : _a.map((t) => t.slug).filter(Boolean)) !== null && _b !== void 0 ? _b : []));
|
|
14690
|
+
dispatch(chatActions.setArtifactsEnabled((_c = response.enable_artifacts) !== null && _c !== void 0 ? _c : false));
|
|
14682
14691
|
// if the tab we are going to activate has no session Id (this is the first time we are creating the session for this tag)
|
|
14683
14692
|
// we need to send a proactive prompt if the advanced tabs properties has no tag.
|
|
14684
14693
|
// (presence of tag indicates an ACTIONABLE UI)
|
|
14685
|
-
if (!((
|
|
14686
|
-
for (const prompt of (
|
|
14694
|
+
if (!((_d = advancedTabsProperties[tab]) === null || _d === void 0 ? void 0 : _d.tag)) {
|
|
14695
|
+
for (const prompt of (_f = (_e = advancedTabsProperties[tab]) === null || _e === void 0 ? void 0 : _e.prompts) !== null && _f !== void 0 ? _f : []) {
|
|
14687
14696
|
// @ts-expect-error - Type mismatch
|
|
14688
14697
|
if (prompt.type === "human" && (prompt === null || prompt === void 0 ? void 0 : prompt.proactive)) {
|
|
14689
|
-
sendMessage(tab, (
|
|
14698
|
+
sendMessage(tab, (_g = prompt.content) !== null && _g !== void 0 ? _g : "", { visible: false });
|
|
14690
14699
|
}
|
|
14691
14700
|
}
|
|
14692
14701
|
}
|
|
@@ -15836,6 +15845,9 @@ function requireDynamicRenderingUtils () {
|
|
|
15836
15845
|
isHangingPromiseRejectionError: function() {
|
|
15837
15846
|
return isHangingPromiseRejectionError;
|
|
15838
15847
|
},
|
|
15848
|
+
makeDevtoolsIOAwarePromise: function() {
|
|
15849
|
+
return makeDevtoolsIOAwarePromise;
|
|
15850
|
+
},
|
|
15839
15851
|
makeHangingPromise: function() {
|
|
15840
15852
|
return makeHangingPromise;
|
|
15841
15853
|
}
|
|
@@ -15848,17 +15860,17 @@ function requireDynamicRenderingUtils () {
|
|
|
15848
15860
|
}
|
|
15849
15861
|
const HANGING_PROMISE_REJECTION = 'HANGING_PROMISE_REJECTION';
|
|
15850
15862
|
class HangingPromiseRejectionError extends Error {
|
|
15851
|
-
constructor(expression){
|
|
15852
|
-
super(`During prerendering, ${expression} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${expression} to a different context by using \`setTimeout\`, \`after\`, or similar functions you may observe this error and you should handle it in that context.`), this.expression = expression, this.digest = HANGING_PROMISE_REJECTION;
|
|
15863
|
+
constructor(route, expression){
|
|
15864
|
+
super(`During prerendering, ${expression} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${expression} to a different context by using \`setTimeout\`, \`after\`, or similar functions you may observe this error and you should handle it in that context. This occurred at route "${route}".`), this.route = route, this.expression = expression, this.digest = HANGING_PROMISE_REJECTION;
|
|
15853
15865
|
}
|
|
15854
15866
|
}
|
|
15855
15867
|
const abortListenersBySignal = new WeakMap();
|
|
15856
|
-
function makeHangingPromise(signal, expression) {
|
|
15868
|
+
function makeHangingPromise(signal, route, expression) {
|
|
15857
15869
|
if (signal.aborted) {
|
|
15858
|
-
return Promise.reject(new HangingPromiseRejectionError(expression));
|
|
15870
|
+
return Promise.reject(new HangingPromiseRejectionError(route, expression));
|
|
15859
15871
|
} else {
|
|
15860
15872
|
const hangingPromise = new Promise((_, reject)=>{
|
|
15861
|
-
const boundRejection = reject.bind(null, new HangingPromiseRejectionError(expression));
|
|
15873
|
+
const boundRejection = reject.bind(null, new HangingPromiseRejectionError(route, expression));
|
|
15862
15874
|
let currentListeners = abortListenersBySignal.get(signal);
|
|
15863
15875
|
if (currentListeners) {
|
|
15864
15876
|
currentListeners.push(boundRejection);
|
|
@@ -15884,6 +15896,16 @@ function requireDynamicRenderingUtils () {
|
|
|
15884
15896
|
}
|
|
15885
15897
|
}
|
|
15886
15898
|
function ignoreReject() {}
|
|
15899
|
+
function makeDevtoolsIOAwarePromise(underlying) {
|
|
15900
|
+
// in React DevTools if we resolve in a setTimeout we will observe
|
|
15901
|
+
// the promise resolution as something that can suspend a boundary or root.
|
|
15902
|
+
return new Promise((resolve)=>{
|
|
15903
|
+
// Must use setTimeout to be considered IO React DevTools. setImmediate will not work.
|
|
15904
|
+
setTimeout(()=>{
|
|
15905
|
+
resolve(underlying);
|
|
15906
|
+
}, 0);
|
|
15907
|
+
});
|
|
15908
|
+
}
|
|
15887
15909
|
|
|
15888
15910
|
|
|
15889
15911
|
} (dynamicRenderingUtils));
|
|
@@ -16145,6 +16167,9 @@ function requireAppRouterHeaders () {
|
|
|
16145
16167
|
FLIGHT_HEADERS: function() {
|
|
16146
16168
|
return FLIGHT_HEADERS;
|
|
16147
16169
|
},
|
|
16170
|
+
NEXT_ACTION_NOT_FOUND_HEADER: function() {
|
|
16171
|
+
return NEXT_ACTION_NOT_FOUND_HEADER;
|
|
16172
|
+
},
|
|
16148
16173
|
NEXT_DID_POSTPONE_HEADER: function() {
|
|
16149
16174
|
return NEXT_DID_POSTPONE_HEADER;
|
|
16150
16175
|
},
|
|
@@ -16188,14 +16213,14 @@ function requireAppRouterHeaders () {
|
|
|
16188
16213
|
return RSC_HEADER;
|
|
16189
16214
|
}
|
|
16190
16215
|
});
|
|
16191
|
-
const RSC_HEADER = '
|
|
16192
|
-
const ACTION_HEADER = '
|
|
16193
|
-
const NEXT_ROUTER_STATE_TREE_HEADER = '
|
|
16194
|
-
const NEXT_ROUTER_PREFETCH_HEADER = '
|
|
16195
|
-
const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER = '
|
|
16196
|
-
const NEXT_HMR_REFRESH_HEADER = '
|
|
16216
|
+
const RSC_HEADER = 'rsc';
|
|
16217
|
+
const ACTION_HEADER = 'next-action';
|
|
16218
|
+
const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree';
|
|
16219
|
+
const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch';
|
|
16220
|
+
const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER = 'next-router-segment-prefetch';
|
|
16221
|
+
const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh';
|
|
16197
16222
|
const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__';
|
|
16198
|
-
const NEXT_URL = '
|
|
16223
|
+
const NEXT_URL = 'next-url';
|
|
16199
16224
|
const RSC_CONTENT_TYPE_HEADER = 'text/x-component';
|
|
16200
16225
|
const FLIGHT_HEADERS = [
|
|
16201
16226
|
RSC_HEADER,
|
|
@@ -16210,6 +16235,7 @@ function requireAppRouterHeaders () {
|
|
|
16210
16235
|
const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path';
|
|
16211
16236
|
const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query';
|
|
16212
16237
|
const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender';
|
|
16238
|
+
const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found';
|
|
16213
16239
|
|
|
16214
16240
|
if ((typeof exports$1.default === 'function' || (typeof exports$1.default === 'object' && exports$1.default !== null)) && typeof exports$1.default.__esModule === 'undefined') {
|
|
16215
16241
|
Object.defineProperty(exports$1.default, '__esModule', { value: true });
|
|
@@ -16222,6 +16248,35 @@ function requireAppRouterHeaders () {
|
|
|
16222
16248
|
return appRouterHeaders.exports;
|
|
16223
16249
|
}
|
|
16224
16250
|
|
|
16251
|
+
var invariantError = {};
|
|
16252
|
+
|
|
16253
|
+
var hasRequiredInvariantError;
|
|
16254
|
+
|
|
16255
|
+
function requireInvariantError () {
|
|
16256
|
+
if (hasRequiredInvariantError) return invariantError;
|
|
16257
|
+
hasRequiredInvariantError = 1;
|
|
16258
|
+
(function (exports$1) {
|
|
16259
|
+
Object.defineProperty(exports$1, "__esModule", {
|
|
16260
|
+
value: true
|
|
16261
|
+
});
|
|
16262
|
+
Object.defineProperty(exports$1, "InvariantError", {
|
|
16263
|
+
enumerable: true,
|
|
16264
|
+
get: function() {
|
|
16265
|
+
return InvariantError;
|
|
16266
|
+
}
|
|
16267
|
+
});
|
|
16268
|
+
class InvariantError extends Error {
|
|
16269
|
+
constructor(message, options){
|
|
16270
|
+
super("Invariant: " + (message.endsWith('.') ? message : message + '.') + " This is a bug in Next.js.", options);
|
|
16271
|
+
this.name = 'InvariantError';
|
|
16272
|
+
}
|
|
16273
|
+
}
|
|
16274
|
+
|
|
16275
|
+
|
|
16276
|
+
} (invariantError));
|
|
16277
|
+
return invariantError;
|
|
16278
|
+
}
|
|
16279
|
+
|
|
16225
16280
|
var hasRequiredWorkUnitAsyncStorage_external;
|
|
16226
16281
|
|
|
16227
16282
|
function requireWorkUnitAsyncStorage_external () {
|
|
@@ -16238,12 +16293,12 @@ function requireWorkUnitAsyncStorage_external () {
|
|
|
16238
16293
|
});
|
|
16239
16294
|
}
|
|
16240
16295
|
_export(exports$1, {
|
|
16296
|
+
getCacheSignal: function() {
|
|
16297
|
+
return getCacheSignal;
|
|
16298
|
+
},
|
|
16241
16299
|
getDraftModeProviderForCacheScope: function() {
|
|
16242
16300
|
return getDraftModeProviderForCacheScope;
|
|
16243
16301
|
},
|
|
16244
|
-
getExpectedRequestStore: function() {
|
|
16245
|
-
return getExpectedRequestStore;
|
|
16246
|
-
},
|
|
16247
16302
|
getHmrRefreshHash: function() {
|
|
16248
16303
|
return getHmrRefreshHash;
|
|
16249
16304
|
},
|
|
@@ -16253,49 +16308,28 @@ function requireWorkUnitAsyncStorage_external () {
|
|
|
16253
16308
|
getRenderResumeDataCache: function() {
|
|
16254
16309
|
return getRenderResumeDataCache;
|
|
16255
16310
|
},
|
|
16311
|
+
getRuntimeStagePromise: function() {
|
|
16312
|
+
return getRuntimeStagePromise;
|
|
16313
|
+
},
|
|
16314
|
+
getServerComponentsHmrCache: function() {
|
|
16315
|
+
return getServerComponentsHmrCache;
|
|
16316
|
+
},
|
|
16317
|
+
isHmrRefresh: function() {
|
|
16318
|
+
return isHmrRefresh;
|
|
16319
|
+
},
|
|
16256
16320
|
throwForMissingRequestStore: function() {
|
|
16257
16321
|
return throwForMissingRequestStore;
|
|
16258
16322
|
},
|
|
16323
|
+
throwInvariantForMissingStore: function() {
|
|
16324
|
+
return throwInvariantForMissingStore;
|
|
16325
|
+
},
|
|
16259
16326
|
workUnitAsyncStorage: function() {
|
|
16260
16327
|
return _workunitasyncstorageinstance.workUnitAsyncStorageInstance;
|
|
16261
16328
|
}
|
|
16262
16329
|
});
|
|
16263
16330
|
const _workunitasyncstorageinstance = requireWorkUnitAsyncStorageInstance();
|
|
16264
16331
|
const _approuterheaders = requireAppRouterHeaders();
|
|
16265
|
-
|
|
16266
|
-
const workUnitStore = _workunitasyncstorageinstance.workUnitAsyncStorageInstance.getStore();
|
|
16267
|
-
if (!workUnitStore) {
|
|
16268
|
-
throwForMissingRequestStore(callingExpression);
|
|
16269
|
-
}
|
|
16270
|
-
switch(workUnitStore.type){
|
|
16271
|
-
case 'request':
|
|
16272
|
-
return workUnitStore;
|
|
16273
|
-
case 'prerender':
|
|
16274
|
-
case 'prerender-ppr':
|
|
16275
|
-
case 'prerender-legacy':
|
|
16276
|
-
// This should not happen because we should have checked it already.
|
|
16277
|
-
throw Object.defineProperty(new Error(`\`${callingExpression}\` cannot be called inside a prerender. This is a bug in Next.js.`), "__NEXT_ERROR_CODE", {
|
|
16278
|
-
value: "E401",
|
|
16279
|
-
enumerable: false,
|
|
16280
|
-
configurable: true
|
|
16281
|
-
});
|
|
16282
|
-
case 'cache':
|
|
16283
|
-
throw Object.defineProperty(new Error(`\`${callingExpression}\` cannot be called inside "use cache". Call it outside and pass an argument instead. Read more: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", {
|
|
16284
|
-
value: "E37",
|
|
16285
|
-
enumerable: false,
|
|
16286
|
-
configurable: true
|
|
16287
|
-
});
|
|
16288
|
-
case 'unstable-cache':
|
|
16289
|
-
throw Object.defineProperty(new Error(`\`${callingExpression}\` cannot be called inside unstable_cache. Call it outside and pass an argument instead. Read more: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`), "__NEXT_ERROR_CODE", {
|
|
16290
|
-
value: "E69",
|
|
16291
|
-
enumerable: false,
|
|
16292
|
-
configurable: true
|
|
16293
|
-
});
|
|
16294
|
-
default:
|
|
16295
|
-
const _exhaustiveCheck = workUnitStore;
|
|
16296
|
-
return _exhaustiveCheck;
|
|
16297
|
-
}
|
|
16298
|
-
}
|
|
16332
|
+
const _invarianterror = requireInvariantError();
|
|
16299
16333
|
function throwForMissingRequestStore(callingExpression) {
|
|
16300
16334
|
throw Object.defineProperty(new Error(`\`${callingExpression}\` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`), "__NEXT_ERROR_CODE", {
|
|
16301
16335
|
value: "E251",
|
|
@@ -16303,43 +16337,143 @@ function requireWorkUnitAsyncStorage_external () {
|
|
|
16303
16337
|
configurable: true
|
|
16304
16338
|
});
|
|
16305
16339
|
}
|
|
16340
|
+
function throwInvariantForMissingStore() {
|
|
16341
|
+
throw Object.defineProperty(new _invarianterror.InvariantError('Expected workUnitAsyncStorage to have a store.'), "__NEXT_ERROR_CODE", {
|
|
16342
|
+
value: "E696",
|
|
16343
|
+
enumerable: false,
|
|
16344
|
+
configurable: true
|
|
16345
|
+
});
|
|
16346
|
+
}
|
|
16306
16347
|
function getPrerenderResumeDataCache(workUnitStore) {
|
|
16307
|
-
|
|
16308
|
-
|
|
16348
|
+
switch(workUnitStore.type){
|
|
16349
|
+
case 'prerender':
|
|
16350
|
+
case 'prerender-runtime':
|
|
16351
|
+
case 'prerender-ppr':
|
|
16352
|
+
return workUnitStore.prerenderResumeDataCache;
|
|
16353
|
+
case 'prerender-client':
|
|
16354
|
+
// TODO eliminate fetch caching in client scope and stop exposing this data
|
|
16355
|
+
// cache during SSR.
|
|
16356
|
+
return workUnitStore.prerenderResumeDataCache;
|
|
16357
|
+
case 'prerender-legacy':
|
|
16358
|
+
case 'request':
|
|
16359
|
+
case 'cache':
|
|
16360
|
+
case 'private-cache':
|
|
16361
|
+
case 'unstable-cache':
|
|
16362
|
+
return null;
|
|
16363
|
+
default:
|
|
16364
|
+
return workUnitStore;
|
|
16309
16365
|
}
|
|
16310
|
-
return null;
|
|
16311
16366
|
}
|
|
16312
16367
|
function getRenderResumeDataCache(workUnitStore) {
|
|
16313
|
-
|
|
16314
|
-
|
|
16368
|
+
switch(workUnitStore.type){
|
|
16369
|
+
case 'request':
|
|
16315
16370
|
return workUnitStore.renderResumeDataCache;
|
|
16316
|
-
|
|
16317
|
-
|
|
16318
|
-
|
|
16319
|
-
|
|
16371
|
+
case 'prerender':
|
|
16372
|
+
case 'prerender-runtime':
|
|
16373
|
+
case 'prerender-client':
|
|
16374
|
+
if (workUnitStore.renderResumeDataCache) {
|
|
16375
|
+
// If we are in a prerender, we might have a render resume data cache
|
|
16376
|
+
// that is used to read from prefilled caches.
|
|
16377
|
+
return workUnitStore.renderResumeDataCache;
|
|
16378
|
+
}
|
|
16379
|
+
// fallthrough
|
|
16380
|
+
case 'prerender-ppr':
|
|
16381
|
+
// Otherwise we return the mutable resume data cache here as an immutable
|
|
16382
|
+
// version of the cache as it can also be used for reading.
|
|
16383
|
+
return workUnitStore.prerenderResumeDataCache;
|
|
16384
|
+
case 'cache':
|
|
16385
|
+
case 'private-cache':
|
|
16386
|
+
case 'unstable-cache':
|
|
16387
|
+
case 'prerender-legacy':
|
|
16388
|
+
return null;
|
|
16389
|
+
default:
|
|
16390
|
+
return workUnitStore;
|
|
16320
16391
|
}
|
|
16321
|
-
return null;
|
|
16322
16392
|
}
|
|
16323
16393
|
function getHmrRefreshHash(workStore, workUnitStore) {
|
|
16324
|
-
|
|
16325
|
-
|
|
16326
|
-
|
|
16394
|
+
if (workStore.dev) {
|
|
16395
|
+
switch(workUnitStore.type){
|
|
16396
|
+
case 'cache':
|
|
16397
|
+
case 'private-cache':
|
|
16398
|
+
case 'prerender':
|
|
16399
|
+
case 'prerender-runtime':
|
|
16400
|
+
return workUnitStore.hmrRefreshHash;
|
|
16401
|
+
case 'request':
|
|
16402
|
+
var _workUnitStore_cookies_get;
|
|
16403
|
+
return (_workUnitStore_cookies_get = workUnitStore.cookies.get(_approuterheaders.NEXT_HMR_REFRESH_HASH_COOKIE)) == null ? void 0 : _workUnitStore_cookies_get.value;
|
|
16404
|
+
}
|
|
16327
16405
|
}
|
|
16328
|
-
return
|
|
16406
|
+
return undefined;
|
|
16407
|
+
}
|
|
16408
|
+
function isHmrRefresh(workStore, workUnitStore) {
|
|
16409
|
+
if (workStore.dev) {
|
|
16410
|
+
switch(workUnitStore.type){
|
|
16411
|
+
case 'cache':
|
|
16412
|
+
case 'private-cache':
|
|
16413
|
+
case 'request':
|
|
16414
|
+
return workUnitStore.isHmrRefresh ?? false;
|
|
16415
|
+
}
|
|
16416
|
+
}
|
|
16417
|
+
return false;
|
|
16418
|
+
}
|
|
16419
|
+
function getServerComponentsHmrCache(workStore, workUnitStore) {
|
|
16420
|
+
if (workStore.dev) {
|
|
16421
|
+
switch(workUnitStore.type){
|
|
16422
|
+
case 'cache':
|
|
16423
|
+
case 'private-cache':
|
|
16424
|
+
case 'request':
|
|
16425
|
+
return workUnitStore.serverComponentsHmrCache;
|
|
16426
|
+
}
|
|
16427
|
+
}
|
|
16428
|
+
return undefined;
|
|
16329
16429
|
}
|
|
16330
16430
|
function getDraftModeProviderForCacheScope(workStore, workUnitStore) {
|
|
16331
16431
|
if (workStore.isDraftMode) {
|
|
16332
16432
|
switch(workUnitStore.type){
|
|
16333
16433
|
case 'cache':
|
|
16434
|
+
case 'private-cache':
|
|
16334
16435
|
case 'unstable-cache':
|
|
16436
|
+
case 'prerender-runtime':
|
|
16335
16437
|
case 'request':
|
|
16336
16438
|
return workUnitStore.draftMode;
|
|
16337
|
-
default:
|
|
16338
|
-
return undefined;
|
|
16339
16439
|
}
|
|
16340
16440
|
}
|
|
16341
16441
|
return undefined;
|
|
16342
16442
|
}
|
|
16443
|
+
function getCacheSignal(workUnitStore) {
|
|
16444
|
+
switch(workUnitStore.type){
|
|
16445
|
+
case 'prerender':
|
|
16446
|
+
case 'prerender-client':
|
|
16447
|
+
case 'prerender-runtime':
|
|
16448
|
+
return workUnitStore.cacheSignal;
|
|
16449
|
+
case 'prerender-ppr':
|
|
16450
|
+
case 'prerender-legacy':
|
|
16451
|
+
case 'request':
|
|
16452
|
+
case 'cache':
|
|
16453
|
+
case 'private-cache':
|
|
16454
|
+
case 'unstable-cache':
|
|
16455
|
+
return null;
|
|
16456
|
+
default:
|
|
16457
|
+
return workUnitStore;
|
|
16458
|
+
}
|
|
16459
|
+
}
|
|
16460
|
+
function getRuntimeStagePromise(workUnitStore) {
|
|
16461
|
+
switch(workUnitStore.type){
|
|
16462
|
+
case 'prerender-runtime':
|
|
16463
|
+
case 'private-cache':
|
|
16464
|
+
return workUnitStore.runtimeStagePromise;
|
|
16465
|
+
case 'prerender':
|
|
16466
|
+
case 'prerender-client':
|
|
16467
|
+
case 'prerender-ppr':
|
|
16468
|
+
case 'prerender-legacy':
|
|
16469
|
+
case 'request':
|
|
16470
|
+
case 'cache':
|
|
16471
|
+
case 'unstable-cache':
|
|
16472
|
+
return null;
|
|
16473
|
+
default:
|
|
16474
|
+
return workUnitStore;
|
|
16475
|
+
}
|
|
16476
|
+
}
|
|
16343
16477
|
|
|
16344
16478
|
|
|
16345
16479
|
} (workUnitAsyncStorage_external));
|
|
@@ -16395,13 +16529,13 @@ function requireWorkAsyncStorage_external () {
|
|
|
16395
16529
|
return workAsyncStorage_external;
|
|
16396
16530
|
}
|
|
16397
16531
|
|
|
16398
|
-
var
|
|
16532
|
+
var boundaryConstants = {};
|
|
16399
16533
|
|
|
16400
|
-
var
|
|
16534
|
+
var hasRequiredBoundaryConstants;
|
|
16401
16535
|
|
|
16402
|
-
function
|
|
16403
|
-
if (
|
|
16404
|
-
|
|
16536
|
+
function requireBoundaryConstants () {
|
|
16537
|
+
if (hasRequiredBoundaryConstants) return boundaryConstants;
|
|
16538
|
+
hasRequiredBoundaryConstants = 1;
|
|
16405
16539
|
(function (exports$1) {
|
|
16406
16540
|
Object.defineProperty(exports$1, "__esModule", {
|
|
16407
16541
|
value: true
|
|
@@ -16419,6 +16553,9 @@ function requireMetadataConstants () {
|
|
|
16419
16553
|
OUTLET_BOUNDARY_NAME: function() {
|
|
16420
16554
|
return OUTLET_BOUNDARY_NAME;
|
|
16421
16555
|
},
|
|
16556
|
+
ROOT_LAYOUT_BOUNDARY_NAME: function() {
|
|
16557
|
+
return ROOT_LAYOUT_BOUNDARY_NAME;
|
|
16558
|
+
},
|
|
16422
16559
|
VIEWPORT_BOUNDARY_NAME: function() {
|
|
16423
16560
|
return VIEWPORT_BOUNDARY_NAME;
|
|
16424
16561
|
}
|
|
@@ -16426,10 +16563,11 @@ function requireMetadataConstants () {
|
|
|
16426
16563
|
const METADATA_BOUNDARY_NAME = '__next_metadata_boundary__';
|
|
16427
16564
|
const VIEWPORT_BOUNDARY_NAME = '__next_viewport_boundary__';
|
|
16428
16565
|
const OUTLET_BOUNDARY_NAME = '__next_outlet_boundary__';
|
|
16566
|
+
const ROOT_LAYOUT_BOUNDARY_NAME = '__next_root_layout_boundary__';
|
|
16429
16567
|
|
|
16430
16568
|
|
|
16431
|
-
} (
|
|
16432
|
-
return
|
|
16569
|
+
} (boundaryConstants));
|
|
16570
|
+
return boundaryConstants;
|
|
16433
16571
|
}
|
|
16434
16572
|
|
|
16435
16573
|
var scheduler = {};
|
|
@@ -16542,6 +16680,9 @@ function requireDynamicRendering () {
|
|
|
16542
16680
|
Postpone: function() {
|
|
16543
16681
|
return Postpone;
|
|
16544
16682
|
},
|
|
16683
|
+
PreludeState: function() {
|
|
16684
|
+
return PreludeState;
|
|
16685
|
+
},
|
|
16545
16686
|
abortAndThrowOnSynchronousRequestDataAccess: function() {
|
|
16546
16687
|
return abortAndThrowOnSynchronousRequestDataAccess;
|
|
16547
16688
|
},
|
|
@@ -16566,8 +16707,11 @@ function requireDynamicRendering () {
|
|
|
16566
16707
|
createHangingInputAbortSignal: function() {
|
|
16567
16708
|
return createHangingInputAbortSignal;
|
|
16568
16709
|
},
|
|
16569
|
-
|
|
16570
|
-
return
|
|
16710
|
+
createRenderInBrowserAbortSignal: function() {
|
|
16711
|
+
return createRenderInBrowserAbortSignal;
|
|
16712
|
+
},
|
|
16713
|
+
delayUntilRuntimeStage: function() {
|
|
16714
|
+
return delayUntilRuntimeStage;
|
|
16571
16715
|
},
|
|
16572
16716
|
formatDynamicAPIAccesses: function() {
|
|
16573
16717
|
return formatDynamicAPIAccesses;
|
|
@@ -16581,6 +16725,9 @@ function requireDynamicRendering () {
|
|
|
16581
16725
|
isPrerenderInterruptedError: function() {
|
|
16582
16726
|
return isPrerenderInterruptedError;
|
|
16583
16727
|
},
|
|
16728
|
+
logDisallowedDynamicError: function() {
|
|
16729
|
+
return logDisallowedDynamicError;
|
|
16730
|
+
},
|
|
16584
16731
|
markCurrentScopeAsDynamic: function() {
|
|
16585
16732
|
return markCurrentScopeAsDynamic;
|
|
16586
16733
|
},
|
|
@@ -16599,9 +16746,6 @@ function requireDynamicRendering () {
|
|
|
16599
16746
|
trackDynamicDataInDynamicRender: function() {
|
|
16600
16747
|
return trackDynamicDataInDynamicRender;
|
|
16601
16748
|
},
|
|
16602
|
-
trackFallbackParamAccessed: function() {
|
|
16603
|
-
return trackFallbackParamAccessed;
|
|
16604
|
-
},
|
|
16605
16749
|
trackSynchronousPlatformIOAccessInDev: function() {
|
|
16606
16750
|
return trackSynchronousPlatformIOAccessInDev;
|
|
16607
16751
|
},
|
|
@@ -16610,6 +16754,9 @@ function requireDynamicRendering () {
|
|
|
16610
16754
|
},
|
|
16611
16755
|
useDynamicRouteParams: function() {
|
|
16612
16756
|
return useDynamicRouteParams;
|
|
16757
|
+
},
|
|
16758
|
+
warnOnSyncDynamicError: function() {
|
|
16759
|
+
return warnOnSyncDynamicError;
|
|
16613
16760
|
}
|
|
16614
16761
|
});
|
|
16615
16762
|
const _react = /*#__PURE__*/ _interop_require_default(React);
|
|
@@ -16618,8 +16765,10 @@ function requireDynamicRendering () {
|
|
|
16618
16765
|
const _workunitasyncstorageexternal = requireWorkUnitAsyncStorage_external();
|
|
16619
16766
|
const _workasyncstorageexternal = requireWorkAsyncStorage_external();
|
|
16620
16767
|
const _dynamicrenderingutils = requireDynamicRenderingUtils();
|
|
16621
|
-
const
|
|
16768
|
+
const _boundaryconstants = requireBoundaryConstants();
|
|
16622
16769
|
const _scheduler = requireScheduler();
|
|
16770
|
+
const _bailouttocsr = requireBailoutToCsr();
|
|
16771
|
+
const _invarianterror = requireInvariantError();
|
|
16623
16772
|
function _interop_require_default(obj) {
|
|
16624
16773
|
return obj && obj.__esModule ? obj : {
|
|
16625
16774
|
default: obj
|
|
@@ -16630,16 +16779,15 @@ function requireDynamicRendering () {
|
|
|
16630
16779
|
return {
|
|
16631
16780
|
isDebugDynamicAccesses,
|
|
16632
16781
|
dynamicAccesses: [],
|
|
16633
|
-
syncDynamicExpression: undefined,
|
|
16634
16782
|
syncDynamicErrorWithStack: null
|
|
16635
16783
|
};
|
|
16636
16784
|
}
|
|
16637
16785
|
function createDynamicValidationState() {
|
|
16638
16786
|
return {
|
|
16639
|
-
|
|
16787
|
+
hasSuspenseAboveBody: false,
|
|
16640
16788
|
hasDynamicMetadata: false,
|
|
16641
16789
|
hasDynamicViewport: false,
|
|
16642
|
-
|
|
16790
|
+
hasAllowedDynamic: false,
|
|
16643
16791
|
dynamicErrors: []
|
|
16644
16792
|
};
|
|
16645
16793
|
}
|
|
@@ -16649,11 +16797,17 @@ function requireDynamicRendering () {
|
|
|
16649
16797
|
}
|
|
16650
16798
|
function markCurrentScopeAsDynamic(store, workUnitStore, expression) {
|
|
16651
16799
|
if (workUnitStore) {
|
|
16652
|
-
|
|
16653
|
-
|
|
16654
|
-
|
|
16655
|
-
|
|
16656
|
-
|
|
16800
|
+
switch(workUnitStore.type){
|
|
16801
|
+
case 'cache':
|
|
16802
|
+
case 'unstable-cache':
|
|
16803
|
+
// Inside cache scopes, marking a scope as dynamic has no effect,
|
|
16804
|
+
// because the outer cache scope creates a cache boundary. This is
|
|
16805
|
+
// subtly different from reading a dynamic data source, which is
|
|
16806
|
+
// forbidden inside a cache scope.
|
|
16807
|
+
return;
|
|
16808
|
+
case 'private-cache':
|
|
16809
|
+
// A private cache scope is already dynamic by definition.
|
|
16810
|
+
return;
|
|
16657
16811
|
}
|
|
16658
16812
|
}
|
|
16659
16813
|
// If we're forcing dynamic rendering or we're forcing static rendering, we
|
|
@@ -16668,29 +16822,29 @@ function requireDynamicRendering () {
|
|
|
16668
16822
|
});
|
|
16669
16823
|
}
|
|
16670
16824
|
if (workUnitStore) {
|
|
16671
|
-
|
|
16672
|
-
|
|
16673
|
-
|
|
16674
|
-
|
|
16675
|
-
|
|
16676
|
-
|
|
16677
|
-
|
|
16678
|
-
|
|
16679
|
-
|
|
16680
|
-
|
|
16681
|
-
|
|
16682
|
-
|
|
16683
|
-
|
|
16684
|
-
|
|
16685
|
-
|
|
16825
|
+
switch(workUnitStore.type){
|
|
16826
|
+
case 'prerender-ppr':
|
|
16827
|
+
return postponeWithTracking(store.route, expression, workUnitStore.dynamicTracking);
|
|
16828
|
+
case 'prerender-legacy':
|
|
16829
|
+
workUnitStore.revalidate = 0;
|
|
16830
|
+
// We aren't prerendering, but we are generating a static page. We need
|
|
16831
|
+
// to bail out of static generation.
|
|
16832
|
+
const err = Object.defineProperty(new _hooksservercontext.DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", {
|
|
16833
|
+
value: "E550",
|
|
16834
|
+
enumerable: false,
|
|
16835
|
+
configurable: true
|
|
16836
|
+
});
|
|
16837
|
+
store.dynamicUsageDescription = expression;
|
|
16838
|
+
store.dynamicUsageStack = err.stack;
|
|
16839
|
+
throw err;
|
|
16840
|
+
case 'request':
|
|
16841
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
16842
|
+
workUnitStore.usedDynamic = true;
|
|
16843
|
+
}
|
|
16844
|
+
break;
|
|
16686
16845
|
}
|
|
16687
16846
|
}
|
|
16688
16847
|
}
|
|
16689
|
-
function trackFallbackParamAccessed(store, expression) {
|
|
16690
|
-
const prerenderStore = _workunitasyncstorageexternal.workUnitAsyncStorage.getStore();
|
|
16691
|
-
if (!prerenderStore || prerenderStore.type !== 'prerender-ppr') return;
|
|
16692
|
-
postponeWithTracking(store.route, expression, prerenderStore.dynamicTracking);
|
|
16693
|
-
}
|
|
16694
16848
|
function throwToInterruptStaticGeneration(expression, store, prerenderStore) {
|
|
16695
16849
|
// We aren't prerendering but we are generating a static page. We need to bail out of static generation
|
|
16696
16850
|
const err = Object.defineProperty(new _hooksservercontext.DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", {
|
|
@@ -16703,25 +16857,31 @@ function requireDynamicRendering () {
|
|
|
16703
16857
|
store.dynamicUsageStack = err.stack;
|
|
16704
16858
|
throw err;
|
|
16705
16859
|
}
|
|
16706
|
-
function trackDynamicDataInDynamicRender(
|
|
16707
|
-
|
|
16708
|
-
|
|
16709
|
-
|
|
16710
|
-
//
|
|
16860
|
+
function trackDynamicDataInDynamicRender(workUnitStore) {
|
|
16861
|
+
switch(workUnitStore.type){
|
|
16862
|
+
case 'cache':
|
|
16863
|
+
case 'unstable-cache':
|
|
16864
|
+
// Inside cache scopes, marking a scope as dynamic has no effect,
|
|
16865
|
+
// because the outer cache scope creates a cache boundary. This is
|
|
16866
|
+
// subtly different from reading a dynamic data source, which is
|
|
16711
16867
|
// forbidden inside a cache scope.
|
|
16712
16868
|
return;
|
|
16713
|
-
|
|
16714
|
-
|
|
16715
|
-
|
|
16716
|
-
|
|
16717
|
-
|
|
16718
|
-
|
|
16719
|
-
|
|
16869
|
+
case 'private-cache':
|
|
16870
|
+
// A private cache scope is already dynamic by definition.
|
|
16871
|
+
return;
|
|
16872
|
+
case 'prerender':
|
|
16873
|
+
case 'prerender-runtime':
|
|
16874
|
+
case 'prerender-legacy':
|
|
16875
|
+
case 'prerender-ppr':
|
|
16876
|
+
case 'prerender-client':
|
|
16877
|
+
break;
|
|
16878
|
+
case 'request':
|
|
16879
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
16880
|
+
workUnitStore.usedDynamic = true;
|
|
16881
|
+
}
|
|
16882
|
+
break;
|
|
16720
16883
|
}
|
|
16721
16884
|
}
|
|
16722
|
-
// Despite it's name we don't actually abort unless we have a controller to call abort on
|
|
16723
|
-
// There are times when we let a prerender run long to discover caches where we want the semantics
|
|
16724
|
-
// of tracking dynamic access without terminating the prerender early
|
|
16725
16885
|
function abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore) {
|
|
16726
16886
|
const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`;
|
|
16727
16887
|
const error = createPrerenderInterruptedError(reason);
|
|
@@ -16738,13 +16898,16 @@ function requireDynamicRendering () {
|
|
|
16738
16898
|
}
|
|
16739
16899
|
function abortOnSynchronousPlatformIOAccess(route, expression, errorWithStack, prerenderStore) {
|
|
16740
16900
|
const dynamicTracking = prerenderStore.dynamicTracking;
|
|
16901
|
+
abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore);
|
|
16902
|
+
// It is important that we set this tracking value after aborting. Aborts are executed
|
|
16903
|
+
// synchronously except for the case where you abort during render itself. By setting this
|
|
16904
|
+
// value late we can use it to determine if any of the aborted tasks are the task that
|
|
16905
|
+
// called the sync IO expression in the first place.
|
|
16741
16906
|
if (dynamicTracking) {
|
|
16742
16907
|
if (dynamicTracking.syncDynamicErrorWithStack === null) {
|
|
16743
|
-
dynamicTracking.syncDynamicExpression = expression;
|
|
16744
16908
|
dynamicTracking.syncDynamicErrorWithStack = errorWithStack;
|
|
16745
16909
|
}
|
|
16746
16910
|
}
|
|
16747
|
-
abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore);
|
|
16748
16911
|
}
|
|
16749
16912
|
function trackSynchronousPlatformIOAccessInDev(requestStore) {
|
|
16750
16913
|
// We don't actually have a controller to abort but we do the semantic equivalent by
|
|
@@ -16759,22 +16922,27 @@ function requireDynamicRendering () {
|
|
|
16759
16922
|
// since we need the throw semantics regardless of whether we abort it is easier to land
|
|
16760
16923
|
// this way. See how this was handled with `abortOnSynchronousPlatformIOAccess` for a closer
|
|
16761
16924
|
// to ideal implementation
|
|
16925
|
+
abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore);
|
|
16926
|
+
// It is important that we set this tracking value after aborting. Aborts are executed
|
|
16927
|
+
// synchronously except for the case where you abort during render itself. By setting this
|
|
16928
|
+
// value late we can use it to determine if any of the aborted tasks are the task that
|
|
16929
|
+
// called the sync IO expression in the first place.
|
|
16762
16930
|
const dynamicTracking = prerenderStore.dynamicTracking;
|
|
16763
16931
|
if (dynamicTracking) {
|
|
16764
16932
|
if (dynamicTracking.syncDynamicErrorWithStack === null) {
|
|
16765
|
-
dynamicTracking.syncDynamicExpression = expression;
|
|
16766
16933
|
dynamicTracking.syncDynamicErrorWithStack = errorWithStack;
|
|
16767
|
-
if (prerenderStore.validating === true) {
|
|
16768
|
-
// We always log Request Access in dev at the point of calling the function
|
|
16769
|
-
// So we mark the dynamic validation as not requiring it to be printed
|
|
16770
|
-
dynamicTracking.syncDynamicLogged = true;
|
|
16771
|
-
}
|
|
16772
16934
|
}
|
|
16773
16935
|
}
|
|
16774
|
-
abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore);
|
|
16775
16936
|
}
|
|
16776
16937
|
throw createPrerenderInterruptedError(`Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`);
|
|
16777
16938
|
}
|
|
16939
|
+
function warnOnSyncDynamicError(dynamicTracking) {
|
|
16940
|
+
if (dynamicTracking.syncDynamicErrorWithStack) {
|
|
16941
|
+
// the server did something sync dynamic, likely
|
|
16942
|
+
// leading to an early termination of the prerender.
|
|
16943
|
+
console.error(dynamicTracking.syncDynamicErrorWithStack);
|
|
16944
|
+
}
|
|
16945
|
+
}
|
|
16778
16946
|
const trackSynchronousRequestDataAccessInDev = trackSynchronousPlatformIOAccessInDev;
|
|
16779
16947
|
function Postpone({ reason, route }) {
|
|
16780
16948
|
const prerenderStore = _workunitasyncstorageexternal.workUnitAsyncStorage.getStore();
|
|
@@ -16867,35 +17035,57 @@ function requireDynamicRendering () {
|
|
|
16867
17035
|
});
|
|
16868
17036
|
}
|
|
16869
17037
|
}
|
|
16870
|
-
function
|
|
16871
|
-
assertPostpone();
|
|
17038
|
+
function createRenderInBrowserAbortSignal() {
|
|
16872
17039
|
const controller = new AbortController();
|
|
16873
|
-
|
|
16874
|
-
|
|
16875
|
-
|
|
16876
|
-
|
|
16877
|
-
|
|
16878
|
-
}
|
|
17040
|
+
controller.abort(Object.defineProperty(new _bailouttocsr.BailoutToCSRError('Render in Browser'), "__NEXT_ERROR_CODE", {
|
|
17041
|
+
value: "E721",
|
|
17042
|
+
enumerable: false,
|
|
17043
|
+
configurable: true
|
|
17044
|
+
}));
|
|
16879
17045
|
return controller.signal;
|
|
16880
17046
|
}
|
|
16881
17047
|
function createHangingInputAbortSignal(workUnitStore) {
|
|
16882
|
-
|
|
16883
|
-
|
|
16884
|
-
|
|
16885
|
-
|
|
16886
|
-
|
|
16887
|
-
|
|
16888
|
-
|
|
16889
|
-
|
|
16890
|
-
|
|
16891
|
-
|
|
16892
|
-
|
|
16893
|
-
|
|
16894
|
-
|
|
16895
|
-
|
|
16896
|
-
|
|
17048
|
+
switch(workUnitStore.type){
|
|
17049
|
+
case 'prerender':
|
|
17050
|
+
case 'prerender-runtime':
|
|
17051
|
+
const controller = new AbortController();
|
|
17052
|
+
if (workUnitStore.cacheSignal) {
|
|
17053
|
+
// If we have a cacheSignal it means we're in a prospective render. If
|
|
17054
|
+
// the input we're waiting on is coming from another cache, we do want
|
|
17055
|
+
// to wait for it so that we can resolve this cache entry too.
|
|
17056
|
+
workUnitStore.cacheSignal.inputReady().then(()=>{
|
|
17057
|
+
controller.abort();
|
|
17058
|
+
});
|
|
17059
|
+
} else {
|
|
17060
|
+
// Otherwise we're in the final render and we should already have all
|
|
17061
|
+
// our caches filled.
|
|
17062
|
+
// If the prerender uses stages, we have wait until the runtime stage,
|
|
17063
|
+
// at which point all runtime inputs will be resolved.
|
|
17064
|
+
// (otherwise, a runtime prerender might consider `cookies()` hanging
|
|
17065
|
+
// even though they'd resolve in the next task.)
|
|
17066
|
+
//
|
|
17067
|
+
// We might still be waiting on some microtasks so we
|
|
17068
|
+
// wait one tick before giving up. When we give up, we still want to
|
|
17069
|
+
// render the content of this cache as deeply as we can so that we can
|
|
17070
|
+
// suspend as deeply as possible in the tree or not at all if we don't
|
|
17071
|
+
// end up waiting for the input.
|
|
17072
|
+
const runtimeStagePromise = (0, _workunitasyncstorageexternal.getRuntimeStagePromise)(workUnitStore);
|
|
17073
|
+
if (runtimeStagePromise) {
|
|
17074
|
+
runtimeStagePromise.then(()=>(0, _scheduler.scheduleOnNextTick)(()=>controller.abort()));
|
|
17075
|
+
} else {
|
|
17076
|
+
(0, _scheduler.scheduleOnNextTick)(()=>controller.abort());
|
|
17077
|
+
}
|
|
17078
|
+
}
|
|
17079
|
+
return controller.signal;
|
|
17080
|
+
case 'prerender-client':
|
|
17081
|
+
case 'prerender-ppr':
|
|
17082
|
+
case 'prerender-legacy':
|
|
17083
|
+
case 'request':
|
|
17084
|
+
case 'cache':
|
|
17085
|
+
case 'private-cache':
|
|
17086
|
+
case 'unstable-cache':
|
|
17087
|
+
return undefined;
|
|
16897
17088
|
}
|
|
16898
|
-
return controller.signal;
|
|
16899
17089
|
}
|
|
16900
17090
|
function annotateDynamicAccess(expression, prerenderStore) {
|
|
16901
17091
|
const dynamicTracking = prerenderStore.dynamicTracking;
|
|
@@ -16908,31 +17098,65 @@ function requireDynamicRendering () {
|
|
|
16908
17098
|
}
|
|
16909
17099
|
function useDynamicRouteParams(expression) {
|
|
16910
17100
|
const workStore = _workasyncstorageexternal.workAsyncStorage.getStore();
|
|
16911
|
-
|
|
16912
|
-
|
|
16913
|
-
|
|
16914
|
-
|
|
16915
|
-
|
|
16916
|
-
|
|
16917
|
-
|
|
16918
|
-
|
|
16919
|
-
|
|
16920
|
-
|
|
16921
|
-
|
|
16922
|
-
|
|
16923
|
-
|
|
16924
|
-
|
|
16925
|
-
|
|
16926
|
-
|
|
16927
|
-
|
|
17101
|
+
const workUnitStore = _workunitasyncstorageexternal.workUnitAsyncStorage.getStore();
|
|
17102
|
+
if (workStore && workUnitStore) {
|
|
17103
|
+
switch(workUnitStore.type){
|
|
17104
|
+
case 'prerender-client':
|
|
17105
|
+
case 'prerender':
|
|
17106
|
+
{
|
|
17107
|
+
const fallbackParams = workUnitStore.fallbackRouteParams;
|
|
17108
|
+
if (fallbackParams && fallbackParams.size > 0) {
|
|
17109
|
+
// We are in a prerender with cacheComponents semantics. We are going to
|
|
17110
|
+
// hang here and never resolve. This will cause the currently
|
|
17111
|
+
// rendering component to effectively be a dynamic hole.
|
|
17112
|
+
_react.default.use((0, _dynamicrenderingutils.makeHangingPromise)(workUnitStore.renderSignal, workStore.route, expression));
|
|
17113
|
+
}
|
|
17114
|
+
break;
|
|
17115
|
+
}
|
|
17116
|
+
case 'prerender-ppr':
|
|
17117
|
+
{
|
|
17118
|
+
const fallbackParams = workUnitStore.fallbackRouteParams;
|
|
17119
|
+
if (fallbackParams && fallbackParams.size > 0) {
|
|
17120
|
+
return postponeWithTracking(workStore.route, expression, workUnitStore.dynamicTracking);
|
|
17121
|
+
}
|
|
17122
|
+
break;
|
|
17123
|
+
}
|
|
17124
|
+
case 'prerender-runtime':
|
|
17125
|
+
throw Object.defineProperty(new _invarianterror.InvariantError(`\`${expression}\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", {
|
|
17126
|
+
value: "E771",
|
|
17127
|
+
enumerable: false,
|
|
17128
|
+
configurable: true
|
|
17129
|
+
});
|
|
17130
|
+
case 'cache':
|
|
17131
|
+
case 'private-cache':
|
|
17132
|
+
throw Object.defineProperty(new _invarianterror.InvariantError(`\`${expression}\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", {
|
|
17133
|
+
value: "E745",
|
|
17134
|
+
enumerable: false,
|
|
17135
|
+
configurable: true
|
|
17136
|
+
});
|
|
16928
17137
|
}
|
|
16929
17138
|
}
|
|
16930
17139
|
}
|
|
16931
17140
|
const hasSuspenseRegex = /\n\s+at Suspense \(<anonymous>\)/;
|
|
16932
|
-
|
|
16933
|
-
const
|
|
16934
|
-
|
|
16935
|
-
|
|
17141
|
+
// Common implicit body tags that React will treat as body when placed directly in html
|
|
17142
|
+
const bodyAndImplicitTags = 'body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6';
|
|
17143
|
+
// Detects when RootLayoutBoundary (our framework marker component) appears
|
|
17144
|
+
// after Suspense in the component stack, indicating the root layout is wrapped
|
|
17145
|
+
// within a Suspense boundary. Ensures no body/html/implicit-body components are in between.
|
|
17146
|
+
//
|
|
17147
|
+
// Example matches:
|
|
17148
|
+
// at Suspense (<anonymous>)
|
|
17149
|
+
// at __next_root_layout_boundary__ (<anonymous>)
|
|
17150
|
+
//
|
|
17151
|
+
// Or with other components in between (but not body/html/implicit-body):
|
|
17152
|
+
// at Suspense (<anonymous>)
|
|
17153
|
+
// at SomeComponent (<anonymous>)
|
|
17154
|
+
// at __next_root_layout_boundary__ (<anonymous>)
|
|
17155
|
+
const hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp(`\\n\\s+at Suspense \\(<anonymous>\\)(?:(?!\\n\\s+at (?:${bodyAndImplicitTags}) \\(<anonymous>\\))[\\s\\S])*?\\n\\s+at ${_boundaryconstants.ROOT_LAYOUT_BOUNDARY_NAME} \\([^\\n]*\\)`);
|
|
17156
|
+
const hasMetadataRegex = new RegExp(`\\n\\s+at ${_boundaryconstants.METADATA_BOUNDARY_NAME}[\\n\\s]`);
|
|
17157
|
+
const hasViewportRegex = new RegExp(`\\n\\s+at ${_boundaryconstants.VIEWPORT_BOUNDARY_NAME}[\\n\\s]`);
|
|
17158
|
+
const hasOutletRegex = new RegExp(`\\n\\s+at ${_boundaryconstants.OUTLET_BOUNDARY_NAME}[\\n\\s]`);
|
|
17159
|
+
function trackAllowedDynamicAccess(workStore, componentStack, dynamicValidation, clientDynamic) {
|
|
16936
17160
|
if (hasOutletRegex.test(componentStack)) {
|
|
16937
17161
|
// We don't need to track that this is dynamic. It is only so when something else is also dynamic.
|
|
16938
17162
|
return;
|
|
@@ -16942,93 +17166,113 @@ function requireDynamicRendering () {
|
|
|
16942
17166
|
} else if (hasViewportRegex.test(componentStack)) {
|
|
16943
17167
|
dynamicValidation.hasDynamicViewport = true;
|
|
16944
17168
|
return;
|
|
17169
|
+
} else if (hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(componentStack)) {
|
|
17170
|
+
// For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule.
|
|
17171
|
+
// But if you have Suspense above body, the prelude is empty but we allow that because having Suspense
|
|
17172
|
+
// is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering.
|
|
17173
|
+
dynamicValidation.hasAllowedDynamic = true;
|
|
17174
|
+
dynamicValidation.hasSuspenseAboveBody = true;
|
|
17175
|
+
return;
|
|
16945
17176
|
} else if (hasSuspenseRegex.test(componentStack)) {
|
|
16946
|
-
|
|
17177
|
+
// this error had a Suspense boundary above it so we don't need to report it as a source
|
|
17178
|
+
// of disallowed
|
|
17179
|
+
dynamicValidation.hasAllowedDynamic = true;
|
|
16947
17180
|
return;
|
|
16948
|
-
} else if (
|
|
16949
|
-
|
|
17181
|
+
} else if (clientDynamic.syncDynamicErrorWithStack) {
|
|
17182
|
+
// This task was the task that called the sync error.
|
|
17183
|
+
dynamicValidation.dynamicErrors.push(clientDynamic.syncDynamicErrorWithStack);
|
|
16950
17184
|
return;
|
|
16951
17185
|
} else {
|
|
16952
|
-
const message = `Route "${route}": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a "use cache" above it.
|
|
16953
|
-
const error =
|
|
17186
|
+
const message = `Route "${workStore.route}": A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a "use cache" above it. See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense`;
|
|
17187
|
+
const error = createErrorWithComponentOrOwnerStack(message, componentStack);
|
|
16954
17188
|
dynamicValidation.dynamicErrors.push(error);
|
|
16955
17189
|
return;
|
|
16956
17190
|
}
|
|
16957
17191
|
}
|
|
16958
|
-
|
|
17192
|
+
/**
|
|
17193
|
+
* In dev mode, we prefer using the owner stack, otherwise the provided
|
|
17194
|
+
* component stack is used.
|
|
17195
|
+
*/ function createErrorWithComponentOrOwnerStack(message, componentStack) {
|
|
17196
|
+
const ownerStack = process.env.NODE_ENV !== 'production' && _react.default.captureOwnerStack ? _react.default.captureOwnerStack() : null;
|
|
16959
17197
|
const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
|
|
16960
17198
|
value: "E394",
|
|
16961
17199
|
enumerable: false,
|
|
16962
17200
|
configurable: true
|
|
16963
17201
|
});
|
|
16964
|
-
error.stack = '
|
|
17202
|
+
error.stack = error.name + ': ' + message + (ownerStack ?? componentStack);
|
|
16965
17203
|
return error;
|
|
16966
17204
|
}
|
|
16967
|
-
|
|
16968
|
-
|
|
16969
|
-
|
|
16970
|
-
|
|
16971
|
-
|
|
16972
|
-
|
|
16973
|
-
|
|
16974
|
-
|
|
16975
|
-
|
|
16976
|
-
|
|
16977
|
-
|
|
16978
|
-
|
|
16979
|
-
|
|
16980
|
-
|
|
16981
|
-
|
|
16982
|
-
syncLogged = false;
|
|
16983
|
-
}
|
|
16984
|
-
if (dynamicValidation.hasSyncDynamicErrors && syncError) {
|
|
16985
|
-
if (!syncLogged) {
|
|
16986
|
-
// In dev we already log errors about sync dynamic access. But during builds we need to ensure
|
|
16987
|
-
// the offending sync error is logged before we exit the build
|
|
16988
|
-
console.error(syncError);
|
|
17205
|
+
var PreludeState = /*#__PURE__*/ function(PreludeState) {
|
|
17206
|
+
PreludeState[PreludeState["Full"] = 0] = "Full";
|
|
17207
|
+
PreludeState[PreludeState["Empty"] = 1] = "Empty";
|
|
17208
|
+
PreludeState[PreludeState["Errored"] = 2] = "Errored";
|
|
17209
|
+
return PreludeState;
|
|
17210
|
+
}({});
|
|
17211
|
+
function logDisallowedDynamicError(workStore, error) {
|
|
17212
|
+
console.error(error);
|
|
17213
|
+
if (!workStore.dev) {
|
|
17214
|
+
if (workStore.hasReadableErrorStacks) {
|
|
17215
|
+
console.error(`To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error.`);
|
|
17216
|
+
} else {
|
|
17217
|
+
console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following:
|
|
17218
|
+
- Start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error.
|
|
17219
|
+
- Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.`);
|
|
16989
17220
|
}
|
|
16990
|
-
// The actual error should have been logged when the sync access ocurred
|
|
16991
|
-
throw new _staticgenerationbailout.StaticGenBailoutError();
|
|
16992
17221
|
}
|
|
16993
|
-
|
|
16994
|
-
|
|
16995
|
-
|
|
16996
|
-
|
|
17222
|
+
}
|
|
17223
|
+
function throwIfDisallowedDynamic(workStore, prelude, dynamicValidation, serverDynamic) {
|
|
17224
|
+
if (prelude !== 0) {
|
|
17225
|
+
if (dynamicValidation.hasSuspenseAboveBody) {
|
|
17226
|
+
// This route has opted into allowing fully dynamic rendering
|
|
17227
|
+
// by including a Suspense boundary above the body. In this case
|
|
17228
|
+
// a lack of a shell is not considered disallowed so we simply return
|
|
17229
|
+
return;
|
|
16997
17230
|
}
|
|
16998
|
-
|
|
16999
|
-
|
|
17000
|
-
|
|
17001
|
-
|
|
17002
|
-
|
|
17003
|
-
|
|
17004
|
-
|
|
17005
|
-
|
|
17006
|
-
|
|
17007
|
-
|
|
17008
|
-
|
|
17009
|
-
|
|
17010
|
-
|
|
17011
|
-
|
|
17012
|
-
enumerable: false,
|
|
17013
|
-
configurable: true
|
|
17014
|
-
});
|
|
17015
|
-
} else if (dynamicValidation.hasDynamicViewport) {
|
|
17016
|
-
if (syncError) {
|
|
17017
|
-
console.error(syncError);
|
|
17018
|
-
throw Object.defineProperty(new _staticgenerationbailout.StaticGenBailoutError(`Route "${route}" has a \`generateViewport\` that could not finish rendering before ${syncExpression} was used. Follow the instructions in the error for this expression to resolve.`), "__NEXT_ERROR_CODE", {
|
|
17019
|
-
value: "E573",
|
|
17020
|
-
enumerable: false,
|
|
17021
|
-
configurable: true
|
|
17022
|
-
});
|
|
17231
|
+
if (serverDynamic.syncDynamicErrorWithStack) {
|
|
17232
|
+
// There is no shell and the server did something sync dynamic likely
|
|
17233
|
+
// leading to an early termination of the prerender before the shell
|
|
17234
|
+
// could be completed. We terminate the build/validating render.
|
|
17235
|
+
logDisallowedDynamicError(workStore, serverDynamic.syncDynamicErrorWithStack);
|
|
17236
|
+
throw new _staticgenerationbailout.StaticGenBailoutError();
|
|
17237
|
+
}
|
|
17238
|
+
// We didn't have any sync bailouts but there may be user code which
|
|
17239
|
+
// blocked the root. We would have captured these during the prerender
|
|
17240
|
+
// and can log them here and then terminate the build/validating render
|
|
17241
|
+
const dynamicErrors = dynamicValidation.dynamicErrors;
|
|
17242
|
+
if (dynamicErrors.length > 0) {
|
|
17243
|
+
for(let i = 0; i < dynamicErrors.length; i++){
|
|
17244
|
+
logDisallowedDynamicError(workStore, dynamicErrors[i]);
|
|
17023
17245
|
}
|
|
17024
|
-
throw
|
|
17025
|
-
|
|
17026
|
-
|
|
17027
|
-
|
|
17028
|
-
|
|
17246
|
+
throw new _staticgenerationbailout.StaticGenBailoutError();
|
|
17247
|
+
}
|
|
17248
|
+
// If we got this far then the only other thing that could be blocking
|
|
17249
|
+
// the root is dynamic Viewport. If this is dynamic then
|
|
17250
|
+
// you need to opt into that by adding a Suspense boundary above the body
|
|
17251
|
+
// to indicate your are ok with fully dynamic rendering.
|
|
17252
|
+
if (dynamicValidation.hasDynamicViewport) {
|
|
17253
|
+
console.error(`Route "${workStore.route}" has a \`generateViewport\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`);
|
|
17254
|
+
throw new _staticgenerationbailout.StaticGenBailoutError();
|
|
17255
|
+
}
|
|
17256
|
+
if (prelude === 1) {
|
|
17257
|
+
// If we ever get this far then we messed up the tracking of invalid dynamic.
|
|
17258
|
+
// We still adhere to the constraint that you must produce a shell but invite the
|
|
17259
|
+
// user to report this as a bug in Next.js.
|
|
17260
|
+
console.error(`Route "${workStore.route}" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`);
|
|
17261
|
+
throw new _staticgenerationbailout.StaticGenBailoutError();
|
|
17262
|
+
}
|
|
17263
|
+
} else {
|
|
17264
|
+
if (dynamicValidation.hasAllowedDynamic === false && dynamicValidation.hasDynamicMetadata) {
|
|
17265
|
+
console.error(`Route "${workStore.route}" has a \`generateMetadata\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`);
|
|
17266
|
+
throw new _staticgenerationbailout.StaticGenBailoutError();
|
|
17029
17267
|
}
|
|
17030
17268
|
}
|
|
17031
17269
|
}
|
|
17270
|
+
function delayUntilRuntimeStage(prerenderStore, result) {
|
|
17271
|
+
if (prerenderStore.runtimeStagePromise) {
|
|
17272
|
+
return prerenderStore.runtimeStagePromise.then(()=>result);
|
|
17273
|
+
}
|
|
17274
|
+
return result;
|
|
17275
|
+
}
|
|
17032
17276
|
|
|
17033
17277
|
|
|
17034
17278
|
} (dynamicRendering));
|
|
@@ -17190,6 +17434,9 @@ function requireNavigation_reactServer () {
|
|
|
17190
17434
|
unauthorized: function() {
|
|
17191
17435
|
return _unauthorized.unauthorized;
|
|
17192
17436
|
},
|
|
17437
|
+
unstable_isUnrecognizedActionError: function() {
|
|
17438
|
+
return unstable_isUnrecognizedActionError;
|
|
17439
|
+
},
|
|
17193
17440
|
unstable_rethrow: function() {
|
|
17194
17441
|
return _unstablerethrow.unstable_rethrow;
|
|
17195
17442
|
}
|
|
@@ -17219,6 +17466,13 @@ function requireNavigation_reactServer () {
|
|
|
17219
17466
|
throw new ReadonlyURLSearchParamsError();
|
|
17220
17467
|
}
|
|
17221
17468
|
}
|
|
17469
|
+
function unstable_isUnrecognizedActionError() {
|
|
17470
|
+
throw Object.defineProperty(new Error('`unstable_isUnrecognizedActionError` can only be used on the client.'), "__NEXT_ERROR_CODE", {
|
|
17471
|
+
value: "E776",
|
|
17472
|
+
enumerable: false,
|
|
17473
|
+
configurable: true
|
|
17474
|
+
});
|
|
17475
|
+
}
|
|
17222
17476
|
|
|
17223
17477
|
if ((typeof exports$1.default === 'function' || (typeof exports$1.default === 'object' && exports$1.default !== null)) && typeof exports$1.default.__esModule === 'undefined') {
|
|
17224
17478
|
Object.defineProperty(exports$1.default, '__esModule', { value: true });
|
|
@@ -17320,6 +17574,52 @@ function requireServerInsertedHtml_sharedRuntime () {
|
|
|
17320
17574
|
return serverInsertedHtml_sharedRuntime;
|
|
17321
17575
|
}
|
|
17322
17576
|
|
|
17577
|
+
var unrecognizedActionError = {exports: {}};
|
|
17578
|
+
|
|
17579
|
+
var hasRequiredUnrecognizedActionError;
|
|
17580
|
+
|
|
17581
|
+
function requireUnrecognizedActionError () {
|
|
17582
|
+
if (hasRequiredUnrecognizedActionError) return unrecognizedActionError.exports;
|
|
17583
|
+
hasRequiredUnrecognizedActionError = 1;
|
|
17584
|
+
(function (module, exports$1) {
|
|
17585
|
+
Object.defineProperty(exports$1, "__esModule", {
|
|
17586
|
+
value: true
|
|
17587
|
+
});
|
|
17588
|
+
function _export(target, all) {
|
|
17589
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
17590
|
+
enumerable: true,
|
|
17591
|
+
get: all[name]
|
|
17592
|
+
});
|
|
17593
|
+
}
|
|
17594
|
+
_export(exports$1, {
|
|
17595
|
+
UnrecognizedActionError: function() {
|
|
17596
|
+
return UnrecognizedActionError;
|
|
17597
|
+
},
|
|
17598
|
+
unstable_isUnrecognizedActionError: function() {
|
|
17599
|
+
return unstable_isUnrecognizedActionError;
|
|
17600
|
+
}
|
|
17601
|
+
});
|
|
17602
|
+
class UnrecognizedActionError extends Error {
|
|
17603
|
+
constructor(...args){
|
|
17604
|
+
super(...args);
|
|
17605
|
+
this.name = 'UnrecognizedActionError';
|
|
17606
|
+
}
|
|
17607
|
+
}
|
|
17608
|
+
function unstable_isUnrecognizedActionError(error) {
|
|
17609
|
+
return !!(error && typeof error === 'object' && error instanceof UnrecognizedActionError);
|
|
17610
|
+
}
|
|
17611
|
+
|
|
17612
|
+
if ((typeof exports$1.default === 'function' || (typeof exports$1.default === 'object' && exports$1.default !== null)) && typeof exports$1.default.__esModule === 'undefined') {
|
|
17613
|
+
Object.defineProperty(exports$1.default, '__esModule', { value: true });
|
|
17614
|
+
Object.assign(exports$1.default, exports$1);
|
|
17615
|
+
module.exports = exports$1.default;
|
|
17616
|
+
}
|
|
17617
|
+
|
|
17618
|
+
|
|
17619
|
+
} (unrecognizedActionError, unrecognizedActionError.exports));
|
|
17620
|
+
return unrecognizedActionError.exports;
|
|
17621
|
+
}
|
|
17622
|
+
|
|
17323
17623
|
var bailoutToClientRendering = {exports: {}};
|
|
17324
17624
|
|
|
17325
17625
|
var hasRequiredBailoutToClientRendering;
|
|
@@ -17339,14 +17639,25 @@ function requireBailoutToClientRendering () {
|
|
|
17339
17639
|
});
|
|
17340
17640
|
const _bailouttocsr = requireBailoutToCsr();
|
|
17341
17641
|
const _workasyncstorageexternal = requireWorkAsyncStorage_external();
|
|
17642
|
+
const _workunitasyncstorageexternal = requireWorkUnitAsyncStorage_external();
|
|
17342
17643
|
function bailoutToClientRendering(reason) {
|
|
17343
17644
|
const workStore = _workasyncstorageexternal.workAsyncStorage.getStore();
|
|
17344
17645
|
if (workStore == null ? void 0 : workStore.forceStatic) return;
|
|
17345
|
-
|
|
17346
|
-
|
|
17347
|
-
|
|
17348
|
-
|
|
17349
|
-
|
|
17646
|
+
const workUnitStore = _workunitasyncstorageexternal.workUnitAsyncStorage.getStore();
|
|
17647
|
+
if (workUnitStore) {
|
|
17648
|
+
switch(workUnitStore.type){
|
|
17649
|
+
case 'prerender':
|
|
17650
|
+
case 'prerender-runtime':
|
|
17651
|
+
case 'prerender-client':
|
|
17652
|
+
case 'prerender-ppr':
|
|
17653
|
+
case 'prerender-legacy':
|
|
17654
|
+
throw Object.defineProperty(new _bailouttocsr.BailoutToCSRError(reason), "__NEXT_ERROR_CODE", {
|
|
17655
|
+
value: "E394",
|
|
17656
|
+
enumerable: false,
|
|
17657
|
+
configurable: true
|
|
17658
|
+
});
|
|
17659
|
+
}
|
|
17660
|
+
}
|
|
17350
17661
|
}
|
|
17351
17662
|
|
|
17352
17663
|
if ((typeof exports$1.default === 'function' || (typeof exports$1.default === 'object' && exports$1.default !== null)) && typeof exports$1.default.__esModule === 'undefined') {
|
|
@@ -17400,6 +17711,9 @@ function requireNavigation$1 () {
|
|
|
17400
17711
|
unauthorized: function() {
|
|
17401
17712
|
return _navigationreactserver.unauthorized;
|
|
17402
17713
|
},
|
|
17714
|
+
unstable_isUnrecognizedActionError: function() {
|
|
17715
|
+
return _unrecognizedactionerror.unstable_isUnrecognizedActionError;
|
|
17716
|
+
},
|
|
17403
17717
|
unstable_rethrow: function() {
|
|
17404
17718
|
return _navigationreactserver.unstable_rethrow;
|
|
17405
17719
|
},
|
|
@@ -17432,6 +17746,7 @@ function requireNavigation$1 () {
|
|
|
17432
17746
|
const _segment = requireSegment();
|
|
17433
17747
|
const _navigationreactserver = requireNavigation_reactServer();
|
|
17434
17748
|
const _serverinsertedhtmlsharedruntime = requireServerInsertedHtml_sharedRuntime();
|
|
17749
|
+
const _unrecognizedactionerror = requireUnrecognizedActionError();
|
|
17435
17750
|
const useDynamicRouteParams = typeof window === 'undefined' ? requireDynamicRendering().useDynamicRouteParams : undefined;
|
|
17436
17751
|
function useSearchParams() {
|
|
17437
17752
|
const searchParams = (0, _react.useContext)(_hooksclientcontextsharedruntime.SearchParamsContext);
|