@turnipxenon/pineapple 2.8.0 → 2.10.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/Card.svelte +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/package.json +1 -3
- package/.eslintignore +0 -16
- package/.eslintrc.cjs +0 -20
- package/.gitignore +0 -24
- package/.idea/.gitignore +0 -5
- package/.idea/codeStyles/Project.xml +0 -76
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/discord.xml +0 -7
- package/.idea/inspectionProfiles/Project_Default.xml +0 -22
- package/.idea/modules.xml +0 -8
- package/.idea/pineapple.iml +0 -16
- package/.idea/shelf/Attempt_for_whole_blog_page/shelved.patch +0 -164
- package/.idea/shelf/Attempt_for_whole_blog_page.xml +0 -4
- package/.idea/shelf/Changes/shelved.patch +0 -118
- package/.idea/shelf/Changes.xml +0 -4
- package/.idea/shelf/Changes1/shelved.patch +0 -250
- package/.idea/shelf/Changes1.xml +0 -4
- package/.idea/shelf/Fix_attempt_for_slug/shelved.patch +0 -63
- package/.idea/shelf/Fix_attempt_for_slug.xml +0 -4
- package/.idea/shelf/yarn_scripts/shelved.patch +0 -20
- package/.idea/shelf/yarn_scripts.xml +0 -4
- package/.idea/vcs.xml +0 -6
- package/.idea/workspace.xml +0 -879
- package/.npmrc +0 -1
- package/.prettierignore +0 -17
- package/.prettierrc +0 -9
- package/.svelte-kit/__package__/.gitignore +0 -1
- package/.svelte-kit/__package__/api/GetLatestBlogs.d.ts +0 -1
- package/.svelte-kit/__package__/api/GetLatestBlogs.js +0 -7
- package/.svelte-kit/__package__/api/index.d.ts +0 -1
- package/.svelte-kit/__package__/api/index.js +0 -2
- package/.svelte-kit/__package__/app.postcss +0 -212
- package/.svelte-kit/__package__/assets/bg_tiled/bg_tiled_ares.png +0 -0
- package/.svelte-kit/__package__/assets/bg_tiled/bg_tiled_corn.png +0 -0
- package/.svelte-kit/__package__/assets/bg_tiled/bg_tiled_pineapple.png +0 -0
- package/.svelte-kit/__package__/assets/bg_tiled/bg_tiled_reinhard.png +0 -0
- package/.svelte-kit/__package__/assets/bg_tiled/bg_tiled_tomato.png +0 -0
- package/.svelte-kit/__package__/assets/bg_tiled/bg_tiled_turnip.png +0 -0
- package/.svelte-kit/__package__/assets/characters/ares/ares_blushing.webp +0 -0
- package/.svelte-kit/__package__/assets/characters/ares/ares_disappointed.webp +0 -0
- package/.svelte-kit/__package__/assets/characters/ares/ares_happy.webp +0 -0
- package/.svelte-kit/__package__/assets/characters/ares/ares_lets_go.webp +0 -0
- package/.svelte-kit/__package__/assets/characters/ares/ares_logo.webp +0 -0
- package/.svelte-kit/__package__/assets/characters/ares/ares_mad.webp +0 -0
- package/.svelte-kit/__package__/assets/characters/ares/ares_neutral.webp +0 -0
- package/.svelte-kit/__package__/assets/characters/ares/ares_slightly_mad.webp +0 -0
- package/.svelte-kit/__package__/assets/characters/ares/ares_surprised.webp +0 -0
- package/.svelte-kit/__package__/assets/characters/ares/ares_yay.webp +0 -0
- package/.svelte-kit/__package__/assets/game_dev/footage-chef-wings.gif +0 -0
- package/.svelte-kit/__package__/assets/icons/arrow-upward.svg +0 -1
- package/.svelte-kit/__package__/assets/icons/bitbucket-icon.svg +0 -1
- package/.svelte-kit/__package__/assets/icons/chat-cursor.svg +0 -47
- package/.svelte-kit/__package__/assets/icons/close.svg +0 -1
- package/.svelte-kit/__package__/assets/icons/external-link.svg +0 -50
- package/.svelte-kit/__package__/assets/icons/github-mark.svg +0 -1
- package/.svelte-kit/__package__/assets/icons/link-icon.svg +0 -1
- package/.svelte-kit/__package__/assets/icons/linkedin.svg +0 -1
- package/.svelte-kit/__package__/assets/icons/mail.svg +0 -1
- package/.svelte-kit/__package__/assets/others/seaweed-showcase.mp4 +0 -0
- package/.svelte-kit/__package__/assets/others/weaver-footage.gif +0 -0
- package/.svelte-kit/__package__/assets/others/window-set.png +0 -0
- package/.svelte-kit/__package__/assets/placeholder/placeholder_circle.png +0 -0
- package/.svelte-kit/__package__/assets/temp/header-hep-cat.mp4 +0 -0
- package/.svelte-kit/__package__/assets/temp/header-pengi.mp4 +0 -0
- package/.svelte-kit/__package__/assets/temp/header-soulwork.mp4 +0 -0
- package/.svelte-kit/__package__/components/Card.svelte +0 -62
- package/.svelte-kit/__package__/components/Card.svelte.d.ts +0 -25
- package/.svelte-kit/__package__/components/CarouselElement.svelte +0 -21
- package/.svelte-kit/__package__/components/CarouselElement.svelte.d.ts +0 -19
- package/.svelte-kit/__package__/components/ElementVisbilityDetector.svelte +0 -18
- package/.svelte-kit/__package__/components/ElementVisbilityDetector.svelte.d.ts +0 -18
- package/.svelte-kit/__package__/components/LazyAsset.svelte +0 -96
- package/.svelte-kit/__package__/components/LazyAsset.svelte.d.ts +0 -20
- package/.svelte-kit/__package__/components/LazyAssetType.d.ts +0 -10
- package/.svelte-kit/__package__/components/LazyAssetType.js +0 -12
- package/.svelte-kit/__package__/components/OnElementVisbilityChanged.d.ts +0 -1
- package/.svelte-kit/__package__/components/OnElementVisbilityChanged.js +0 -1
- package/.svelte-kit/__package__/components/PineappleSlideToggle.svelte +0 -12
- package/.svelte-kit/__package__/components/PineappleSlideToggle.svelte.d.ts +0 -20
- package/.svelte-kit/__package__/components/RandomizedBackground.svelte +0 -64
- package/.svelte-kit/__package__/components/RandomizedBackground.svelte.d.ts +0 -16
- package/.svelte-kit/__package__/components/RandomizedImage.svelte +0 -37
- package/.svelte-kit/__package__/components/RandomizedImage.svelte.d.ts +0 -17
- package/.svelte-kit/__package__/components/SocialSection.svelte +0 -166
- package/.svelte-kit/__package__/components/SocialSection.svelte.d.ts +0 -31
- package/.svelte-kit/__package__/components/StickyElement.svelte +0 -36
- package/.svelte-kit/__package__/components/StickyElement.svelte.d.ts +0 -18
- package/.svelte-kit/__package__/components/ToggleableContent.svelte +0 -66
- package/.svelte-kit/__package__/components/ToggleableContent.svelte.d.ts +0 -19
- package/.svelte-kit/__package__/components/ToggleableContentType.d.ts +0 -4
- package/.svelte-kit/__package__/components/ToggleableContentType.js +0 -5
- package/.svelte-kit/__package__/components/blog_template/BlogTemplate.svelte +0 -44
- package/.svelte-kit/__package__/components/blog_template/BlogTemplate.svelte.d.ts +0 -23
- package/.svelte-kit/__package__/components/blog_template/BlogTemplateInner.svelte +0 -38
- package/.svelte-kit/__package__/components/blog_template/BlogTemplateInner.svelte.d.ts +0 -19
- package/.svelte-kit/__package__/components/blog_template/blog-template.css +0 -7
- package/.svelte-kit/__package__/components/chip/Chip.svelte +0 -95
- package/.svelte-kit/__package__/components/chip/Chip.svelte.d.ts +0 -19
- package/.svelte-kit/__package__/components/combo_box/ComboBox.svelte +0 -11
- package/.svelte-kit/__package__/components/combo_box/ComboBox.svelte.d.ts +0 -18
- package/.svelte-kit/__package__/components/combo_box/ComboBoxWithButton.svelte +0 -22
- package/.svelte-kit/__package__/components/combo_box/ComboBoxWithButton.svelte.d.ts +0 -19
- package/.svelte-kit/__package__/components/combo_box/combo-box.postcss +0 -22
- package/.svelte-kit/__package__/components/dialog_manager/DialogManager.d.ts +0 -82
- package/.svelte-kit/__package__/components/dialog_manager/DialogManager.js +0 -263
- package/.svelte-kit/__package__/components/dialog_manager/DialogManagerStore.d.ts +0 -41
- package/.svelte-kit/__package__/components/dialog_manager/DialogManagerStore.js +0 -45
- package/.svelte-kit/__package__/components/dialog_manager/DialogProcessor.d.ts +0 -13
- package/.svelte-kit/__package__/components/dialog_manager/DialogProcessor.js +0 -62
- package/.svelte-kit/__package__/components/dialog_manager/DialogUtils.d.ts +0 -5
- package/.svelte-kit/__package__/components/dialog_manager/DialogUtils.js +0 -8
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/core/BTreeUtils.d.ts +0 -15
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/core/BTreeUtils.js +0 -34
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/core/BaseBehaviorResult.d.ts +0 -4
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/core/BaseBehaviorResult.js +0 -1
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/core/BehaviorNode.d.ts +0 -3
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/core/BehaviorNode.js +0 -1
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/core/BehaviorStatus.d.ts +0 -5
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/core/BehaviorStatus.js +0 -6
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/core/SelectorNode.d.ts +0 -12
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/core/SelectorNode.js +0 -22
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/ExpressionArguments.d.ts +0 -5
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/ExpressionArguments.js +0 -1
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/ExpressionBehaviorNode.d.ts +0 -4
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/ExpressionBehaviorNode.js +0 -1
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/ExpressionEvaluator.d.ts +0 -15
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/ExpressionEvaluator.js +0 -220
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/ExpressionResult.d.ts +0 -5
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/ExpressionResult.js +0 -1
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/ExpressionSelectorNode.d.ts +0 -8
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/ExpressionSelectorNode.js +0 -15
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/ExpressionState.d.ts +0 -3
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/ExpressionState.js +0 -1
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/OperandNode.d.ts +0 -10
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/OperandNode.js +0 -15
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/OperatorNode.d.ts +0 -11
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/OperatorNode.js +0 -30
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/commands/CommandExpressionNode.d.ts +0 -6
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/commands/CommandExpressionNode.js +0 -21
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/commands/CommandLogicNode.d.ts +0 -9
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/commands/CommandLogicNode.js +0 -19
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/commands/CommandMap.d.ts +0 -9
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/commands/CommandMap.js +0 -18
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/commands/RandomRangeCommand.d.ts +0 -15
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/commands/RandomRangeCommand.js +0 -24
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/commands/VisitedCommand.d.ts +0 -20
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/commands/VisitedCommand.js +0 -32
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/commands/VisitedCountCommand.d.ts +0 -13
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/commands/VisitedCountCommand.js +0 -25
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/operators/AndOperator.d.ts +0 -7
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/operators/AndOperator.js +0 -15
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/operators/EqualityOperator.d.ts +0 -7
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/operators/EqualityOperator.js +0 -14
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/operators/GreaterThanEqualOperator.d.ts +0 -7
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/operators/GreaterThanEqualOperator.js +0 -12
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/operators/GreaterThanOperator.d.ts +0 -7
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/operators/GreaterThanOperator.js +0 -12
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/operators/InequalityOperator.d.ts +0 -7
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/operators/InequalityOperator.js +0 -12
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/operators/LessThanEqualOperator.d.ts +0 -7
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/operators/LessThanEqualOperator.js +0 -12
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/operators/LessThanOperator.d.ts +0 -7
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/operators/LessThanOperator.js +0 -12
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/operators/NegationOperator.d.ts +0 -7
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/operators/NegationOperator.js +0 -13
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/operators/OperatorLogicNode.d.ts +0 -17
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/operators/OperatorLogicNode.js +0 -32
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/operators/OperatorMap.d.ts +0 -9
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/operators/OperatorMap.js +0 -47
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/operators/OrOperator.d.ts +0 -7
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/operators/OrOperator.js +0 -13
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/operators/XorOperator.d.ts +0 -7
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/operators/XorOperator.js +0 -17
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/operators/arithmetic/DivisionOperator.d.ts +0 -7
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/operators/arithmetic/DivisionOperator.js +0 -14
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/operators/arithmetic/MinusOperator.d.ts +0 -7
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/operators/arithmetic/MinusOperator.js +0 -14
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/operators/arithmetic/MultiplicationOperator.d.ts +0 -7
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/operators/arithmetic/MultiplicationOperator.js +0 -12
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/operators/arithmetic/PlusOperator.d.ts +0 -7
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/operators/arithmetic/PlusOperator.js +0 -14
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/operators/arithmetic/RemainderDivisionOperator.d.ts +0 -7
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/expression/operators/arithmetic/RemainderDivisionOperator.js +0 -14
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/line_core/LineBehaviorNode.d.ts +0 -4
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/line_core/LineBehaviorNode.js +0 -1
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/line_core/LineBehaviorResult.d.ts +0 -6
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/line_core/LineBehaviorResult.js +0 -1
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/line_core/LineNodeArguments.d.ts +0 -6
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/line_core/LineNodeArguments.js +0 -1
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/line_core/LineSelectorNode.d.ts +0 -8
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/line_core/LineSelectorNode.js +0 -15
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/line_processors/BehaviorState.d.ts +0 -5
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/line_processors/BehaviorState.js +0 -5
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/line_processors/ElseIfNode.d.ts +0 -11
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/line_processors/ElseIfNode.js +0 -53
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/line_processors/ElseNode.d.ts +0 -11
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/line_processors/ElseNode.js +0 -49
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/line_processors/EndIfNode.d.ts +0 -11
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/line_processors/EndIfNode.js +0 -23
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/line_processors/IfMode.d.ts +0 -6
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/line_processors/IfMode.js +0 -8
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/line_processors/IfNode.d.ts +0 -12
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/line_processors/IfNode.js +0 -43
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/line_processors/IgnoreGuardNode.d.ts +0 -11
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/line_processors/IgnoreGuardNode.js +0 -25
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/line_processors/IgnoreJumpNode.d.ts +0 -6
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/line_processors/IgnoreJumpNode.js +0 -18
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/line_processors/LineCommentNode.d.ts +0 -6
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/line_processors/LineCommentNode.js +0 -17
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/line_processors/NormalLineProcessorNode.d.ts +0 -10
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/line_processors/NormalLineProcessorNode.js +0 -38
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/line_processors/SetVariableNode.d.ts +0 -11
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/line_processors/SetVariableNode.js +0 -31
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/line_processors/commands/DeclareCommand.d.ts +0 -8
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/line_processors/commands/DeclareCommand.js +0 -39
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/line_processors/commands/JumpCommand.d.ts +0 -8
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/line_processors/commands/JumpCommand.js +0 -40
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/line_processors/commands/UnvisitCommand.d.ts +0 -9
- package/.svelte-kit/__package__/components/dialog_manager/behavior_tree/line_processors/commands/UnvisitCommand.js +0 -28
- package/.svelte-kit/__package__/components/dialog_overlay/DialogOverlay.svelte +0 -124
- package/.svelte-kit/__package__/components/dialog_overlay/DialogOverlay.svelte.d.ts +0 -14
- package/.svelte-kit/__package__/components/index.d.ts +0 -7
- package/.svelte-kit/__package__/components/index.js +0 -8
- package/.svelte-kit/__package__/components/layouts/LayoutConstants.d.ts +0 -1
- package/.svelte-kit/__package__/components/layouts/LayoutConstants.js +0 -1
- package/.svelte-kit/__package__/components/layouts/SeaweedBaseLayout.svelte +0 -86
- package/.svelte-kit/__package__/components/layouts/SeaweedBaseLayout.svelte.d.ts +0 -22
- package/.svelte-kit/__package__/components/navigation_component/NavigationComponent.svelte +0 -262
- package/.svelte-kit/__package__/components/navigation_component/NavigationComponent.svelte.d.ts +0 -28
- package/.svelte-kit/__package__/components/navigation_component/NavigationControl.svelte +0 -121
- package/.svelte-kit/__package__/components/navigation_component/NavigationControl.svelte.d.ts +0 -18
- package/.svelte-kit/__package__/components/navigation_component/PageMeta.d.ts +0 -95
- package/.svelte-kit/__package__/components/navigation_component/PageMeta.js +0 -129
- package/.svelte-kit/__package__/components/navigation_component/index.d.ts +0 -2
- package/.svelte-kit/__package__/components/navigation_component/index.js +0 -3
- package/.svelte-kit/__package__/components/overrideable_meta/OverridableMeta.svelte +0 -51
- package/.svelte-kit/__package__/components/overrideable_meta/OverridableMeta.svelte.d.ts +0 -20
- package/.svelte-kit/__package__/components/overrideable_meta/OverridableMetaProps.d.ts +0 -9
- package/.svelte-kit/__package__/components/overrideable_meta/OverridableMetaProps.js +0 -1
- package/.svelte-kit/__package__/components/overrideable_meta/index.d.ts +0 -2
- package/.svelte-kit/__package__/components/overrideable_meta/index.js +0 -3
- package/.svelte-kit/__package__/components/pineapple/PineappleBaseLayout.svelte +0 -290
- package/.svelte-kit/__package__/components/pineapple/PineappleBaseLayout.svelte.d.ts +0 -18
- package/.svelte-kit/__package__/components/pineapple/toast/DefaultToastBody.d.ts +0 -8
- package/.svelte-kit/__package__/components/pineapple/toast/DefaultToastBody.js +0 -1
- package/.svelte-kit/__package__/components/pineapple/toast/DefaultToastBody.svelte +0 -48
- package/.svelte-kit/__package__/components/pineapple/toast/DefaultToastBody.svelte.d.ts +0 -20
- package/.svelte-kit/__package__/components/pineapple/toast/Toast.d.ts +0 -27
- package/.svelte-kit/__package__/components/pineapple/toast/Toast.js +0 -37
- package/.svelte-kit/__package__/components/pineapple/toast/Toast.svelte +0 -92
- package/.svelte-kit/__package__/components/pineapple/toast/Toast.svelte.d.ts +0 -14
- package/.svelte-kit/__package__/components/pineapple/toast/custom-toast/TestCustomToast.d.ts +0 -5
- package/.svelte-kit/__package__/components/pineapple/toast/custom-toast/TestCustomToast.js +0 -1
- package/.svelte-kit/__package__/components/pineapple/toast/custom-toast/TestCustomToast.svelte +0 -1
- package/.svelte-kit/__package__/components/pineapple/toast/custom-toast/TestCustomToast.svelte.d.ts +0 -23
- package/.svelte-kit/__package__/consts.d.ts +0 -2
- package/.svelte-kit/__package__/consts.js +0 -2
- package/.svelte-kit/__package__/index.d.ts +0 -13
- package/.svelte-kit/__package__/index.js +0 -14
- package/.svelte-kit/__package__/postcss.d.ts +0 -3
- package/.svelte-kit/__package__/scripts/pineapple_fiber/PineappleFiberParser.d.ts +0 -2
- package/.svelte-kit/__package__/scripts/pineapple_fiber/PineappleFiberParser.js +0 -137
- package/.svelte-kit/__package__/scripts/pineapple_fiber/PineappleWeaver.d.ts +0 -9
- package/.svelte-kit/__package__/scripts/pineapple_fiber/PineappleWeaver.js +0 -70
- package/.svelte-kit/__package__/scripts/util/FileManagement.d.ts +0 -7
- package/.svelte-kit/__package__/scripts/util/FileManagement.js +0 -35
- package/.svelte-kit/__package__/scripts/util/ManualCheck.d.ts +0 -1
- package/.svelte-kit/__package__/scripts/util/ManualCheck.js +0 -28
- package/.svelte-kit/__package__/scripts/util/ManualCheckRun.d.ts +0 -1
- package/.svelte-kit/__package__/scripts/util/ManualCheckRun.js +0 -6
- package/.svelte-kit/__package__/server-temp/prisma.d.ts +0 -2
- package/.svelte-kit/__package__/server-temp/prisma.js +0 -2
- package/.svelte-kit/__package__/store.d.ts +0 -17
- package/.svelte-kit/__package__/store.js +0 -17
- package/.svelte-kit/__package__/styles/DefaultGridContainer.css +0 -61
- package/.svelte-kit/__package__/styles/global.css +0 -1
- package/.svelte-kit/__package__/template/seaweed/ChumBucket.svelte +0 -87
- package/.svelte-kit/__package__/template/seaweed/ChumBucket.svelte.d.ts +0 -14
- package/.svelte-kit/__package__/template/seaweed/CreateUrlForm.svelte +0 -66
- package/.svelte-kit/__package__/template/seaweed/CreateUrlForm.svelte.d.ts +0 -16
- package/.svelte-kit/__package__/template/seaweed/ParseQueryTerms.d.ts +0 -1
- package/.svelte-kit/__package__/template/seaweed/ParseQueryTerms.js +0 -23
- package/.svelte-kit/__package__/template/seaweed/RunChaos.d.ts +0 -1
- package/.svelte-kit/__package__/template/seaweed/RunChaos.js +0 -41
- package/.svelte-kit/__package__/template/seaweed/SeaweedTemplate.svelte +0 -287
- package/.svelte-kit/__package__/template/seaweed/SeaweedTemplate.svelte.d.ts +0 -29
- package/.svelte-kit/__package__/template/seaweed/SeaweedTemplateData.d.ts +0 -30
- package/.svelte-kit/__package__/template/seaweed/SeaweedTemplateData.js +0 -79
- package/.svelte-kit/__package__/template/seaweed/entries/ChefWings.svelte +0 -47
- package/.svelte-kit/__package__/template/seaweed/entries/ChefWings.svelte.d.ts +0 -17
- package/.svelte-kit/__package__/template/seaweed/entries/CustomizedYarnspinner.svelte +0 -32
- package/.svelte-kit/__package__/template/seaweed/entries/CustomizedYarnspinner.svelte.d.ts +0 -17
- package/.svelte-kit/__package__/template/seaweed/entries/EntryProps.d.ts +0 -16
- package/.svelte-kit/__package__/template/seaweed/entries/EntryProps.js +0 -5
- package/.svelte-kit/__package__/template/seaweed/entries/Hepcat.svelte +0 -55
- package/.svelte-kit/__package__/template/seaweed/entries/Hepcat.svelte.d.ts +0 -17
- package/.svelte-kit/__package__/template/seaweed/entries/Pengi.svelte +0 -49
- package/.svelte-kit/__package__/template/seaweed/entries/Pengi.svelte.d.ts +0 -17
- package/.svelte-kit/__package__/template/seaweed/entries/Soulwork.svelte +0 -46
- package/.svelte-kit/__package__/template/seaweed/entries/Soulwork.svelte.d.ts +0 -17
- package/.svelte-kit/__package__/template/seaweed/entries/ThisWebpage.svelte +0 -46
- package/.svelte-kit/__package__/template/seaweed/entries/ThisWebpage.svelte.d.ts +0 -17
- package/.svelte-kit/__package__/template/seaweed/entries/WorkExperience.svelte +0 -113
- package/.svelte-kit/__package__/template/seaweed/entries/WorkExperience.svelte.d.ts +0 -18
- package/.svelte-kit/__package__/template/seaweed/entries/Workset.svelte +0 -48
- package/.svelte-kit/__package__/template/seaweed/entries/Workset.svelte.d.ts +0 -17
- package/.svelte-kit/__package__/template/seaweed/entry_order_config/EntryOrderConfig.d.ts +0 -1
- package/.svelte-kit/__package__/template/seaweed/entry_order_config/EntryOrderConfig.js +0 -8
- package/.svelte-kit/__package__/template/seaweed/entry_order_config/EntryOrderConfig.svelte +0 -387
- package/.svelte-kit/__package__/template/seaweed/entry_order_config/EntryOrderConfig.svelte.d.ts +0 -23
- package/.svelte-kit/__package__/template/seaweed/entry_order_config/entry-order-config.postcss +0 -35
- package/.svelte-kit/__package__/template/seaweed/index.d.ts +0 -4
- package/.svelte-kit/__package__/template/seaweed/index.js +0 -4
- package/.svelte-kit/__package__/template/seaweed/seaweed.postcss +0 -133
- package/.svelte-kit/__package__/theme.postcss +0 -117
- package/.svelte-kit/__package__/types/BlogBlurbMeta.d.ts +0 -11
- package/.svelte-kit/__package__/types/BlogBlurbMeta.js +0 -16
- package/.svelte-kit/__package__/types/BreadcrumbData.d.ts +0 -4
- package/.svelte-kit/__package__/types/BreadcrumbData.js +0 -1
- package/.svelte-kit/__package__/types/api/CreateUrl.d.ts +0 -15
- package/.svelte-kit/__package__/types/api/CreateUrl.js +0 -19
- package/.svelte-kit/__package__/types/api/index.d.ts +0 -1
- package/.svelte-kit/__package__/types/api/index.js +0 -2
- package/.svelte-kit/__package__/types/pineapple_fiber/DialogDetail.d.ts +0 -6
- package/.svelte-kit/__package__/types/pineapple_fiber/DialogDetail.js +0 -1
- package/.svelte-kit/__package__/types/pineapple_fiber/DialogState.d.ts +0 -6
- package/.svelte-kit/__package__/types/pineapple_fiber/DialogState.js +0 -7
- package/.svelte-kit/__package__/types/pineapple_fiber/DialogVariableStore.d.ts +0 -2
- package/.svelte-kit/__package__/types/pineapple_fiber/DialogVariableStore.js +0 -20
- package/.svelte-kit/__package__/types/pineapple_fiber/PortraitType.d.ts +0 -11
- package/.svelte-kit/__package__/types/pineapple_fiber/PortraitType.js +0 -12
- package/.svelte-kit/__package__/util/util.d.ts +0 -10
- package/.svelte-kit/__package__/util/util.js +0 -27
- package/.svelte-kit/ambient.d.ts +0 -395
- package/.svelte-kit/generated/client/app.js +0 -47
- package/.svelte-kit/generated/client/matchers.js +0 -1
- package/.svelte-kit/generated/client/nodes/0.js +0 -1
- package/.svelte-kit/generated/client/nodes/1.js +0 -1
- package/.svelte-kit/generated/client/nodes/10.js +0 -1
- package/.svelte-kit/generated/client/nodes/11.js +0 -1
- package/.svelte-kit/generated/client/nodes/12.js +0 -1
- package/.svelte-kit/generated/client/nodes/13.js +0 -3
- package/.svelte-kit/generated/client/nodes/14.js +0 -3
- package/.svelte-kit/generated/client/nodes/15.js +0 -3
- package/.svelte-kit/generated/client/nodes/16.js +0 -1
- package/.svelte-kit/generated/client/nodes/2.js +0 -1
- package/.svelte-kit/generated/client/nodes/3.js +0 -1
- package/.svelte-kit/generated/client/nodes/4.js +0 -1
- package/.svelte-kit/generated/client/nodes/5.js +0 -1
- package/.svelte-kit/generated/client/nodes/6.js +0 -1
- package/.svelte-kit/generated/client/nodes/7.js +0 -1
- package/.svelte-kit/generated/client/nodes/8.js +0 -1
- package/.svelte-kit/generated/client/nodes/9.js +0 -1
- package/.svelte-kit/generated/client-optimized/app.js +0 -47
- package/.svelte-kit/generated/client-optimized/matchers.js +0 -1
- package/.svelte-kit/generated/client-optimized/nodes/0.js +0 -1
- package/.svelte-kit/generated/client-optimized/nodes/1.js +0 -1
- package/.svelte-kit/generated/client-optimized/nodes/10.js +0 -1
- package/.svelte-kit/generated/client-optimized/nodes/11.js +0 -1
- package/.svelte-kit/generated/client-optimized/nodes/12.js +0 -1
- package/.svelte-kit/generated/client-optimized/nodes/13.js +0 -3
- package/.svelte-kit/generated/client-optimized/nodes/14.js +0 -3
- package/.svelte-kit/generated/client-optimized/nodes/15.js +0 -3
- package/.svelte-kit/generated/client-optimized/nodes/16.js +0 -1
- package/.svelte-kit/generated/client-optimized/nodes/2.js +0 -1
- package/.svelte-kit/generated/client-optimized/nodes/3.js +0 -1
- package/.svelte-kit/generated/client-optimized/nodes/4.js +0 -1
- package/.svelte-kit/generated/client-optimized/nodes/5.js +0 -1
- package/.svelte-kit/generated/client-optimized/nodes/6.js +0 -1
- package/.svelte-kit/generated/client-optimized/nodes/7.js +0 -1
- package/.svelte-kit/generated/client-optimized/nodes/8.js +0 -1
- package/.svelte-kit/generated/client-optimized/nodes/9.js +0 -1
- package/.svelte-kit/generated/root.svelte +0 -64
- package/.svelte-kit/generated/server/internal.js +0 -34
- package/.svelte-kit/non-ambient.d.ts +0 -25
- package/.svelte-kit/output/client/.vite/manifest.json +0 -694
- package/.svelte-kit/output/client/_app/immutable/assets/0.BZfguPbX.css +0 -10
- package/.svelte-kit/output/client/_app/immutable/assets/13.BIMIBpeM.css +0 -1
- package/.svelte-kit/output/client/_app/immutable/assets/4.ClTmhFiH.css +0 -1
- package/.svelte-kit/output/client/_app/immutable/assets/NavigationComponent.DcXBcmND.css +0 -1
- package/.svelte-kit/output/client/_app/immutable/assets/PineappleBaseLayout.BJNkM2lS.css +0 -1
- package/.svelte-kit/output/client/_app/immutable/assets/ProgressBar.Cirlo5Z8.css +0 -1
- package/.svelte-kit/output/client/_app/immutable/assets/_layout.BgClWDWR.css +0 -10
- package/.svelte-kit/output/client/_app/immutable/assets/_page.BIMIBpeM.css +0 -1
- package/.svelte-kit/output/client/_app/immutable/assets/_page.ClTmhFiH.css +0 -1
- package/.svelte-kit/output/client/_app/immutable/assets/ares_blushing.B6Q0SsBp.webp +0 -0
- package/.svelte-kit/output/client/_app/immutable/assets/ares_disappointed.LOpkh7Q7.webp +0 -0
- package/.svelte-kit/output/client/_app/immutable/assets/ares_happy.Cz9WhdwO.webp +0 -0
- package/.svelte-kit/output/client/_app/immutable/assets/ares_lets_go.BxjJjKUv.webp +0 -0
- package/.svelte-kit/output/client/_app/immutable/assets/ares_logo.C_a3ZQAP.webp +0 -0
- package/.svelte-kit/output/client/_app/immutable/assets/ares_mad.DofDLDmM.webp +0 -0
- package/.svelte-kit/output/client/_app/immutable/assets/ares_neutral.Hp923t8N.webp +0 -0
- package/.svelte-kit/output/client/_app/immutable/assets/ares_slightly_mad.DdwOp6J5.webp +0 -0
- package/.svelte-kit/output/client/_app/immutable/assets/ares_surprised.BxbNH_w8.webp +0 -0
- package/.svelte-kit/output/client/_app/immutable/assets/ares_yay.EM2SNr0e.webp +0 -0
- package/.svelte-kit/output/client/_app/immutable/assets/bg_tiled_ares.DTcFskeK.png +0 -0
- package/.svelte-kit/output/client/_app/immutable/assets/bg_tiled_corn.D22ZwTZ0.png +0 -0
- package/.svelte-kit/output/client/_app/immutable/assets/bg_tiled_pineapple.D28N65_A.png +0 -0
- package/.svelte-kit/output/client/_app/immutable/assets/bg_tiled_reinhard.D22NV0xw.png +0 -0
- package/.svelte-kit/output/client/_app/immutable/assets/bg_tiled_tomato.O9Z7_E07.png +0 -0
- package/.svelte-kit/output/client/_app/immutable/assets/bg_tiled_turnip.DMU0uHH4.png +0 -0
- package/.svelte-kit/output/client/_app/immutable/assets/footage-chef-wings.dVBm8Uit.gif +0 -0
- package/.svelte-kit/output/client/_app/immutable/assets/header-hep-cat.DcyPS3Oy.mp4 +0 -0
- package/.svelte-kit/output/client/_app/immutable/assets/header-pengi.DWAOeO4q.mp4 +0 -0
- package/.svelte-kit/output/client/_app/immutable/assets/header-soulwork.BQRWmhTu.mp4 +0 -0
- package/.svelte-kit/output/client/_app/immutable/assets/placeholder_circle.Ij3bN7bI.png +0 -0
- package/.svelte-kit/output/client/_app/immutable/assets/seaweed-showcase.TTVTTC5m.mp4 +0 -0
- package/.svelte-kit/output/client/_app/immutable/assets/weaver-footage.sjDEbkrX.gif +0 -0
- package/.svelte-kit/output/client/_app/immutable/assets/window-set.IpgsYUna.png +0 -0
- package/.svelte-kit/output/client/_app/immutable/chunks/DialogManagerStore.uKBS8wDS.js +0 -7
- package/.svelte-kit/output/client/_app/immutable/chunks/NavigationComponent.svelte_svelte_type_style_lang.DfEIDspS.js +0 -33
- package/.svelte-kit/output/client/_app/immutable/chunks/PineappleBaseLayout.svelte_svelte_type_style_lang.DYXCZxRe.js +0 -5
- package/.svelte-kit/output/client/_app/immutable/chunks/PineappleSlideToggle.Cpnzq8nG.js +0 -1
- package/.svelte-kit/output/client/_app/immutable/chunks/ProgressBar.svelte_svelte_type_style_lang.gYVkR-Pp.js +0 -1
- package/.svelte-kit/output/client/_app/immutable/chunks/SeaweedTemplate.D8BMpFyR.js +0 -42
- package/.svelte-kit/output/client/_app/immutable/chunks/Toast.CfxCQiZJ.js +0 -1
- package/.svelte-kit/output/client/_app/immutable/chunks/_page.BCsXwAds.js +0 -8
- package/.svelte-kit/output/client/_app/immutable/chunks/_page.CER3LJw4.js +0 -8
- package/.svelte-kit/output/client/_app/immutable/chunks/_page.CJqYI1vC.js +0 -7
- package/.svelte-kit/output/client/_app/immutable/chunks/_page.CRke_Vt-.js +0 -8
- package/.svelte-kit/output/client/_app/immutable/chunks/_page.CdlE3ZqM.js +0 -8
- package/.svelte-kit/output/client/_app/immutable/chunks/_page.D8F_fKwN.js +0 -8
- package/.svelte-kit/output/client/_app/immutable/chunks/_page.DOjmKWLN.js +0 -8
- package/.svelte-kit/output/client/_app/immutable/chunks/_page.UybeXHGE.js +0 -8
- package/.svelte-kit/output/client/_app/immutable/chunks/close.BSBWitOq.js +0 -1
- package/.svelte-kit/output/client/_app/immutable/chunks/each.SQ7NrLlo.js +0 -1
- package/.svelte-kit/output/client/_app/immutable/chunks/entry.B9Zoh-6L.js +0 -3
- package/.svelte-kit/output/client/_app/immutable/chunks/index.BID2VU8k.js +0 -4
- package/.svelte-kit/output/client/_app/immutable/chunks/index.D_vqlE3X.js +0 -1
- package/.svelte-kit/output/client/_app/immutable/chunks/index.DbwYs1Xx.js +0 -1
- package/.svelte-kit/output/client/_app/immutable/chunks/index.lAcdadTB.js +0 -1
- package/.svelte-kit/output/client/_app/immutable/chunks/index.qztrOHW4.js +0 -6
- package/.svelte-kit/output/client/_app/immutable/chunks/preload-helper.BQ24v_F8.js +0 -1
- package/.svelte-kit/output/client/_app/immutable/chunks/scheduler.DsUDfRdB.js +0 -1
- package/.svelte-kit/output/client/_app/immutable/chunks/spread.CgU5AtxT.js +0 -1
- package/.svelte-kit/output/client/_app/immutable/chunks/store.yyGEKEAe.js +0 -1
- package/.svelte-kit/output/client/_app/immutable/chunks/stores.BVA7LtvQ.js +0 -1
- package/.svelte-kit/output/client/_app/immutable/chunks/stores.CYFggfyT.js +0 -1
- package/.svelte-kit/output/client/_app/immutable/chunks/stores.DEMC0xoI.js +0 -1
- package/.svelte-kit/output/client/_app/immutable/chunks/stores.UNf3hc21.js +0 -1
- package/.svelte-kit/output/client/_app/immutable/chunks/transitions.FXurGCgU.js +0 -1
- package/.svelte-kit/output/client/_app/immutable/chunks/util.CpV-3U2s.js +0 -1
- package/.svelte-kit/output/client/_app/immutable/entry/app.CsPg_tSG.js +0 -7
- package/.svelte-kit/output/client/_app/immutable/entry/start.BK4UymrI.js +0 -1
- package/.svelte-kit/output/client/_app/immutable/nodes/0.DpxE_iuA.js +0 -2
- package/.svelte-kit/output/client/_app/immutable/nodes/1.CfFtBDAU.js +0 -4
- package/.svelte-kit/output/client/_app/immutable/nodes/10.B_ssKps0.js +0 -1
- package/.svelte-kit/output/client/_app/immutable/nodes/11.B_ssKps0.js +0 -1
- package/.svelte-kit/output/client/_app/immutable/nodes/12.CnXaShb6.js +0 -1
- package/.svelte-kit/output/client/_app/immutable/nodes/13.D6l5S0uo.js +0 -61
- package/.svelte-kit/output/client/_app/immutable/nodes/14.D-06Eivu.js +0 -1
- package/.svelte-kit/output/client/_app/immutable/nodes/15.UZK1S76t.js +0 -1
- package/.svelte-kit/output/client/_app/immutable/nodes/16.C52UdDDz.js +0 -1
- package/.svelte-kit/output/client/_app/immutable/nodes/2.C_PeLfm6.js +0 -5
- package/.svelte-kit/output/client/_app/immutable/nodes/3.DRZNxJIx.js +0 -1
- package/.svelte-kit/output/client/_app/immutable/nodes/4.7r5Yp15Y.js +0 -1
- package/.svelte-kit/output/client/_app/immutable/nodes/5.B_ssKps0.js +0 -1
- package/.svelte-kit/output/client/_app/immutable/nodes/6.B_ssKps0.js +0 -1
- package/.svelte-kit/output/client/_app/immutable/nodes/7.B_ssKps0.js +0 -1
- package/.svelte-kit/output/client/_app/immutable/nodes/8.B_ssKps0.js +0 -1
- package/.svelte-kit/output/client/_app/immutable/nodes/9.B_ssKps0.js +0 -1
- package/.svelte-kit/output/client/_app/version.json +0 -1
- package/.svelte-kit/output/client/default-card.png +0 -0
- package/.svelte-kit/output/client/favicon.png +0 -0
- package/.svelte-kit/output/client/robots.txt +0 -5
- package/.svelte-kit/output/server/.vite/manifest.json +0 -617
- package/.svelte-kit/output/server/_app/immutable/assets/NavigationComponent.DcXBcmND.css +0 -1
- package/.svelte-kit/output/server/_app/immutable/assets/PineappleBaseLayout.BJNkM2lS.css +0 -1
- package/.svelte-kit/output/server/_app/immutable/assets/ProgressBar.Cirlo5Z8.css +0 -1
- package/.svelte-kit/output/server/_app/immutable/assets/_layout.BgClWDWR.css +0 -10
- package/.svelte-kit/output/server/_app/immutable/assets/_page.BIMIBpeM.css +0 -1
- package/.svelte-kit/output/server/_app/immutable/assets/_page.ClTmhFiH.css +0 -1
- package/.svelte-kit/output/server/_app/immutable/assets/ares_blushing.B6Q0SsBp.webp +0 -0
- package/.svelte-kit/output/server/_app/immutable/assets/ares_disappointed.LOpkh7Q7.webp +0 -0
- package/.svelte-kit/output/server/_app/immutable/assets/ares_happy.Cz9WhdwO.webp +0 -0
- package/.svelte-kit/output/server/_app/immutable/assets/ares_lets_go.BxjJjKUv.webp +0 -0
- package/.svelte-kit/output/server/_app/immutable/assets/ares_logo.C_a3ZQAP.webp +0 -0
- package/.svelte-kit/output/server/_app/immutable/assets/ares_mad.DofDLDmM.webp +0 -0
- package/.svelte-kit/output/server/_app/immutable/assets/ares_neutral.Hp923t8N.webp +0 -0
- package/.svelte-kit/output/server/_app/immutable/assets/ares_slightly_mad.DdwOp6J5.webp +0 -0
- package/.svelte-kit/output/server/_app/immutable/assets/ares_surprised.BxbNH_w8.webp +0 -0
- package/.svelte-kit/output/server/_app/immutable/assets/ares_yay.EM2SNr0e.webp +0 -0
- package/.svelte-kit/output/server/_app/immutable/assets/bg_tiled_ares.DTcFskeK.png +0 -0
- package/.svelte-kit/output/server/_app/immutable/assets/bg_tiled_corn.D22ZwTZ0.png +0 -0
- package/.svelte-kit/output/server/_app/immutable/assets/bg_tiled_pineapple.D28N65_A.png +0 -0
- package/.svelte-kit/output/server/_app/immutable/assets/bg_tiled_reinhard.D22NV0xw.png +0 -0
- package/.svelte-kit/output/server/_app/immutable/assets/bg_tiled_tomato.O9Z7_E07.png +0 -0
- package/.svelte-kit/output/server/_app/immutable/assets/bg_tiled_turnip.DMU0uHH4.png +0 -0
- package/.svelte-kit/output/server/_app/immutable/assets/footage-chef-wings.dVBm8Uit.gif +0 -0
- package/.svelte-kit/output/server/_app/immutable/assets/header-hep-cat.DcyPS3Oy.mp4 +0 -0
- package/.svelte-kit/output/server/_app/immutable/assets/header-pengi.DWAOeO4q.mp4 +0 -0
- package/.svelte-kit/output/server/_app/immutable/assets/header-soulwork.BQRWmhTu.mp4 +0 -0
- package/.svelte-kit/output/server/_app/immutable/assets/placeholder_circle.Ij3bN7bI.png +0 -0
- package/.svelte-kit/output/server/_app/immutable/assets/seaweed-showcase.TTVTTC5m.mp4 +0 -0
- package/.svelte-kit/output/server/_app/immutable/assets/weaver-footage.sjDEbkrX.gif +0 -0
- package/.svelte-kit/output/server/_app/immutable/assets/window-set.IpgsYUna.png +0 -0
- package/.svelte-kit/output/server/chunks/CreateUrl.js +0 -17
- package/.svelte-kit/output/server/chunks/DialogManagerStore.js +0 -1412
- package/.svelte-kit/output/server/chunks/NavigationComponent.svelte_svelte_type_style_lang.js +0 -272
- package/.svelte-kit/output/server/chunks/PineappleBaseLayout.svelte_svelte_type_style_lang.js +0 -50
- package/.svelte-kit/output/server/chunks/PineappleSlideToggle.js +0 -120
- package/.svelte-kit/output/server/chunks/ProgressBar.svelte_svelte_type_style_lang.js +0 -60
- package/.svelte-kit/output/server/chunks/SeaweedTemplate.js +0 -786
- package/.svelte-kit/output/server/chunks/_page.js +0 -4
- package/.svelte-kit/output/server/chunks/_page2.js +0 -4
- package/.svelte-kit/output/server/chunks/_page3.js +0 -4
- package/.svelte-kit/output/server/chunks/_page4.js +0 -4
- package/.svelte-kit/output/server/chunks/_page5.js +0 -4
- package/.svelte-kit/output/server/chunks/_page6.js +0 -4
- package/.svelte-kit/output/server/chunks/_page7.js +0 -4
- package/.svelte-kit/output/server/chunks/_page8.js +0 -4
- package/.svelte-kit/output/server/chunks/client.js +0 -12
- package/.svelte-kit/output/server/chunks/close.js +0 -262
- package/.svelte-kit/output/server/chunks/exports.js +0 -200
- package/.svelte-kit/output/server/chunks/index.js +0 -52
- package/.svelte-kit/output/server/chunks/index2.js +0 -34
- package/.svelte-kit/output/server/chunks/index3.js +0 -48
- package/.svelte-kit/output/server/chunks/index4.js +0 -12
- package/.svelte-kit/output/server/chunks/internal.js +0 -247
- package/.svelte-kit/output/server/chunks/prod-ssr.js +0 -6
- package/.svelte-kit/output/server/chunks/ssr.js +0 -322
- package/.svelte-kit/output/server/chunks/stores.js +0 -5
- package/.svelte-kit/output/server/chunks/stores2.js +0 -26
- package/.svelte-kit/output/server/chunks/stores3.js +0 -38
- package/.svelte-kit/output/server/chunks/stores4.js +0 -79
- package/.svelte-kit/output/server/entries/endpoints/api/create-url/_server.ts.js +0 -21
- package/.svelte-kit/output/server/entries/endpoints/api/get-latest-blogs/_server.ts.js +0 -11
- package/.svelte-kit/output/server/entries/pages/(pineapple)/_layout.svelte.js +0 -291
- package/.svelte-kit/output/server/entries/pages/(pineapple)/_page.svelte.js +0 -21
- package/.svelte-kit/output/server/entries/pages/(pineapple)/pineapple/(extra-pages)/page1/_page.svelte.js +0 -20
- package/.svelte-kit/output/server/entries/pages/(pineapple)/pineapple/(extra-pages)/page2/_page.svelte.js +0 -20
- package/.svelte-kit/output/server/entries/pages/(pineapple)/pineapple/(extra-pages)/page3/_page.svelte.js +0 -20
- package/.svelte-kit/output/server/entries/pages/(pineapple)/pineapple/(extra-pages)/page3/page5/_page.svelte.js +0 -20
- package/.svelte-kit/output/server/entries/pages/(pineapple)/pineapple/(extra-pages)/page3/page6/_page.svelte.js +0 -20
- package/.svelte-kit/output/server/entries/pages/(pineapple)/pineapple/(extra-pages)/page3/page7/(test_layout)/page8/_page.svelte.js +0 -20
- package/.svelte-kit/output/server/entries/pages/(pineapple)/pineapple/(extra-pages)/page3/page7/_page.svelte.js +0 -20
- package/.svelte-kit/output/server/entries/pages/(pineapple)/pineapple/(extra-pages)/page4/_page.svelte.js +0 -16
- package/.svelte-kit/output/server/entries/pages/(pineapple)/pineapple/(pineapple)/_page.svelte.js +0 -333
- package/.svelte-kit/output/server/entries/pages/(pineapple)/pineapple/(pineapple)/_page.ts.js +0 -9
- package/.svelte-kit/output/server/entries/pages/(seaweed)/_layout.svelte.js +0 -301
- package/.svelte-kit/output/server/entries/pages/(seaweed)/portfolio/_page.svelte.js +0 -19
- package/.svelte-kit/output/server/entries/pages/(seaweed)/portfolio/_page.ts.js +0 -9
- package/.svelte-kit/output/server/entries/pages/(seaweed)/portfolio/actual/_page.svelte.js +0 -23
- package/.svelte-kit/output/server/entries/pages/(seaweed)/portfolio/actual/_page.ts.js +0 -9
- package/.svelte-kit/output/server/entries/pages/(seaweed)/portfolio/actual/_slug_/_page.server.ts.js +0 -32
- package/.svelte-kit/output/server/entries/pages/(seaweed)/portfolio/actual/_slug_/_page.svelte.js +0 -39
- package/.svelte-kit/output/server/entries/pages/_error.svelte.js +0 -29
- package/.svelte-kit/output/server/entries/pages/_layout.svelte.js +0 -58
- package/.svelte-kit/output/server/index.js +0 -2955
- package/.svelte-kit/output/server/internal.js +0 -13
- package/.svelte-kit/output/server/manifest-full.js +0 -147
- package/.svelte-kit/output/server/manifest.js +0 -147
- package/.svelte-kit/output/server/nodes/0.js +0 -8
- package/.svelte-kit/output/server/nodes/1.js +0 -8
- package/.svelte-kit/output/server/nodes/10.js +0 -8
- package/.svelte-kit/output/server/nodes/11.js +0 -8
- package/.svelte-kit/output/server/nodes/12.js +0 -8
- package/.svelte-kit/output/server/nodes/13.js +0 -10
- package/.svelte-kit/output/server/nodes/14.js +0 -10
- package/.svelte-kit/output/server/nodes/15.js +0 -10
- package/.svelte-kit/output/server/nodes/16.js +0 -10
- package/.svelte-kit/output/server/nodes/2.js +0 -8
- package/.svelte-kit/output/server/nodes/3.js +0 -8
- package/.svelte-kit/output/server/nodes/4.js +0 -8
- package/.svelte-kit/output/server/nodes/5.js +0 -8
- package/.svelte-kit/output/server/nodes/6.js +0 -8
- package/.svelte-kit/output/server/nodes/7.js +0 -8
- package/.svelte-kit/output/server/nodes/8.js +0 -8
- package/.svelte-kit/output/server/nodes/9.js +0 -8
- package/.svelte-kit/tsconfig.json +0 -50
- package/.svelte-kit/types/route_meta_data.json +0 -31
- package/.svelte-kit/types/src/routes/$types.d.ts +0 -19
- package/.svelte-kit/types/src/routes/(pineapple)/$types.d.ts +0 -22
- package/.svelte-kit/types/src/routes/(pineapple)/pineapple/(extra-pages)/page1/$types.d.ts +0 -17
- package/.svelte-kit/types/src/routes/(pineapple)/pineapple/(extra-pages)/page2/$types.d.ts +0 -17
- package/.svelte-kit/types/src/routes/(pineapple)/pineapple/(extra-pages)/page3/$types.d.ts +0 -17
- package/.svelte-kit/types/src/routes/(pineapple)/pineapple/(extra-pages)/page3/page5/$types.d.ts +0 -17
- package/.svelte-kit/types/src/routes/(pineapple)/pineapple/(extra-pages)/page3/page6/$types.d.ts +0 -17
- package/.svelte-kit/types/src/routes/(pineapple)/pineapple/(extra-pages)/page3/page7/$types.d.ts +0 -17
- package/.svelte-kit/types/src/routes/(pineapple)/pineapple/(extra-pages)/page3/page7/(test_layout)/page8/$types.d.ts +0 -17
- package/.svelte-kit/types/src/routes/(pineapple)/pineapple/(extra-pages)/page4/$types.d.ts +0 -17
- package/.svelte-kit/types/src/routes/(pineapple)/pineapple/(pineapple)/$types.d.ts +0 -19
- package/.svelte-kit/types/src/routes/(seaweed)/$types.d.ts +0 -19
- package/.svelte-kit/types/src/routes/(seaweed)/portfolio/$types.d.ts +0 -19
- package/.svelte-kit/types/src/routes/(seaweed)/portfolio/actual/$types.d.ts +0 -19
- package/.svelte-kit/types/src/routes/(seaweed)/portfolio/actual/[slug]/$types.d.ts +0 -25
- package/.svelte-kit/types/src/routes/(seaweed)/portfolio/actual/[slug]/proxy+page.server.ts +0 -36
- package/.svelte-kit/types/src/routes/api/create-url/$types.d.ts +0 -10
- package/.svelte-kit/types/src/routes/api/get-latest-blogs/$types.d.ts +0 -10
- package/build/client/_app/immutable/assets/0.vT28YyQg.css +0 -10
- package/build/client/_app/immutable/assets/0.vT28YyQg.css.br +0 -0
- package/build/client/_app/immutable/assets/0.vT28YyQg.css.gz +0 -0
- package/build/client/_app/immutable/assets/13.BIMIBpeM.css +0 -1
- package/build/client/_app/immutable/assets/13.BIMIBpeM.css.br +0 -2
- package/build/client/_app/immutable/assets/13.BIMIBpeM.css.gz +0 -0
- package/build/client/_app/immutable/assets/4.ClTmhFiH.css +0 -1
- package/build/client/_app/immutable/assets/4.ClTmhFiH.css.br +0 -0
- package/build/client/_app/immutable/assets/4.ClTmhFiH.css.gz +0 -0
- package/build/client/_app/immutable/assets/Card.BAkK2DAr.css +0 -1
- package/build/client/_app/immutable/assets/Card.BAkK2DAr.css.br +0 -0
- package/build/client/_app/immutable/assets/Card.BAkK2DAr.css.gz +0 -0
- package/build/client/_app/immutable/assets/NavigationComponent.DAojhPuD.css +0 -1
- package/build/client/_app/immutable/assets/NavigationComponent.DAojhPuD.css.br +0 -0
- package/build/client/_app/immutable/assets/NavigationComponent.DAojhPuD.css.gz +0 -0
- package/build/client/_app/immutable/assets/PineappleBaseLayout.syfctdq0.css +0 -1
- package/build/client/_app/immutable/assets/PineappleBaseLayout.syfctdq0.css.br +0 -0
- package/build/client/_app/immutable/assets/PineappleBaseLayout.syfctdq0.css.gz +0 -0
- package/build/client/_app/immutable/assets/ProgressBar.Cirlo5Z8.css +0 -1
- package/build/client/_app/immutable/assets/ProgressBar.Cirlo5Z8.css.br +0 -0
- package/build/client/_app/immutable/assets/ProgressBar.Cirlo5Z8.css.gz +0 -0
- package/build/client/_app/immutable/assets/SeaweedTemplate.GqF0sFEE.css +0 -1
- package/build/client/_app/immutable/assets/SeaweedTemplate.GqF0sFEE.css.br +0 -0
- package/build/client/_app/immutable/assets/SeaweedTemplate.GqF0sFEE.css.gz +0 -0
- package/build/client/_app/immutable/assets/_layout.h2ESO4YN.css +0 -10
- package/build/client/_app/immutable/assets/_layout.h2ESO4YN.css.br +0 -0
- package/build/client/_app/immutable/assets/_layout.h2ESO4YN.css.gz +0 -0
- package/build/client/_app/immutable/assets/_page.BIMIBpeM.css +0 -1
- package/build/client/_app/immutable/assets/_page.BIMIBpeM.css.br +0 -2
- package/build/client/_app/immutable/assets/_page.BIMIBpeM.css.gz +0 -0
- package/build/client/_app/immutable/assets/_page.ClTmhFiH.css +0 -1
- package/build/client/_app/immutable/assets/_page.ClTmhFiH.css.br +0 -0
- package/build/client/_app/immutable/assets/_page.ClTmhFiH.css.gz +0 -0
- package/build/client/_app/immutable/assets/ares_blushing.B6Q0SsBp.webp +0 -0
- package/build/client/_app/immutable/assets/ares_disappointed.LOpkh7Q7.webp +0 -0
- package/build/client/_app/immutable/assets/ares_happy.Cz9WhdwO.webp +0 -0
- package/build/client/_app/immutable/assets/ares_lets_go.BxjJjKUv.webp +0 -0
- package/build/client/_app/immutable/assets/ares_logo.C_a3ZQAP.webp +0 -0
- package/build/client/_app/immutable/assets/ares_mad.DofDLDmM.webp +0 -0
- package/build/client/_app/immutable/assets/ares_neutral.Hp923t8N.webp +0 -0
- package/build/client/_app/immutable/assets/ares_slightly_mad.DdwOp6J5.webp +0 -0
- package/build/client/_app/immutable/assets/ares_surprised.BxbNH_w8.webp +0 -0
- package/build/client/_app/immutable/assets/ares_yay.EM2SNr0e.webp +0 -0
- package/build/client/_app/immutable/assets/bg_tiled_ares.DTcFskeK.png +0 -0
- package/build/client/_app/immutable/assets/bg_tiled_corn.D22ZwTZ0.png +0 -0
- package/build/client/_app/immutable/assets/bg_tiled_pineapple.D28N65_A.png +0 -0
- package/build/client/_app/immutable/assets/bg_tiled_reinhard.D22NV0xw.png +0 -0
- package/build/client/_app/immutable/assets/bg_tiled_tomato.O9Z7_E07.png +0 -0
- package/build/client/_app/immutable/assets/bg_tiled_turnip.DMU0uHH4.png +0 -0
- package/build/client/_app/immutable/assets/footage-chef-wings.dVBm8Uit.gif +0 -0
- package/build/client/_app/immutable/assets/header-hep-cat.DcyPS3Oy.mp4 +0 -0
- package/build/client/_app/immutable/assets/header-pengi.DWAOeO4q.mp4 +0 -0
- package/build/client/_app/immutable/assets/header-soulwork.BQRWmhTu.mp4 +0 -0
- package/build/client/_app/immutable/assets/placeholder_circle.Ij3bN7bI.png +0 -0
- package/build/client/_app/immutable/assets/seaweed-showcase.TTVTTC5m.mp4 +0 -0
- package/build/client/_app/immutable/assets/weaver-footage.sjDEbkrX.gif +0 -0
- package/build/client/_app/immutable/assets/window-set.IpgsYUna.png +0 -0
- package/build/client/_app/immutable/chunks/Card.Cqslzydv.js +0 -5
- package/build/client/_app/immutable/chunks/Card.Cqslzydv.js.br +0 -0
- package/build/client/_app/immutable/chunks/Card.Cqslzydv.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DialogManagerStore.BHUI4V3S.js +0 -7
- package/build/client/_app/immutable/chunks/DialogManagerStore.BHUI4V3S.js.br +0 -0
- package/build/client/_app/immutable/chunks/DialogManagerStore.BHUI4V3S.js.gz +0 -0
- package/build/client/_app/immutable/chunks/ProgressBar.svelte_svelte_type_style_lang.CsYmxU_7.js +0 -1
- package/build/client/_app/immutable/chunks/ProgressBar.svelte_svelte_type_style_lang.CsYmxU_7.js.br +0 -0
- package/build/client/_app/immutable/chunks/ProgressBar.svelte_svelte_type_style_lang.CsYmxU_7.js.gz +0 -0
- package/build/client/_app/immutable/chunks/SeaweedTemplate.olNF2tjY.js +0 -1070
- package/build/client/_app/immutable/chunks/SeaweedTemplate.olNF2tjY.js.br +0 -0
- package/build/client/_app/immutable/chunks/SeaweedTemplate.olNF2tjY.js.gz +0 -0
- package/build/client/_app/immutable/chunks/SeaweedTemplate.svelte_svelte_type_style_lang.DxGjnfBo.js +0 -61
- package/build/client/_app/immutable/chunks/SeaweedTemplate.svelte_svelte_type_style_lang.DxGjnfBo.js.br +0 -0
- package/build/client/_app/immutable/chunks/SeaweedTemplate.svelte_svelte_type_style_lang.DxGjnfBo.js.gz +0 -0
- package/build/client/_app/immutable/chunks/SlideToggle.u1_9_9_F.js +0 -1
- package/build/client/_app/immutable/chunks/SlideToggle.u1_9_9_F.js.br +0 -0
- package/build/client/_app/immutable/chunks/SlideToggle.u1_9_9_F.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Toast.DTsUTF2x.js +0 -1
- package/build/client/_app/immutable/chunks/Toast.DTsUTF2x.js.br +0 -0
- package/build/client/_app/immutable/chunks/Toast.DTsUTF2x.js.gz +0 -0
- package/build/client/_app/immutable/chunks/_page.BCsXwAds.js +0 -8
- package/build/client/_app/immutable/chunks/_page.BCsXwAds.js.br +0 -0
- package/build/client/_app/immutable/chunks/_page.BCsXwAds.js.gz +0 -0
- package/build/client/_app/immutable/chunks/_page.CER3LJw4.js +0 -8
- package/build/client/_app/immutable/chunks/_page.CER3LJw4.js.br +0 -0
- package/build/client/_app/immutable/chunks/_page.CER3LJw4.js.gz +0 -0
- package/build/client/_app/immutable/chunks/_page.CJqYI1vC.js +0 -7
- package/build/client/_app/immutable/chunks/_page.CJqYI1vC.js.br +0 -0
- package/build/client/_app/immutable/chunks/_page.CJqYI1vC.js.gz +0 -0
- package/build/client/_app/immutable/chunks/_page.CRke_Vt-.js +0 -8
- package/build/client/_app/immutable/chunks/_page.CRke_Vt-.js.br +0 -0
- package/build/client/_app/immutable/chunks/_page.CRke_Vt-.js.gz +0 -0
- package/build/client/_app/immutable/chunks/_page.CdlE3ZqM.js +0 -8
- package/build/client/_app/immutable/chunks/_page.CdlE3ZqM.js.br +0 -0
- package/build/client/_app/immutable/chunks/_page.CdlE3ZqM.js.gz +0 -0
- package/build/client/_app/immutable/chunks/_page.D8F_fKwN.js +0 -8
- package/build/client/_app/immutable/chunks/_page.D8F_fKwN.js.br +0 -0
- package/build/client/_app/immutable/chunks/_page.D8F_fKwN.js.gz +0 -0
- package/build/client/_app/immutable/chunks/_page.DOjmKWLN.js +0 -8
- package/build/client/_app/immutable/chunks/_page.DOjmKWLN.js.br +0 -0
- package/build/client/_app/immutable/chunks/_page.DOjmKWLN.js.gz +0 -0
- package/build/client/_app/immutable/chunks/_page.UybeXHGE.js +0 -8
- package/build/client/_app/immutable/chunks/_page.UybeXHGE.js.br +0 -0
- package/build/client/_app/immutable/chunks/_page.UybeXHGE.js.gz +0 -0
- package/build/client/_app/immutable/chunks/each.D6YF6ztN.js +0 -1
- package/build/client/_app/immutable/chunks/each.D6YF6ztN.js.br +0 -0
- package/build/client/_app/immutable/chunks/each.D6YF6ztN.js.gz +0 -0
- package/build/client/_app/immutable/chunks/entry.CqafanwD.js +0 -3
- package/build/client/_app/immutable/chunks/entry.CqafanwD.js.br +0 -0
- package/build/client/_app/immutable/chunks/entry.CqafanwD.js.gz +0 -0
- package/build/client/_app/immutable/chunks/index.CpCFB3OR.js +0 -1
- package/build/client/_app/immutable/chunks/index.CpCFB3OR.js.br +0 -0
- package/build/client/_app/immutable/chunks/index.CpCFB3OR.js.gz +0 -0
- package/build/client/_app/immutable/chunks/index.CzQb476d.js +0 -4
- package/build/client/_app/immutable/chunks/index.CzQb476d.js.br +0 -0
- package/build/client/_app/immutable/chunks/index.CzQb476d.js.gz +0 -0
- package/build/client/_app/immutable/chunks/index.DbwYs1Xx.js +0 -1
- package/build/client/_app/immutable/chunks/index.DbwYs1Xx.js.br +0 -0
- package/build/client/_app/immutable/chunks/index.DbwYs1Xx.js.gz +0 -0
- package/build/client/_app/immutable/chunks/index.XsyeOyy6.js +0 -1
- package/build/client/_app/immutable/chunks/index.XsyeOyy6.js.br +0 -0
- package/build/client/_app/immutable/chunks/index.XsyeOyy6.js.gz +0 -0
- package/build/client/_app/immutable/chunks/index.siPN9RHO.js +0 -6
- package/build/client/_app/immutable/chunks/index.siPN9RHO.js.br +0 -0
- package/build/client/_app/immutable/chunks/index.siPN9RHO.js.gz +0 -0
- package/build/client/_app/immutable/chunks/preload-helper.BQ24v_F8.js +0 -1
- package/build/client/_app/immutable/chunks/preload-helper.BQ24v_F8.js.br +0 -0
- package/build/client/_app/immutable/chunks/preload-helper.BQ24v_F8.js.gz +0 -0
- package/build/client/_app/immutable/chunks/scheduler._lhIxVlV.js +0 -1
- package/build/client/_app/immutable/chunks/scheduler._lhIxVlV.js.br +0 -0
- package/build/client/_app/immutable/chunks/scheduler._lhIxVlV.js.gz +0 -0
- package/build/client/_app/immutable/chunks/spread.CgU5AtxT.js +0 -1
- package/build/client/_app/immutable/chunks/spread.CgU5AtxT.js.br +0 -0
- package/build/client/_app/immutable/chunks/spread.CgU5AtxT.js.gz +0 -0
- package/build/client/_app/immutable/chunks/store.RmhKBLzA.js +0 -1
- package/build/client/_app/immutable/chunks/store.RmhKBLzA.js.br +0 -0
- package/build/client/_app/immutable/chunks/store.RmhKBLzA.js.gz +0 -0
- package/build/client/_app/immutable/chunks/stores.BlLsExs2.js +0 -1
- package/build/client/_app/immutable/chunks/stores.BlLsExs2.js.br +0 -2
- package/build/client/_app/immutable/chunks/stores.BlLsExs2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/stores.DIRl0B43.js +0 -1
- package/build/client/_app/immutable/chunks/stores.DIRl0B43.js.br +0 -0
- package/build/client/_app/immutable/chunks/stores.DIRl0B43.js.gz +0 -0
- package/build/client/_app/immutable/chunks/stores.UAeg925R.js +0 -1
- package/build/client/_app/immutable/chunks/stores.UAeg925R.js.br +0 -0
- package/build/client/_app/immutable/chunks/stores.UAeg925R.js.gz +0 -0
- package/build/client/_app/immutable/chunks/transitions.FXurGCgU.js +0 -1
- package/build/client/_app/immutable/chunks/transitions.FXurGCgU.js.br +0 -0
- package/build/client/_app/immutable/chunks/transitions.FXurGCgU.js.gz +0 -0
- package/build/client/_app/immutable/chunks/util.CpV-3U2s.js +0 -1
- package/build/client/_app/immutable/chunks/util.CpV-3U2s.js.br +0 -0
- package/build/client/_app/immutable/chunks/util.CpV-3U2s.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.Roh-CwIG.js +0 -7
- package/build/client/_app/immutable/entry/app.Roh-CwIG.js.br +0 -0
- package/build/client/_app/immutable/entry/app.Roh-CwIG.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.DcyrsFfL.js +0 -1
- package/build/client/_app/immutable/entry/start.DcyrsFfL.js.br +0 -0
- package/build/client/_app/immutable/entry/start.DcyrsFfL.js.gz +0 -0
- package/build/client/_app/immutable/nodes/0.C4avhXVA.js +0 -2
- package/build/client/_app/immutable/nodes/0.C4avhXVA.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.C4avhXVA.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.D0PSlzBz.js +0 -4
- package/build/client/_app/immutable/nodes/1.D0PSlzBz.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.D0PSlzBz.js.gz +0 -0
- package/build/client/_app/immutable/nodes/10.DOmmqdN-.js +0 -1
- package/build/client/_app/immutable/nodes/10.DOmmqdN-.js.br +0 -0
- package/build/client/_app/immutable/nodes/10.DOmmqdN-.js.gz +0 -0
- package/build/client/_app/immutable/nodes/11.DOmmqdN-.js +0 -1
- package/build/client/_app/immutable/nodes/11.DOmmqdN-.js.br +0 -0
- package/build/client/_app/immutable/nodes/11.DOmmqdN-.js.gz +0 -0
- package/build/client/_app/immutable/nodes/12.DsQEbmGE.js +0 -1
- package/build/client/_app/immutable/nodes/12.DsQEbmGE.js.br +0 -0
- package/build/client/_app/immutable/nodes/12.DsQEbmGE.js.gz +0 -0
- package/build/client/_app/immutable/nodes/13.BT4c85jG.js +0 -61
- package/build/client/_app/immutable/nodes/13.BT4c85jG.js.br +0 -0
- package/build/client/_app/immutable/nodes/13.BT4c85jG.js.gz +0 -0
- package/build/client/_app/immutable/nodes/14.Of3nlv7V.js +0 -1
- package/build/client/_app/immutable/nodes/14.Of3nlv7V.js.br +0 -0
- package/build/client/_app/immutable/nodes/14.Of3nlv7V.js.gz +0 -0
- package/build/client/_app/immutable/nodes/15.BPS0gknX.js +0 -1
- package/build/client/_app/immutable/nodes/15.BPS0gknX.js.br +0 -0
- package/build/client/_app/immutable/nodes/15.BPS0gknX.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.C0CLaNxi.js +0 -5
- package/build/client/_app/immutable/nodes/2.C0CLaNxi.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.C0CLaNxi.js.gz +0 -0
- package/build/client/_app/immutable/nodes/3.DniefHgr.js +0 -1
- package/build/client/_app/immutable/nodes/3.DniefHgr.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.DniefHgr.js.gz +0 -0
- package/build/client/_app/immutable/nodes/4.CArxSEXv.js +0 -1
- package/build/client/_app/immutable/nodes/4.CArxSEXv.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.CArxSEXv.js.gz +0 -0
- package/build/client/_app/immutable/nodes/5.DOmmqdN-.js +0 -1
- package/build/client/_app/immutable/nodes/5.DOmmqdN-.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.DOmmqdN-.js.gz +0 -0
- package/build/client/_app/immutable/nodes/6.DOmmqdN-.js +0 -1
- package/build/client/_app/immutable/nodes/6.DOmmqdN-.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.DOmmqdN-.js.gz +0 -0
- package/build/client/_app/immutable/nodes/7.DOmmqdN-.js +0 -1
- package/build/client/_app/immutable/nodes/7.DOmmqdN-.js.br +0 -0
- package/build/client/_app/immutable/nodes/7.DOmmqdN-.js.gz +0 -0
- package/build/client/_app/immutable/nodes/8.DOmmqdN-.js +0 -1
- package/build/client/_app/immutable/nodes/8.DOmmqdN-.js.br +0 -0
- package/build/client/_app/immutable/nodes/8.DOmmqdN-.js.gz +0 -0
- package/build/client/_app/immutable/nodes/9.DOmmqdN-.js +0 -1
- package/build/client/_app/immutable/nodes/9.DOmmqdN-.js.br +0 -0
- package/build/client/_app/immutable/nodes/9.DOmmqdN-.js.gz +0 -0
- package/build/client/_app/version.json +0 -1
- package/build/client/_app/version.json.br +0 -0
- package/build/client/_app/version.json.gz +0 -0
- package/build/client/default-card.png +0 -0
- package/build/client/favicon.png +0 -0
- package/build/client/robots.txt +0 -5
- package/build/env.js +0 -43
- package/build/handler.js +0 -1334
- package/build/index.js +0 -323
- package/build/prerendered/portfolio/__data.json +0 -1
- package/build/prerendered/portfolio/__data.json.br +0 -0
- package/build/prerendered/portfolio/__data.json.gz +0 -0
- package/build/prerendered/portfolio.html +0 -240
- package/build/prerendered/portfolio.html.br +0 -0
- package/build/prerendered/portfolio.html.gz +0 -0
- package/build/server/chunks/0-KMIjynIm.js +0 -9
- package/build/server/chunks/0-KMIjynIm.js.map +0 -1
- package/build/server/chunks/1-CPYJlXmE.js +0 -9
- package/build/server/chunks/1-CPYJlXmE.js.map +0 -1
- package/build/server/chunks/10-ByB12I6i.js +0 -9
- package/build/server/chunks/10-ByB12I6i.js.map +0 -1
- package/build/server/chunks/11-Bqxt-_Xz.js +0 -9
- package/build/server/chunks/11-Bqxt-_Xz.js.map +0 -1
- package/build/server/chunks/12-wv3y8eRw.js +0 -9
- package/build/server/chunks/12-wv3y8eRw.js.map +0 -1
- package/build/server/chunks/13-CqUa6DKb.js +0 -22
- package/build/server/chunks/13-CqUa6DKb.js.map +0 -1
- package/build/server/chunks/15-D73EDQfd.js +0 -22
- package/build/server/chunks/15-D73EDQfd.js.map +0 -1
- package/build/server/chunks/2-DGl4iAUS.js +0 -9
- package/build/server/chunks/2-DGl4iAUS.js.map +0 -1
- package/build/server/chunks/3-BkP0gvW2.js +0 -9
- package/build/server/chunks/3-BkP0gvW2.js.map +0 -1
- package/build/server/chunks/4-D-IFPEHZ.js +0 -9
- package/build/server/chunks/4-D-IFPEHZ.js.map +0 -1
- package/build/server/chunks/5-1JJGr-hh.js +0 -9
- package/build/server/chunks/5-1JJGr-hh.js.map +0 -1
- package/build/server/chunks/6-CsfOsh4P.js +0 -9
- package/build/server/chunks/6-CsfOsh4P.js.map +0 -1
- package/build/server/chunks/7-ClOFYc99.js +0 -9
- package/build/server/chunks/7-ClOFYc99.js.map +0 -1
- package/build/server/chunks/8-BQiYCfzA.js +0 -9
- package/build/server/chunks/8-BQiYCfzA.js.map +0 -1
- package/build/server/chunks/9-BIbW4vaf.js +0 -9
- package/build/server/chunks/9-BIbW4vaf.js.map +0 -1
- package/build/server/chunks/Card-2Fi14Ee_.js +0 -38
- package/build/server/chunks/Card-2Fi14Ee_.js.map +0 -1
- package/build/server/chunks/DialogManagerStore-_F4uBJWM.js +0 -1396
- package/build/server/chunks/DialogManagerStore-_F4uBJWM.js.map +0 -1
- package/build/server/chunks/ProgressBar.svelte_svelte_type_style_lang-SkkMcEL5.js +0 -57
- package/build/server/chunks/ProgressBar.svelte_svelte_type_style_lang-SkkMcEL5.js.map +0 -1
- package/build/server/chunks/SeaweedTemplate.svelte_svelte_type_style_lang-CCbNvvLx.js +0 -331
- package/build/server/chunks/SeaweedTemplate.svelte_svelte_type_style_lang-CCbNvvLx.js.map +0 -1
- package/build/server/chunks/SlideToggle-7ZUciZM2.js +0 -85
- package/build/server/chunks/SlideToggle-7ZUciZM2.js.map +0 -1
- package/build/server/chunks/_error.svelte-BzIpkAmU.js +0 -32
- package/build/server/chunks/_error.svelte-BzIpkAmU.js.map +0 -1
- package/build/server/chunks/_layout.svelte-BJy0SSDg.js +0 -295
- package/build/server/chunks/_layout.svelte-BJy0SSDg.js.map +0 -1
- package/build/server/chunks/_layout.svelte-BXEPLbGU.js +0 -62
- package/build/server/chunks/_layout.svelte-BXEPLbGU.js.map +0 -1
- package/build/server/chunks/_layout.svelte-BZmk1pJQ.js +0 -188
- package/build/server/chunks/_layout.svelte-BZmk1pJQ.js.map +0 -1
- package/build/server/chunks/_page-C4bdgzNZ.js +0 -4
- package/build/server/chunks/_page-C4bdgzNZ.js.map +0 -1
- package/build/server/chunks/_page.svelte-CoBwY5R6.js +0 -335
- package/build/server/chunks/_page.svelte-CoBwY5R6.js.map +0 -1
- package/build/server/chunks/_page.svelte-Cs3TpJ-J.js +0 -25
- package/build/server/chunks/_page.svelte-Cs3TpJ-J.js.map +0 -1
- package/build/server/chunks/_page.svelte-CwRPslA_.js +0 -25
- package/build/server/chunks/_page.svelte-CwRPslA_.js.map +0 -1
- package/build/server/chunks/_page.svelte-D4TldIJX.js +0 -25
- package/build/server/chunks/_page.svelte-D4TldIJX.js.map +0 -1
- package/build/server/chunks/_page.svelte-DBubSTBJ.js +0 -27
- package/build/server/chunks/_page.svelte-DBubSTBJ.js.map +0 -1
- package/build/server/chunks/_page.svelte-DWq_pga0.js +0 -25
- package/build/server/chunks/_page.svelte-DWq_pga0.js.map +0 -1
- package/build/server/chunks/_page.svelte-DX-wlnYc.js +0 -22
- package/build/server/chunks/_page.svelte-DX-wlnYc.js.map +0 -1
- package/build/server/chunks/_page.svelte-DmRwzfw2.js +0 -25
- package/build/server/chunks/_page.svelte-DmRwzfw2.js.map +0 -1
- package/build/server/chunks/_page.svelte-DoXYvCKL.js +0 -1041
- package/build/server/chunks/_page.svelte-DoXYvCKL.js.map +0 -1
- package/build/server/chunks/_page.svelte-Jf-X5Rnw.js +0 -25
- package/build/server/chunks/_page.svelte-Jf-X5Rnw.js.map +0 -1
- package/build/server/chunks/_page.svelte-esjB02TA.js +0 -25
- package/build/server/chunks/_page.svelte-esjB02TA.js.map +0 -1
- package/build/server/chunks/_page2-C4bdgzNZ.js +0 -4
- package/build/server/chunks/_page2-C4bdgzNZ.js.map +0 -1
- package/build/server/chunks/_page3-C4bdgzNZ.js +0 -4
- package/build/server/chunks/_page3-C4bdgzNZ.js.map +0 -1
- package/build/server/chunks/_page4-C4bdgzNZ.js +0 -4
- package/build/server/chunks/_page4-C4bdgzNZ.js.map +0 -1
- package/build/server/chunks/_page5-C4bdgzNZ.js +0 -4
- package/build/server/chunks/_page5-C4bdgzNZ.js.map +0 -1
- package/build/server/chunks/_page6-C4bdgzNZ.js +0 -4
- package/build/server/chunks/_page6-C4bdgzNZ.js.map +0 -1
- package/build/server/chunks/_page7-C4bdgzNZ.js +0 -4
- package/build/server/chunks/_page7-C4bdgzNZ.js.map +0 -1
- package/build/server/chunks/_page8-DfvDtv49.js +0 -4
- package/build/server/chunks/_page8-DfvDtv49.js.map +0 -1
- package/build/server/chunks/client-CjdeEz1m.js +0 -13
- package/build/server/chunks/client-CjdeEz1m.js.map +0 -1
- package/build/server/chunks/exports-DuWZopOC.js +0 -133
- package/build/server/chunks/exports-DuWZopOC.js.map +0 -1
- package/build/server/chunks/index-Dux0Qc2u.js +0 -347
- package/build/server/chunks/index-Dux0Qc2u.js.map +0 -1
- package/build/server/chunks/index2-CKzT37zP.js +0 -100
- package/build/server/chunks/index2-CKzT37zP.js.map +0 -1
- package/build/server/chunks/index3-Bx4sUpqk.js +0 -48
- package/build/server/chunks/index3-Bx4sUpqk.js.map +0 -1
- package/build/server/chunks/index4-Ce-TEB-q.js +0 -11
- package/build/server/chunks/index4-Ce-TEB-q.js.map +0 -1
- package/build/server/chunks/prod-ssr-DxkyU4_t.js +0 -5
- package/build/server/chunks/prod-ssr-DxkyU4_t.js.map +0 -1
- package/build/server/chunks/store-wiFecv6I.js +0 -254
- package/build/server/chunks/store-wiFecv6I.js.map +0 -1
- package/build/server/chunks/stores-CS43lvG7.js +0 -6
- package/build/server/chunks/stores-CS43lvG7.js.map +0 -1
- package/build/server/chunks/stores2-BKuxMr7h.js +0 -27
- package/build/server/chunks/stores2-BKuxMr7h.js.map +0 -1
- package/build/server/chunks/stores3-DzEecBrh.js +0 -37
- package/build/server/chunks/stores3-DzEecBrh.js.map +0 -1
- package/build/server/index.js +0 -4263
- package/build/server/index.js.map +0 -1
- package/build/server/manifest.js +0 -124
- package/build/server/manifest.js.map +0 -1
- package/build/shims.js +0 -32
- package/dev/.gitignore +0 -1
- package/dev/README.md +0 -9
- package/dev/repo_list.txt +0 -1
- package/dev/update_all_repos.sh +0 -16
- package/docs/GroupLazyLoad.md +0 -34
- package/docs/OverlaySpec.md +0 -23
- package/docs/PineappleFiberSpec.md +0 -356
- package/docs/archive/MigrationToAzure.md +0 -102
- package/docs/images/figure-ares-happy.png +0 -0
- package/docs/images/figure-yarn-spinner.png +0 -0
- package/docs/pull_request_template.md +0 -34
- package/postcss.config.cjs +0 -6
- package/prisma/migrations/20240408050417_init/migration.sql +0 -7
- package/prisma/migrations/migration_lock.toml +0 -3
- package/prisma/schema.prisma +0 -13
- package/src/app.html +0 -13
- package/src/lib/.gitignore +0 -1
- package/src/lib/api/GetLatestBlogs.ts +0 -7
- package/src/lib/api/index.ts +0 -3
- package/src/lib/app.postcss +0 -212
- package/src/lib/assets/bg_tiled/bg_tiled_ares.png +0 -0
- package/src/lib/assets/bg_tiled/bg_tiled_corn.png +0 -0
- package/src/lib/assets/bg_tiled/bg_tiled_pineapple.png +0 -0
- package/src/lib/assets/bg_tiled/bg_tiled_reinhard.png +0 -0
- package/src/lib/assets/bg_tiled/bg_tiled_tomato.png +0 -0
- package/src/lib/assets/bg_tiled/bg_tiled_turnip.png +0 -0
- package/src/lib/assets/characters/ares/ares_blushing.webp +0 -0
- package/src/lib/assets/characters/ares/ares_disappointed.webp +0 -0
- package/src/lib/assets/characters/ares/ares_happy.webp +0 -0
- package/src/lib/assets/characters/ares/ares_lets_go.webp +0 -0
- package/src/lib/assets/characters/ares/ares_logo.webp +0 -0
- package/src/lib/assets/characters/ares/ares_mad.webp +0 -0
- package/src/lib/assets/characters/ares/ares_neutral.webp +0 -0
- package/src/lib/assets/characters/ares/ares_slightly_mad.webp +0 -0
- package/src/lib/assets/characters/ares/ares_surprised.webp +0 -0
- package/src/lib/assets/characters/ares/ares_yay.webp +0 -0
- package/src/lib/assets/game_dev/footage-chef-wings.gif +0 -0
- package/src/lib/assets/icons/arrow-upward.svg +0 -1
- package/src/lib/assets/icons/bitbucket-icon.svg +0 -1
- package/src/lib/assets/icons/chat-cursor.svg +0 -47
- package/src/lib/assets/icons/close.svg +0 -1
- package/src/lib/assets/icons/external-link.svg +0 -50
- package/src/lib/assets/icons/github-mark.svg +0 -1
- package/src/lib/assets/icons/link-icon.svg +0 -1
- package/src/lib/assets/icons/linkedin.svg +0 -1
- package/src/lib/assets/icons/mail.svg +0 -1
- package/src/lib/assets/others/seaweed-showcase.mp4 +0 -0
- package/src/lib/assets/others/weaver-footage.gif +0 -0
- package/src/lib/assets/others/window-set.png +0 -0
- package/src/lib/assets/placeholder/placeholder_circle.png +0 -0
- package/src/lib/assets/temp/header-hep-cat.mp4 +0 -0
- package/src/lib/assets/temp/header-pengi.mp4 +0 -0
- package/src/lib/assets/temp/header-soulwork.mp4 +0 -0
- package/src/lib/components/Card.svelte +0 -54
- package/src/lib/components/CarouselElement.svelte +0 -23
- package/src/lib/components/ElementVisbilityDetector.svelte +0 -22
- package/src/lib/components/LazyAsset.svelte +0 -114
- package/src/lib/components/LazyAssetType.ts +0 -11
- package/src/lib/components/OnElementVisbilityChanged.ts +0 -1
- package/src/lib/components/PineappleSlideToggle.svelte +0 -14
- package/src/lib/components/RandomizedBackground.svelte +0 -79
- package/src/lib/components/RandomizedImage.svelte +0 -40
- package/src/lib/components/SocialSection.svelte +0 -99
- package/src/lib/components/StickyElement.svelte +0 -40
- package/src/lib/components/ToggleableContent.svelte +0 -86
- package/src/lib/components/ToggleableContentType.ts +0 -4
- package/src/lib/components/blog_template/BlogTemplate.svelte +0 -51
- package/src/lib/components/blog_template/BlogTemplateInner.svelte +0 -41
- package/src/lib/components/blog_template/blog-template.css +0 -7
- package/src/lib/components/chip/Chip.svelte +0 -60
- package/src/lib/components/combo_box/ComboBox.svelte +0 -13
- package/src/lib/components/combo_box/ComboBoxWithButton.svelte +0 -25
- package/src/lib/components/combo_box/combo-box.postcss +0 -22
- package/src/lib/components/dialog_manager/DialogManager.ts +0 -308
- package/src/lib/components/dialog_manager/DialogManagerStore.ts +0 -52
- package/src/lib/components/dialog_manager/DialogProcessor.ts +0 -68
- package/src/lib/components/dialog_manager/DialogUtils.ts +0 -10
- package/src/lib/components/dialog_manager/behavior_tree/core/BTreeUtils.ts +0 -40
- package/src/lib/components/dialog_manager/behavior_tree/core/BaseBehaviorResult.ts +0 -5
- package/src/lib/components/dialog_manager/behavior_tree/core/BehaviorNode.ts +0 -3
- package/src/lib/components/dialog_manager/behavior_tree/core/BehaviorStatus.ts +0 -5
- package/src/lib/components/dialog_manager/behavior_tree/core/SelectorNode.ts +0 -32
- package/src/lib/components/dialog_manager/behavior_tree/expression/ExpressionArguments.ts +0 -6
- package/src/lib/components/dialog_manager/behavior_tree/expression/ExpressionBehaviorNode.ts +0 -5
- package/src/lib/components/dialog_manager/behavior_tree/expression/ExpressionEvaluator.ts +0 -236
- package/src/lib/components/dialog_manager/behavior_tree/expression/ExpressionResult.ts +0 -6
- package/src/lib/components/dialog_manager/behavior_tree/expression/ExpressionSelectorNode.ts +0 -20
- package/src/lib/components/dialog_manager/behavior_tree/expression/ExpressionState.ts +0 -3
- package/src/lib/components/dialog_manager/behavior_tree/expression/OperandNode.ts +0 -19
- package/src/lib/components/dialog_manager/behavior_tree/expression/OperatorNode.ts +0 -37
- package/src/lib/components/dialog_manager/behavior_tree/expression/commands/CommandExpressionNode.ts +0 -28
- package/src/lib/components/dialog_manager/behavior_tree/expression/commands/CommandLogicNode.ts +0 -34
- package/src/lib/components/dialog_manager/behavior_tree/expression/commands/CommandMap.ts +0 -26
- package/src/lib/components/dialog_manager/behavior_tree/expression/commands/RandomRangeCommand.ts +0 -31
- package/src/lib/components/dialog_manager/behavior_tree/expression/commands/VisitedCommand.ts +0 -38
- package/src/lib/components/dialog_manager/behavior_tree/expression/commands/VisitedCountCommand.ts +0 -28
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/AndOperator.ts +0 -24
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/EqualityOperator.ts +0 -21
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/GreaterThanEqualOperator.ts +0 -21
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/GreaterThanOperator.ts +0 -21
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/InequalityOperator.ts +0 -19
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/LessThanEqualOperator.ts +0 -21
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/LessThanOperator.ts +0 -21
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/NegationOperator.ts +0 -20
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/OperatorLogicNode.ts +0 -42
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/OperatorMap.ts +0 -53
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/OrOperator.ts +0 -22
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/XorOperator.ts +0 -24
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/arithmetic/DivisionOperator.ts +0 -23
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/arithmetic/MinusOperator.ts +0 -23
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/arithmetic/MultiplicationOperator.ts +0 -21
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/arithmetic/PlusOperator.ts +0 -23
- package/src/lib/components/dialog_manager/behavior_tree/expression/operators/arithmetic/RemainderDivisionOperator.ts +0 -23
- package/src/lib/components/dialog_manager/behavior_tree/line_core/LineBehaviorNode.ts +0 -5
- package/src/lib/components/dialog_manager/behavior_tree/line_core/LineBehaviorResult.ts +0 -7
- package/src/lib/components/dialog_manager/behavior_tree/line_core/LineNodeArguments.ts +0 -7
- package/src/lib/components/dialog_manager/behavior_tree/line_core/LineSelectorNode.ts +0 -20
- package/src/lib/components/dialog_manager/behavior_tree/line_processors/BehaviorState.ts +0 -6
- package/src/lib/components/dialog_manager/behavior_tree/line_processors/ElseIfNode.ts +0 -59
- package/src/lib/components/dialog_manager/behavior_tree/line_processors/ElseNode.ts +0 -55
- package/src/lib/components/dialog_manager/behavior_tree/line_processors/EndIfNode.ts +0 -28
- package/src/lib/components/dialog_manager/behavior_tree/line_processors/IfMode.ts +0 -7
- package/src/lib/components/dialog_manager/behavior_tree/line_processors/IfNode.ts +0 -49
- package/src/lib/components/dialog_manager/behavior_tree/line_processors/IgnoreGuardNode.ts +0 -30
- package/src/lib/components/dialog_manager/behavior_tree/line_processors/IgnoreJumpNode.ts +0 -24
- package/src/lib/components/dialog_manager/behavior_tree/line_processors/LineCommentNode.ts +0 -22
- package/src/lib/components/dialog_manager/behavior_tree/line_processors/NormalLineProcessorNode.ts +0 -48
- package/src/lib/components/dialog_manager/behavior_tree/line_processors/SetVariableNode.ts +0 -37
- package/src/lib/components/dialog_manager/behavior_tree/line_processors/commands/DeclareCommand.ts +0 -48
- package/src/lib/components/dialog_manager/behavior_tree/line_processors/commands/JumpCommand.ts +0 -51
- package/src/lib/components/dialog_manager/behavior_tree/line_processors/commands/UnvisitCommand.ts +0 -34
- package/src/lib/components/dialog_overlay/DialogOverlay.svelte +0 -130
- package/src/lib/components/index.ts +0 -9
- package/src/lib/components/layouts/LayoutConstants.ts +0 -1
- package/src/lib/components/layouts/SeaweedBaseLayout.svelte +0 -96
- package/src/lib/components/navigation_component/NavigationComponent.svelte +0 -152
- package/src/lib/components/navigation_component/NavigationControl.svelte +0 -61
- package/src/lib/components/navigation_component/PageMeta.ts +0 -249
- package/src/lib/components/navigation_component/index.ts +0 -4
- package/src/lib/components/overrideable_meta/OverridableMeta.svelte +0 -56
- package/src/lib/components/overrideable_meta/OverridableMetaProps.ts +0 -9
- package/src/lib/components/overrideable_meta/index.ts +0 -4
- package/src/lib/components/pineapple/PineappleBaseLayout.svelte +0 -222
- package/src/lib/components/pineapple/toast/DefaultToastBody.svelte +0 -43
- package/src/lib/components/pineapple/toast/DefaultToastBody.ts +0 -10
- package/src/lib/components/pineapple/toast/Toast.svelte +0 -116
- package/src/lib/components/pineapple/toast/Toast.ts +0 -57
- package/src/lib/components/pineapple/toast/custom-toast/TestCustomToast.svelte +0 -1
- package/src/lib/components/pineapple/toast/custom-toast/TestCustomToast.ts +0 -6
- package/src/lib/consts.ts +0 -2
- package/src/lib/index.ts +0 -16
- package/src/lib/postcss.d.ts +0 -3
- package/src/lib/scripts/pineapple_fiber/PineappleFiberParser.ts +0 -177
- package/src/lib/scripts/pineapple_fiber/PineappleWeaver.ts +0 -79
- package/src/lib/scripts/util/FileManagement.ts +0 -38
- package/src/lib/scripts/util/ManualCheck.ts +0 -32
- package/src/lib/scripts/util/ManualCheckRun.ts +0 -7
- package/src/lib/server-temp/prisma.ts +0 -3
- package/src/lib/store.ts +0 -18
- package/src/lib/styles/DefaultGridContainer.css +0 -61
- package/src/lib/styles/global.css +0 -1
- package/src/lib/template/seaweed/ChumBucket.svelte +0 -90
- package/src/lib/template/seaweed/CreateUrlForm.svelte +0 -70
- package/src/lib/template/seaweed/ParseQueryTerms.ts +0 -26
- package/src/lib/template/seaweed/RunChaos.ts +0 -44
- package/src/lib/template/seaweed/SeaweedTemplate.svelte +0 -349
- package/src/lib/template/seaweed/SeaweedTemplateData.ts +0 -112
- package/src/lib/template/seaweed/entries/ChefWings.svelte +0 -54
- package/src/lib/template/seaweed/entries/CustomizedYarnspinner.svelte +0 -34
- package/src/lib/template/seaweed/entries/EntryProps.ts +0 -19
- package/src/lib/template/seaweed/entries/Hepcat.svelte +0 -58
- package/src/lib/template/seaweed/entries/Pengi.svelte +0 -51
- package/src/lib/template/seaweed/entries/Soulwork.svelte +0 -48
- package/src/lib/template/seaweed/entries/ThisWebpage.svelte +0 -49
- package/src/lib/template/seaweed/entries/WorkExperience.svelte +0 -116
- package/src/lib/template/seaweed/entries/Workset.svelte +0 -51
- package/src/lib/template/seaweed/entry_order_config/EntryOrderConfig.svelte +0 -253
- package/src/lib/template/seaweed/entry_order_config/EntryOrderConfig.ts +0 -7
- package/src/lib/template/seaweed/entry_order_config/entry-order-config.postcss +0 -35
- package/src/lib/template/seaweed/index.ts +0 -4
- package/src/lib/template/seaweed/seaweed.postcss +0 -133
- package/src/lib/theme.postcss +0 -117
- package/src/lib/types/BlogBlurbMeta.ts +0 -16
- package/src/lib/types/BreadcrumbData.ts +0 -4
- package/src/lib/types/api/CreateUrl.ts +0 -30
- package/src/lib/types/api/index.ts +0 -3
- package/src/lib/types/pineapple_fiber/DialogDetail.ts +0 -7
- package/src/lib/types/pineapple_fiber/DialogState.ts +0 -6
- package/src/lib/types/pineapple_fiber/DialogVariableStore.ts +0 -24
- package/src/lib/types/pineapple_fiber/PortraitType.ts +0 -11
- package/src/lib/util/util.ts +0 -38
- package/src/routes/(pineapple)/+layout.svelte +0 -8
- package/src/routes/(pineapple)/+page.svelte +0 -33
- package/src/routes/(pineapple)/pineapple/(extra-pages)/page1/+page.svelte +0 -11
- package/src/routes/(pineapple)/pineapple/(extra-pages)/page1/meta.json +0 -24
- package/src/routes/(pineapple)/pineapple/(extra-pages)/page2/+page.svelte +0 -14
- package/src/routes/(pineapple)/pineapple/(extra-pages)/page2/meta.json +0 -8
- package/src/routes/(pineapple)/pineapple/(extra-pages)/page3/+page.svelte +0 -8
- package/src/routes/(pineapple)/pineapple/(extra-pages)/page3/page5/+page.svelte +0 -9
- package/src/routes/(pineapple)/pineapple/(extra-pages)/page3/page5/meta.json +0 -7
- package/src/routes/(pineapple)/pineapple/(extra-pages)/page3/page6/+page.svelte +0 -8
- package/src/routes/(pineapple)/pineapple/(extra-pages)/page3/page7/(test_layout)/page8/+page.svelte +0 -8
- package/src/routes/(pineapple)/pineapple/(extra-pages)/page3/page7/(test_layout)/page8/meta.json +0 -7
- package/src/routes/(pineapple)/pineapple/(extra-pages)/page3/page7/+page.svelte +0 -8
- package/src/routes/(pineapple)/pineapple/(extra-pages)/page4/+page.svelte +0 -7
- package/src/routes/(pineapple)/pineapple/(pineapple)/+page.svelte +0 -80
- package/src/routes/(pineapple)/pineapple/(pineapple)/+page.ts +0 -8
- package/src/routes/(pineapple)/pineapple/(pineapple)/ImageMap.ts +0 -5
- package/src/routes/(pineapple)/pineapple/(pineapple)/TestDialog.yarn +0 -7
- package/src/routes/(seaweed)/+layout.svelte +0 -11
- package/src/routes/(seaweed)/portfolio/+page.svelte +0 -19
- package/src/routes/(seaweed)/portfolio/+page.ts +0 -8
- package/src/routes/(seaweed)/portfolio/.gitignore +0 -1
- package/src/routes/(seaweed)/portfolio/actual/+page.svelte +0 -21
- package/src/routes/(seaweed)/portfolio/actual/+page.ts +0 -8
- package/src/routes/(seaweed)/portfolio/actual/[slug]/+page.server.ts +0 -35
- package/src/routes/(seaweed)/portfolio/actual/[slug]/+page.svelte +0 -48
- package/src/routes/(seaweed)/portfolio/actual/[slug]/SlugPageData.ts +0 -4
- package/src/routes/+error.svelte +0 -26
- package/src/routes/+layout.svelte +0 -33
- package/src/routes/Error.yarn +0 -7
- package/src/routes/ErrorYarn.ts +0 -24
- package/src/routes/api/create-url/+server.ts +0 -24
- package/src/routes/api/get-latest-blogs/+server.ts +0 -4
- package/src/types.d.ts +0 -8
- package/static/default-card.png +0 -0
- package/static/favicon.png +0 -0
- package/static/robots.txt +0 -5
- package/svelte.config.js +0 -25
- package/tailwind.config.ts +0 -29
- package/tsconfig.json +0 -22
- package/vite.config.ts +0 -7
- package/vite.config.ts.timestamp-1709797261217-7fe7973433269.mjs +0 -10
- package/vite.config.ts.timestamp-1709801575567-e7eed430338b.mjs +0 -10
- package/vite.config.ts.timestamp-1710003919548-e3e0deafd6ef6.mjs +0 -10
- package/vite.config.ts.timestamp-1710279492121-6e9193760fb1c.mjs +0 -10
- package/yarn.lock +0 -2565
package/build/server/index.js
DELETED
|
@@ -1,4263 +0,0 @@
|
|
|
1
|
-
import { D as DEV } from './chunks/prod-ssr-DxkyU4_t.js';
|
|
2
|
-
import { c as create_ssr_component, s as setContext, v as validate_component, m as missing_component, r as readable, w as writable } from './chunks/index-Dux0Qc2u.js';
|
|
3
|
-
import { d as decode_pathname, h as has_data_suffix, s as strip_data_suffix, a as decode_params, n as normalize_path, b as disable_search, c as add_data_suffix, m as make_trackable, r as resolve } from './chunks/exports-DuWZopOC.js';
|
|
4
|
-
|
|
5
|
-
let base = "";
|
|
6
|
-
let assets = base;
|
|
7
|
-
const initial = { base, assets };
|
|
8
|
-
function override(paths) {
|
|
9
|
-
base = paths.base;
|
|
10
|
-
assets = paths.assets;
|
|
11
|
-
}
|
|
12
|
-
function reset() {
|
|
13
|
-
base = initial.base;
|
|
14
|
-
assets = initial.assets;
|
|
15
|
-
}
|
|
16
|
-
let public_env = {};
|
|
17
|
-
let safe_public_env = {};
|
|
18
|
-
function set_public_env(environment) {
|
|
19
|
-
public_env = environment;
|
|
20
|
-
}
|
|
21
|
-
function set_safe_public_env(environment) {
|
|
22
|
-
safe_public_env = environment;
|
|
23
|
-
}
|
|
24
|
-
function afterUpdate() {
|
|
25
|
-
}
|
|
26
|
-
const Root = create_ssr_component(($$result, $$props, $$bindings, slots) => {
|
|
27
|
-
let { stores } = $$props;
|
|
28
|
-
let { page } = $$props;
|
|
29
|
-
let { constructors } = $$props;
|
|
30
|
-
let { components = [] } = $$props;
|
|
31
|
-
let { form } = $$props;
|
|
32
|
-
let { data_0 = null } = $$props;
|
|
33
|
-
let { data_1 = null } = $$props;
|
|
34
|
-
let { data_2 = null } = $$props;
|
|
35
|
-
{
|
|
36
|
-
setContext("__svelte__", stores);
|
|
37
|
-
}
|
|
38
|
-
afterUpdate(stores.page.notify);
|
|
39
|
-
if ($$props.stores === void 0 && $$bindings.stores && stores !== void 0)
|
|
40
|
-
$$bindings.stores(stores);
|
|
41
|
-
if ($$props.page === void 0 && $$bindings.page && page !== void 0)
|
|
42
|
-
$$bindings.page(page);
|
|
43
|
-
if ($$props.constructors === void 0 && $$bindings.constructors && constructors !== void 0)
|
|
44
|
-
$$bindings.constructors(constructors);
|
|
45
|
-
if ($$props.components === void 0 && $$bindings.components && components !== void 0)
|
|
46
|
-
$$bindings.components(components);
|
|
47
|
-
if ($$props.form === void 0 && $$bindings.form && form !== void 0)
|
|
48
|
-
$$bindings.form(form);
|
|
49
|
-
if ($$props.data_0 === void 0 && $$bindings.data_0 && data_0 !== void 0)
|
|
50
|
-
$$bindings.data_0(data_0);
|
|
51
|
-
if ($$props.data_1 === void 0 && $$bindings.data_1 && data_1 !== void 0)
|
|
52
|
-
$$bindings.data_1(data_1);
|
|
53
|
-
if ($$props.data_2 === void 0 && $$bindings.data_2 && data_2 !== void 0)
|
|
54
|
-
$$bindings.data_2(data_2);
|
|
55
|
-
let $$settled;
|
|
56
|
-
let $$rendered;
|
|
57
|
-
let previous_head = $$result.head;
|
|
58
|
-
do {
|
|
59
|
-
$$settled = true;
|
|
60
|
-
$$result.head = previous_head;
|
|
61
|
-
{
|
|
62
|
-
stores.page.set(page);
|
|
63
|
-
}
|
|
64
|
-
$$rendered = ` ${constructors[1] ? `${validate_component(constructors[0] || missing_component, "svelte:component").$$render(
|
|
65
|
-
$$result,
|
|
66
|
-
{ data: data_0, this: components[0] },
|
|
67
|
-
{
|
|
68
|
-
this: ($$value) => {
|
|
69
|
-
components[0] = $$value;
|
|
70
|
-
$$settled = false;
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
default: () => {
|
|
75
|
-
return `${constructors[2] ? `${validate_component(constructors[1] || missing_component, "svelte:component").$$render(
|
|
76
|
-
$$result,
|
|
77
|
-
{ data: data_1, this: components[1] },
|
|
78
|
-
{
|
|
79
|
-
this: ($$value) => {
|
|
80
|
-
components[1] = $$value;
|
|
81
|
-
$$settled = false;
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
default: () => {
|
|
86
|
-
return `${validate_component(constructors[2] || missing_component, "svelte:component").$$render(
|
|
87
|
-
$$result,
|
|
88
|
-
{ data: data_2, form, this: components[2] },
|
|
89
|
-
{
|
|
90
|
-
this: ($$value) => {
|
|
91
|
-
components[2] = $$value;
|
|
92
|
-
$$settled = false;
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
{}
|
|
96
|
-
)}`;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
)}` : `${validate_component(constructors[1] || missing_component, "svelte:component").$$render(
|
|
100
|
-
$$result,
|
|
101
|
-
{ data: data_1, form, this: components[1] },
|
|
102
|
-
{
|
|
103
|
-
this: ($$value) => {
|
|
104
|
-
components[1] = $$value;
|
|
105
|
-
$$settled = false;
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
{}
|
|
109
|
-
)}`}`;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
)}` : `${validate_component(constructors[0] || missing_component, "svelte:component").$$render(
|
|
113
|
-
$$result,
|
|
114
|
-
{ data: data_0, form, this: components[0] },
|
|
115
|
-
{
|
|
116
|
-
this: ($$value) => {
|
|
117
|
-
components[0] = $$value;
|
|
118
|
-
$$settled = false;
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
{}
|
|
122
|
-
)}`} ${``}`;
|
|
123
|
-
} while (!$$settled);
|
|
124
|
-
return $$rendered;
|
|
125
|
-
});
|
|
126
|
-
const options = {
|
|
127
|
-
app_dir: "_app",
|
|
128
|
-
app_template_contains_nonce: false,
|
|
129
|
-
csp: { "mode": "auto", "directives": { "upgrade-insecure-requests": false, "block-all-mixed-content": false }, "reportOnly": { "upgrade-insecure-requests": false, "block-all-mixed-content": false } },
|
|
130
|
-
csrf_check_origin: true,
|
|
131
|
-
embedded: false,
|
|
132
|
-
env_public_prefix: "PUBLIC_",
|
|
133
|
-
env_private_prefix: "",
|
|
134
|
-
hooks: null,
|
|
135
|
-
// added lazily, via `get_hooks`
|
|
136
|
-
preload_strategy: "modulepreload",
|
|
137
|
-
root: Root,
|
|
138
|
-
service_worker: false,
|
|
139
|
-
templates: {
|
|
140
|
-
app: ({ head, body, assets: assets2, nonce, env }) => '<!DOCTYPE html>\n<html lang="en">\n <head>\n <meta charset="utf-8" />\n <link rel="icon" href="' + assets2 + '/favicon.png" />\n <meta name="viewport" content="width=device-width" />\n ' + head + '\n </head>\n\n <body data-sveltekit-preload-data="hover" data-theme="crimson">\n <div style="display: contents" class="h-full overflow-hidden">' + body + "</div>\n </body>\n</html>\n",
|
|
141
|
-
error: ({ status, message }) => '<!doctype html>\n<html lang="en">\n <head>\n <meta charset="utf-8" />\n <title>' + message + `</title>
|
|
142
|
-
|
|
143
|
-
<style>
|
|
144
|
-
body {
|
|
145
|
-
--bg: white;
|
|
146
|
-
--fg: #222;
|
|
147
|
-
--divider: #ccc;
|
|
148
|
-
background: var(--bg);
|
|
149
|
-
color: var(--fg);
|
|
150
|
-
font-family:
|
|
151
|
-
system-ui,
|
|
152
|
-
-apple-system,
|
|
153
|
-
BlinkMacSystemFont,
|
|
154
|
-
'Segoe UI',
|
|
155
|
-
Roboto,
|
|
156
|
-
Oxygen,
|
|
157
|
-
Ubuntu,
|
|
158
|
-
Cantarell,
|
|
159
|
-
'Open Sans',
|
|
160
|
-
'Helvetica Neue',
|
|
161
|
-
sans-serif;
|
|
162
|
-
display: flex;
|
|
163
|
-
align-items: center;
|
|
164
|
-
justify-content: center;
|
|
165
|
-
height: 100vh;
|
|
166
|
-
margin: 0;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.error {
|
|
170
|
-
display: flex;
|
|
171
|
-
align-items: center;
|
|
172
|
-
max-width: 32rem;
|
|
173
|
-
margin: 0 1rem;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
.status {
|
|
177
|
-
font-weight: 200;
|
|
178
|
-
font-size: 3rem;
|
|
179
|
-
line-height: 1;
|
|
180
|
-
position: relative;
|
|
181
|
-
top: -0.05rem;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.message {
|
|
185
|
-
border-left: 1px solid var(--divider);
|
|
186
|
-
padding: 0 0 0 1rem;
|
|
187
|
-
margin: 0 0 0 1rem;
|
|
188
|
-
min-height: 2.5rem;
|
|
189
|
-
display: flex;
|
|
190
|
-
align-items: center;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
.message h1 {
|
|
194
|
-
font-weight: 400;
|
|
195
|
-
font-size: 1em;
|
|
196
|
-
margin: 0;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
@media (prefers-color-scheme: dark) {
|
|
200
|
-
body {
|
|
201
|
-
--bg: #222;
|
|
202
|
-
--fg: #ddd;
|
|
203
|
-
--divider: #666;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
</style>
|
|
207
|
-
</head>
|
|
208
|
-
<body>
|
|
209
|
-
<div class="error">
|
|
210
|
-
<span class="status">` + status + '</span>\n <div class="message">\n <h1>' + message + "</h1>\n </div>\n </div>\n </body>\n</html>\n"
|
|
211
|
-
},
|
|
212
|
-
version_hash: "44o79b"
|
|
213
|
-
};
|
|
214
|
-
async function get_hooks() {
|
|
215
|
-
return {};
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
/** @type {Record<string, string>} */
|
|
219
|
-
const escaped = {
|
|
220
|
-
'<': '\\u003C',
|
|
221
|
-
'\\': '\\\\',
|
|
222
|
-
'\b': '\\b',
|
|
223
|
-
'\f': '\\f',
|
|
224
|
-
'\n': '\\n',
|
|
225
|
-
'\r': '\\r',
|
|
226
|
-
'\t': '\\t',
|
|
227
|
-
'\u2028': '\\u2028',
|
|
228
|
-
'\u2029': '\\u2029'
|
|
229
|
-
};
|
|
230
|
-
|
|
231
|
-
class DevalueError extends Error {
|
|
232
|
-
/**
|
|
233
|
-
* @param {string} message
|
|
234
|
-
* @param {string[]} keys
|
|
235
|
-
*/
|
|
236
|
-
constructor(message, keys) {
|
|
237
|
-
super(message);
|
|
238
|
-
this.name = 'DevalueError';
|
|
239
|
-
this.path = keys.join('');
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
/** @param {any} thing */
|
|
244
|
-
function is_primitive(thing) {
|
|
245
|
-
return Object(thing) !== thing;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
const object_proto_names = /* @__PURE__ */ Object.getOwnPropertyNames(
|
|
249
|
-
Object.prototype
|
|
250
|
-
)
|
|
251
|
-
.sort()
|
|
252
|
-
.join('\0');
|
|
253
|
-
|
|
254
|
-
/** @param {any} thing */
|
|
255
|
-
function is_plain_object(thing) {
|
|
256
|
-
const proto = Object.getPrototypeOf(thing);
|
|
257
|
-
|
|
258
|
-
return (
|
|
259
|
-
proto === Object.prototype ||
|
|
260
|
-
proto === null ||
|
|
261
|
-
Object.getOwnPropertyNames(proto).sort().join('\0') === object_proto_names
|
|
262
|
-
);
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
/** @param {any} thing */
|
|
266
|
-
function get_type(thing) {
|
|
267
|
-
return Object.prototype.toString.call(thing).slice(8, -1);
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
/** @param {string} char */
|
|
271
|
-
function get_escaped_char(char) {
|
|
272
|
-
switch (char) {
|
|
273
|
-
case '"':
|
|
274
|
-
return '\\"';
|
|
275
|
-
case '<':
|
|
276
|
-
return '\\u003C';
|
|
277
|
-
case '\\':
|
|
278
|
-
return '\\\\';
|
|
279
|
-
case '\n':
|
|
280
|
-
return '\\n';
|
|
281
|
-
case '\r':
|
|
282
|
-
return '\\r';
|
|
283
|
-
case '\t':
|
|
284
|
-
return '\\t';
|
|
285
|
-
case '\b':
|
|
286
|
-
return '\\b';
|
|
287
|
-
case '\f':
|
|
288
|
-
return '\\f';
|
|
289
|
-
case '\u2028':
|
|
290
|
-
return '\\u2028';
|
|
291
|
-
case '\u2029':
|
|
292
|
-
return '\\u2029';
|
|
293
|
-
default:
|
|
294
|
-
return char < ' '
|
|
295
|
-
? `\\u${char.charCodeAt(0).toString(16).padStart(4, '0')}`
|
|
296
|
-
: '';
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
/** @param {string} str */
|
|
301
|
-
function stringify_string(str) {
|
|
302
|
-
let result = '';
|
|
303
|
-
let last_pos = 0;
|
|
304
|
-
const len = str.length;
|
|
305
|
-
|
|
306
|
-
for (let i = 0; i < len; i += 1) {
|
|
307
|
-
const char = str[i];
|
|
308
|
-
const replacement = get_escaped_char(char);
|
|
309
|
-
if (replacement) {
|
|
310
|
-
result += str.slice(last_pos, i) + replacement;
|
|
311
|
-
last_pos = i + 1;
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
return `"${last_pos === 0 ? str : result + str.slice(last_pos)}"`;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
const chars$1 = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$';
|
|
319
|
-
const unsafe_chars = /[<\b\f\n\r\t\0\u2028\u2029]/g;
|
|
320
|
-
const reserved =
|
|
321
|
-
/^(?:do|if|in|for|int|let|new|try|var|byte|case|char|else|enum|goto|long|this|void|with|await|break|catch|class|const|final|float|short|super|throw|while|yield|delete|double|export|import|native|return|switch|throws|typeof|boolean|default|extends|finally|package|private|abstract|continue|debugger|function|volatile|interface|protected|transient|implements|instanceof|synchronized)$/;
|
|
322
|
-
|
|
323
|
-
/**
|
|
324
|
-
* Turn a value into the JavaScript that creates an equivalent value
|
|
325
|
-
* @param {any} value
|
|
326
|
-
* @param {(value: any) => string | void} [replacer]
|
|
327
|
-
*/
|
|
328
|
-
function uneval(value, replacer) {
|
|
329
|
-
const counts = new Map();
|
|
330
|
-
|
|
331
|
-
/** @type {string[]} */
|
|
332
|
-
const keys = [];
|
|
333
|
-
|
|
334
|
-
const custom = new Map();
|
|
335
|
-
|
|
336
|
-
/** @param {any} thing */
|
|
337
|
-
function walk(thing) {
|
|
338
|
-
if (typeof thing === 'function') {
|
|
339
|
-
throw new DevalueError(`Cannot stringify a function`, keys);
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
if (!is_primitive(thing)) {
|
|
343
|
-
if (counts.has(thing)) {
|
|
344
|
-
counts.set(thing, counts.get(thing) + 1);
|
|
345
|
-
return;
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
counts.set(thing, 1);
|
|
349
|
-
|
|
350
|
-
if (replacer) {
|
|
351
|
-
const str = replacer(thing);
|
|
352
|
-
|
|
353
|
-
if (typeof str === 'string') {
|
|
354
|
-
custom.set(thing, str);
|
|
355
|
-
return;
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
const type = get_type(thing);
|
|
360
|
-
|
|
361
|
-
switch (type) {
|
|
362
|
-
case 'Number':
|
|
363
|
-
case 'BigInt':
|
|
364
|
-
case 'String':
|
|
365
|
-
case 'Boolean':
|
|
366
|
-
case 'Date':
|
|
367
|
-
case 'RegExp':
|
|
368
|
-
return;
|
|
369
|
-
|
|
370
|
-
case 'Array':
|
|
371
|
-
/** @type {any[]} */ (thing).forEach((value, i) => {
|
|
372
|
-
keys.push(`[${i}]`);
|
|
373
|
-
walk(value);
|
|
374
|
-
keys.pop();
|
|
375
|
-
});
|
|
376
|
-
break;
|
|
377
|
-
|
|
378
|
-
case 'Set':
|
|
379
|
-
Array.from(thing).forEach(walk);
|
|
380
|
-
break;
|
|
381
|
-
|
|
382
|
-
case 'Map':
|
|
383
|
-
for (const [key, value] of thing) {
|
|
384
|
-
keys.push(
|
|
385
|
-
`.get(${is_primitive(key) ? stringify_primitive$1(key) : '...'})`
|
|
386
|
-
);
|
|
387
|
-
walk(value);
|
|
388
|
-
keys.pop();
|
|
389
|
-
}
|
|
390
|
-
break;
|
|
391
|
-
|
|
392
|
-
default:
|
|
393
|
-
if (!is_plain_object(thing)) {
|
|
394
|
-
throw new DevalueError(
|
|
395
|
-
`Cannot stringify arbitrary non-POJOs`,
|
|
396
|
-
keys
|
|
397
|
-
);
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
if (Object.getOwnPropertySymbols(thing).length > 0) {
|
|
401
|
-
throw new DevalueError(
|
|
402
|
-
`Cannot stringify POJOs with symbolic keys`,
|
|
403
|
-
keys
|
|
404
|
-
);
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
for (const key in thing) {
|
|
408
|
-
keys.push(`.${key}`);
|
|
409
|
-
walk(thing[key]);
|
|
410
|
-
keys.pop();
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
walk(value);
|
|
417
|
-
|
|
418
|
-
const names = new Map();
|
|
419
|
-
|
|
420
|
-
Array.from(counts)
|
|
421
|
-
.filter((entry) => entry[1] > 1)
|
|
422
|
-
.sort((a, b) => b[1] - a[1])
|
|
423
|
-
.forEach((entry, i) => {
|
|
424
|
-
names.set(entry[0], get_name(i));
|
|
425
|
-
});
|
|
426
|
-
|
|
427
|
-
/**
|
|
428
|
-
* @param {any} thing
|
|
429
|
-
* @returns {string}
|
|
430
|
-
*/
|
|
431
|
-
function stringify(thing) {
|
|
432
|
-
if (names.has(thing)) {
|
|
433
|
-
return names.get(thing);
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
if (is_primitive(thing)) {
|
|
437
|
-
return stringify_primitive$1(thing);
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
if (custom.has(thing)) {
|
|
441
|
-
return custom.get(thing);
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
const type = get_type(thing);
|
|
445
|
-
|
|
446
|
-
switch (type) {
|
|
447
|
-
case 'Number':
|
|
448
|
-
case 'String':
|
|
449
|
-
case 'Boolean':
|
|
450
|
-
return `Object(${stringify(thing.valueOf())})`;
|
|
451
|
-
|
|
452
|
-
case 'RegExp':
|
|
453
|
-
return `new RegExp(${stringify_string(thing.source)}, "${
|
|
454
|
-
thing.flags
|
|
455
|
-
}")`;
|
|
456
|
-
|
|
457
|
-
case 'Date':
|
|
458
|
-
return `new Date(${thing.getTime()})`;
|
|
459
|
-
|
|
460
|
-
case 'Array':
|
|
461
|
-
const members = /** @type {any[]} */ (thing).map((v, i) =>
|
|
462
|
-
i in thing ? stringify(v) : ''
|
|
463
|
-
);
|
|
464
|
-
const tail = thing.length === 0 || thing.length - 1 in thing ? '' : ',';
|
|
465
|
-
return `[${members.join(',')}${tail}]`;
|
|
466
|
-
|
|
467
|
-
case 'Set':
|
|
468
|
-
case 'Map':
|
|
469
|
-
return `new ${type}([${Array.from(thing).map(stringify).join(',')}])`;
|
|
470
|
-
|
|
471
|
-
default:
|
|
472
|
-
const obj = `{${Object.keys(thing)
|
|
473
|
-
.map((key) => `${safe_key(key)}:${stringify(thing[key])}`)
|
|
474
|
-
.join(',')}}`;
|
|
475
|
-
const proto = Object.getPrototypeOf(thing);
|
|
476
|
-
if (proto === null) {
|
|
477
|
-
return Object.keys(thing).length > 0
|
|
478
|
-
? `Object.assign(Object.create(null),${obj})`
|
|
479
|
-
: `Object.create(null)`;
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
return obj;
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
const str = stringify(value);
|
|
487
|
-
|
|
488
|
-
if (names.size) {
|
|
489
|
-
/** @type {string[]} */
|
|
490
|
-
const params = [];
|
|
491
|
-
|
|
492
|
-
/** @type {string[]} */
|
|
493
|
-
const statements = [];
|
|
494
|
-
|
|
495
|
-
/** @type {string[]} */
|
|
496
|
-
const values = [];
|
|
497
|
-
|
|
498
|
-
names.forEach((name, thing) => {
|
|
499
|
-
params.push(name);
|
|
500
|
-
|
|
501
|
-
if (custom.has(thing)) {
|
|
502
|
-
values.push(/** @type {string} */ (custom.get(thing)));
|
|
503
|
-
return;
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
if (is_primitive(thing)) {
|
|
507
|
-
values.push(stringify_primitive$1(thing));
|
|
508
|
-
return;
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
const type = get_type(thing);
|
|
512
|
-
|
|
513
|
-
switch (type) {
|
|
514
|
-
case 'Number':
|
|
515
|
-
case 'String':
|
|
516
|
-
case 'Boolean':
|
|
517
|
-
values.push(`Object(${stringify(thing.valueOf())})`);
|
|
518
|
-
break;
|
|
519
|
-
|
|
520
|
-
case 'RegExp':
|
|
521
|
-
values.push(thing.toString());
|
|
522
|
-
break;
|
|
523
|
-
|
|
524
|
-
case 'Date':
|
|
525
|
-
values.push(`new Date(${thing.getTime()})`);
|
|
526
|
-
break;
|
|
527
|
-
|
|
528
|
-
case 'Array':
|
|
529
|
-
values.push(`Array(${thing.length})`);
|
|
530
|
-
/** @type {any[]} */ (thing).forEach((v, i) => {
|
|
531
|
-
statements.push(`${name}[${i}]=${stringify(v)}`);
|
|
532
|
-
});
|
|
533
|
-
break;
|
|
534
|
-
|
|
535
|
-
case 'Set':
|
|
536
|
-
values.push(`new Set`);
|
|
537
|
-
statements.push(
|
|
538
|
-
`${name}.${Array.from(thing)
|
|
539
|
-
.map((v) => `add(${stringify(v)})`)
|
|
540
|
-
.join('.')}`
|
|
541
|
-
);
|
|
542
|
-
break;
|
|
543
|
-
|
|
544
|
-
case 'Map':
|
|
545
|
-
values.push(`new Map`);
|
|
546
|
-
statements.push(
|
|
547
|
-
`${name}.${Array.from(thing)
|
|
548
|
-
.map(([k, v]) => `set(${stringify(k)}, ${stringify(v)})`)
|
|
549
|
-
.join('.')}`
|
|
550
|
-
);
|
|
551
|
-
break;
|
|
552
|
-
|
|
553
|
-
default:
|
|
554
|
-
values.push(
|
|
555
|
-
Object.getPrototypeOf(thing) === null ? 'Object.create(null)' : '{}'
|
|
556
|
-
);
|
|
557
|
-
Object.keys(thing).forEach((key) => {
|
|
558
|
-
statements.push(
|
|
559
|
-
`${name}${safe_prop(key)}=${stringify(thing[key])}`
|
|
560
|
-
);
|
|
561
|
-
});
|
|
562
|
-
}
|
|
563
|
-
});
|
|
564
|
-
|
|
565
|
-
statements.push(`return ${str}`);
|
|
566
|
-
|
|
567
|
-
return `(function(${params.join(',')}){${statements.join(
|
|
568
|
-
';'
|
|
569
|
-
)}}(${values.join(',')}))`;
|
|
570
|
-
} else {
|
|
571
|
-
return str;
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
/** @param {number} num */
|
|
576
|
-
function get_name(num) {
|
|
577
|
-
let name = '';
|
|
578
|
-
|
|
579
|
-
do {
|
|
580
|
-
name = chars$1[num % chars$1.length] + name;
|
|
581
|
-
num = ~~(num / chars$1.length) - 1;
|
|
582
|
-
} while (num >= 0);
|
|
583
|
-
|
|
584
|
-
return reserved.test(name) ? `${name}0` : name;
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
/** @param {string} c */
|
|
588
|
-
function escape_unsafe_char(c) {
|
|
589
|
-
return escaped[c] || c;
|
|
590
|
-
}
|
|
591
|
-
|
|
592
|
-
/** @param {string} str */
|
|
593
|
-
function escape_unsafe_chars(str) {
|
|
594
|
-
return str.replace(unsafe_chars, escape_unsafe_char);
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
/** @param {string} key */
|
|
598
|
-
function safe_key(key) {
|
|
599
|
-
return /^[_$a-zA-Z][_$a-zA-Z0-9]*$/.test(key)
|
|
600
|
-
? key
|
|
601
|
-
: escape_unsafe_chars(JSON.stringify(key));
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
/** @param {string} key */
|
|
605
|
-
function safe_prop(key) {
|
|
606
|
-
return /^[_$a-zA-Z][_$a-zA-Z0-9]*$/.test(key)
|
|
607
|
-
? `.${key}`
|
|
608
|
-
: `[${escape_unsafe_chars(JSON.stringify(key))}]`;
|
|
609
|
-
}
|
|
610
|
-
|
|
611
|
-
/** @param {any} thing */
|
|
612
|
-
function stringify_primitive$1(thing) {
|
|
613
|
-
if (typeof thing === 'string') return stringify_string(thing);
|
|
614
|
-
if (thing === void 0) return 'void 0';
|
|
615
|
-
if (thing === 0 && 1 / thing < 0) return '-0';
|
|
616
|
-
const str = String(thing);
|
|
617
|
-
if (typeof thing === 'number') return str.replace(/^(-)?0\./, '$1.');
|
|
618
|
-
if (typeof thing === 'bigint') return thing + 'n';
|
|
619
|
-
return str;
|
|
620
|
-
}
|
|
621
|
-
|
|
622
|
-
const UNDEFINED = -1;
|
|
623
|
-
const HOLE = -2;
|
|
624
|
-
const NAN = -3;
|
|
625
|
-
const POSITIVE_INFINITY = -4;
|
|
626
|
-
const NEGATIVE_INFINITY = -5;
|
|
627
|
-
const NEGATIVE_ZERO = -6;
|
|
628
|
-
|
|
629
|
-
/**
|
|
630
|
-
* Turn a value into a JSON string that can be parsed with `devalue.parse`
|
|
631
|
-
* @param {any} value
|
|
632
|
-
* @param {Record<string, (value: any) => any>} [reducers]
|
|
633
|
-
*/
|
|
634
|
-
function stringify(value, reducers) {
|
|
635
|
-
/** @type {any[]} */
|
|
636
|
-
const stringified = [];
|
|
637
|
-
|
|
638
|
-
/** @type {Map<any, number>} */
|
|
639
|
-
const indexes = new Map();
|
|
640
|
-
|
|
641
|
-
/** @type {Array<{ key: string, fn: (value: any) => any }>} */
|
|
642
|
-
const custom = [];
|
|
643
|
-
for (const key in reducers) {
|
|
644
|
-
custom.push({ key, fn: reducers[key] });
|
|
645
|
-
}
|
|
646
|
-
|
|
647
|
-
/** @type {string[]} */
|
|
648
|
-
const keys = [];
|
|
649
|
-
|
|
650
|
-
let p = 0;
|
|
651
|
-
|
|
652
|
-
/** @param {any} thing */
|
|
653
|
-
function flatten(thing) {
|
|
654
|
-
if (typeof thing === 'function') {
|
|
655
|
-
throw new DevalueError(`Cannot stringify a function`, keys);
|
|
656
|
-
}
|
|
657
|
-
|
|
658
|
-
if (indexes.has(thing)) return indexes.get(thing);
|
|
659
|
-
|
|
660
|
-
if (thing === undefined) return UNDEFINED;
|
|
661
|
-
if (Number.isNaN(thing)) return NAN;
|
|
662
|
-
if (thing === Infinity) return POSITIVE_INFINITY;
|
|
663
|
-
if (thing === -Infinity) return NEGATIVE_INFINITY;
|
|
664
|
-
if (thing === 0 && 1 / thing < 0) return NEGATIVE_ZERO;
|
|
665
|
-
|
|
666
|
-
const index = p++;
|
|
667
|
-
indexes.set(thing, index);
|
|
668
|
-
|
|
669
|
-
for (const { key, fn } of custom) {
|
|
670
|
-
const value = fn(thing);
|
|
671
|
-
if (value) {
|
|
672
|
-
stringified[index] = `["${key}",${flatten(value)}]`;
|
|
673
|
-
return index;
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
let str = '';
|
|
678
|
-
|
|
679
|
-
if (is_primitive(thing)) {
|
|
680
|
-
str = stringify_primitive(thing);
|
|
681
|
-
} else {
|
|
682
|
-
const type = get_type(thing);
|
|
683
|
-
|
|
684
|
-
switch (type) {
|
|
685
|
-
case 'Number':
|
|
686
|
-
case 'String':
|
|
687
|
-
case 'Boolean':
|
|
688
|
-
str = `["Object",${stringify_primitive(thing)}]`;
|
|
689
|
-
break;
|
|
690
|
-
|
|
691
|
-
case 'BigInt':
|
|
692
|
-
str = `["BigInt",${thing}]`;
|
|
693
|
-
break;
|
|
694
|
-
|
|
695
|
-
case 'Date':
|
|
696
|
-
str = `["Date","${thing.toISOString()}"]`;
|
|
697
|
-
break;
|
|
698
|
-
|
|
699
|
-
case 'RegExp':
|
|
700
|
-
const { source, flags } = thing;
|
|
701
|
-
str = flags
|
|
702
|
-
? `["RegExp",${stringify_string(source)},"${flags}"]`
|
|
703
|
-
: `["RegExp",${stringify_string(source)}]`;
|
|
704
|
-
break;
|
|
705
|
-
|
|
706
|
-
case 'Array':
|
|
707
|
-
str = '[';
|
|
708
|
-
|
|
709
|
-
for (let i = 0; i < thing.length; i += 1) {
|
|
710
|
-
if (i > 0) str += ',';
|
|
711
|
-
|
|
712
|
-
if (i in thing) {
|
|
713
|
-
keys.push(`[${i}]`);
|
|
714
|
-
str += flatten(thing[i]);
|
|
715
|
-
keys.pop();
|
|
716
|
-
} else {
|
|
717
|
-
str += HOLE;
|
|
718
|
-
}
|
|
719
|
-
}
|
|
720
|
-
|
|
721
|
-
str += ']';
|
|
722
|
-
|
|
723
|
-
break;
|
|
724
|
-
|
|
725
|
-
case 'Set':
|
|
726
|
-
str = '["Set"';
|
|
727
|
-
|
|
728
|
-
for (const value of thing) {
|
|
729
|
-
str += `,${flatten(value)}`;
|
|
730
|
-
}
|
|
731
|
-
|
|
732
|
-
str += ']';
|
|
733
|
-
break;
|
|
734
|
-
|
|
735
|
-
case 'Map':
|
|
736
|
-
str = '["Map"';
|
|
737
|
-
|
|
738
|
-
for (const [key, value] of thing) {
|
|
739
|
-
keys.push(
|
|
740
|
-
`.get(${is_primitive(key) ? stringify_primitive(key) : '...'})`
|
|
741
|
-
);
|
|
742
|
-
str += `,${flatten(key)},${flatten(value)}`;
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
str += ']';
|
|
746
|
-
break;
|
|
747
|
-
|
|
748
|
-
default:
|
|
749
|
-
if (!is_plain_object(thing)) {
|
|
750
|
-
throw new DevalueError(
|
|
751
|
-
`Cannot stringify arbitrary non-POJOs`,
|
|
752
|
-
keys
|
|
753
|
-
);
|
|
754
|
-
}
|
|
755
|
-
|
|
756
|
-
if (Object.getOwnPropertySymbols(thing).length > 0) {
|
|
757
|
-
throw new DevalueError(
|
|
758
|
-
`Cannot stringify POJOs with symbolic keys`,
|
|
759
|
-
keys
|
|
760
|
-
);
|
|
761
|
-
}
|
|
762
|
-
|
|
763
|
-
if (Object.getPrototypeOf(thing) === null) {
|
|
764
|
-
str = '["null"';
|
|
765
|
-
for (const key in thing) {
|
|
766
|
-
keys.push(`.${key}`);
|
|
767
|
-
str += `,${stringify_string(key)},${flatten(thing[key])}`;
|
|
768
|
-
keys.pop();
|
|
769
|
-
}
|
|
770
|
-
str += ']';
|
|
771
|
-
} else {
|
|
772
|
-
str = '{';
|
|
773
|
-
let started = false;
|
|
774
|
-
for (const key in thing) {
|
|
775
|
-
if (started) str += ',';
|
|
776
|
-
started = true;
|
|
777
|
-
keys.push(`.${key}`);
|
|
778
|
-
str += `${stringify_string(key)}:${flatten(thing[key])}`;
|
|
779
|
-
keys.pop();
|
|
780
|
-
}
|
|
781
|
-
str += '}';
|
|
782
|
-
}
|
|
783
|
-
}
|
|
784
|
-
}
|
|
785
|
-
|
|
786
|
-
stringified[index] = str;
|
|
787
|
-
return index;
|
|
788
|
-
}
|
|
789
|
-
|
|
790
|
-
const index = flatten(value);
|
|
791
|
-
|
|
792
|
-
// special case — value is represented as a negative index
|
|
793
|
-
if (index < 0) return `${index}`;
|
|
794
|
-
|
|
795
|
-
return `[${stringified.join(',')}]`;
|
|
796
|
-
}
|
|
797
|
-
|
|
798
|
-
/**
|
|
799
|
-
* @param {any} thing
|
|
800
|
-
* @returns {string}
|
|
801
|
-
*/
|
|
802
|
-
function stringify_primitive(thing) {
|
|
803
|
-
const type = typeof thing;
|
|
804
|
-
if (type === 'string') return stringify_string(thing);
|
|
805
|
-
if (thing instanceof String) return stringify_string(thing.toString());
|
|
806
|
-
if (thing === void 0) return UNDEFINED.toString();
|
|
807
|
-
if (thing === 0 && 1 / thing < 0) return NEGATIVE_ZERO.toString();
|
|
808
|
-
if (type === 'bigint') return `["BigInt","${thing}"]`;
|
|
809
|
-
return String(thing);
|
|
810
|
-
}
|
|
811
|
-
|
|
812
|
-
var cookie = {};
|
|
813
|
-
|
|
814
|
-
/*!
|
|
815
|
-
* cookie
|
|
816
|
-
* Copyright(c) 2012-2014 Roman Shtylman
|
|
817
|
-
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
818
|
-
* MIT Licensed
|
|
819
|
-
*/
|
|
820
|
-
|
|
821
|
-
var hasRequiredCookie;
|
|
822
|
-
|
|
823
|
-
function requireCookie () {
|
|
824
|
-
if (hasRequiredCookie) return cookie;
|
|
825
|
-
hasRequiredCookie = 1;
|
|
826
|
-
|
|
827
|
-
/**
|
|
828
|
-
* Module exports.
|
|
829
|
-
* @public
|
|
830
|
-
*/
|
|
831
|
-
|
|
832
|
-
cookie.parse = parse;
|
|
833
|
-
cookie.serialize = serialize;
|
|
834
|
-
|
|
835
|
-
/**
|
|
836
|
-
* Module variables.
|
|
837
|
-
* @private
|
|
838
|
-
*/
|
|
839
|
-
|
|
840
|
-
var __toString = Object.prototype.toString;
|
|
841
|
-
|
|
842
|
-
/**
|
|
843
|
-
* RegExp to match field-content in RFC 7230 sec 3.2
|
|
844
|
-
*
|
|
845
|
-
* field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]
|
|
846
|
-
* field-vchar = VCHAR / obs-text
|
|
847
|
-
* obs-text = %x80-FF
|
|
848
|
-
*/
|
|
849
|
-
|
|
850
|
-
var fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;
|
|
851
|
-
|
|
852
|
-
/**
|
|
853
|
-
* Parse a cookie header.
|
|
854
|
-
*
|
|
855
|
-
* Parse the given cookie header string into an object
|
|
856
|
-
* The object has the various cookies as keys(names) => values
|
|
857
|
-
*
|
|
858
|
-
* @param {string} str
|
|
859
|
-
* @param {object} [options]
|
|
860
|
-
* @return {object}
|
|
861
|
-
* @public
|
|
862
|
-
*/
|
|
863
|
-
|
|
864
|
-
function parse(str, options) {
|
|
865
|
-
if (typeof str !== 'string') {
|
|
866
|
-
throw new TypeError('argument str must be a string');
|
|
867
|
-
}
|
|
868
|
-
|
|
869
|
-
var obj = {};
|
|
870
|
-
var opt = options || {};
|
|
871
|
-
var dec = opt.decode || decode;
|
|
872
|
-
|
|
873
|
-
var index = 0;
|
|
874
|
-
while (index < str.length) {
|
|
875
|
-
var eqIdx = str.indexOf('=', index);
|
|
876
|
-
|
|
877
|
-
// no more cookie pairs
|
|
878
|
-
if (eqIdx === -1) {
|
|
879
|
-
break
|
|
880
|
-
}
|
|
881
|
-
|
|
882
|
-
var endIdx = str.indexOf(';', index);
|
|
883
|
-
|
|
884
|
-
if (endIdx === -1) {
|
|
885
|
-
endIdx = str.length;
|
|
886
|
-
} else if (endIdx < eqIdx) {
|
|
887
|
-
// backtrack on prior semicolon
|
|
888
|
-
index = str.lastIndexOf(';', eqIdx - 1) + 1;
|
|
889
|
-
continue
|
|
890
|
-
}
|
|
891
|
-
|
|
892
|
-
var key = str.slice(index, eqIdx).trim();
|
|
893
|
-
|
|
894
|
-
// only assign once
|
|
895
|
-
if (undefined === obj[key]) {
|
|
896
|
-
var val = str.slice(eqIdx + 1, endIdx).trim();
|
|
897
|
-
|
|
898
|
-
// quoted values
|
|
899
|
-
if (val.charCodeAt(0) === 0x22) {
|
|
900
|
-
val = val.slice(1, -1);
|
|
901
|
-
}
|
|
902
|
-
|
|
903
|
-
obj[key] = tryDecode(val, dec);
|
|
904
|
-
}
|
|
905
|
-
|
|
906
|
-
index = endIdx + 1;
|
|
907
|
-
}
|
|
908
|
-
|
|
909
|
-
return obj;
|
|
910
|
-
}
|
|
911
|
-
|
|
912
|
-
/**
|
|
913
|
-
* Serialize data into a cookie header.
|
|
914
|
-
*
|
|
915
|
-
* Serialize the a name value pair into a cookie string suitable for
|
|
916
|
-
* http headers. An optional options object specified cookie parameters.
|
|
917
|
-
*
|
|
918
|
-
* serialize('foo', 'bar', { httpOnly: true })
|
|
919
|
-
* => "foo=bar; httpOnly"
|
|
920
|
-
*
|
|
921
|
-
* @param {string} name
|
|
922
|
-
* @param {string} val
|
|
923
|
-
* @param {object} [options]
|
|
924
|
-
* @return {string}
|
|
925
|
-
* @public
|
|
926
|
-
*/
|
|
927
|
-
|
|
928
|
-
function serialize(name, val, options) {
|
|
929
|
-
var opt = options || {};
|
|
930
|
-
var enc = opt.encode || encode;
|
|
931
|
-
|
|
932
|
-
if (typeof enc !== 'function') {
|
|
933
|
-
throw new TypeError('option encode is invalid');
|
|
934
|
-
}
|
|
935
|
-
|
|
936
|
-
if (!fieldContentRegExp.test(name)) {
|
|
937
|
-
throw new TypeError('argument name is invalid');
|
|
938
|
-
}
|
|
939
|
-
|
|
940
|
-
var value = enc(val);
|
|
941
|
-
|
|
942
|
-
if (value && !fieldContentRegExp.test(value)) {
|
|
943
|
-
throw new TypeError('argument val is invalid');
|
|
944
|
-
}
|
|
945
|
-
|
|
946
|
-
var str = name + '=' + value;
|
|
947
|
-
|
|
948
|
-
if (null != opt.maxAge) {
|
|
949
|
-
var maxAge = opt.maxAge - 0;
|
|
950
|
-
|
|
951
|
-
if (isNaN(maxAge) || !isFinite(maxAge)) {
|
|
952
|
-
throw new TypeError('option maxAge is invalid')
|
|
953
|
-
}
|
|
954
|
-
|
|
955
|
-
str += '; Max-Age=' + Math.floor(maxAge);
|
|
956
|
-
}
|
|
957
|
-
|
|
958
|
-
if (opt.domain) {
|
|
959
|
-
if (!fieldContentRegExp.test(opt.domain)) {
|
|
960
|
-
throw new TypeError('option domain is invalid');
|
|
961
|
-
}
|
|
962
|
-
|
|
963
|
-
str += '; Domain=' + opt.domain;
|
|
964
|
-
}
|
|
965
|
-
|
|
966
|
-
if (opt.path) {
|
|
967
|
-
if (!fieldContentRegExp.test(opt.path)) {
|
|
968
|
-
throw new TypeError('option path is invalid');
|
|
969
|
-
}
|
|
970
|
-
|
|
971
|
-
str += '; Path=' + opt.path;
|
|
972
|
-
}
|
|
973
|
-
|
|
974
|
-
if (opt.expires) {
|
|
975
|
-
var expires = opt.expires;
|
|
976
|
-
|
|
977
|
-
if (!isDate(expires) || isNaN(expires.valueOf())) {
|
|
978
|
-
throw new TypeError('option expires is invalid');
|
|
979
|
-
}
|
|
980
|
-
|
|
981
|
-
str += '; Expires=' + expires.toUTCString();
|
|
982
|
-
}
|
|
983
|
-
|
|
984
|
-
if (opt.httpOnly) {
|
|
985
|
-
str += '; HttpOnly';
|
|
986
|
-
}
|
|
987
|
-
|
|
988
|
-
if (opt.secure) {
|
|
989
|
-
str += '; Secure';
|
|
990
|
-
}
|
|
991
|
-
|
|
992
|
-
if (opt.partitioned) {
|
|
993
|
-
str += '; Partitioned';
|
|
994
|
-
}
|
|
995
|
-
|
|
996
|
-
if (opt.priority) {
|
|
997
|
-
var priority = typeof opt.priority === 'string'
|
|
998
|
-
? opt.priority.toLowerCase()
|
|
999
|
-
: opt.priority;
|
|
1000
|
-
|
|
1001
|
-
switch (priority) {
|
|
1002
|
-
case 'low':
|
|
1003
|
-
str += '; Priority=Low';
|
|
1004
|
-
break
|
|
1005
|
-
case 'medium':
|
|
1006
|
-
str += '; Priority=Medium';
|
|
1007
|
-
break
|
|
1008
|
-
case 'high':
|
|
1009
|
-
str += '; Priority=High';
|
|
1010
|
-
break
|
|
1011
|
-
default:
|
|
1012
|
-
throw new TypeError('option priority is invalid')
|
|
1013
|
-
}
|
|
1014
|
-
}
|
|
1015
|
-
|
|
1016
|
-
if (opt.sameSite) {
|
|
1017
|
-
var sameSite = typeof opt.sameSite === 'string'
|
|
1018
|
-
? opt.sameSite.toLowerCase() : opt.sameSite;
|
|
1019
|
-
|
|
1020
|
-
switch (sameSite) {
|
|
1021
|
-
case true:
|
|
1022
|
-
str += '; SameSite=Strict';
|
|
1023
|
-
break;
|
|
1024
|
-
case 'lax':
|
|
1025
|
-
str += '; SameSite=Lax';
|
|
1026
|
-
break;
|
|
1027
|
-
case 'strict':
|
|
1028
|
-
str += '; SameSite=Strict';
|
|
1029
|
-
break;
|
|
1030
|
-
case 'none':
|
|
1031
|
-
str += '; SameSite=None';
|
|
1032
|
-
break;
|
|
1033
|
-
default:
|
|
1034
|
-
throw new TypeError('option sameSite is invalid');
|
|
1035
|
-
}
|
|
1036
|
-
}
|
|
1037
|
-
|
|
1038
|
-
return str;
|
|
1039
|
-
}
|
|
1040
|
-
|
|
1041
|
-
/**
|
|
1042
|
-
* URL-decode string value. Optimized to skip native call when no %.
|
|
1043
|
-
*
|
|
1044
|
-
* @param {string} str
|
|
1045
|
-
* @returns {string}
|
|
1046
|
-
*/
|
|
1047
|
-
|
|
1048
|
-
function decode (str) {
|
|
1049
|
-
return str.indexOf('%') !== -1
|
|
1050
|
-
? decodeURIComponent(str)
|
|
1051
|
-
: str
|
|
1052
|
-
}
|
|
1053
|
-
|
|
1054
|
-
/**
|
|
1055
|
-
* URL-encode value.
|
|
1056
|
-
*
|
|
1057
|
-
* @param {string} val
|
|
1058
|
-
* @returns {string}
|
|
1059
|
-
*/
|
|
1060
|
-
|
|
1061
|
-
function encode (val) {
|
|
1062
|
-
return encodeURIComponent(val)
|
|
1063
|
-
}
|
|
1064
|
-
|
|
1065
|
-
/**
|
|
1066
|
-
* Determine if value is a Date.
|
|
1067
|
-
*
|
|
1068
|
-
* @param {*} val
|
|
1069
|
-
* @private
|
|
1070
|
-
*/
|
|
1071
|
-
|
|
1072
|
-
function isDate (val) {
|
|
1073
|
-
return __toString.call(val) === '[object Date]' ||
|
|
1074
|
-
val instanceof Date
|
|
1075
|
-
}
|
|
1076
|
-
|
|
1077
|
-
/**
|
|
1078
|
-
* Try decoding a string using a decoding function.
|
|
1079
|
-
*
|
|
1080
|
-
* @param {string} str
|
|
1081
|
-
* @param {function} decode
|
|
1082
|
-
* @private
|
|
1083
|
-
*/
|
|
1084
|
-
|
|
1085
|
-
function tryDecode(str, decode) {
|
|
1086
|
-
try {
|
|
1087
|
-
return decode(str);
|
|
1088
|
-
} catch (e) {
|
|
1089
|
-
return str;
|
|
1090
|
-
}
|
|
1091
|
-
}
|
|
1092
|
-
return cookie;
|
|
1093
|
-
}
|
|
1094
|
-
|
|
1095
|
-
var cookieExports = requireCookie();
|
|
1096
|
-
|
|
1097
|
-
var setCookie = {exports: {}};
|
|
1098
|
-
|
|
1099
|
-
var hasRequiredSetCookie;
|
|
1100
|
-
|
|
1101
|
-
function requireSetCookie () {
|
|
1102
|
-
if (hasRequiredSetCookie) return setCookie.exports;
|
|
1103
|
-
hasRequiredSetCookie = 1;
|
|
1104
|
-
|
|
1105
|
-
var defaultParseOptions = {
|
|
1106
|
-
decodeValues: true,
|
|
1107
|
-
map: false,
|
|
1108
|
-
silent: false,
|
|
1109
|
-
};
|
|
1110
|
-
|
|
1111
|
-
function isNonEmptyString(str) {
|
|
1112
|
-
return typeof str === "string" && !!str.trim();
|
|
1113
|
-
}
|
|
1114
|
-
|
|
1115
|
-
function parseString(setCookieValue, options) {
|
|
1116
|
-
var parts = setCookieValue.split(";").filter(isNonEmptyString);
|
|
1117
|
-
|
|
1118
|
-
var nameValuePairStr = parts.shift();
|
|
1119
|
-
var parsed = parseNameValuePair(nameValuePairStr);
|
|
1120
|
-
var name = parsed.name;
|
|
1121
|
-
var value = parsed.value;
|
|
1122
|
-
|
|
1123
|
-
options = options
|
|
1124
|
-
? Object.assign({}, defaultParseOptions, options)
|
|
1125
|
-
: defaultParseOptions;
|
|
1126
|
-
|
|
1127
|
-
try {
|
|
1128
|
-
value = options.decodeValues ? decodeURIComponent(value) : value; // decode cookie value
|
|
1129
|
-
} catch (e) {
|
|
1130
|
-
console.error(
|
|
1131
|
-
"set-cookie-parser encountered an error while decoding a cookie with value '" +
|
|
1132
|
-
value +
|
|
1133
|
-
"'. Set options.decodeValues to false to disable this feature.",
|
|
1134
|
-
e
|
|
1135
|
-
);
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
|
-
var cookie = {
|
|
1139
|
-
name: name,
|
|
1140
|
-
value: value,
|
|
1141
|
-
};
|
|
1142
|
-
|
|
1143
|
-
parts.forEach(function (part) {
|
|
1144
|
-
var sides = part.split("=");
|
|
1145
|
-
var key = sides.shift().trimLeft().toLowerCase();
|
|
1146
|
-
var value = sides.join("=");
|
|
1147
|
-
if (key === "expires") {
|
|
1148
|
-
cookie.expires = new Date(value);
|
|
1149
|
-
} else if (key === "max-age") {
|
|
1150
|
-
cookie.maxAge = parseInt(value, 10);
|
|
1151
|
-
} else if (key === "secure") {
|
|
1152
|
-
cookie.secure = true;
|
|
1153
|
-
} else if (key === "httponly") {
|
|
1154
|
-
cookie.httpOnly = true;
|
|
1155
|
-
} else if (key === "samesite") {
|
|
1156
|
-
cookie.sameSite = value;
|
|
1157
|
-
} else {
|
|
1158
|
-
cookie[key] = value;
|
|
1159
|
-
}
|
|
1160
|
-
});
|
|
1161
|
-
|
|
1162
|
-
return cookie;
|
|
1163
|
-
}
|
|
1164
|
-
|
|
1165
|
-
function parseNameValuePair(nameValuePairStr) {
|
|
1166
|
-
// Parses name-value-pair according to rfc6265bis draft
|
|
1167
|
-
|
|
1168
|
-
var name = "";
|
|
1169
|
-
var value = "";
|
|
1170
|
-
var nameValueArr = nameValuePairStr.split("=");
|
|
1171
|
-
if (nameValueArr.length > 1) {
|
|
1172
|
-
name = nameValueArr.shift();
|
|
1173
|
-
value = nameValueArr.join("="); // everything after the first =, joined by a "=" if there was more than one part
|
|
1174
|
-
} else {
|
|
1175
|
-
value = nameValuePairStr;
|
|
1176
|
-
}
|
|
1177
|
-
|
|
1178
|
-
return { name: name, value: value };
|
|
1179
|
-
}
|
|
1180
|
-
|
|
1181
|
-
function parse(input, options) {
|
|
1182
|
-
options = options
|
|
1183
|
-
? Object.assign({}, defaultParseOptions, options)
|
|
1184
|
-
: defaultParseOptions;
|
|
1185
|
-
|
|
1186
|
-
if (!input) {
|
|
1187
|
-
if (!options.map) {
|
|
1188
|
-
return [];
|
|
1189
|
-
} else {
|
|
1190
|
-
return {};
|
|
1191
|
-
}
|
|
1192
|
-
}
|
|
1193
|
-
|
|
1194
|
-
if (input.headers) {
|
|
1195
|
-
if (typeof input.headers.getSetCookie === "function") {
|
|
1196
|
-
// for fetch responses - they combine headers of the same type in the headers array,
|
|
1197
|
-
// but getSetCookie returns an uncombined array
|
|
1198
|
-
input = input.headers.getSetCookie();
|
|
1199
|
-
} else if (input.headers["set-cookie"]) {
|
|
1200
|
-
// fast-path for node.js (which automatically normalizes header names to lower-case
|
|
1201
|
-
input = input.headers["set-cookie"];
|
|
1202
|
-
} else {
|
|
1203
|
-
// slow-path for other environments - see #25
|
|
1204
|
-
var sch =
|
|
1205
|
-
input.headers[
|
|
1206
|
-
Object.keys(input.headers).find(function (key) {
|
|
1207
|
-
return key.toLowerCase() === "set-cookie";
|
|
1208
|
-
})
|
|
1209
|
-
];
|
|
1210
|
-
// warn if called on a request-like object with a cookie header rather than a set-cookie header - see #34, 36
|
|
1211
|
-
if (!sch && input.headers.cookie && !options.silent) {
|
|
1212
|
-
console.warn(
|
|
1213
|
-
"Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."
|
|
1214
|
-
);
|
|
1215
|
-
}
|
|
1216
|
-
input = sch;
|
|
1217
|
-
}
|
|
1218
|
-
}
|
|
1219
|
-
if (!Array.isArray(input)) {
|
|
1220
|
-
input = [input];
|
|
1221
|
-
}
|
|
1222
|
-
|
|
1223
|
-
options = options
|
|
1224
|
-
? Object.assign({}, defaultParseOptions, options)
|
|
1225
|
-
: defaultParseOptions;
|
|
1226
|
-
|
|
1227
|
-
if (!options.map) {
|
|
1228
|
-
return input.filter(isNonEmptyString).map(function (str) {
|
|
1229
|
-
return parseString(str, options);
|
|
1230
|
-
});
|
|
1231
|
-
} else {
|
|
1232
|
-
var cookies = {};
|
|
1233
|
-
return input.filter(isNonEmptyString).reduce(function (cookies, str) {
|
|
1234
|
-
var cookie = parseString(str, options);
|
|
1235
|
-
cookies[cookie.name] = cookie;
|
|
1236
|
-
return cookies;
|
|
1237
|
-
}, cookies);
|
|
1238
|
-
}
|
|
1239
|
-
}
|
|
1240
|
-
|
|
1241
|
-
/*
|
|
1242
|
-
Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas
|
|
1243
|
-
that are within a single set-cookie field-value, such as in the Expires portion.
|
|
1244
|
-
|
|
1245
|
-
This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2
|
|
1246
|
-
Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128
|
|
1247
|
-
React Native's fetch does this for *every* header, including set-cookie.
|
|
1248
|
-
|
|
1249
|
-
Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25
|
|
1250
|
-
Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation
|
|
1251
|
-
*/
|
|
1252
|
-
function splitCookiesString(cookiesString) {
|
|
1253
|
-
if (Array.isArray(cookiesString)) {
|
|
1254
|
-
return cookiesString;
|
|
1255
|
-
}
|
|
1256
|
-
if (typeof cookiesString !== "string") {
|
|
1257
|
-
return [];
|
|
1258
|
-
}
|
|
1259
|
-
|
|
1260
|
-
var cookiesStrings = [];
|
|
1261
|
-
var pos = 0;
|
|
1262
|
-
var start;
|
|
1263
|
-
var ch;
|
|
1264
|
-
var lastComma;
|
|
1265
|
-
var nextStart;
|
|
1266
|
-
var cookiesSeparatorFound;
|
|
1267
|
-
|
|
1268
|
-
function skipWhitespace() {
|
|
1269
|
-
while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) {
|
|
1270
|
-
pos += 1;
|
|
1271
|
-
}
|
|
1272
|
-
return pos < cookiesString.length;
|
|
1273
|
-
}
|
|
1274
|
-
|
|
1275
|
-
function notSpecialChar() {
|
|
1276
|
-
ch = cookiesString.charAt(pos);
|
|
1277
|
-
|
|
1278
|
-
return ch !== "=" && ch !== ";" && ch !== ",";
|
|
1279
|
-
}
|
|
1280
|
-
|
|
1281
|
-
while (pos < cookiesString.length) {
|
|
1282
|
-
start = pos;
|
|
1283
|
-
cookiesSeparatorFound = false;
|
|
1284
|
-
|
|
1285
|
-
while (skipWhitespace()) {
|
|
1286
|
-
ch = cookiesString.charAt(pos);
|
|
1287
|
-
if (ch === ",") {
|
|
1288
|
-
// ',' is a cookie separator if we have later first '=', not ';' or ','
|
|
1289
|
-
lastComma = pos;
|
|
1290
|
-
pos += 1;
|
|
1291
|
-
|
|
1292
|
-
skipWhitespace();
|
|
1293
|
-
nextStart = pos;
|
|
1294
|
-
|
|
1295
|
-
while (pos < cookiesString.length && notSpecialChar()) {
|
|
1296
|
-
pos += 1;
|
|
1297
|
-
}
|
|
1298
|
-
|
|
1299
|
-
// currently special character
|
|
1300
|
-
if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") {
|
|
1301
|
-
// we found cookies separator
|
|
1302
|
-
cookiesSeparatorFound = true;
|
|
1303
|
-
// pos is inside the next cookie, so back up and return it.
|
|
1304
|
-
pos = nextStart;
|
|
1305
|
-
cookiesStrings.push(cookiesString.substring(start, lastComma));
|
|
1306
|
-
start = pos;
|
|
1307
|
-
} else {
|
|
1308
|
-
// in param ',' or param separator ';',
|
|
1309
|
-
// we continue from that comma
|
|
1310
|
-
pos = lastComma + 1;
|
|
1311
|
-
}
|
|
1312
|
-
} else {
|
|
1313
|
-
pos += 1;
|
|
1314
|
-
}
|
|
1315
|
-
}
|
|
1316
|
-
|
|
1317
|
-
if (!cookiesSeparatorFound || pos >= cookiesString.length) {
|
|
1318
|
-
cookiesStrings.push(cookiesString.substring(start, cookiesString.length));
|
|
1319
|
-
}
|
|
1320
|
-
}
|
|
1321
|
-
|
|
1322
|
-
return cookiesStrings;
|
|
1323
|
-
}
|
|
1324
|
-
|
|
1325
|
-
setCookie.exports = parse;
|
|
1326
|
-
setCookie.exports.parse = parse;
|
|
1327
|
-
setCookie.exports.parseString = parseString;
|
|
1328
|
-
setCookie.exports.splitCookiesString = splitCookiesString;
|
|
1329
|
-
return setCookie.exports;
|
|
1330
|
-
}
|
|
1331
|
-
|
|
1332
|
-
var setCookieExports = requireSetCookie();
|
|
1333
|
-
|
|
1334
|
-
const SVELTE_KIT_ASSETS = "/_svelte_kit_assets";
|
|
1335
|
-
const ENDPOINT_METHODS = ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "HEAD"];
|
|
1336
|
-
const PAGE_METHODS = ["GET", "POST", "HEAD"];
|
|
1337
|
-
function negotiate(accept, types) {
|
|
1338
|
-
const parts = [];
|
|
1339
|
-
accept.split(",").forEach((str, i) => {
|
|
1340
|
-
const match = /([^/]+)\/([^;]+)(?:;q=([0-9.]+))?/.exec(str);
|
|
1341
|
-
if (match) {
|
|
1342
|
-
const [, type, subtype, q = "1"] = match;
|
|
1343
|
-
parts.push({ type, subtype, q: +q, i });
|
|
1344
|
-
}
|
|
1345
|
-
});
|
|
1346
|
-
parts.sort((a, b) => {
|
|
1347
|
-
if (a.q !== b.q) {
|
|
1348
|
-
return b.q - a.q;
|
|
1349
|
-
}
|
|
1350
|
-
if (a.subtype === "*" !== (b.subtype === "*")) {
|
|
1351
|
-
return a.subtype === "*" ? 1 : -1;
|
|
1352
|
-
}
|
|
1353
|
-
if (a.type === "*" !== (b.type === "*")) {
|
|
1354
|
-
return a.type === "*" ? 1 : -1;
|
|
1355
|
-
}
|
|
1356
|
-
return a.i - b.i;
|
|
1357
|
-
});
|
|
1358
|
-
let accepted;
|
|
1359
|
-
let min_priority = Infinity;
|
|
1360
|
-
for (const mimetype of types) {
|
|
1361
|
-
const [type, subtype] = mimetype.split("/");
|
|
1362
|
-
const priority = parts.findIndex(
|
|
1363
|
-
(part) => (part.type === type || part.type === "*") && (part.subtype === subtype || part.subtype === "*")
|
|
1364
|
-
);
|
|
1365
|
-
if (priority !== -1 && priority < min_priority) {
|
|
1366
|
-
accepted = mimetype;
|
|
1367
|
-
min_priority = priority;
|
|
1368
|
-
}
|
|
1369
|
-
}
|
|
1370
|
-
return accepted;
|
|
1371
|
-
}
|
|
1372
|
-
function is_content_type(request, ...types) {
|
|
1373
|
-
const type = request.headers.get("content-type")?.split(";", 1)[0].trim() ?? "";
|
|
1374
|
-
return types.includes(type.toLowerCase());
|
|
1375
|
-
}
|
|
1376
|
-
function is_form_content_type(request) {
|
|
1377
|
-
return is_content_type(
|
|
1378
|
-
request,
|
|
1379
|
-
"application/x-www-form-urlencoded",
|
|
1380
|
-
"multipart/form-data",
|
|
1381
|
-
"text/plain"
|
|
1382
|
-
);
|
|
1383
|
-
}
|
|
1384
|
-
class HttpError {
|
|
1385
|
-
/**
|
|
1386
|
-
* @param {number} status
|
|
1387
|
-
* @param {{message: string} extends App.Error ? (App.Error | string | undefined) : App.Error} body
|
|
1388
|
-
*/
|
|
1389
|
-
constructor(status, body2) {
|
|
1390
|
-
this.status = status;
|
|
1391
|
-
if (typeof body2 === "string") {
|
|
1392
|
-
this.body = { message: body2 };
|
|
1393
|
-
} else if (body2) {
|
|
1394
|
-
this.body = body2;
|
|
1395
|
-
} else {
|
|
1396
|
-
this.body = { message: `Error: ${status}` };
|
|
1397
|
-
}
|
|
1398
|
-
}
|
|
1399
|
-
toString() {
|
|
1400
|
-
return JSON.stringify(this.body);
|
|
1401
|
-
}
|
|
1402
|
-
}
|
|
1403
|
-
class Redirect {
|
|
1404
|
-
/**
|
|
1405
|
-
* @param {300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308} status
|
|
1406
|
-
* @param {string} location
|
|
1407
|
-
*/
|
|
1408
|
-
constructor(status, location) {
|
|
1409
|
-
this.status = status;
|
|
1410
|
-
this.location = location;
|
|
1411
|
-
}
|
|
1412
|
-
}
|
|
1413
|
-
class SvelteKitError extends Error {
|
|
1414
|
-
/**
|
|
1415
|
-
* @param {number} status
|
|
1416
|
-
* @param {string} text
|
|
1417
|
-
* @param {string} message
|
|
1418
|
-
*/
|
|
1419
|
-
constructor(status, text2, message) {
|
|
1420
|
-
super(message);
|
|
1421
|
-
this.status = status;
|
|
1422
|
-
this.text = text2;
|
|
1423
|
-
}
|
|
1424
|
-
}
|
|
1425
|
-
class ActionFailure {
|
|
1426
|
-
/**
|
|
1427
|
-
* @param {number} status
|
|
1428
|
-
* @param {T} data
|
|
1429
|
-
*/
|
|
1430
|
-
constructor(status, data) {
|
|
1431
|
-
this.status = status;
|
|
1432
|
-
this.data = data;
|
|
1433
|
-
}
|
|
1434
|
-
}
|
|
1435
|
-
function json(data, init2) {
|
|
1436
|
-
const body2 = JSON.stringify(data);
|
|
1437
|
-
const headers2 = new Headers(init2?.headers);
|
|
1438
|
-
if (!headers2.has("content-length")) {
|
|
1439
|
-
headers2.set("content-length", encoder$3.encode(body2).byteLength.toString());
|
|
1440
|
-
}
|
|
1441
|
-
if (!headers2.has("content-type")) {
|
|
1442
|
-
headers2.set("content-type", "application/json");
|
|
1443
|
-
}
|
|
1444
|
-
return new Response(body2, {
|
|
1445
|
-
...init2,
|
|
1446
|
-
headers: headers2
|
|
1447
|
-
});
|
|
1448
|
-
}
|
|
1449
|
-
const encoder$3 = new TextEncoder();
|
|
1450
|
-
function text(body2, init2) {
|
|
1451
|
-
const headers2 = new Headers(init2?.headers);
|
|
1452
|
-
if (!headers2.has("content-length")) {
|
|
1453
|
-
const encoded = encoder$3.encode(body2);
|
|
1454
|
-
headers2.set("content-length", encoded.byteLength.toString());
|
|
1455
|
-
return new Response(encoded, {
|
|
1456
|
-
...init2,
|
|
1457
|
-
headers: headers2
|
|
1458
|
-
});
|
|
1459
|
-
}
|
|
1460
|
-
return new Response(body2, {
|
|
1461
|
-
...init2,
|
|
1462
|
-
headers: headers2
|
|
1463
|
-
});
|
|
1464
|
-
}
|
|
1465
|
-
function coalesce_to_error(err) {
|
|
1466
|
-
return err instanceof Error || err && /** @type {any} */
|
|
1467
|
-
err.name && /** @type {any} */
|
|
1468
|
-
err.message ? (
|
|
1469
|
-
/** @type {Error} */
|
|
1470
|
-
err
|
|
1471
|
-
) : new Error(JSON.stringify(err));
|
|
1472
|
-
}
|
|
1473
|
-
function normalize_error(error) {
|
|
1474
|
-
return (
|
|
1475
|
-
/** @type {import('../runtime/control.js').Redirect | HttpError | SvelteKitError | Error} */
|
|
1476
|
-
error
|
|
1477
|
-
);
|
|
1478
|
-
}
|
|
1479
|
-
function get_status(error) {
|
|
1480
|
-
return error instanceof HttpError || error instanceof SvelteKitError ? error.status : 500;
|
|
1481
|
-
}
|
|
1482
|
-
function get_message(error) {
|
|
1483
|
-
return error instanceof SvelteKitError ? error.text : "Internal Error";
|
|
1484
|
-
}
|
|
1485
|
-
function method_not_allowed(mod, method) {
|
|
1486
|
-
return text(`${method} method not allowed`, {
|
|
1487
|
-
status: 405,
|
|
1488
|
-
headers: {
|
|
1489
|
-
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405
|
|
1490
|
-
// "The server must generate an Allow header field in a 405 status code response"
|
|
1491
|
-
allow: allowed_methods(mod).join(", ")
|
|
1492
|
-
}
|
|
1493
|
-
});
|
|
1494
|
-
}
|
|
1495
|
-
function allowed_methods(mod) {
|
|
1496
|
-
const allowed = ENDPOINT_METHODS.filter((method) => method in mod);
|
|
1497
|
-
if ("GET" in mod || "HEAD" in mod)
|
|
1498
|
-
allowed.push("HEAD");
|
|
1499
|
-
return allowed;
|
|
1500
|
-
}
|
|
1501
|
-
function static_error_page(options2, status, message) {
|
|
1502
|
-
let page = options2.templates.error({ status, message });
|
|
1503
|
-
return text(page, {
|
|
1504
|
-
headers: { "content-type": "text/html; charset=utf-8" },
|
|
1505
|
-
status
|
|
1506
|
-
});
|
|
1507
|
-
}
|
|
1508
|
-
async function handle_fatal_error(event, options2, error) {
|
|
1509
|
-
error = error instanceof HttpError ? error : coalesce_to_error(error);
|
|
1510
|
-
const status = get_status(error);
|
|
1511
|
-
const body2 = await handle_error_and_jsonify(event, options2, error);
|
|
1512
|
-
const type = negotiate(event.request.headers.get("accept") || "text/html", [
|
|
1513
|
-
"application/json",
|
|
1514
|
-
"text/html"
|
|
1515
|
-
]);
|
|
1516
|
-
if (event.isDataRequest || type === "application/json") {
|
|
1517
|
-
return json(body2, {
|
|
1518
|
-
status
|
|
1519
|
-
});
|
|
1520
|
-
}
|
|
1521
|
-
return static_error_page(options2, status, body2.message);
|
|
1522
|
-
}
|
|
1523
|
-
async function handle_error_and_jsonify(event, options2, error) {
|
|
1524
|
-
if (error instanceof HttpError) {
|
|
1525
|
-
return error.body;
|
|
1526
|
-
}
|
|
1527
|
-
const status = get_status(error);
|
|
1528
|
-
const message = get_message(error);
|
|
1529
|
-
return await options2.hooks.handleError({ error, event, status, message }) ?? { message };
|
|
1530
|
-
}
|
|
1531
|
-
function redirect_response(status, location) {
|
|
1532
|
-
const response = new Response(void 0, {
|
|
1533
|
-
status,
|
|
1534
|
-
headers: { location }
|
|
1535
|
-
});
|
|
1536
|
-
return response;
|
|
1537
|
-
}
|
|
1538
|
-
function clarify_devalue_error(event, error) {
|
|
1539
|
-
if (error.path) {
|
|
1540
|
-
return `Data returned from \`load\` while rendering ${event.route.id} is not serializable: ${error.message} (data${error.path})`;
|
|
1541
|
-
}
|
|
1542
|
-
if (error.path === "") {
|
|
1543
|
-
return `Data returned from \`load\` while rendering ${event.route.id} is not a plain object`;
|
|
1544
|
-
}
|
|
1545
|
-
return error.message;
|
|
1546
|
-
}
|
|
1547
|
-
function stringify_uses(node) {
|
|
1548
|
-
const uses = [];
|
|
1549
|
-
if (node.uses && node.uses.dependencies.size > 0) {
|
|
1550
|
-
uses.push(`"dependencies":${JSON.stringify(Array.from(node.uses.dependencies))}`);
|
|
1551
|
-
}
|
|
1552
|
-
if (node.uses && node.uses.search_params.size > 0) {
|
|
1553
|
-
uses.push(`"search_params":${JSON.stringify(Array.from(node.uses.search_params))}`);
|
|
1554
|
-
}
|
|
1555
|
-
if (node.uses && node.uses.params.size > 0) {
|
|
1556
|
-
uses.push(`"params":${JSON.stringify(Array.from(node.uses.params))}`);
|
|
1557
|
-
}
|
|
1558
|
-
if (node.uses?.parent)
|
|
1559
|
-
uses.push('"parent":1');
|
|
1560
|
-
if (node.uses?.route)
|
|
1561
|
-
uses.push('"route":1');
|
|
1562
|
-
if (node.uses?.url)
|
|
1563
|
-
uses.push('"url":1');
|
|
1564
|
-
return `"uses":{${uses.join(",")}}`;
|
|
1565
|
-
}
|
|
1566
|
-
async function render_endpoint(event, mod, state) {
|
|
1567
|
-
const method = (
|
|
1568
|
-
/** @type {import('types').HttpMethod} */
|
|
1569
|
-
event.request.method
|
|
1570
|
-
);
|
|
1571
|
-
let handler = mod[method] || mod.fallback;
|
|
1572
|
-
if (method === "HEAD" && mod.GET && !mod.HEAD) {
|
|
1573
|
-
handler = mod.GET;
|
|
1574
|
-
}
|
|
1575
|
-
if (!handler) {
|
|
1576
|
-
return method_not_allowed(mod, method);
|
|
1577
|
-
}
|
|
1578
|
-
const prerender = mod.prerender ?? state.prerender_default;
|
|
1579
|
-
if (prerender && (mod.POST || mod.PATCH || mod.PUT || mod.DELETE)) {
|
|
1580
|
-
throw new Error("Cannot prerender endpoints that have mutative methods");
|
|
1581
|
-
}
|
|
1582
|
-
if (state.prerendering && !prerender) {
|
|
1583
|
-
if (state.depth > 0) {
|
|
1584
|
-
throw new Error(`${event.route.id} is not prerenderable`);
|
|
1585
|
-
} else {
|
|
1586
|
-
return new Response(void 0, { status: 204 });
|
|
1587
|
-
}
|
|
1588
|
-
}
|
|
1589
|
-
try {
|
|
1590
|
-
let response = await handler(
|
|
1591
|
-
/** @type {import('@sveltejs/kit').RequestEvent<Record<string, any>>} */
|
|
1592
|
-
event
|
|
1593
|
-
);
|
|
1594
|
-
if (!(response instanceof Response)) {
|
|
1595
|
-
throw new Error(
|
|
1596
|
-
`Invalid response from route ${event.url.pathname}: handler should return a Response object`
|
|
1597
|
-
);
|
|
1598
|
-
}
|
|
1599
|
-
if (state.prerendering) {
|
|
1600
|
-
response = new Response(response.body, {
|
|
1601
|
-
status: response.status,
|
|
1602
|
-
statusText: response.statusText,
|
|
1603
|
-
headers: new Headers(response.headers)
|
|
1604
|
-
});
|
|
1605
|
-
response.headers.set("x-sveltekit-prerender", String(prerender));
|
|
1606
|
-
}
|
|
1607
|
-
return response;
|
|
1608
|
-
} catch (e) {
|
|
1609
|
-
if (e instanceof Redirect) {
|
|
1610
|
-
return new Response(void 0, {
|
|
1611
|
-
status: e.status,
|
|
1612
|
-
headers: { location: e.location }
|
|
1613
|
-
});
|
|
1614
|
-
}
|
|
1615
|
-
throw e;
|
|
1616
|
-
}
|
|
1617
|
-
}
|
|
1618
|
-
function is_endpoint_request(event) {
|
|
1619
|
-
const { method, headers: headers2 } = event.request;
|
|
1620
|
-
if (ENDPOINT_METHODS.includes(method) && !PAGE_METHODS.includes(method)) {
|
|
1621
|
-
return true;
|
|
1622
|
-
}
|
|
1623
|
-
if (method === "POST" && headers2.get("x-sveltekit-action") === "true")
|
|
1624
|
-
return false;
|
|
1625
|
-
const accept = event.request.headers.get("accept") ?? "*/*";
|
|
1626
|
-
return negotiate(accept, ["*", "text/html"]) !== "text/html";
|
|
1627
|
-
}
|
|
1628
|
-
function compact(arr) {
|
|
1629
|
-
return arr.filter(
|
|
1630
|
-
/** @returns {val is NonNullable<T>} */
|
|
1631
|
-
(val) => val != null
|
|
1632
|
-
);
|
|
1633
|
-
}
|
|
1634
|
-
function is_action_json_request(event) {
|
|
1635
|
-
const accept = negotiate(event.request.headers.get("accept") ?? "*/*", [
|
|
1636
|
-
"application/json",
|
|
1637
|
-
"text/html"
|
|
1638
|
-
]);
|
|
1639
|
-
return accept === "application/json" && event.request.method === "POST";
|
|
1640
|
-
}
|
|
1641
|
-
async function handle_action_json_request(event, options2, server) {
|
|
1642
|
-
const actions = server?.actions;
|
|
1643
|
-
if (!actions) {
|
|
1644
|
-
const no_actions_error = new SvelteKitError(
|
|
1645
|
-
405,
|
|
1646
|
-
"Method Not Allowed",
|
|
1647
|
-
"POST method not allowed. No actions exist for this page"
|
|
1648
|
-
);
|
|
1649
|
-
return action_json(
|
|
1650
|
-
{
|
|
1651
|
-
type: "error",
|
|
1652
|
-
error: await handle_error_and_jsonify(event, options2, no_actions_error)
|
|
1653
|
-
},
|
|
1654
|
-
{
|
|
1655
|
-
status: no_actions_error.status,
|
|
1656
|
-
headers: {
|
|
1657
|
-
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405
|
|
1658
|
-
// "The server must generate an Allow header field in a 405 status code response"
|
|
1659
|
-
allow: "GET"
|
|
1660
|
-
}
|
|
1661
|
-
}
|
|
1662
|
-
);
|
|
1663
|
-
}
|
|
1664
|
-
check_named_default_separate(actions);
|
|
1665
|
-
try {
|
|
1666
|
-
const data = await call_action(event, actions);
|
|
1667
|
-
if (false)
|
|
1668
|
-
;
|
|
1669
|
-
if (data instanceof ActionFailure) {
|
|
1670
|
-
return action_json({
|
|
1671
|
-
type: "failure",
|
|
1672
|
-
status: data.status,
|
|
1673
|
-
// @ts-expect-error we assign a string to what is supposed to be an object. That's ok
|
|
1674
|
-
// because we don't use the object outside, and this way we have better code navigation
|
|
1675
|
-
// through knowing where the related interface is used.
|
|
1676
|
-
data: stringify_action_response(
|
|
1677
|
-
data.data,
|
|
1678
|
-
/** @type {string} */
|
|
1679
|
-
event.route.id
|
|
1680
|
-
)
|
|
1681
|
-
});
|
|
1682
|
-
} else {
|
|
1683
|
-
return action_json({
|
|
1684
|
-
type: "success",
|
|
1685
|
-
status: data ? 200 : 204,
|
|
1686
|
-
// @ts-expect-error see comment above
|
|
1687
|
-
data: stringify_action_response(
|
|
1688
|
-
data,
|
|
1689
|
-
/** @type {string} */
|
|
1690
|
-
event.route.id
|
|
1691
|
-
)
|
|
1692
|
-
});
|
|
1693
|
-
}
|
|
1694
|
-
} catch (e) {
|
|
1695
|
-
const err = normalize_error(e);
|
|
1696
|
-
if (err instanceof Redirect) {
|
|
1697
|
-
return action_json_redirect(err);
|
|
1698
|
-
}
|
|
1699
|
-
return action_json(
|
|
1700
|
-
{
|
|
1701
|
-
type: "error",
|
|
1702
|
-
error: await handle_error_and_jsonify(event, options2, check_incorrect_fail_use(err))
|
|
1703
|
-
},
|
|
1704
|
-
{
|
|
1705
|
-
status: get_status(err)
|
|
1706
|
-
}
|
|
1707
|
-
);
|
|
1708
|
-
}
|
|
1709
|
-
}
|
|
1710
|
-
function check_incorrect_fail_use(error) {
|
|
1711
|
-
return error instanceof ActionFailure ? new Error('Cannot "throw fail()". Use "return fail()"') : error;
|
|
1712
|
-
}
|
|
1713
|
-
function action_json_redirect(redirect) {
|
|
1714
|
-
return action_json({
|
|
1715
|
-
type: "redirect",
|
|
1716
|
-
status: redirect.status,
|
|
1717
|
-
location: redirect.location
|
|
1718
|
-
});
|
|
1719
|
-
}
|
|
1720
|
-
function action_json(data, init2) {
|
|
1721
|
-
return json(data, init2);
|
|
1722
|
-
}
|
|
1723
|
-
function is_action_request(event) {
|
|
1724
|
-
return event.request.method === "POST";
|
|
1725
|
-
}
|
|
1726
|
-
async function handle_action_request(event, server) {
|
|
1727
|
-
const actions = server?.actions;
|
|
1728
|
-
if (!actions) {
|
|
1729
|
-
event.setHeaders({
|
|
1730
|
-
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405
|
|
1731
|
-
// "The server must generate an Allow header field in a 405 status code response"
|
|
1732
|
-
allow: "GET"
|
|
1733
|
-
});
|
|
1734
|
-
return {
|
|
1735
|
-
type: "error",
|
|
1736
|
-
error: new SvelteKitError(
|
|
1737
|
-
405,
|
|
1738
|
-
"Method Not Allowed",
|
|
1739
|
-
"POST method not allowed. No actions exist for this page"
|
|
1740
|
-
)
|
|
1741
|
-
};
|
|
1742
|
-
}
|
|
1743
|
-
check_named_default_separate(actions);
|
|
1744
|
-
try {
|
|
1745
|
-
const data = await call_action(event, actions);
|
|
1746
|
-
if (false)
|
|
1747
|
-
;
|
|
1748
|
-
if (data instanceof ActionFailure) {
|
|
1749
|
-
return {
|
|
1750
|
-
type: "failure",
|
|
1751
|
-
status: data.status,
|
|
1752
|
-
data: data.data
|
|
1753
|
-
};
|
|
1754
|
-
} else {
|
|
1755
|
-
return {
|
|
1756
|
-
type: "success",
|
|
1757
|
-
status: 200,
|
|
1758
|
-
// @ts-expect-error this will be removed upon serialization, so `undefined` is the same as omission
|
|
1759
|
-
data
|
|
1760
|
-
};
|
|
1761
|
-
}
|
|
1762
|
-
} catch (e) {
|
|
1763
|
-
const err = normalize_error(e);
|
|
1764
|
-
if (err instanceof Redirect) {
|
|
1765
|
-
return {
|
|
1766
|
-
type: "redirect",
|
|
1767
|
-
status: err.status,
|
|
1768
|
-
location: err.location
|
|
1769
|
-
};
|
|
1770
|
-
}
|
|
1771
|
-
return {
|
|
1772
|
-
type: "error",
|
|
1773
|
-
error: check_incorrect_fail_use(err)
|
|
1774
|
-
};
|
|
1775
|
-
}
|
|
1776
|
-
}
|
|
1777
|
-
function check_named_default_separate(actions) {
|
|
1778
|
-
if (actions.default && Object.keys(actions).length > 1) {
|
|
1779
|
-
throw new Error(
|
|
1780
|
-
"When using named actions, the default action cannot be used. See the docs for more info: https://kit.svelte.dev/docs/form-actions#named-actions"
|
|
1781
|
-
);
|
|
1782
|
-
}
|
|
1783
|
-
}
|
|
1784
|
-
async function call_action(event, actions) {
|
|
1785
|
-
const url = new URL(event.request.url);
|
|
1786
|
-
let name = "default";
|
|
1787
|
-
for (const param of url.searchParams) {
|
|
1788
|
-
if (param[0].startsWith("/")) {
|
|
1789
|
-
name = param[0].slice(1);
|
|
1790
|
-
if (name === "default") {
|
|
1791
|
-
throw new Error('Cannot use reserved action name "default"');
|
|
1792
|
-
}
|
|
1793
|
-
break;
|
|
1794
|
-
}
|
|
1795
|
-
}
|
|
1796
|
-
const action = actions[name];
|
|
1797
|
-
if (!action) {
|
|
1798
|
-
throw new SvelteKitError(404, "Not Found", `No action with name '${name}' found`);
|
|
1799
|
-
}
|
|
1800
|
-
if (!is_form_content_type(event.request)) {
|
|
1801
|
-
throw new SvelteKitError(
|
|
1802
|
-
415,
|
|
1803
|
-
"Unsupported Media Type",
|
|
1804
|
-
`Form actions expect form-encoded data — received ${event.request.headers.get(
|
|
1805
|
-
"content-type"
|
|
1806
|
-
)}`
|
|
1807
|
-
);
|
|
1808
|
-
}
|
|
1809
|
-
return action(event);
|
|
1810
|
-
}
|
|
1811
|
-
function uneval_action_response(data, route_id) {
|
|
1812
|
-
return try_deserialize(data, uneval, route_id);
|
|
1813
|
-
}
|
|
1814
|
-
function stringify_action_response(data, route_id) {
|
|
1815
|
-
return try_deserialize(data, stringify, route_id);
|
|
1816
|
-
}
|
|
1817
|
-
function try_deserialize(data, fn, route_id) {
|
|
1818
|
-
try {
|
|
1819
|
-
return fn(data);
|
|
1820
|
-
} catch (e) {
|
|
1821
|
-
const error = (
|
|
1822
|
-
/** @type {any} */
|
|
1823
|
-
e
|
|
1824
|
-
);
|
|
1825
|
-
if ("path" in error) {
|
|
1826
|
-
let message = `Data returned from action inside ${route_id} is not serializable: ${error.message}`;
|
|
1827
|
-
if (error.path !== "")
|
|
1828
|
-
message += ` (data.${error.path})`;
|
|
1829
|
-
throw new Error(message);
|
|
1830
|
-
}
|
|
1831
|
-
throw error;
|
|
1832
|
-
}
|
|
1833
|
-
}
|
|
1834
|
-
const INVALIDATED_PARAM = "x-sveltekit-invalidated";
|
|
1835
|
-
const TRAILING_SLASH_PARAM = "x-sveltekit-trailing-slash";
|
|
1836
|
-
function b64_encode(buffer) {
|
|
1837
|
-
if (globalThis.Buffer) {
|
|
1838
|
-
return Buffer.from(buffer).toString("base64");
|
|
1839
|
-
}
|
|
1840
|
-
const little_endian = new Uint8Array(new Uint16Array([1]).buffer)[0] > 0;
|
|
1841
|
-
return btoa(
|
|
1842
|
-
new TextDecoder(little_endian ? "utf-16le" : "utf-16be").decode(
|
|
1843
|
-
new Uint16Array(new Uint8Array(buffer))
|
|
1844
|
-
)
|
|
1845
|
-
);
|
|
1846
|
-
}
|
|
1847
|
-
async function load_server_data({ event, state, node, parent }) {
|
|
1848
|
-
if (!node?.server)
|
|
1849
|
-
return null;
|
|
1850
|
-
let is_tracking = true;
|
|
1851
|
-
const uses = {
|
|
1852
|
-
dependencies: /* @__PURE__ */ new Set(),
|
|
1853
|
-
params: /* @__PURE__ */ new Set(),
|
|
1854
|
-
parent: false,
|
|
1855
|
-
route: false,
|
|
1856
|
-
url: false,
|
|
1857
|
-
search_params: /* @__PURE__ */ new Set()
|
|
1858
|
-
};
|
|
1859
|
-
const url = make_trackable(
|
|
1860
|
-
event.url,
|
|
1861
|
-
() => {
|
|
1862
|
-
if (is_tracking) {
|
|
1863
|
-
uses.url = true;
|
|
1864
|
-
}
|
|
1865
|
-
},
|
|
1866
|
-
(param) => {
|
|
1867
|
-
if (is_tracking) {
|
|
1868
|
-
uses.search_params.add(param);
|
|
1869
|
-
}
|
|
1870
|
-
}
|
|
1871
|
-
);
|
|
1872
|
-
if (state.prerendering) {
|
|
1873
|
-
disable_search(url);
|
|
1874
|
-
}
|
|
1875
|
-
const result = await node.server.load?.call(null, {
|
|
1876
|
-
...event,
|
|
1877
|
-
fetch: (info, init2) => {
|
|
1878
|
-
new URL(info instanceof Request ? info.url : info, event.url);
|
|
1879
|
-
return event.fetch(info, init2);
|
|
1880
|
-
},
|
|
1881
|
-
/** @param {string[]} deps */
|
|
1882
|
-
depends: (...deps) => {
|
|
1883
|
-
for (const dep of deps) {
|
|
1884
|
-
const { href } = new URL(dep, event.url);
|
|
1885
|
-
uses.dependencies.add(href);
|
|
1886
|
-
}
|
|
1887
|
-
},
|
|
1888
|
-
params: new Proxy(event.params, {
|
|
1889
|
-
get: (target, key2) => {
|
|
1890
|
-
if (is_tracking) {
|
|
1891
|
-
uses.params.add(key2);
|
|
1892
|
-
}
|
|
1893
|
-
return target[
|
|
1894
|
-
/** @type {string} */
|
|
1895
|
-
key2
|
|
1896
|
-
];
|
|
1897
|
-
}
|
|
1898
|
-
}),
|
|
1899
|
-
parent: async () => {
|
|
1900
|
-
if (is_tracking) {
|
|
1901
|
-
uses.parent = true;
|
|
1902
|
-
}
|
|
1903
|
-
return parent();
|
|
1904
|
-
},
|
|
1905
|
-
route: new Proxy(event.route, {
|
|
1906
|
-
get: (target, key2) => {
|
|
1907
|
-
if (is_tracking) {
|
|
1908
|
-
uses.route = true;
|
|
1909
|
-
}
|
|
1910
|
-
return target[
|
|
1911
|
-
/** @type {'id'} */
|
|
1912
|
-
key2
|
|
1913
|
-
];
|
|
1914
|
-
}
|
|
1915
|
-
}),
|
|
1916
|
-
url,
|
|
1917
|
-
untrack(fn) {
|
|
1918
|
-
is_tracking = false;
|
|
1919
|
-
try {
|
|
1920
|
-
return fn();
|
|
1921
|
-
} finally {
|
|
1922
|
-
is_tracking = true;
|
|
1923
|
-
}
|
|
1924
|
-
}
|
|
1925
|
-
});
|
|
1926
|
-
return {
|
|
1927
|
-
type: "data",
|
|
1928
|
-
data: result ?? null,
|
|
1929
|
-
uses,
|
|
1930
|
-
slash: node.server.trailingSlash
|
|
1931
|
-
};
|
|
1932
|
-
}
|
|
1933
|
-
async function load_data({
|
|
1934
|
-
event,
|
|
1935
|
-
fetched,
|
|
1936
|
-
node,
|
|
1937
|
-
parent,
|
|
1938
|
-
server_data_promise,
|
|
1939
|
-
state,
|
|
1940
|
-
resolve_opts,
|
|
1941
|
-
csr
|
|
1942
|
-
}) {
|
|
1943
|
-
const server_data_node = await server_data_promise;
|
|
1944
|
-
if (!node?.universal?.load) {
|
|
1945
|
-
return server_data_node?.data ?? null;
|
|
1946
|
-
}
|
|
1947
|
-
const result = await node.universal.load.call(null, {
|
|
1948
|
-
url: event.url,
|
|
1949
|
-
params: event.params,
|
|
1950
|
-
data: server_data_node?.data ?? null,
|
|
1951
|
-
route: event.route,
|
|
1952
|
-
fetch: create_universal_fetch(event, state, fetched, csr, resolve_opts),
|
|
1953
|
-
setHeaders: event.setHeaders,
|
|
1954
|
-
depends: () => {
|
|
1955
|
-
},
|
|
1956
|
-
parent,
|
|
1957
|
-
untrack: (fn) => fn()
|
|
1958
|
-
});
|
|
1959
|
-
return result ?? null;
|
|
1960
|
-
}
|
|
1961
|
-
function create_universal_fetch(event, state, fetched, csr, resolve_opts) {
|
|
1962
|
-
const universal_fetch = async (input, init2) => {
|
|
1963
|
-
const cloned_body = input instanceof Request && input.body ? input.clone().body : null;
|
|
1964
|
-
const cloned_headers = input instanceof Request && [...input.headers].length ? new Headers(input.headers) : init2?.headers;
|
|
1965
|
-
let response = await event.fetch(input, init2);
|
|
1966
|
-
const url = new URL(input instanceof Request ? input.url : input, event.url);
|
|
1967
|
-
const same_origin = url.origin === event.url.origin;
|
|
1968
|
-
let dependency;
|
|
1969
|
-
if (same_origin) {
|
|
1970
|
-
if (state.prerendering) {
|
|
1971
|
-
dependency = { response, body: null };
|
|
1972
|
-
state.prerendering.dependencies.set(url.pathname, dependency);
|
|
1973
|
-
}
|
|
1974
|
-
} else {
|
|
1975
|
-
const mode = input instanceof Request ? input.mode : init2?.mode ?? "cors";
|
|
1976
|
-
if (mode === "no-cors") {
|
|
1977
|
-
response = new Response("", {
|
|
1978
|
-
status: response.status,
|
|
1979
|
-
statusText: response.statusText,
|
|
1980
|
-
headers: response.headers
|
|
1981
|
-
});
|
|
1982
|
-
} else {
|
|
1983
|
-
const acao = response.headers.get("access-control-allow-origin");
|
|
1984
|
-
if (!acao || acao !== event.url.origin && acao !== "*") {
|
|
1985
|
-
throw new Error(
|
|
1986
|
-
`CORS error: ${acao ? "Incorrect" : "No"} 'Access-Control-Allow-Origin' header is present on the requested resource`
|
|
1987
|
-
);
|
|
1988
|
-
}
|
|
1989
|
-
}
|
|
1990
|
-
}
|
|
1991
|
-
const proxy = new Proxy(response, {
|
|
1992
|
-
get(response2, key2, _receiver) {
|
|
1993
|
-
async function push_fetched(body2, is_b64) {
|
|
1994
|
-
const status_number = Number(response2.status);
|
|
1995
|
-
if (isNaN(status_number)) {
|
|
1996
|
-
throw new Error(
|
|
1997
|
-
`response.status is not a number. value: "${response2.status}" type: ${typeof response2.status}`
|
|
1998
|
-
);
|
|
1999
|
-
}
|
|
2000
|
-
fetched.push({
|
|
2001
|
-
url: same_origin ? url.href.slice(event.url.origin.length) : url.href,
|
|
2002
|
-
method: event.request.method,
|
|
2003
|
-
request_body: (
|
|
2004
|
-
/** @type {string | ArrayBufferView | undefined} */
|
|
2005
|
-
input instanceof Request && cloned_body ? await stream_to_string(cloned_body) : init2?.body
|
|
2006
|
-
),
|
|
2007
|
-
request_headers: cloned_headers,
|
|
2008
|
-
response_body: body2,
|
|
2009
|
-
response: response2,
|
|
2010
|
-
is_b64
|
|
2011
|
-
});
|
|
2012
|
-
}
|
|
2013
|
-
if (key2 === "arrayBuffer") {
|
|
2014
|
-
return async () => {
|
|
2015
|
-
const buffer = await response2.arrayBuffer();
|
|
2016
|
-
if (dependency) {
|
|
2017
|
-
dependency.body = new Uint8Array(buffer);
|
|
2018
|
-
}
|
|
2019
|
-
if (buffer instanceof ArrayBuffer) {
|
|
2020
|
-
await push_fetched(b64_encode(buffer), true);
|
|
2021
|
-
}
|
|
2022
|
-
return buffer;
|
|
2023
|
-
};
|
|
2024
|
-
}
|
|
2025
|
-
async function text2() {
|
|
2026
|
-
const body2 = await response2.text();
|
|
2027
|
-
if (!body2 || typeof body2 === "string") {
|
|
2028
|
-
await push_fetched(body2, false);
|
|
2029
|
-
}
|
|
2030
|
-
if (dependency) {
|
|
2031
|
-
dependency.body = body2;
|
|
2032
|
-
}
|
|
2033
|
-
return body2;
|
|
2034
|
-
}
|
|
2035
|
-
if (key2 === "text") {
|
|
2036
|
-
return text2;
|
|
2037
|
-
}
|
|
2038
|
-
if (key2 === "json") {
|
|
2039
|
-
return async () => {
|
|
2040
|
-
return JSON.parse(await text2());
|
|
2041
|
-
};
|
|
2042
|
-
}
|
|
2043
|
-
return Reflect.get(response2, key2, response2);
|
|
2044
|
-
}
|
|
2045
|
-
});
|
|
2046
|
-
if (csr) {
|
|
2047
|
-
const get = response.headers.get;
|
|
2048
|
-
response.headers.get = (key2) => {
|
|
2049
|
-
const lower = key2.toLowerCase();
|
|
2050
|
-
const value = get.call(response.headers, lower);
|
|
2051
|
-
if (value && !lower.startsWith("x-sveltekit-")) {
|
|
2052
|
-
const included = resolve_opts.filterSerializedResponseHeaders(lower, value);
|
|
2053
|
-
if (!included) {
|
|
2054
|
-
throw new Error(
|
|
2055
|
-
`Failed to get response header "${lower}" — it must be included by the \`filterSerializedResponseHeaders\` option: https://kit.svelte.dev/docs/hooks#server-hooks-handle (at ${event.route.id})`
|
|
2056
|
-
);
|
|
2057
|
-
}
|
|
2058
|
-
}
|
|
2059
|
-
return value;
|
|
2060
|
-
};
|
|
2061
|
-
}
|
|
2062
|
-
return proxy;
|
|
2063
|
-
};
|
|
2064
|
-
return (input, init2) => {
|
|
2065
|
-
const response = universal_fetch(input, init2);
|
|
2066
|
-
response.catch(() => {
|
|
2067
|
-
});
|
|
2068
|
-
return response;
|
|
2069
|
-
};
|
|
2070
|
-
}
|
|
2071
|
-
async function stream_to_string(stream) {
|
|
2072
|
-
let result = "";
|
|
2073
|
-
const reader = stream.getReader();
|
|
2074
|
-
const decoder = new TextDecoder();
|
|
2075
|
-
while (true) {
|
|
2076
|
-
const { done, value } = await reader.read();
|
|
2077
|
-
if (done) {
|
|
2078
|
-
break;
|
|
2079
|
-
}
|
|
2080
|
-
result += decoder.decode(value);
|
|
2081
|
-
}
|
|
2082
|
-
return result;
|
|
2083
|
-
}
|
|
2084
|
-
function hash(...values) {
|
|
2085
|
-
let hash2 = 5381;
|
|
2086
|
-
for (const value of values) {
|
|
2087
|
-
if (typeof value === "string") {
|
|
2088
|
-
let i = value.length;
|
|
2089
|
-
while (i)
|
|
2090
|
-
hash2 = hash2 * 33 ^ value.charCodeAt(--i);
|
|
2091
|
-
} else if (ArrayBuffer.isView(value)) {
|
|
2092
|
-
const buffer = new Uint8Array(value.buffer, value.byteOffset, value.byteLength);
|
|
2093
|
-
let i = buffer.length;
|
|
2094
|
-
while (i)
|
|
2095
|
-
hash2 = hash2 * 33 ^ buffer[--i];
|
|
2096
|
-
} else {
|
|
2097
|
-
throw new TypeError("value must be a string or TypedArray");
|
|
2098
|
-
}
|
|
2099
|
-
}
|
|
2100
|
-
return (hash2 >>> 0).toString(36);
|
|
2101
|
-
}
|
|
2102
|
-
const escape_html_attr_dict = {
|
|
2103
|
-
"&": "&",
|
|
2104
|
-
'"': """
|
|
2105
|
-
};
|
|
2106
|
-
const escape_html_attr_regex = new RegExp(
|
|
2107
|
-
// special characters
|
|
2108
|
-
`[${Object.keys(escape_html_attr_dict).join("")}]|[\\ud800-\\udbff](?![\\udc00-\\udfff])|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\udc00-\\udfff]`,
|
|
2109
|
-
"g"
|
|
2110
|
-
);
|
|
2111
|
-
function escape_html_attr(str) {
|
|
2112
|
-
const escaped_str = str.replace(escape_html_attr_regex, (match) => {
|
|
2113
|
-
if (match.length === 2) {
|
|
2114
|
-
return match;
|
|
2115
|
-
}
|
|
2116
|
-
return escape_html_attr_dict[match] ?? `&#${match.charCodeAt(0)};`;
|
|
2117
|
-
});
|
|
2118
|
-
return `"${escaped_str}"`;
|
|
2119
|
-
}
|
|
2120
|
-
const replacements = {
|
|
2121
|
-
"<": "\\u003C",
|
|
2122
|
-
"\u2028": "\\u2028",
|
|
2123
|
-
"\u2029": "\\u2029"
|
|
2124
|
-
};
|
|
2125
|
-
const pattern = new RegExp(`[${Object.keys(replacements).join("")}]`, "g");
|
|
2126
|
-
function serialize_data(fetched, filter, prerendering2 = false) {
|
|
2127
|
-
const headers2 = {};
|
|
2128
|
-
let cache_control = null;
|
|
2129
|
-
let age = null;
|
|
2130
|
-
let varyAny = false;
|
|
2131
|
-
for (const [key2, value] of fetched.response.headers) {
|
|
2132
|
-
if (filter(key2, value)) {
|
|
2133
|
-
headers2[key2] = value;
|
|
2134
|
-
}
|
|
2135
|
-
if (key2 === "cache-control")
|
|
2136
|
-
cache_control = value;
|
|
2137
|
-
else if (key2 === "age")
|
|
2138
|
-
age = value;
|
|
2139
|
-
else if (key2 === "vary" && value.trim() === "*")
|
|
2140
|
-
varyAny = true;
|
|
2141
|
-
}
|
|
2142
|
-
const payload = {
|
|
2143
|
-
status: fetched.response.status,
|
|
2144
|
-
statusText: fetched.response.statusText,
|
|
2145
|
-
headers: headers2,
|
|
2146
|
-
body: fetched.response_body
|
|
2147
|
-
};
|
|
2148
|
-
const safe_payload = JSON.stringify(payload).replace(pattern, (match) => replacements[match]);
|
|
2149
|
-
const attrs = [
|
|
2150
|
-
'type="application/json"',
|
|
2151
|
-
"data-sveltekit-fetched",
|
|
2152
|
-
`data-url=${escape_html_attr(fetched.url)}`
|
|
2153
|
-
];
|
|
2154
|
-
if (fetched.is_b64) {
|
|
2155
|
-
attrs.push("data-b64");
|
|
2156
|
-
}
|
|
2157
|
-
if (fetched.request_headers || fetched.request_body) {
|
|
2158
|
-
const values = [];
|
|
2159
|
-
if (fetched.request_headers) {
|
|
2160
|
-
values.push([...new Headers(fetched.request_headers)].join(","));
|
|
2161
|
-
}
|
|
2162
|
-
if (fetched.request_body) {
|
|
2163
|
-
values.push(fetched.request_body);
|
|
2164
|
-
}
|
|
2165
|
-
attrs.push(`data-hash="${hash(...values)}"`);
|
|
2166
|
-
}
|
|
2167
|
-
if (!prerendering2 && fetched.method === "GET" && cache_control && !varyAny) {
|
|
2168
|
-
const match = /s-maxage=(\d+)/g.exec(cache_control) ?? /max-age=(\d+)/g.exec(cache_control);
|
|
2169
|
-
if (match) {
|
|
2170
|
-
const ttl = +match[1] - +(age ?? "0");
|
|
2171
|
-
attrs.push(`data-ttl="${ttl}"`);
|
|
2172
|
-
}
|
|
2173
|
-
}
|
|
2174
|
-
return `<script ${attrs.join(" ")}>${safe_payload}<\/script>`;
|
|
2175
|
-
}
|
|
2176
|
-
const s = JSON.stringify;
|
|
2177
|
-
const encoder$2 = new TextEncoder();
|
|
2178
|
-
function sha256(data) {
|
|
2179
|
-
if (!key[0])
|
|
2180
|
-
precompute();
|
|
2181
|
-
const out = init.slice(0);
|
|
2182
|
-
const array2 = encode(data);
|
|
2183
|
-
for (let i = 0; i < array2.length; i += 16) {
|
|
2184
|
-
const w = array2.subarray(i, i + 16);
|
|
2185
|
-
let tmp;
|
|
2186
|
-
let a;
|
|
2187
|
-
let b;
|
|
2188
|
-
let out0 = out[0];
|
|
2189
|
-
let out1 = out[1];
|
|
2190
|
-
let out2 = out[2];
|
|
2191
|
-
let out3 = out[3];
|
|
2192
|
-
let out4 = out[4];
|
|
2193
|
-
let out5 = out[5];
|
|
2194
|
-
let out6 = out[6];
|
|
2195
|
-
let out7 = out[7];
|
|
2196
|
-
for (let i2 = 0; i2 < 64; i2++) {
|
|
2197
|
-
if (i2 < 16) {
|
|
2198
|
-
tmp = w[i2];
|
|
2199
|
-
} else {
|
|
2200
|
-
a = w[i2 + 1 & 15];
|
|
2201
|
-
b = w[i2 + 14 & 15];
|
|
2202
|
-
tmp = w[i2 & 15] = (a >>> 7 ^ a >>> 18 ^ a >>> 3 ^ a << 25 ^ a << 14) + (b >>> 17 ^ b >>> 19 ^ b >>> 10 ^ b << 15 ^ b << 13) + w[i2 & 15] + w[i2 + 9 & 15] | 0;
|
|
2203
|
-
}
|
|
2204
|
-
tmp = tmp + out7 + (out4 >>> 6 ^ out4 >>> 11 ^ out4 >>> 25 ^ out4 << 26 ^ out4 << 21 ^ out4 << 7) + (out6 ^ out4 & (out5 ^ out6)) + key[i2];
|
|
2205
|
-
out7 = out6;
|
|
2206
|
-
out6 = out5;
|
|
2207
|
-
out5 = out4;
|
|
2208
|
-
out4 = out3 + tmp | 0;
|
|
2209
|
-
out3 = out2;
|
|
2210
|
-
out2 = out1;
|
|
2211
|
-
out1 = out0;
|
|
2212
|
-
out0 = tmp + (out1 & out2 ^ out3 & (out1 ^ out2)) + (out1 >>> 2 ^ out1 >>> 13 ^ out1 >>> 22 ^ out1 << 30 ^ out1 << 19 ^ out1 << 10) | 0;
|
|
2213
|
-
}
|
|
2214
|
-
out[0] = out[0] + out0 | 0;
|
|
2215
|
-
out[1] = out[1] + out1 | 0;
|
|
2216
|
-
out[2] = out[2] + out2 | 0;
|
|
2217
|
-
out[3] = out[3] + out3 | 0;
|
|
2218
|
-
out[4] = out[4] + out4 | 0;
|
|
2219
|
-
out[5] = out[5] + out5 | 0;
|
|
2220
|
-
out[6] = out[6] + out6 | 0;
|
|
2221
|
-
out[7] = out[7] + out7 | 0;
|
|
2222
|
-
}
|
|
2223
|
-
const bytes = new Uint8Array(out.buffer);
|
|
2224
|
-
reverse_endianness(bytes);
|
|
2225
|
-
return base64(bytes);
|
|
2226
|
-
}
|
|
2227
|
-
const init = new Uint32Array(8);
|
|
2228
|
-
const key = new Uint32Array(64);
|
|
2229
|
-
function precompute() {
|
|
2230
|
-
function frac(x) {
|
|
2231
|
-
return (x - Math.floor(x)) * 4294967296;
|
|
2232
|
-
}
|
|
2233
|
-
let prime = 2;
|
|
2234
|
-
for (let i = 0; i < 64; prime++) {
|
|
2235
|
-
let is_prime = true;
|
|
2236
|
-
for (let factor = 2; factor * factor <= prime; factor++) {
|
|
2237
|
-
if (prime % factor === 0) {
|
|
2238
|
-
is_prime = false;
|
|
2239
|
-
break;
|
|
2240
|
-
}
|
|
2241
|
-
}
|
|
2242
|
-
if (is_prime) {
|
|
2243
|
-
if (i < 8) {
|
|
2244
|
-
init[i] = frac(prime ** (1 / 2));
|
|
2245
|
-
}
|
|
2246
|
-
key[i] = frac(prime ** (1 / 3));
|
|
2247
|
-
i++;
|
|
2248
|
-
}
|
|
2249
|
-
}
|
|
2250
|
-
}
|
|
2251
|
-
function reverse_endianness(bytes) {
|
|
2252
|
-
for (let i = 0; i < bytes.length; i += 4) {
|
|
2253
|
-
const a = bytes[i + 0];
|
|
2254
|
-
const b = bytes[i + 1];
|
|
2255
|
-
const c = bytes[i + 2];
|
|
2256
|
-
const d = bytes[i + 3];
|
|
2257
|
-
bytes[i + 0] = d;
|
|
2258
|
-
bytes[i + 1] = c;
|
|
2259
|
-
bytes[i + 2] = b;
|
|
2260
|
-
bytes[i + 3] = a;
|
|
2261
|
-
}
|
|
2262
|
-
}
|
|
2263
|
-
function encode(str) {
|
|
2264
|
-
const encoded = encoder$2.encode(str);
|
|
2265
|
-
const length = encoded.length * 8;
|
|
2266
|
-
const size = 512 * Math.ceil((length + 65) / 512);
|
|
2267
|
-
const bytes = new Uint8Array(size / 8);
|
|
2268
|
-
bytes.set(encoded);
|
|
2269
|
-
bytes[encoded.length] = 128;
|
|
2270
|
-
reverse_endianness(bytes);
|
|
2271
|
-
const words = new Uint32Array(bytes.buffer);
|
|
2272
|
-
words[words.length - 2] = Math.floor(length / 4294967296);
|
|
2273
|
-
words[words.length - 1] = length;
|
|
2274
|
-
return words;
|
|
2275
|
-
}
|
|
2276
|
-
const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
|
|
2277
|
-
function base64(bytes) {
|
|
2278
|
-
const l = bytes.length;
|
|
2279
|
-
let result = "";
|
|
2280
|
-
let i;
|
|
2281
|
-
for (i = 2; i < l; i += 3) {
|
|
2282
|
-
result += chars[bytes[i - 2] >> 2];
|
|
2283
|
-
result += chars[(bytes[i - 2] & 3) << 4 | bytes[i - 1] >> 4];
|
|
2284
|
-
result += chars[(bytes[i - 1] & 15) << 2 | bytes[i] >> 6];
|
|
2285
|
-
result += chars[bytes[i] & 63];
|
|
2286
|
-
}
|
|
2287
|
-
if (i === l + 1) {
|
|
2288
|
-
result += chars[bytes[i - 2] >> 2];
|
|
2289
|
-
result += chars[(bytes[i - 2] & 3) << 4];
|
|
2290
|
-
result += "==";
|
|
2291
|
-
}
|
|
2292
|
-
if (i === l) {
|
|
2293
|
-
result += chars[bytes[i - 2] >> 2];
|
|
2294
|
-
result += chars[(bytes[i - 2] & 3) << 4 | bytes[i - 1] >> 4];
|
|
2295
|
-
result += chars[(bytes[i - 1] & 15) << 2];
|
|
2296
|
-
result += "=";
|
|
2297
|
-
}
|
|
2298
|
-
return result;
|
|
2299
|
-
}
|
|
2300
|
-
const array = new Uint8Array(16);
|
|
2301
|
-
function generate_nonce() {
|
|
2302
|
-
crypto.getRandomValues(array);
|
|
2303
|
-
return base64(array);
|
|
2304
|
-
}
|
|
2305
|
-
const quoted = /* @__PURE__ */ new Set([
|
|
2306
|
-
"self",
|
|
2307
|
-
"unsafe-eval",
|
|
2308
|
-
"unsafe-hashes",
|
|
2309
|
-
"unsafe-inline",
|
|
2310
|
-
"none",
|
|
2311
|
-
"strict-dynamic",
|
|
2312
|
-
"report-sample",
|
|
2313
|
-
"wasm-unsafe-eval",
|
|
2314
|
-
"script"
|
|
2315
|
-
]);
|
|
2316
|
-
const crypto_pattern = /^(nonce|sha\d\d\d)-/;
|
|
2317
|
-
class BaseProvider {
|
|
2318
|
-
/** @type {boolean} */
|
|
2319
|
-
#use_hashes;
|
|
2320
|
-
/** @type {boolean} */
|
|
2321
|
-
#script_needs_csp;
|
|
2322
|
-
/** @type {boolean} */
|
|
2323
|
-
#style_needs_csp;
|
|
2324
|
-
/** @type {import('types').CspDirectives} */
|
|
2325
|
-
#directives;
|
|
2326
|
-
/** @type {import('types').Csp.Source[]} */
|
|
2327
|
-
#script_src;
|
|
2328
|
-
/** @type {import('types').Csp.Source[]} */
|
|
2329
|
-
#script_src_elem;
|
|
2330
|
-
/** @type {import('types').Csp.Source[]} */
|
|
2331
|
-
#style_src;
|
|
2332
|
-
/** @type {import('types').Csp.Source[]} */
|
|
2333
|
-
#style_src_attr;
|
|
2334
|
-
/** @type {import('types').Csp.Source[]} */
|
|
2335
|
-
#style_src_elem;
|
|
2336
|
-
/** @type {string} */
|
|
2337
|
-
#nonce;
|
|
2338
|
-
/**
|
|
2339
|
-
* @param {boolean} use_hashes
|
|
2340
|
-
* @param {import('types').CspDirectives} directives
|
|
2341
|
-
* @param {string} nonce
|
|
2342
|
-
*/
|
|
2343
|
-
constructor(use_hashes, directives, nonce) {
|
|
2344
|
-
this.#use_hashes = use_hashes;
|
|
2345
|
-
this.#directives = directives;
|
|
2346
|
-
const d = this.#directives;
|
|
2347
|
-
this.#script_src = [];
|
|
2348
|
-
this.#script_src_elem = [];
|
|
2349
|
-
this.#style_src = [];
|
|
2350
|
-
this.#style_src_attr = [];
|
|
2351
|
-
this.#style_src_elem = [];
|
|
2352
|
-
const effective_script_src = d["script-src"] || d["default-src"];
|
|
2353
|
-
const script_src_elem = d["script-src-elem"];
|
|
2354
|
-
const effective_style_src = d["style-src"] || d["default-src"];
|
|
2355
|
-
const style_src_attr = d["style-src-attr"];
|
|
2356
|
-
const style_src_elem = d["style-src-elem"];
|
|
2357
|
-
this.#script_needs_csp = !!effective_script_src && effective_script_src.filter((value) => value !== "unsafe-inline").length > 0 || !!script_src_elem && script_src_elem.filter((value) => value !== "unsafe-inline").length > 0;
|
|
2358
|
-
this.#style_needs_csp = !!effective_style_src && effective_style_src.filter((value) => value !== "unsafe-inline").length > 0 || !!style_src_attr && style_src_attr.filter((value) => value !== "unsafe-inline").length > 0 || !!style_src_elem && style_src_elem.filter((value) => value !== "unsafe-inline").length > 0;
|
|
2359
|
-
this.script_needs_nonce = this.#script_needs_csp && !this.#use_hashes;
|
|
2360
|
-
this.style_needs_nonce = this.#style_needs_csp && !this.#use_hashes;
|
|
2361
|
-
this.#nonce = nonce;
|
|
2362
|
-
}
|
|
2363
|
-
/** @param {string} content */
|
|
2364
|
-
add_script(content) {
|
|
2365
|
-
if (this.#script_needs_csp) {
|
|
2366
|
-
const d = this.#directives;
|
|
2367
|
-
if (this.#use_hashes) {
|
|
2368
|
-
const hash2 = sha256(content);
|
|
2369
|
-
this.#script_src.push(`sha256-${hash2}`);
|
|
2370
|
-
if (d["script-src-elem"]?.length) {
|
|
2371
|
-
this.#script_src_elem.push(`sha256-${hash2}`);
|
|
2372
|
-
}
|
|
2373
|
-
} else {
|
|
2374
|
-
if (this.#script_src.length === 0) {
|
|
2375
|
-
this.#script_src.push(`nonce-${this.#nonce}`);
|
|
2376
|
-
}
|
|
2377
|
-
if (d["script-src-elem"]?.length) {
|
|
2378
|
-
this.#script_src_elem.push(`nonce-${this.#nonce}`);
|
|
2379
|
-
}
|
|
2380
|
-
}
|
|
2381
|
-
}
|
|
2382
|
-
}
|
|
2383
|
-
/** @param {string} content */
|
|
2384
|
-
add_style(content) {
|
|
2385
|
-
if (this.#style_needs_csp) {
|
|
2386
|
-
const empty_comment_hash = "9OlNO0DNEeaVzHL4RZwCLsBHA8WBQ8toBp/4F5XV2nc=";
|
|
2387
|
-
const d = this.#directives;
|
|
2388
|
-
if (this.#use_hashes) {
|
|
2389
|
-
const hash2 = sha256(content);
|
|
2390
|
-
this.#style_src.push(`sha256-${hash2}`);
|
|
2391
|
-
if (d["style-src-attr"]?.length) {
|
|
2392
|
-
this.#style_src_attr.push(`sha256-${hash2}`);
|
|
2393
|
-
}
|
|
2394
|
-
if (d["style-src-elem"]?.length) {
|
|
2395
|
-
if (hash2 !== empty_comment_hash && !d["style-src-elem"].includes(`sha256-${empty_comment_hash}`)) {
|
|
2396
|
-
this.#style_src_elem.push(`sha256-${empty_comment_hash}`);
|
|
2397
|
-
}
|
|
2398
|
-
this.#style_src_elem.push(`sha256-${hash2}`);
|
|
2399
|
-
}
|
|
2400
|
-
} else {
|
|
2401
|
-
if (this.#style_src.length === 0 && !d["style-src"]?.includes("unsafe-inline")) {
|
|
2402
|
-
this.#style_src.push(`nonce-${this.#nonce}`);
|
|
2403
|
-
}
|
|
2404
|
-
if (d["style-src-attr"]?.length) {
|
|
2405
|
-
this.#style_src_attr.push(`nonce-${this.#nonce}`);
|
|
2406
|
-
}
|
|
2407
|
-
if (d["style-src-elem"]?.length) {
|
|
2408
|
-
if (!d["style-src-elem"].includes(`sha256-${empty_comment_hash}`)) {
|
|
2409
|
-
this.#style_src_elem.push(`sha256-${empty_comment_hash}`);
|
|
2410
|
-
}
|
|
2411
|
-
this.#style_src_elem.push(`nonce-${this.#nonce}`);
|
|
2412
|
-
}
|
|
2413
|
-
}
|
|
2414
|
-
}
|
|
2415
|
-
}
|
|
2416
|
-
/**
|
|
2417
|
-
* @param {boolean} [is_meta]
|
|
2418
|
-
*/
|
|
2419
|
-
get_header(is_meta = false) {
|
|
2420
|
-
const header = [];
|
|
2421
|
-
const directives = { ...this.#directives };
|
|
2422
|
-
if (this.#style_src.length > 0) {
|
|
2423
|
-
directives["style-src"] = [
|
|
2424
|
-
...directives["style-src"] || directives["default-src"] || [],
|
|
2425
|
-
...this.#style_src
|
|
2426
|
-
];
|
|
2427
|
-
}
|
|
2428
|
-
if (this.#style_src_attr.length > 0) {
|
|
2429
|
-
directives["style-src-attr"] = [
|
|
2430
|
-
...directives["style-src-attr"] || [],
|
|
2431
|
-
...this.#style_src_attr
|
|
2432
|
-
];
|
|
2433
|
-
}
|
|
2434
|
-
if (this.#style_src_elem.length > 0) {
|
|
2435
|
-
directives["style-src-elem"] = [
|
|
2436
|
-
...directives["style-src-elem"] || [],
|
|
2437
|
-
...this.#style_src_elem
|
|
2438
|
-
];
|
|
2439
|
-
}
|
|
2440
|
-
if (this.#script_src.length > 0) {
|
|
2441
|
-
directives["script-src"] = [
|
|
2442
|
-
...directives["script-src"] || directives["default-src"] || [],
|
|
2443
|
-
...this.#script_src
|
|
2444
|
-
];
|
|
2445
|
-
}
|
|
2446
|
-
if (this.#script_src_elem.length > 0) {
|
|
2447
|
-
directives["script-src-elem"] = [
|
|
2448
|
-
...directives["script-src-elem"] || [],
|
|
2449
|
-
...this.#script_src_elem
|
|
2450
|
-
];
|
|
2451
|
-
}
|
|
2452
|
-
for (const key2 in directives) {
|
|
2453
|
-
if (is_meta && (key2 === "frame-ancestors" || key2 === "report-uri" || key2 === "sandbox")) {
|
|
2454
|
-
continue;
|
|
2455
|
-
}
|
|
2456
|
-
const value = (
|
|
2457
|
-
/** @type {string[] | true} */
|
|
2458
|
-
directives[key2]
|
|
2459
|
-
);
|
|
2460
|
-
if (!value)
|
|
2461
|
-
continue;
|
|
2462
|
-
const directive = [key2];
|
|
2463
|
-
if (Array.isArray(value)) {
|
|
2464
|
-
value.forEach((value2) => {
|
|
2465
|
-
if (quoted.has(value2) || crypto_pattern.test(value2)) {
|
|
2466
|
-
directive.push(`'${value2}'`);
|
|
2467
|
-
} else {
|
|
2468
|
-
directive.push(value2);
|
|
2469
|
-
}
|
|
2470
|
-
});
|
|
2471
|
-
}
|
|
2472
|
-
header.push(directive.join(" "));
|
|
2473
|
-
}
|
|
2474
|
-
return header.join("; ");
|
|
2475
|
-
}
|
|
2476
|
-
}
|
|
2477
|
-
class CspProvider extends BaseProvider {
|
|
2478
|
-
get_meta() {
|
|
2479
|
-
const content = this.get_header(true);
|
|
2480
|
-
if (!content) {
|
|
2481
|
-
return;
|
|
2482
|
-
}
|
|
2483
|
-
return `<meta http-equiv="content-security-policy" content=${escape_html_attr(content)}>`;
|
|
2484
|
-
}
|
|
2485
|
-
}
|
|
2486
|
-
class CspReportOnlyProvider extends BaseProvider {
|
|
2487
|
-
/**
|
|
2488
|
-
* @param {boolean} use_hashes
|
|
2489
|
-
* @param {import('types').CspDirectives} directives
|
|
2490
|
-
* @param {string} nonce
|
|
2491
|
-
*/
|
|
2492
|
-
constructor(use_hashes, directives, nonce) {
|
|
2493
|
-
super(use_hashes, directives, nonce);
|
|
2494
|
-
if (Object.values(directives).filter((v) => !!v).length > 0) {
|
|
2495
|
-
const has_report_to = directives["report-to"]?.length ?? 0 > 0;
|
|
2496
|
-
const has_report_uri = directives["report-uri"]?.length ?? 0 > 0;
|
|
2497
|
-
if (!has_report_to && !has_report_uri) {
|
|
2498
|
-
throw Error(
|
|
2499
|
-
"`content-security-policy-report-only` must be specified with either the `report-to` or `report-uri` directives, or both"
|
|
2500
|
-
);
|
|
2501
|
-
}
|
|
2502
|
-
}
|
|
2503
|
-
}
|
|
2504
|
-
}
|
|
2505
|
-
class Csp {
|
|
2506
|
-
/** @readonly */
|
|
2507
|
-
nonce = generate_nonce();
|
|
2508
|
-
/** @type {CspProvider} */
|
|
2509
|
-
csp_provider;
|
|
2510
|
-
/** @type {CspReportOnlyProvider} */
|
|
2511
|
-
report_only_provider;
|
|
2512
|
-
/**
|
|
2513
|
-
* @param {import('./types.js').CspConfig} config
|
|
2514
|
-
* @param {import('./types.js').CspOpts} opts
|
|
2515
|
-
*/
|
|
2516
|
-
constructor({ mode, directives, reportOnly }, { prerender }) {
|
|
2517
|
-
const use_hashes = mode === "hash" || mode === "auto" && prerender;
|
|
2518
|
-
this.csp_provider = new CspProvider(use_hashes, directives, this.nonce);
|
|
2519
|
-
this.report_only_provider = new CspReportOnlyProvider(use_hashes, reportOnly, this.nonce);
|
|
2520
|
-
}
|
|
2521
|
-
get script_needs_nonce() {
|
|
2522
|
-
return this.csp_provider.script_needs_nonce || this.report_only_provider.script_needs_nonce;
|
|
2523
|
-
}
|
|
2524
|
-
get style_needs_nonce() {
|
|
2525
|
-
return this.csp_provider.style_needs_nonce || this.report_only_provider.style_needs_nonce;
|
|
2526
|
-
}
|
|
2527
|
-
/** @param {string} content */
|
|
2528
|
-
add_script(content) {
|
|
2529
|
-
this.csp_provider.add_script(content);
|
|
2530
|
-
this.report_only_provider.add_script(content);
|
|
2531
|
-
}
|
|
2532
|
-
/** @param {string} content */
|
|
2533
|
-
add_style(content) {
|
|
2534
|
-
this.csp_provider.add_style(content);
|
|
2535
|
-
this.report_only_provider.add_style(content);
|
|
2536
|
-
}
|
|
2537
|
-
}
|
|
2538
|
-
function defer() {
|
|
2539
|
-
let fulfil;
|
|
2540
|
-
let reject;
|
|
2541
|
-
const promise = new Promise((f, r) => {
|
|
2542
|
-
fulfil = f;
|
|
2543
|
-
reject = r;
|
|
2544
|
-
});
|
|
2545
|
-
return { promise, fulfil, reject };
|
|
2546
|
-
}
|
|
2547
|
-
function create_async_iterator() {
|
|
2548
|
-
const deferred = [defer()];
|
|
2549
|
-
return {
|
|
2550
|
-
iterator: {
|
|
2551
|
-
[Symbol.asyncIterator]() {
|
|
2552
|
-
return {
|
|
2553
|
-
next: async () => {
|
|
2554
|
-
const next = await deferred[0].promise;
|
|
2555
|
-
if (!next.done)
|
|
2556
|
-
deferred.shift();
|
|
2557
|
-
return next;
|
|
2558
|
-
}
|
|
2559
|
-
};
|
|
2560
|
-
}
|
|
2561
|
-
},
|
|
2562
|
-
push: (value) => {
|
|
2563
|
-
deferred[deferred.length - 1].fulfil({
|
|
2564
|
-
value,
|
|
2565
|
-
done: false
|
|
2566
|
-
});
|
|
2567
|
-
deferred.push(defer());
|
|
2568
|
-
},
|
|
2569
|
-
done: () => {
|
|
2570
|
-
deferred[deferred.length - 1].fulfil({ done: true });
|
|
2571
|
-
}
|
|
2572
|
-
};
|
|
2573
|
-
}
|
|
2574
|
-
const updated = {
|
|
2575
|
-
...readable(false),
|
|
2576
|
-
check: () => false
|
|
2577
|
-
};
|
|
2578
|
-
const encoder$1 = new TextEncoder();
|
|
2579
|
-
async function render_response({
|
|
2580
|
-
branch,
|
|
2581
|
-
fetched,
|
|
2582
|
-
options: options2,
|
|
2583
|
-
manifest,
|
|
2584
|
-
state,
|
|
2585
|
-
page_config,
|
|
2586
|
-
status,
|
|
2587
|
-
error = null,
|
|
2588
|
-
event,
|
|
2589
|
-
resolve_opts,
|
|
2590
|
-
action_result
|
|
2591
|
-
}) {
|
|
2592
|
-
if (state.prerendering) {
|
|
2593
|
-
if (options2.csp.mode === "nonce") {
|
|
2594
|
-
throw new Error('Cannot use prerendering if config.kit.csp.mode === "nonce"');
|
|
2595
|
-
}
|
|
2596
|
-
if (options2.app_template_contains_nonce) {
|
|
2597
|
-
throw new Error("Cannot use prerendering if page template contains %sveltekit.nonce%");
|
|
2598
|
-
}
|
|
2599
|
-
}
|
|
2600
|
-
const { client } = manifest._;
|
|
2601
|
-
const modulepreloads = new Set(client.imports);
|
|
2602
|
-
const stylesheets = new Set(client.stylesheets);
|
|
2603
|
-
const fonts = new Set(client.fonts);
|
|
2604
|
-
const link_header_preloads = /* @__PURE__ */ new Set();
|
|
2605
|
-
const inline_styles = /* @__PURE__ */ new Map();
|
|
2606
|
-
let rendered;
|
|
2607
|
-
const form_value = action_result?.type === "success" || action_result?.type === "failure" ? action_result.data ?? null : null;
|
|
2608
|
-
let base$1 = base;
|
|
2609
|
-
let assets$1 = assets;
|
|
2610
|
-
let base_expression = s(base);
|
|
2611
|
-
if (!state.prerendering?.fallback) {
|
|
2612
|
-
const segments = event.url.pathname.slice(base.length).split("/").slice(2);
|
|
2613
|
-
base$1 = segments.map(() => "..").join("/") || ".";
|
|
2614
|
-
base_expression = `new URL(${s(base$1)}, location).pathname.slice(0, -1)`;
|
|
2615
|
-
if (!assets || assets[0] === "/" && assets !== SVELTE_KIT_ASSETS) {
|
|
2616
|
-
assets$1 = base$1;
|
|
2617
|
-
}
|
|
2618
|
-
}
|
|
2619
|
-
if (page_config.ssr) {
|
|
2620
|
-
const props = {
|
|
2621
|
-
stores: {
|
|
2622
|
-
page: writable(null),
|
|
2623
|
-
navigating: writable(null),
|
|
2624
|
-
updated
|
|
2625
|
-
},
|
|
2626
|
-
constructors: await Promise.all(branch.map(({ node }) => node.component())),
|
|
2627
|
-
form: form_value
|
|
2628
|
-
};
|
|
2629
|
-
let data2 = {};
|
|
2630
|
-
for (let i = 0; i < branch.length; i += 1) {
|
|
2631
|
-
data2 = { ...data2, ...branch[i].data };
|
|
2632
|
-
props[`data_${i}`] = data2;
|
|
2633
|
-
}
|
|
2634
|
-
props.page = {
|
|
2635
|
-
error,
|
|
2636
|
-
params: (
|
|
2637
|
-
/** @type {Record<string, any>} */
|
|
2638
|
-
event.params
|
|
2639
|
-
),
|
|
2640
|
-
route: event.route,
|
|
2641
|
-
status,
|
|
2642
|
-
url: event.url,
|
|
2643
|
-
data: data2,
|
|
2644
|
-
form: form_value,
|
|
2645
|
-
state: {}
|
|
2646
|
-
};
|
|
2647
|
-
override({ base: base$1, assets: assets$1 });
|
|
2648
|
-
{
|
|
2649
|
-
try {
|
|
2650
|
-
rendered = options2.root.render(props);
|
|
2651
|
-
} finally {
|
|
2652
|
-
reset();
|
|
2653
|
-
}
|
|
2654
|
-
}
|
|
2655
|
-
for (const { node } of branch) {
|
|
2656
|
-
for (const url of node.imports)
|
|
2657
|
-
modulepreloads.add(url);
|
|
2658
|
-
for (const url of node.stylesheets)
|
|
2659
|
-
stylesheets.add(url);
|
|
2660
|
-
for (const url of node.fonts)
|
|
2661
|
-
fonts.add(url);
|
|
2662
|
-
if (node.inline_styles) {
|
|
2663
|
-
Object.entries(await node.inline_styles()).forEach(([k, v]) => inline_styles.set(k, v));
|
|
2664
|
-
}
|
|
2665
|
-
}
|
|
2666
|
-
} else {
|
|
2667
|
-
rendered = { head: "", html: "", css: { code: "", map: null } };
|
|
2668
|
-
}
|
|
2669
|
-
let head = "";
|
|
2670
|
-
let body2 = rendered.html;
|
|
2671
|
-
const csp = new Csp(options2.csp, {
|
|
2672
|
-
prerender: !!state.prerendering
|
|
2673
|
-
});
|
|
2674
|
-
const prefixed = (path) => {
|
|
2675
|
-
if (path.startsWith("/")) {
|
|
2676
|
-
return base + path;
|
|
2677
|
-
}
|
|
2678
|
-
return `${assets$1}/${path}`;
|
|
2679
|
-
};
|
|
2680
|
-
if (inline_styles.size > 0) {
|
|
2681
|
-
const content = Array.from(inline_styles.values()).join("\n");
|
|
2682
|
-
const attributes = [];
|
|
2683
|
-
if (csp.style_needs_nonce)
|
|
2684
|
-
attributes.push(` nonce="${csp.nonce}"`);
|
|
2685
|
-
csp.add_style(content);
|
|
2686
|
-
head += `
|
|
2687
|
-
<style${attributes.join("")}>${content}</style>`;
|
|
2688
|
-
}
|
|
2689
|
-
for (const dep of stylesheets) {
|
|
2690
|
-
const path = prefixed(dep);
|
|
2691
|
-
const attributes = ['rel="stylesheet"'];
|
|
2692
|
-
if (inline_styles.has(dep)) {
|
|
2693
|
-
attributes.push("disabled", 'media="(max-width: 0)"');
|
|
2694
|
-
} else {
|
|
2695
|
-
if (resolve_opts.preload({ type: "css", path })) {
|
|
2696
|
-
const preload_atts = ['rel="preload"', 'as="style"'];
|
|
2697
|
-
link_header_preloads.add(`<${encodeURI(path)}>; ${preload_atts.join(";")}; nopush`);
|
|
2698
|
-
}
|
|
2699
|
-
}
|
|
2700
|
-
head += `
|
|
2701
|
-
<link href="${path}" ${attributes.join(" ")}>`;
|
|
2702
|
-
}
|
|
2703
|
-
for (const dep of fonts) {
|
|
2704
|
-
const path = prefixed(dep);
|
|
2705
|
-
if (resolve_opts.preload({ type: "font", path })) {
|
|
2706
|
-
const ext = dep.slice(dep.lastIndexOf(".") + 1);
|
|
2707
|
-
const attributes = [
|
|
2708
|
-
'rel="preload"',
|
|
2709
|
-
'as="font"',
|
|
2710
|
-
`type="font/${ext}"`,
|
|
2711
|
-
`href="${path}"`,
|
|
2712
|
-
"crossorigin"
|
|
2713
|
-
];
|
|
2714
|
-
head += `
|
|
2715
|
-
<link ${attributes.join(" ")}>`;
|
|
2716
|
-
}
|
|
2717
|
-
}
|
|
2718
|
-
const global = `__sveltekit_${options2.version_hash}`;
|
|
2719
|
-
const { data, chunks } = get_data(
|
|
2720
|
-
event,
|
|
2721
|
-
options2,
|
|
2722
|
-
branch.map((b) => b.server_data),
|
|
2723
|
-
global
|
|
2724
|
-
);
|
|
2725
|
-
if (page_config.ssr && page_config.csr) {
|
|
2726
|
-
body2 += `
|
|
2727
|
-
${fetched.map(
|
|
2728
|
-
(item) => serialize_data(item, resolve_opts.filterSerializedResponseHeaders, !!state.prerendering)
|
|
2729
|
-
).join("\n ")}`;
|
|
2730
|
-
}
|
|
2731
|
-
if (page_config.csr) {
|
|
2732
|
-
if (client.uses_env_dynamic_public && state.prerendering) {
|
|
2733
|
-
modulepreloads.add(`${options2.app_dir}/env.js`);
|
|
2734
|
-
}
|
|
2735
|
-
const included_modulepreloads = Array.from(modulepreloads, (dep) => prefixed(dep)).filter(
|
|
2736
|
-
(path) => resolve_opts.preload({ type: "js", path })
|
|
2737
|
-
);
|
|
2738
|
-
for (const path of included_modulepreloads) {
|
|
2739
|
-
link_header_preloads.add(`<${encodeURI(path)}>; rel="modulepreload"; nopush`);
|
|
2740
|
-
if (options2.preload_strategy !== "modulepreload") {
|
|
2741
|
-
head += `
|
|
2742
|
-
<link rel="preload" as="script" crossorigin="anonymous" href="${path}">`;
|
|
2743
|
-
} else if (state.prerendering) {
|
|
2744
|
-
head += `
|
|
2745
|
-
<link rel="modulepreload" href="${path}">`;
|
|
2746
|
-
}
|
|
2747
|
-
}
|
|
2748
|
-
const blocks = [];
|
|
2749
|
-
const load_env_eagerly = client.uses_env_dynamic_public && state.prerendering;
|
|
2750
|
-
const properties = [`base: ${base_expression}`];
|
|
2751
|
-
if (assets) {
|
|
2752
|
-
properties.push(`assets: ${s(assets)}`);
|
|
2753
|
-
}
|
|
2754
|
-
if (client.uses_env_dynamic_public) {
|
|
2755
|
-
properties.push(`env: ${load_env_eagerly ? "null" : s(public_env)}`);
|
|
2756
|
-
}
|
|
2757
|
-
if (chunks) {
|
|
2758
|
-
blocks.push("const deferred = new Map();");
|
|
2759
|
-
properties.push(`defer: (id) => new Promise((fulfil, reject) => {
|
|
2760
|
-
deferred.set(id, { fulfil, reject });
|
|
2761
|
-
})`);
|
|
2762
|
-
properties.push(`resolve: ({ id, data, error }) => {
|
|
2763
|
-
const { fulfil, reject } = deferred.get(id);
|
|
2764
|
-
deferred.delete(id);
|
|
2765
|
-
|
|
2766
|
-
if (error) reject(error);
|
|
2767
|
-
else fulfil(data);
|
|
2768
|
-
}`);
|
|
2769
|
-
}
|
|
2770
|
-
blocks.push(`${global} = {
|
|
2771
|
-
${properties.join(",\n ")}
|
|
2772
|
-
};`);
|
|
2773
|
-
const args = ["app", "element"];
|
|
2774
|
-
blocks.push("const element = document.currentScript.parentElement;");
|
|
2775
|
-
if (page_config.ssr) {
|
|
2776
|
-
const serialized = { form: "null", error: "null" };
|
|
2777
|
-
blocks.push(`const data = ${data};`);
|
|
2778
|
-
if (form_value) {
|
|
2779
|
-
serialized.form = uneval_action_response(
|
|
2780
|
-
form_value,
|
|
2781
|
-
/** @type {string} */
|
|
2782
|
-
event.route.id
|
|
2783
|
-
);
|
|
2784
|
-
}
|
|
2785
|
-
if (error) {
|
|
2786
|
-
serialized.error = uneval(error);
|
|
2787
|
-
}
|
|
2788
|
-
const hydrate = [
|
|
2789
|
-
`node_ids: [${branch.map(({ node }) => node.index).join(", ")}]`,
|
|
2790
|
-
"data",
|
|
2791
|
-
`form: ${serialized.form}`,
|
|
2792
|
-
`error: ${serialized.error}`
|
|
2793
|
-
];
|
|
2794
|
-
if (status !== 200) {
|
|
2795
|
-
hydrate.push(`status: ${status}`);
|
|
2796
|
-
}
|
|
2797
|
-
if (options2.embedded) {
|
|
2798
|
-
hydrate.push(`params: ${uneval(event.params)}`, `route: ${s(event.route)}`);
|
|
2799
|
-
}
|
|
2800
|
-
const indent = " ".repeat(load_env_eagerly ? 7 : 6);
|
|
2801
|
-
args.push(`{
|
|
2802
|
-
${indent} ${hydrate.join(`,
|
|
2803
|
-
${indent} `)}
|
|
2804
|
-
${indent}}`);
|
|
2805
|
-
}
|
|
2806
|
-
if (load_env_eagerly) {
|
|
2807
|
-
blocks.push(`import(${s(`${base$1}/${options2.app_dir}/env.js`)}).then(({ env }) => {
|
|
2808
|
-
${global}.env = env;
|
|
2809
|
-
|
|
2810
|
-
Promise.all([
|
|
2811
|
-
import(${s(prefixed(client.start))}),
|
|
2812
|
-
import(${s(prefixed(client.app))})
|
|
2813
|
-
]).then(([kit, app]) => {
|
|
2814
|
-
kit.start(${args.join(", ")});
|
|
2815
|
-
});
|
|
2816
|
-
});`);
|
|
2817
|
-
} else {
|
|
2818
|
-
blocks.push(`Promise.all([
|
|
2819
|
-
import(${s(prefixed(client.start))}),
|
|
2820
|
-
import(${s(prefixed(client.app))})
|
|
2821
|
-
]).then(([kit, app]) => {
|
|
2822
|
-
kit.start(${args.join(", ")});
|
|
2823
|
-
});`);
|
|
2824
|
-
}
|
|
2825
|
-
if (options2.service_worker) {
|
|
2826
|
-
const opts = "";
|
|
2827
|
-
blocks.push(`if ('serviceWorker' in navigator) {
|
|
2828
|
-
addEventListener('load', function () {
|
|
2829
|
-
navigator.serviceWorker.register('${prefixed("service-worker.js")}'${opts});
|
|
2830
|
-
});
|
|
2831
|
-
}`);
|
|
2832
|
-
}
|
|
2833
|
-
const init_app = `
|
|
2834
|
-
{
|
|
2835
|
-
${blocks.join("\n\n ")}
|
|
2836
|
-
}
|
|
2837
|
-
`;
|
|
2838
|
-
csp.add_script(init_app);
|
|
2839
|
-
body2 += `
|
|
2840
|
-
<script${csp.script_needs_nonce ? ` nonce="${csp.nonce}"` : ""}>${init_app}<\/script>
|
|
2841
|
-
`;
|
|
2842
|
-
}
|
|
2843
|
-
const headers2 = new Headers({
|
|
2844
|
-
"x-sveltekit-page": "true",
|
|
2845
|
-
"content-type": "text/html"
|
|
2846
|
-
});
|
|
2847
|
-
if (state.prerendering) {
|
|
2848
|
-
const http_equiv = [];
|
|
2849
|
-
const csp_headers = csp.csp_provider.get_meta();
|
|
2850
|
-
if (csp_headers) {
|
|
2851
|
-
http_equiv.push(csp_headers);
|
|
2852
|
-
}
|
|
2853
|
-
if (state.prerendering.cache) {
|
|
2854
|
-
http_equiv.push(`<meta http-equiv="cache-control" content="${state.prerendering.cache}">`);
|
|
2855
|
-
}
|
|
2856
|
-
if (http_equiv.length > 0) {
|
|
2857
|
-
head = http_equiv.join("\n") + head;
|
|
2858
|
-
}
|
|
2859
|
-
} else {
|
|
2860
|
-
const csp_header = csp.csp_provider.get_header();
|
|
2861
|
-
if (csp_header) {
|
|
2862
|
-
headers2.set("content-security-policy", csp_header);
|
|
2863
|
-
}
|
|
2864
|
-
const report_only_header = csp.report_only_provider.get_header();
|
|
2865
|
-
if (report_only_header) {
|
|
2866
|
-
headers2.set("content-security-policy-report-only", report_only_header);
|
|
2867
|
-
}
|
|
2868
|
-
if (link_header_preloads.size) {
|
|
2869
|
-
headers2.set("link", Array.from(link_header_preloads).join(", "));
|
|
2870
|
-
}
|
|
2871
|
-
}
|
|
2872
|
-
head += rendered.head;
|
|
2873
|
-
const html = options2.templates.app({
|
|
2874
|
-
head,
|
|
2875
|
-
body: body2,
|
|
2876
|
-
assets: assets$1,
|
|
2877
|
-
nonce: (
|
|
2878
|
-
/** @type {string} */
|
|
2879
|
-
csp.nonce
|
|
2880
|
-
),
|
|
2881
|
-
env: safe_public_env
|
|
2882
|
-
});
|
|
2883
|
-
const transformed = await resolve_opts.transformPageChunk({
|
|
2884
|
-
html,
|
|
2885
|
-
done: true
|
|
2886
|
-
}) || "";
|
|
2887
|
-
if (!chunks) {
|
|
2888
|
-
headers2.set("etag", `"${hash(transformed)}"`);
|
|
2889
|
-
}
|
|
2890
|
-
return !chunks ? text(transformed, {
|
|
2891
|
-
status,
|
|
2892
|
-
headers: headers2
|
|
2893
|
-
}) : new Response(
|
|
2894
|
-
new ReadableStream({
|
|
2895
|
-
async start(controller) {
|
|
2896
|
-
controller.enqueue(encoder$1.encode(transformed + "\n"));
|
|
2897
|
-
for await (const chunk of chunks) {
|
|
2898
|
-
controller.enqueue(encoder$1.encode(chunk));
|
|
2899
|
-
}
|
|
2900
|
-
controller.close();
|
|
2901
|
-
},
|
|
2902
|
-
type: "bytes"
|
|
2903
|
-
}),
|
|
2904
|
-
{
|
|
2905
|
-
headers: {
|
|
2906
|
-
"content-type": "text/html"
|
|
2907
|
-
}
|
|
2908
|
-
}
|
|
2909
|
-
);
|
|
2910
|
-
}
|
|
2911
|
-
function get_data(event, options2, nodes, global) {
|
|
2912
|
-
let promise_id = 1;
|
|
2913
|
-
let count = 0;
|
|
2914
|
-
const { iterator, push, done } = create_async_iterator();
|
|
2915
|
-
function replacer(thing) {
|
|
2916
|
-
if (typeof thing?.then === "function") {
|
|
2917
|
-
const id = promise_id++;
|
|
2918
|
-
count += 1;
|
|
2919
|
-
thing.then(
|
|
2920
|
-
/** @param {any} data */
|
|
2921
|
-
(data) => ({ data })
|
|
2922
|
-
).catch(
|
|
2923
|
-
/** @param {any} error */
|
|
2924
|
-
async (error) => ({
|
|
2925
|
-
error: await handle_error_and_jsonify(event, options2, error)
|
|
2926
|
-
})
|
|
2927
|
-
).then(
|
|
2928
|
-
/**
|
|
2929
|
-
* @param {{data: any; error: any}} result
|
|
2930
|
-
*/
|
|
2931
|
-
async ({ data, error }) => {
|
|
2932
|
-
count -= 1;
|
|
2933
|
-
let str;
|
|
2934
|
-
try {
|
|
2935
|
-
str = uneval({ id, data, error }, replacer);
|
|
2936
|
-
} catch (e) {
|
|
2937
|
-
error = await handle_error_and_jsonify(
|
|
2938
|
-
event,
|
|
2939
|
-
options2,
|
|
2940
|
-
new Error(`Failed to serialize promise while rendering ${event.route.id}`)
|
|
2941
|
-
);
|
|
2942
|
-
data = void 0;
|
|
2943
|
-
str = uneval({ id, data, error }, replacer);
|
|
2944
|
-
}
|
|
2945
|
-
push(`<script>${global}.resolve(${str})<\/script>
|
|
2946
|
-
`);
|
|
2947
|
-
if (count === 0)
|
|
2948
|
-
done();
|
|
2949
|
-
}
|
|
2950
|
-
);
|
|
2951
|
-
return `${global}.defer(${id})`;
|
|
2952
|
-
}
|
|
2953
|
-
}
|
|
2954
|
-
try {
|
|
2955
|
-
const strings = nodes.map((node) => {
|
|
2956
|
-
if (!node)
|
|
2957
|
-
return "null";
|
|
2958
|
-
return `{"type":"data","data":${uneval(node.data, replacer)},${stringify_uses(node)}${node.slash ? `,"slash":${JSON.stringify(node.slash)}` : ""}}`;
|
|
2959
|
-
});
|
|
2960
|
-
return {
|
|
2961
|
-
data: `[${strings.join(",")}]`,
|
|
2962
|
-
chunks: count > 0 ? iterator : null
|
|
2963
|
-
};
|
|
2964
|
-
} catch (e) {
|
|
2965
|
-
throw new Error(clarify_devalue_error(
|
|
2966
|
-
event,
|
|
2967
|
-
/** @type {any} */
|
|
2968
|
-
e
|
|
2969
|
-
));
|
|
2970
|
-
}
|
|
2971
|
-
}
|
|
2972
|
-
function get_option(nodes, option) {
|
|
2973
|
-
return nodes.reduce(
|
|
2974
|
-
(value, node) => {
|
|
2975
|
-
return (
|
|
2976
|
-
/** @type {Value} TypeScript's too dumb to understand this */
|
|
2977
|
-
node?.universal?.[option] ?? node?.server?.[option] ?? value
|
|
2978
|
-
);
|
|
2979
|
-
},
|
|
2980
|
-
/** @type {Value | undefined} */
|
|
2981
|
-
void 0
|
|
2982
|
-
);
|
|
2983
|
-
}
|
|
2984
|
-
async function respond_with_error({
|
|
2985
|
-
event,
|
|
2986
|
-
options: options2,
|
|
2987
|
-
manifest,
|
|
2988
|
-
state,
|
|
2989
|
-
status,
|
|
2990
|
-
error,
|
|
2991
|
-
resolve_opts
|
|
2992
|
-
}) {
|
|
2993
|
-
if (event.request.headers.get("x-sveltekit-error")) {
|
|
2994
|
-
return static_error_page(
|
|
2995
|
-
options2,
|
|
2996
|
-
status,
|
|
2997
|
-
/** @type {Error} */
|
|
2998
|
-
error.message
|
|
2999
|
-
);
|
|
3000
|
-
}
|
|
3001
|
-
const fetched = [];
|
|
3002
|
-
try {
|
|
3003
|
-
const branch = [];
|
|
3004
|
-
const default_layout = await manifest._.nodes[0]();
|
|
3005
|
-
const ssr = get_option([default_layout], "ssr") ?? true;
|
|
3006
|
-
const csr = get_option([default_layout], "csr") ?? true;
|
|
3007
|
-
if (ssr) {
|
|
3008
|
-
state.error = true;
|
|
3009
|
-
const server_data_promise = load_server_data({
|
|
3010
|
-
event,
|
|
3011
|
-
state,
|
|
3012
|
-
node: default_layout,
|
|
3013
|
-
parent: async () => ({})
|
|
3014
|
-
});
|
|
3015
|
-
const server_data = await server_data_promise;
|
|
3016
|
-
const data = await load_data({
|
|
3017
|
-
event,
|
|
3018
|
-
fetched,
|
|
3019
|
-
node: default_layout,
|
|
3020
|
-
parent: async () => ({}),
|
|
3021
|
-
resolve_opts,
|
|
3022
|
-
server_data_promise,
|
|
3023
|
-
state,
|
|
3024
|
-
csr
|
|
3025
|
-
});
|
|
3026
|
-
branch.push(
|
|
3027
|
-
{
|
|
3028
|
-
node: default_layout,
|
|
3029
|
-
server_data,
|
|
3030
|
-
data
|
|
3031
|
-
},
|
|
3032
|
-
{
|
|
3033
|
-
node: await manifest._.nodes[1](),
|
|
3034
|
-
// 1 is always the root error
|
|
3035
|
-
data: null,
|
|
3036
|
-
server_data: null
|
|
3037
|
-
}
|
|
3038
|
-
);
|
|
3039
|
-
}
|
|
3040
|
-
return await render_response({
|
|
3041
|
-
options: options2,
|
|
3042
|
-
manifest,
|
|
3043
|
-
state,
|
|
3044
|
-
page_config: {
|
|
3045
|
-
ssr,
|
|
3046
|
-
csr
|
|
3047
|
-
},
|
|
3048
|
-
status,
|
|
3049
|
-
error: await handle_error_and_jsonify(event, options2, error),
|
|
3050
|
-
branch,
|
|
3051
|
-
fetched,
|
|
3052
|
-
event,
|
|
3053
|
-
resolve_opts
|
|
3054
|
-
});
|
|
3055
|
-
} catch (e) {
|
|
3056
|
-
if (e instanceof Redirect) {
|
|
3057
|
-
return redirect_response(e.status, e.location);
|
|
3058
|
-
}
|
|
3059
|
-
return static_error_page(
|
|
3060
|
-
options2,
|
|
3061
|
-
get_status(e),
|
|
3062
|
-
(await handle_error_and_jsonify(event, options2, e)).message
|
|
3063
|
-
);
|
|
3064
|
-
}
|
|
3065
|
-
}
|
|
3066
|
-
function once(fn) {
|
|
3067
|
-
let done = false;
|
|
3068
|
-
let result;
|
|
3069
|
-
return () => {
|
|
3070
|
-
if (done)
|
|
3071
|
-
return result;
|
|
3072
|
-
done = true;
|
|
3073
|
-
return result = fn();
|
|
3074
|
-
};
|
|
3075
|
-
}
|
|
3076
|
-
const encoder = new TextEncoder();
|
|
3077
|
-
async function render_data(event, route, options2, manifest, state, invalidated_data_nodes, trailing_slash) {
|
|
3078
|
-
if (!route.page) {
|
|
3079
|
-
return new Response(void 0, {
|
|
3080
|
-
status: 404
|
|
3081
|
-
});
|
|
3082
|
-
}
|
|
3083
|
-
try {
|
|
3084
|
-
const node_ids = [...route.page.layouts, route.page.leaf];
|
|
3085
|
-
const invalidated = invalidated_data_nodes ?? node_ids.map(() => true);
|
|
3086
|
-
let aborted = false;
|
|
3087
|
-
const url = new URL(event.url);
|
|
3088
|
-
url.pathname = normalize_path(url.pathname, trailing_slash);
|
|
3089
|
-
const new_event = { ...event, url };
|
|
3090
|
-
const functions = node_ids.map((n, i) => {
|
|
3091
|
-
return once(async () => {
|
|
3092
|
-
try {
|
|
3093
|
-
if (aborted) {
|
|
3094
|
-
return (
|
|
3095
|
-
/** @type {import('types').ServerDataSkippedNode} */
|
|
3096
|
-
{
|
|
3097
|
-
type: "skip"
|
|
3098
|
-
}
|
|
3099
|
-
);
|
|
3100
|
-
}
|
|
3101
|
-
const node = n == void 0 ? n : await manifest._.nodes[n]();
|
|
3102
|
-
return load_server_data({
|
|
3103
|
-
event: new_event,
|
|
3104
|
-
state,
|
|
3105
|
-
node,
|
|
3106
|
-
parent: async () => {
|
|
3107
|
-
const data2 = {};
|
|
3108
|
-
for (let j = 0; j < i; j += 1) {
|
|
3109
|
-
const parent = (
|
|
3110
|
-
/** @type {import('types').ServerDataNode | null} */
|
|
3111
|
-
await functions[j]()
|
|
3112
|
-
);
|
|
3113
|
-
if (parent) {
|
|
3114
|
-
Object.assign(data2, parent.data);
|
|
3115
|
-
}
|
|
3116
|
-
}
|
|
3117
|
-
return data2;
|
|
3118
|
-
}
|
|
3119
|
-
});
|
|
3120
|
-
} catch (e) {
|
|
3121
|
-
aborted = true;
|
|
3122
|
-
throw e;
|
|
3123
|
-
}
|
|
3124
|
-
});
|
|
3125
|
-
});
|
|
3126
|
-
const promises = functions.map(async (fn, i) => {
|
|
3127
|
-
if (!invalidated[i]) {
|
|
3128
|
-
return (
|
|
3129
|
-
/** @type {import('types').ServerDataSkippedNode} */
|
|
3130
|
-
{
|
|
3131
|
-
type: "skip"
|
|
3132
|
-
}
|
|
3133
|
-
);
|
|
3134
|
-
}
|
|
3135
|
-
return fn();
|
|
3136
|
-
});
|
|
3137
|
-
let length = promises.length;
|
|
3138
|
-
const nodes = await Promise.all(
|
|
3139
|
-
promises.map(
|
|
3140
|
-
(p, i) => p.catch(async (error) => {
|
|
3141
|
-
if (error instanceof Redirect) {
|
|
3142
|
-
throw error;
|
|
3143
|
-
}
|
|
3144
|
-
length = Math.min(length, i + 1);
|
|
3145
|
-
return (
|
|
3146
|
-
/** @type {import('types').ServerErrorNode} */
|
|
3147
|
-
{
|
|
3148
|
-
type: "error",
|
|
3149
|
-
error: await handle_error_and_jsonify(event, options2, error),
|
|
3150
|
-
status: error instanceof HttpError || error instanceof SvelteKitError ? error.status : void 0
|
|
3151
|
-
}
|
|
3152
|
-
);
|
|
3153
|
-
})
|
|
3154
|
-
)
|
|
3155
|
-
);
|
|
3156
|
-
const { data, chunks } = get_data_json(event, options2, nodes);
|
|
3157
|
-
if (!chunks) {
|
|
3158
|
-
return json_response(data);
|
|
3159
|
-
}
|
|
3160
|
-
return new Response(
|
|
3161
|
-
new ReadableStream({
|
|
3162
|
-
async start(controller) {
|
|
3163
|
-
controller.enqueue(encoder.encode(data));
|
|
3164
|
-
for await (const chunk of chunks) {
|
|
3165
|
-
controller.enqueue(encoder.encode(chunk));
|
|
3166
|
-
}
|
|
3167
|
-
controller.close();
|
|
3168
|
-
},
|
|
3169
|
-
type: "bytes"
|
|
3170
|
-
}),
|
|
3171
|
-
{
|
|
3172
|
-
headers: {
|
|
3173
|
-
// we use a proprietary content type to prevent buffering.
|
|
3174
|
-
// the `text` prefix makes it inspectable
|
|
3175
|
-
"content-type": "text/sveltekit-data",
|
|
3176
|
-
"cache-control": "private, no-store"
|
|
3177
|
-
}
|
|
3178
|
-
}
|
|
3179
|
-
);
|
|
3180
|
-
} catch (e) {
|
|
3181
|
-
const error = normalize_error(e);
|
|
3182
|
-
if (error instanceof Redirect) {
|
|
3183
|
-
return redirect_json_response(error);
|
|
3184
|
-
} else {
|
|
3185
|
-
return json_response(await handle_error_and_jsonify(event, options2, error), 500);
|
|
3186
|
-
}
|
|
3187
|
-
}
|
|
3188
|
-
}
|
|
3189
|
-
function json_response(json2, status = 200) {
|
|
3190
|
-
return text(typeof json2 === "string" ? json2 : JSON.stringify(json2), {
|
|
3191
|
-
status,
|
|
3192
|
-
headers: {
|
|
3193
|
-
"content-type": "application/json",
|
|
3194
|
-
"cache-control": "private, no-store"
|
|
3195
|
-
}
|
|
3196
|
-
});
|
|
3197
|
-
}
|
|
3198
|
-
function redirect_json_response(redirect) {
|
|
3199
|
-
return json_response({
|
|
3200
|
-
type: "redirect",
|
|
3201
|
-
location: redirect.location
|
|
3202
|
-
});
|
|
3203
|
-
}
|
|
3204
|
-
function get_data_json(event, options2, nodes) {
|
|
3205
|
-
let promise_id = 1;
|
|
3206
|
-
let count = 0;
|
|
3207
|
-
const { iterator, push, done } = create_async_iterator();
|
|
3208
|
-
const reducers = {
|
|
3209
|
-
/** @param {any} thing */
|
|
3210
|
-
Promise: (thing) => {
|
|
3211
|
-
if (typeof thing?.then === "function") {
|
|
3212
|
-
const id = promise_id++;
|
|
3213
|
-
count += 1;
|
|
3214
|
-
let key2 = "data";
|
|
3215
|
-
thing.catch(
|
|
3216
|
-
/** @param {any} e */
|
|
3217
|
-
async (e) => {
|
|
3218
|
-
key2 = "error";
|
|
3219
|
-
return handle_error_and_jsonify(
|
|
3220
|
-
event,
|
|
3221
|
-
options2,
|
|
3222
|
-
/** @type {any} */
|
|
3223
|
-
e
|
|
3224
|
-
);
|
|
3225
|
-
}
|
|
3226
|
-
).then(
|
|
3227
|
-
/** @param {any} value */
|
|
3228
|
-
async (value) => {
|
|
3229
|
-
let str;
|
|
3230
|
-
try {
|
|
3231
|
-
str = stringify(value, reducers);
|
|
3232
|
-
} catch (e) {
|
|
3233
|
-
const error = await handle_error_and_jsonify(
|
|
3234
|
-
event,
|
|
3235
|
-
options2,
|
|
3236
|
-
new Error(`Failed to serialize promise while rendering ${event.route.id}`)
|
|
3237
|
-
);
|
|
3238
|
-
key2 = "error";
|
|
3239
|
-
str = stringify(error, reducers);
|
|
3240
|
-
}
|
|
3241
|
-
count -= 1;
|
|
3242
|
-
push(`{"type":"chunk","id":${id},"${key2}":${str}}
|
|
3243
|
-
`);
|
|
3244
|
-
if (count === 0)
|
|
3245
|
-
done();
|
|
3246
|
-
}
|
|
3247
|
-
);
|
|
3248
|
-
return id;
|
|
3249
|
-
}
|
|
3250
|
-
}
|
|
3251
|
-
};
|
|
3252
|
-
try {
|
|
3253
|
-
const strings = nodes.map((node) => {
|
|
3254
|
-
if (!node)
|
|
3255
|
-
return "null";
|
|
3256
|
-
if (node.type === "error" || node.type === "skip") {
|
|
3257
|
-
return JSON.stringify(node);
|
|
3258
|
-
}
|
|
3259
|
-
return `{"type":"data","data":${stringify(node.data, reducers)},${stringify_uses(
|
|
3260
|
-
node
|
|
3261
|
-
)}${node.slash ? `,"slash":${JSON.stringify(node.slash)}` : ""}}`;
|
|
3262
|
-
});
|
|
3263
|
-
return {
|
|
3264
|
-
data: `{"type":"data","nodes":[${strings.join(",")}]}
|
|
3265
|
-
`,
|
|
3266
|
-
chunks: count > 0 ? iterator : null
|
|
3267
|
-
};
|
|
3268
|
-
} catch (e) {
|
|
3269
|
-
throw new Error(clarify_devalue_error(
|
|
3270
|
-
event,
|
|
3271
|
-
/** @type {any} */
|
|
3272
|
-
e
|
|
3273
|
-
));
|
|
3274
|
-
}
|
|
3275
|
-
}
|
|
3276
|
-
function load_page_nodes(page, manifest) {
|
|
3277
|
-
return Promise.all([
|
|
3278
|
-
// we use == here rather than === because [undefined] serializes as "[null]"
|
|
3279
|
-
...page.layouts.map((n) => n == void 0 ? n : manifest._.nodes[n]()),
|
|
3280
|
-
manifest._.nodes[page.leaf]()
|
|
3281
|
-
]);
|
|
3282
|
-
}
|
|
3283
|
-
const MAX_DEPTH = 10;
|
|
3284
|
-
async function render_page(event, page, options2, manifest, state, resolve_opts) {
|
|
3285
|
-
if (state.depth > MAX_DEPTH) {
|
|
3286
|
-
return text(`Not found: ${event.url.pathname}`, {
|
|
3287
|
-
status: 404
|
|
3288
|
-
// TODO in some cases this should be 500. not sure how to differentiate
|
|
3289
|
-
});
|
|
3290
|
-
}
|
|
3291
|
-
if (is_action_json_request(event)) {
|
|
3292
|
-
const node = await manifest._.nodes[page.leaf]();
|
|
3293
|
-
return handle_action_json_request(event, options2, node?.server);
|
|
3294
|
-
}
|
|
3295
|
-
try {
|
|
3296
|
-
const nodes = await load_page_nodes(page, manifest);
|
|
3297
|
-
const leaf_node = (
|
|
3298
|
-
/** @type {import('types').SSRNode} */
|
|
3299
|
-
nodes.at(-1)
|
|
3300
|
-
);
|
|
3301
|
-
let status = 200;
|
|
3302
|
-
let action_result = void 0;
|
|
3303
|
-
if (is_action_request(event)) {
|
|
3304
|
-
action_result = await handle_action_request(event, leaf_node.server);
|
|
3305
|
-
if (action_result?.type === "redirect") {
|
|
3306
|
-
return redirect_response(action_result.status, action_result.location);
|
|
3307
|
-
}
|
|
3308
|
-
if (action_result?.type === "error") {
|
|
3309
|
-
status = get_status(action_result.error);
|
|
3310
|
-
}
|
|
3311
|
-
if (action_result?.type === "failure") {
|
|
3312
|
-
status = action_result.status;
|
|
3313
|
-
}
|
|
3314
|
-
}
|
|
3315
|
-
const should_prerender_data = nodes.some((node) => node?.server?.load);
|
|
3316
|
-
const data_pathname = add_data_suffix(event.url.pathname);
|
|
3317
|
-
const should_prerender = get_option(nodes, "prerender") ?? false;
|
|
3318
|
-
if (should_prerender) {
|
|
3319
|
-
const mod = leaf_node.server;
|
|
3320
|
-
if (mod?.actions) {
|
|
3321
|
-
throw new Error("Cannot prerender pages with actions");
|
|
3322
|
-
}
|
|
3323
|
-
} else if (state.prerendering) {
|
|
3324
|
-
return new Response(void 0, {
|
|
3325
|
-
status: 204
|
|
3326
|
-
});
|
|
3327
|
-
}
|
|
3328
|
-
state.prerender_default = should_prerender;
|
|
3329
|
-
const fetched = [];
|
|
3330
|
-
if (get_option(nodes, "ssr") === false && !(state.prerendering && should_prerender_data)) {
|
|
3331
|
-
return await render_response({
|
|
3332
|
-
branch: [],
|
|
3333
|
-
fetched,
|
|
3334
|
-
page_config: {
|
|
3335
|
-
ssr: false,
|
|
3336
|
-
csr: get_option(nodes, "csr") ?? true
|
|
3337
|
-
},
|
|
3338
|
-
status,
|
|
3339
|
-
error: null,
|
|
3340
|
-
event,
|
|
3341
|
-
options: options2,
|
|
3342
|
-
manifest,
|
|
3343
|
-
state,
|
|
3344
|
-
resolve_opts
|
|
3345
|
-
});
|
|
3346
|
-
}
|
|
3347
|
-
const branch = [];
|
|
3348
|
-
let load_error = null;
|
|
3349
|
-
const server_promises = nodes.map((node, i) => {
|
|
3350
|
-
if (load_error) {
|
|
3351
|
-
throw load_error;
|
|
3352
|
-
}
|
|
3353
|
-
return Promise.resolve().then(async () => {
|
|
3354
|
-
try {
|
|
3355
|
-
if (node === leaf_node && action_result?.type === "error") {
|
|
3356
|
-
throw action_result.error;
|
|
3357
|
-
}
|
|
3358
|
-
return await load_server_data({
|
|
3359
|
-
event,
|
|
3360
|
-
state,
|
|
3361
|
-
node,
|
|
3362
|
-
parent: async () => {
|
|
3363
|
-
const data = {};
|
|
3364
|
-
for (let j = 0; j < i; j += 1) {
|
|
3365
|
-
const parent = await server_promises[j];
|
|
3366
|
-
if (parent)
|
|
3367
|
-
Object.assign(data, await parent.data);
|
|
3368
|
-
}
|
|
3369
|
-
return data;
|
|
3370
|
-
}
|
|
3371
|
-
});
|
|
3372
|
-
} catch (e) {
|
|
3373
|
-
load_error = /** @type {Error} */
|
|
3374
|
-
e;
|
|
3375
|
-
throw load_error;
|
|
3376
|
-
}
|
|
3377
|
-
});
|
|
3378
|
-
});
|
|
3379
|
-
const csr = get_option(nodes, "csr") ?? true;
|
|
3380
|
-
const load_promises = nodes.map((node, i) => {
|
|
3381
|
-
if (load_error)
|
|
3382
|
-
throw load_error;
|
|
3383
|
-
return Promise.resolve().then(async () => {
|
|
3384
|
-
try {
|
|
3385
|
-
return await load_data({
|
|
3386
|
-
event,
|
|
3387
|
-
fetched,
|
|
3388
|
-
node,
|
|
3389
|
-
parent: async () => {
|
|
3390
|
-
const data = {};
|
|
3391
|
-
for (let j = 0; j < i; j += 1) {
|
|
3392
|
-
Object.assign(data, await load_promises[j]);
|
|
3393
|
-
}
|
|
3394
|
-
return data;
|
|
3395
|
-
},
|
|
3396
|
-
resolve_opts,
|
|
3397
|
-
server_data_promise: server_promises[i],
|
|
3398
|
-
state,
|
|
3399
|
-
csr
|
|
3400
|
-
});
|
|
3401
|
-
} catch (e) {
|
|
3402
|
-
load_error = /** @type {Error} */
|
|
3403
|
-
e;
|
|
3404
|
-
throw load_error;
|
|
3405
|
-
}
|
|
3406
|
-
});
|
|
3407
|
-
});
|
|
3408
|
-
for (const p of server_promises)
|
|
3409
|
-
p.catch(() => {
|
|
3410
|
-
});
|
|
3411
|
-
for (const p of load_promises)
|
|
3412
|
-
p.catch(() => {
|
|
3413
|
-
});
|
|
3414
|
-
for (let i = 0; i < nodes.length; i += 1) {
|
|
3415
|
-
const node = nodes[i];
|
|
3416
|
-
if (node) {
|
|
3417
|
-
try {
|
|
3418
|
-
const server_data = await server_promises[i];
|
|
3419
|
-
const data = await load_promises[i];
|
|
3420
|
-
branch.push({ node, server_data, data });
|
|
3421
|
-
} catch (e) {
|
|
3422
|
-
const err = normalize_error(e);
|
|
3423
|
-
if (err instanceof Redirect) {
|
|
3424
|
-
if (state.prerendering && should_prerender_data) {
|
|
3425
|
-
const body2 = JSON.stringify({
|
|
3426
|
-
type: "redirect",
|
|
3427
|
-
location: err.location
|
|
3428
|
-
});
|
|
3429
|
-
state.prerendering.dependencies.set(data_pathname, {
|
|
3430
|
-
response: text(body2),
|
|
3431
|
-
body: body2
|
|
3432
|
-
});
|
|
3433
|
-
}
|
|
3434
|
-
return redirect_response(err.status, err.location);
|
|
3435
|
-
}
|
|
3436
|
-
const status2 = get_status(err);
|
|
3437
|
-
const error = await handle_error_and_jsonify(event, options2, err);
|
|
3438
|
-
while (i--) {
|
|
3439
|
-
if (page.errors[i]) {
|
|
3440
|
-
const index = (
|
|
3441
|
-
/** @type {number} */
|
|
3442
|
-
page.errors[i]
|
|
3443
|
-
);
|
|
3444
|
-
const node2 = await manifest._.nodes[index]();
|
|
3445
|
-
let j = i;
|
|
3446
|
-
while (!branch[j])
|
|
3447
|
-
j -= 1;
|
|
3448
|
-
return await render_response({
|
|
3449
|
-
event,
|
|
3450
|
-
options: options2,
|
|
3451
|
-
manifest,
|
|
3452
|
-
state,
|
|
3453
|
-
resolve_opts,
|
|
3454
|
-
page_config: { ssr: true, csr: true },
|
|
3455
|
-
status: status2,
|
|
3456
|
-
error,
|
|
3457
|
-
branch: compact(branch.slice(0, j + 1)).concat({
|
|
3458
|
-
node: node2,
|
|
3459
|
-
data: null,
|
|
3460
|
-
server_data: null
|
|
3461
|
-
}),
|
|
3462
|
-
fetched
|
|
3463
|
-
});
|
|
3464
|
-
}
|
|
3465
|
-
}
|
|
3466
|
-
return static_error_page(options2, status2, error.message);
|
|
3467
|
-
}
|
|
3468
|
-
} else {
|
|
3469
|
-
branch.push(null);
|
|
3470
|
-
}
|
|
3471
|
-
}
|
|
3472
|
-
if (state.prerendering && should_prerender_data) {
|
|
3473
|
-
let { data, chunks } = get_data_json(
|
|
3474
|
-
event,
|
|
3475
|
-
options2,
|
|
3476
|
-
branch.map((node) => node?.server_data)
|
|
3477
|
-
);
|
|
3478
|
-
if (chunks) {
|
|
3479
|
-
for await (const chunk of chunks) {
|
|
3480
|
-
data += chunk;
|
|
3481
|
-
}
|
|
3482
|
-
}
|
|
3483
|
-
state.prerendering.dependencies.set(data_pathname, {
|
|
3484
|
-
response: text(data),
|
|
3485
|
-
body: data
|
|
3486
|
-
});
|
|
3487
|
-
}
|
|
3488
|
-
const ssr = get_option(nodes, "ssr") ?? true;
|
|
3489
|
-
return await render_response({
|
|
3490
|
-
event,
|
|
3491
|
-
options: options2,
|
|
3492
|
-
manifest,
|
|
3493
|
-
state,
|
|
3494
|
-
resolve_opts,
|
|
3495
|
-
page_config: {
|
|
3496
|
-
csr: get_option(nodes, "csr") ?? true,
|
|
3497
|
-
ssr
|
|
3498
|
-
},
|
|
3499
|
-
status,
|
|
3500
|
-
error: null,
|
|
3501
|
-
branch: ssr === false ? [] : compact(branch),
|
|
3502
|
-
action_result,
|
|
3503
|
-
fetched
|
|
3504
|
-
});
|
|
3505
|
-
} catch (e) {
|
|
3506
|
-
return await respond_with_error({
|
|
3507
|
-
event,
|
|
3508
|
-
options: options2,
|
|
3509
|
-
manifest,
|
|
3510
|
-
state,
|
|
3511
|
-
status: 500,
|
|
3512
|
-
error: e,
|
|
3513
|
-
resolve_opts
|
|
3514
|
-
});
|
|
3515
|
-
}
|
|
3516
|
-
}
|
|
3517
|
-
function exec(match, params, matchers) {
|
|
3518
|
-
const result = {};
|
|
3519
|
-
const values = match.slice(1);
|
|
3520
|
-
const values_needing_match = values.filter((value) => value !== void 0);
|
|
3521
|
-
let buffered = 0;
|
|
3522
|
-
for (let i = 0; i < params.length; i += 1) {
|
|
3523
|
-
const param = params[i];
|
|
3524
|
-
let value = values[i - buffered];
|
|
3525
|
-
if (param.chained && param.rest && buffered) {
|
|
3526
|
-
value = values.slice(i - buffered, i + 1).filter((s2) => s2).join("/");
|
|
3527
|
-
buffered = 0;
|
|
3528
|
-
}
|
|
3529
|
-
if (value === void 0) {
|
|
3530
|
-
if (param.rest)
|
|
3531
|
-
result[param.name] = "";
|
|
3532
|
-
continue;
|
|
3533
|
-
}
|
|
3534
|
-
if (!param.matcher || matchers[param.matcher](value)) {
|
|
3535
|
-
result[param.name] = value;
|
|
3536
|
-
const next_param = params[i + 1];
|
|
3537
|
-
const next_value = values[i + 1];
|
|
3538
|
-
if (next_param && !next_param.rest && next_param.optional && next_value && param.chained) {
|
|
3539
|
-
buffered = 0;
|
|
3540
|
-
}
|
|
3541
|
-
if (!next_param && !next_value && Object.keys(result).length === values_needing_match.length) {
|
|
3542
|
-
buffered = 0;
|
|
3543
|
-
}
|
|
3544
|
-
continue;
|
|
3545
|
-
}
|
|
3546
|
-
if (param.optional && param.chained) {
|
|
3547
|
-
buffered++;
|
|
3548
|
-
continue;
|
|
3549
|
-
}
|
|
3550
|
-
return;
|
|
3551
|
-
}
|
|
3552
|
-
if (buffered)
|
|
3553
|
-
return;
|
|
3554
|
-
return result;
|
|
3555
|
-
}
|
|
3556
|
-
function validate_options(options2) {
|
|
3557
|
-
if (options2?.path === void 0) {
|
|
3558
|
-
throw new Error("You must specify a `path` when setting, deleting or serializing cookies");
|
|
3559
|
-
}
|
|
3560
|
-
}
|
|
3561
|
-
function get_cookies(request, url, trailing_slash) {
|
|
3562
|
-
const header = request.headers.get("cookie") ?? "";
|
|
3563
|
-
const initial_cookies = cookieExports.parse(header, { decode: (value) => value });
|
|
3564
|
-
const normalized_url = normalize_path(url.pathname, trailing_slash);
|
|
3565
|
-
const new_cookies = {};
|
|
3566
|
-
const defaults = {
|
|
3567
|
-
httpOnly: true,
|
|
3568
|
-
sameSite: "lax",
|
|
3569
|
-
secure: url.hostname === "localhost" && url.protocol === "http:" ? false : true
|
|
3570
|
-
};
|
|
3571
|
-
const cookies = {
|
|
3572
|
-
// The JSDoc param annotations appearing below for get, set and delete
|
|
3573
|
-
// are necessary to expose the `cookie` library types to
|
|
3574
|
-
// typescript users. `@type {import('@sveltejs/kit').Cookies}` above is not
|
|
3575
|
-
// sufficient to do so.
|
|
3576
|
-
/**
|
|
3577
|
-
* @param {string} name
|
|
3578
|
-
* @param {import('cookie').CookieParseOptions} opts
|
|
3579
|
-
*/
|
|
3580
|
-
get(name, opts) {
|
|
3581
|
-
const c = new_cookies[name];
|
|
3582
|
-
if (c && domain_matches(url.hostname, c.options.domain) && path_matches(url.pathname, c.options.path)) {
|
|
3583
|
-
return c.value;
|
|
3584
|
-
}
|
|
3585
|
-
const decoder = opts?.decode || decodeURIComponent;
|
|
3586
|
-
const req_cookies = cookieExports.parse(header, { decode: decoder });
|
|
3587
|
-
const cookie = req_cookies[name];
|
|
3588
|
-
return cookie;
|
|
3589
|
-
},
|
|
3590
|
-
/**
|
|
3591
|
-
* @param {import('cookie').CookieParseOptions} opts
|
|
3592
|
-
*/
|
|
3593
|
-
getAll(opts) {
|
|
3594
|
-
const decoder = opts?.decode || decodeURIComponent;
|
|
3595
|
-
const cookies2 = cookieExports.parse(header, { decode: decoder });
|
|
3596
|
-
for (const c of Object.values(new_cookies)) {
|
|
3597
|
-
if (domain_matches(url.hostname, c.options.domain) && path_matches(url.pathname, c.options.path)) {
|
|
3598
|
-
cookies2[c.name] = c.value;
|
|
3599
|
-
}
|
|
3600
|
-
}
|
|
3601
|
-
return Object.entries(cookies2).map(([name, value]) => ({ name, value }));
|
|
3602
|
-
},
|
|
3603
|
-
/**
|
|
3604
|
-
* @param {string} name
|
|
3605
|
-
* @param {string} value
|
|
3606
|
-
* @param {import('./page/types.js').Cookie['options']} options
|
|
3607
|
-
*/
|
|
3608
|
-
set(name, value, options2) {
|
|
3609
|
-
validate_options(options2);
|
|
3610
|
-
set_internal(name, value, { ...defaults, ...options2 });
|
|
3611
|
-
},
|
|
3612
|
-
/**
|
|
3613
|
-
* @param {string} name
|
|
3614
|
-
* @param {import('./page/types.js').Cookie['options']} options
|
|
3615
|
-
*/
|
|
3616
|
-
delete(name, options2) {
|
|
3617
|
-
validate_options(options2);
|
|
3618
|
-
cookies.set(name, "", { ...options2, maxAge: 0 });
|
|
3619
|
-
},
|
|
3620
|
-
/**
|
|
3621
|
-
* @param {string} name
|
|
3622
|
-
* @param {string} value
|
|
3623
|
-
* @param {import('./page/types.js').Cookie['options']} options
|
|
3624
|
-
*/
|
|
3625
|
-
serialize(name, value, options2) {
|
|
3626
|
-
validate_options(options2);
|
|
3627
|
-
let path = options2.path;
|
|
3628
|
-
if (!options2.domain || options2.domain === url.hostname) {
|
|
3629
|
-
path = resolve(normalized_url, path);
|
|
3630
|
-
}
|
|
3631
|
-
return cookieExports.serialize(name, value, { ...defaults, ...options2, path });
|
|
3632
|
-
}
|
|
3633
|
-
};
|
|
3634
|
-
function get_cookie_header(destination, header2) {
|
|
3635
|
-
const combined_cookies = {
|
|
3636
|
-
// cookies sent by the user agent have lowest precedence
|
|
3637
|
-
...initial_cookies
|
|
3638
|
-
};
|
|
3639
|
-
for (const key2 in new_cookies) {
|
|
3640
|
-
const cookie = new_cookies[key2];
|
|
3641
|
-
if (!domain_matches(destination.hostname, cookie.options.domain))
|
|
3642
|
-
continue;
|
|
3643
|
-
if (!path_matches(destination.pathname, cookie.options.path))
|
|
3644
|
-
continue;
|
|
3645
|
-
const encoder2 = cookie.options.encode || encodeURIComponent;
|
|
3646
|
-
combined_cookies[cookie.name] = encoder2(cookie.value);
|
|
3647
|
-
}
|
|
3648
|
-
if (header2) {
|
|
3649
|
-
const parsed = cookieExports.parse(header2, { decode: (value) => value });
|
|
3650
|
-
for (const name in parsed) {
|
|
3651
|
-
combined_cookies[name] = parsed[name];
|
|
3652
|
-
}
|
|
3653
|
-
}
|
|
3654
|
-
return Object.entries(combined_cookies).map(([name, value]) => `${name}=${value}`).join("; ");
|
|
3655
|
-
}
|
|
3656
|
-
function set_internal(name, value, options2) {
|
|
3657
|
-
let path = options2.path;
|
|
3658
|
-
if (!options2.domain || options2.domain === url.hostname) {
|
|
3659
|
-
path = resolve(normalized_url, path);
|
|
3660
|
-
}
|
|
3661
|
-
new_cookies[name] = { name, value, options: { ...options2, path } };
|
|
3662
|
-
}
|
|
3663
|
-
return { cookies, new_cookies, get_cookie_header, set_internal };
|
|
3664
|
-
}
|
|
3665
|
-
function domain_matches(hostname, constraint) {
|
|
3666
|
-
if (!constraint)
|
|
3667
|
-
return true;
|
|
3668
|
-
const normalized = constraint[0] === "." ? constraint.slice(1) : constraint;
|
|
3669
|
-
if (hostname === normalized)
|
|
3670
|
-
return true;
|
|
3671
|
-
return hostname.endsWith("." + normalized);
|
|
3672
|
-
}
|
|
3673
|
-
function path_matches(path, constraint) {
|
|
3674
|
-
if (!constraint)
|
|
3675
|
-
return true;
|
|
3676
|
-
const normalized = constraint.endsWith("/") ? constraint.slice(0, -1) : constraint;
|
|
3677
|
-
if (path === normalized)
|
|
3678
|
-
return true;
|
|
3679
|
-
return path.startsWith(normalized + "/");
|
|
3680
|
-
}
|
|
3681
|
-
function add_cookies_to_headers(headers2, cookies) {
|
|
3682
|
-
for (const new_cookie of cookies) {
|
|
3683
|
-
const { name, value, options: options2 } = new_cookie;
|
|
3684
|
-
headers2.append("set-cookie", cookieExports.serialize(name, value, options2));
|
|
3685
|
-
if (options2.path.endsWith(".html")) {
|
|
3686
|
-
const path = add_data_suffix(options2.path);
|
|
3687
|
-
headers2.append("set-cookie", cookieExports.serialize(name, value, { ...options2, path }));
|
|
3688
|
-
}
|
|
3689
|
-
}
|
|
3690
|
-
}
|
|
3691
|
-
function create_fetch({ event, options: options2, manifest, state, get_cookie_header, set_internal }) {
|
|
3692
|
-
const server_fetch = async (info, init2) => {
|
|
3693
|
-
const original_request = normalize_fetch_input(info, init2, event.url);
|
|
3694
|
-
let mode = (info instanceof Request ? info.mode : init2?.mode) ?? "cors";
|
|
3695
|
-
let credentials = (info instanceof Request ? info.credentials : init2?.credentials) ?? "same-origin";
|
|
3696
|
-
return options2.hooks.handleFetch({
|
|
3697
|
-
event,
|
|
3698
|
-
request: original_request,
|
|
3699
|
-
fetch: async (info2, init3) => {
|
|
3700
|
-
const request = normalize_fetch_input(info2, init3, event.url);
|
|
3701
|
-
const url = new URL(request.url);
|
|
3702
|
-
if (!request.headers.has("origin")) {
|
|
3703
|
-
request.headers.set("origin", event.url.origin);
|
|
3704
|
-
}
|
|
3705
|
-
if (info2 !== original_request) {
|
|
3706
|
-
mode = (info2 instanceof Request ? info2.mode : init3?.mode) ?? "cors";
|
|
3707
|
-
credentials = (info2 instanceof Request ? info2.credentials : init3?.credentials) ?? "same-origin";
|
|
3708
|
-
}
|
|
3709
|
-
if ((request.method === "GET" || request.method === "HEAD") && (mode === "no-cors" && url.origin !== event.url.origin || url.origin === event.url.origin)) {
|
|
3710
|
-
request.headers.delete("origin");
|
|
3711
|
-
}
|
|
3712
|
-
if (url.origin !== event.url.origin) {
|
|
3713
|
-
if (`.${url.hostname}`.endsWith(`.${event.url.hostname}`) && credentials !== "omit") {
|
|
3714
|
-
const cookie = get_cookie_header(url, request.headers.get("cookie"));
|
|
3715
|
-
if (cookie)
|
|
3716
|
-
request.headers.set("cookie", cookie);
|
|
3717
|
-
}
|
|
3718
|
-
return fetch(request);
|
|
3719
|
-
}
|
|
3720
|
-
const prefix = assets || base;
|
|
3721
|
-
const decoded = decodeURIComponent(url.pathname);
|
|
3722
|
-
const filename = (decoded.startsWith(prefix) ? decoded.slice(prefix.length) : decoded).slice(1);
|
|
3723
|
-
const filename_html = `${filename}/index.html`;
|
|
3724
|
-
const is_asset = manifest.assets.has(filename);
|
|
3725
|
-
const is_asset_html = manifest.assets.has(filename_html);
|
|
3726
|
-
if (is_asset || is_asset_html) {
|
|
3727
|
-
const file = is_asset ? filename : filename_html;
|
|
3728
|
-
if (state.read) {
|
|
3729
|
-
const type = is_asset ? manifest.mimeTypes[filename.slice(filename.lastIndexOf("."))] : "text/html";
|
|
3730
|
-
return new Response(state.read(file), {
|
|
3731
|
-
headers: type ? { "content-type": type } : {}
|
|
3732
|
-
});
|
|
3733
|
-
}
|
|
3734
|
-
return await fetch(request);
|
|
3735
|
-
}
|
|
3736
|
-
if (credentials !== "omit") {
|
|
3737
|
-
const cookie = get_cookie_header(url, request.headers.get("cookie"));
|
|
3738
|
-
if (cookie) {
|
|
3739
|
-
request.headers.set("cookie", cookie);
|
|
3740
|
-
}
|
|
3741
|
-
const authorization = event.request.headers.get("authorization");
|
|
3742
|
-
if (authorization && !request.headers.has("authorization")) {
|
|
3743
|
-
request.headers.set("authorization", authorization);
|
|
3744
|
-
}
|
|
3745
|
-
}
|
|
3746
|
-
if (!request.headers.has("accept")) {
|
|
3747
|
-
request.headers.set("accept", "*/*");
|
|
3748
|
-
}
|
|
3749
|
-
if (!request.headers.has("accept-language")) {
|
|
3750
|
-
request.headers.set(
|
|
3751
|
-
"accept-language",
|
|
3752
|
-
/** @type {string} */
|
|
3753
|
-
event.request.headers.get("accept-language")
|
|
3754
|
-
);
|
|
3755
|
-
}
|
|
3756
|
-
const response = await respond(request, options2, manifest, {
|
|
3757
|
-
...state,
|
|
3758
|
-
depth: state.depth + 1
|
|
3759
|
-
});
|
|
3760
|
-
const set_cookie = response.headers.get("set-cookie");
|
|
3761
|
-
if (set_cookie) {
|
|
3762
|
-
for (const str of setCookieExports.splitCookiesString(set_cookie)) {
|
|
3763
|
-
const { name, value, ...options3 } = setCookieExports.parseString(str);
|
|
3764
|
-
const path = options3.path ?? (url.pathname.split("/").slice(0, -1).join("/") || "/");
|
|
3765
|
-
set_internal(name, value, {
|
|
3766
|
-
path,
|
|
3767
|
-
.../** @type {import('cookie').CookieSerializeOptions} */
|
|
3768
|
-
options3
|
|
3769
|
-
});
|
|
3770
|
-
}
|
|
3771
|
-
}
|
|
3772
|
-
return response;
|
|
3773
|
-
}
|
|
3774
|
-
});
|
|
3775
|
-
};
|
|
3776
|
-
return (input, init2) => {
|
|
3777
|
-
const response = server_fetch(input, init2);
|
|
3778
|
-
response.catch(() => {
|
|
3779
|
-
});
|
|
3780
|
-
return response;
|
|
3781
|
-
};
|
|
3782
|
-
}
|
|
3783
|
-
function normalize_fetch_input(info, init2, url) {
|
|
3784
|
-
if (info instanceof Request) {
|
|
3785
|
-
return info;
|
|
3786
|
-
}
|
|
3787
|
-
return new Request(typeof info === "string" ? new URL(info, url) : info, init2);
|
|
3788
|
-
}
|
|
3789
|
-
let body;
|
|
3790
|
-
let etag;
|
|
3791
|
-
let headers;
|
|
3792
|
-
function get_public_env(request) {
|
|
3793
|
-
body ??= `export const env=${JSON.stringify(public_env)}`;
|
|
3794
|
-
etag ??= `W/${Date.now()}`;
|
|
3795
|
-
headers ??= new Headers({
|
|
3796
|
-
"content-type": "application/javascript; charset=utf-8",
|
|
3797
|
-
etag
|
|
3798
|
-
});
|
|
3799
|
-
if (request.headers.get("if-none-match") === etag) {
|
|
3800
|
-
return new Response(void 0, { status: 304, headers });
|
|
3801
|
-
}
|
|
3802
|
-
return new Response(body, { headers });
|
|
3803
|
-
}
|
|
3804
|
-
function get_page_config(nodes) {
|
|
3805
|
-
let current = {};
|
|
3806
|
-
for (const node of nodes) {
|
|
3807
|
-
if (!node?.universal?.config && !node?.server?.config)
|
|
3808
|
-
continue;
|
|
3809
|
-
current = {
|
|
3810
|
-
...current,
|
|
3811
|
-
...node?.universal?.config,
|
|
3812
|
-
...node?.server?.config
|
|
3813
|
-
};
|
|
3814
|
-
}
|
|
3815
|
-
return Object.keys(current).length ? current : void 0;
|
|
3816
|
-
}
|
|
3817
|
-
const default_transform = ({ html }) => html;
|
|
3818
|
-
const default_filter = () => false;
|
|
3819
|
-
const default_preload = ({ type }) => type === "js" || type === "css";
|
|
3820
|
-
const page_methods = /* @__PURE__ */ new Set(["GET", "HEAD", "POST"]);
|
|
3821
|
-
const allowed_page_methods = /* @__PURE__ */ new Set(["GET", "HEAD", "OPTIONS"]);
|
|
3822
|
-
async function respond(request, options2, manifest, state) {
|
|
3823
|
-
const url = new URL(request.url);
|
|
3824
|
-
if (options2.csrf_check_origin) {
|
|
3825
|
-
const forbidden = is_form_content_type(request) && (request.method === "POST" || request.method === "PUT" || request.method === "PATCH" || request.method === "DELETE") && request.headers.get("origin") !== url.origin;
|
|
3826
|
-
if (forbidden) {
|
|
3827
|
-
const csrf_error = new HttpError(
|
|
3828
|
-
403,
|
|
3829
|
-
`Cross-site ${request.method} form submissions are forbidden`
|
|
3830
|
-
);
|
|
3831
|
-
if (request.headers.get("accept") === "application/json") {
|
|
3832
|
-
return json(csrf_error.body, { status: csrf_error.status });
|
|
3833
|
-
}
|
|
3834
|
-
return text(csrf_error.body.message, { status: csrf_error.status });
|
|
3835
|
-
}
|
|
3836
|
-
}
|
|
3837
|
-
let rerouted_path;
|
|
3838
|
-
try {
|
|
3839
|
-
rerouted_path = options2.hooks.reroute({ url: new URL(url) }) ?? url.pathname;
|
|
3840
|
-
} catch (e) {
|
|
3841
|
-
return text("Internal Server Error", {
|
|
3842
|
-
status: 500
|
|
3843
|
-
});
|
|
3844
|
-
}
|
|
3845
|
-
let decoded;
|
|
3846
|
-
try {
|
|
3847
|
-
decoded = decode_pathname(rerouted_path);
|
|
3848
|
-
} catch {
|
|
3849
|
-
return text("Malformed URI", { status: 400 });
|
|
3850
|
-
}
|
|
3851
|
-
let route = null;
|
|
3852
|
-
let params = {};
|
|
3853
|
-
if (base && !state.prerendering?.fallback) {
|
|
3854
|
-
if (!decoded.startsWith(base)) {
|
|
3855
|
-
return text("Not found", { status: 404 });
|
|
3856
|
-
}
|
|
3857
|
-
decoded = decoded.slice(base.length) || "/";
|
|
3858
|
-
}
|
|
3859
|
-
if (decoded === `/${options2.app_dir}/env.js`) {
|
|
3860
|
-
return get_public_env(request);
|
|
3861
|
-
}
|
|
3862
|
-
if (decoded.startsWith(`/${options2.app_dir}`)) {
|
|
3863
|
-
return text("Not found", { status: 404 });
|
|
3864
|
-
}
|
|
3865
|
-
const is_data_request = has_data_suffix(decoded);
|
|
3866
|
-
let invalidated_data_nodes;
|
|
3867
|
-
if (is_data_request) {
|
|
3868
|
-
decoded = strip_data_suffix(decoded) || "/";
|
|
3869
|
-
url.pathname = strip_data_suffix(url.pathname) + (url.searchParams.get(TRAILING_SLASH_PARAM) === "1" ? "/" : "") || "/";
|
|
3870
|
-
url.searchParams.delete(TRAILING_SLASH_PARAM);
|
|
3871
|
-
invalidated_data_nodes = url.searchParams.get(INVALIDATED_PARAM)?.split("").map((node) => node === "1");
|
|
3872
|
-
url.searchParams.delete(INVALIDATED_PARAM);
|
|
3873
|
-
}
|
|
3874
|
-
if (!state.prerendering?.fallback) {
|
|
3875
|
-
const matchers = await manifest._.matchers();
|
|
3876
|
-
for (const candidate of manifest._.routes) {
|
|
3877
|
-
const match = candidate.pattern.exec(decoded);
|
|
3878
|
-
if (!match)
|
|
3879
|
-
continue;
|
|
3880
|
-
const matched = exec(match, candidate.params, matchers);
|
|
3881
|
-
if (matched) {
|
|
3882
|
-
route = candidate;
|
|
3883
|
-
params = decode_params(matched);
|
|
3884
|
-
break;
|
|
3885
|
-
}
|
|
3886
|
-
}
|
|
3887
|
-
}
|
|
3888
|
-
let trailing_slash = void 0;
|
|
3889
|
-
const headers2 = {};
|
|
3890
|
-
let cookies_to_add = {};
|
|
3891
|
-
const event = {
|
|
3892
|
-
// @ts-expect-error `cookies` and `fetch` need to be created after the `event` itself
|
|
3893
|
-
cookies: null,
|
|
3894
|
-
// @ts-expect-error
|
|
3895
|
-
fetch: null,
|
|
3896
|
-
getClientAddress: state.getClientAddress || (() => {
|
|
3897
|
-
throw new Error(
|
|
3898
|
-
`${"@sveltejs/adapter-node"} does not specify getClientAddress. Please raise an issue`
|
|
3899
|
-
);
|
|
3900
|
-
}),
|
|
3901
|
-
locals: {},
|
|
3902
|
-
params,
|
|
3903
|
-
platform: state.platform,
|
|
3904
|
-
request,
|
|
3905
|
-
route: { id: route?.id ?? null },
|
|
3906
|
-
setHeaders: (new_headers) => {
|
|
3907
|
-
for (const key2 in new_headers) {
|
|
3908
|
-
const lower = key2.toLowerCase();
|
|
3909
|
-
const value = new_headers[key2];
|
|
3910
|
-
if (lower === "set-cookie") {
|
|
3911
|
-
throw new Error(
|
|
3912
|
-
"Use `event.cookies.set(name, value, options)` instead of `event.setHeaders` to set cookies"
|
|
3913
|
-
);
|
|
3914
|
-
} else if (lower in headers2) {
|
|
3915
|
-
throw new Error(`"${key2}" header is already set`);
|
|
3916
|
-
} else {
|
|
3917
|
-
headers2[lower] = value;
|
|
3918
|
-
if (state.prerendering && lower === "cache-control") {
|
|
3919
|
-
state.prerendering.cache = /** @type {string} */
|
|
3920
|
-
value;
|
|
3921
|
-
}
|
|
3922
|
-
}
|
|
3923
|
-
}
|
|
3924
|
-
},
|
|
3925
|
-
url,
|
|
3926
|
-
isDataRequest: is_data_request,
|
|
3927
|
-
isSubRequest: state.depth > 0
|
|
3928
|
-
};
|
|
3929
|
-
let resolve_opts = {
|
|
3930
|
-
transformPageChunk: default_transform,
|
|
3931
|
-
filterSerializedResponseHeaders: default_filter,
|
|
3932
|
-
preload: default_preload
|
|
3933
|
-
};
|
|
3934
|
-
try {
|
|
3935
|
-
if (route) {
|
|
3936
|
-
if (url.pathname === base || url.pathname === base + "/") {
|
|
3937
|
-
trailing_slash = "always";
|
|
3938
|
-
} else if (route.page) {
|
|
3939
|
-
const nodes = await load_page_nodes(route.page, manifest);
|
|
3940
|
-
if (DEV)
|
|
3941
|
-
;
|
|
3942
|
-
trailing_slash = get_option(nodes, "trailingSlash");
|
|
3943
|
-
} else if (route.endpoint) {
|
|
3944
|
-
const node = await route.endpoint();
|
|
3945
|
-
trailing_slash = node.trailingSlash;
|
|
3946
|
-
if (DEV)
|
|
3947
|
-
;
|
|
3948
|
-
}
|
|
3949
|
-
if (!is_data_request) {
|
|
3950
|
-
const normalized = normalize_path(url.pathname, trailing_slash ?? "never");
|
|
3951
|
-
if (normalized !== url.pathname && !state.prerendering?.fallback) {
|
|
3952
|
-
return new Response(void 0, {
|
|
3953
|
-
status: 308,
|
|
3954
|
-
headers: {
|
|
3955
|
-
"x-sveltekit-normalize": "1",
|
|
3956
|
-
location: (
|
|
3957
|
-
// ensure paths starting with '//' are not treated as protocol-relative
|
|
3958
|
-
(normalized.startsWith("//") ? url.origin + normalized : normalized) + (url.search === "?" ? "" : url.search)
|
|
3959
|
-
)
|
|
3960
|
-
}
|
|
3961
|
-
});
|
|
3962
|
-
}
|
|
3963
|
-
}
|
|
3964
|
-
if (state.before_handle || state.emulator?.platform) {
|
|
3965
|
-
let config = {};
|
|
3966
|
-
let prerender = false;
|
|
3967
|
-
if (route.endpoint) {
|
|
3968
|
-
const node = await route.endpoint();
|
|
3969
|
-
config = node.config ?? config;
|
|
3970
|
-
prerender = node.prerender ?? prerender;
|
|
3971
|
-
} else if (route.page) {
|
|
3972
|
-
const nodes = await load_page_nodes(route.page, manifest);
|
|
3973
|
-
config = get_page_config(nodes) ?? config;
|
|
3974
|
-
prerender = get_option(nodes, "prerender") ?? false;
|
|
3975
|
-
}
|
|
3976
|
-
if (state.before_handle) {
|
|
3977
|
-
state.before_handle(event, config, prerender);
|
|
3978
|
-
}
|
|
3979
|
-
if (state.emulator?.platform) {
|
|
3980
|
-
event.platform = await state.emulator.platform({ config, prerender });
|
|
3981
|
-
}
|
|
3982
|
-
}
|
|
3983
|
-
}
|
|
3984
|
-
const { cookies, new_cookies, get_cookie_header, set_internal } = get_cookies(
|
|
3985
|
-
request,
|
|
3986
|
-
url,
|
|
3987
|
-
trailing_slash ?? "never"
|
|
3988
|
-
);
|
|
3989
|
-
cookies_to_add = new_cookies;
|
|
3990
|
-
event.cookies = cookies;
|
|
3991
|
-
event.fetch = create_fetch({
|
|
3992
|
-
event,
|
|
3993
|
-
options: options2,
|
|
3994
|
-
manifest,
|
|
3995
|
-
state,
|
|
3996
|
-
get_cookie_header,
|
|
3997
|
-
set_internal
|
|
3998
|
-
});
|
|
3999
|
-
if (state.prerendering && !state.prerendering.fallback)
|
|
4000
|
-
disable_search(url);
|
|
4001
|
-
const response = await options2.hooks.handle({
|
|
4002
|
-
event,
|
|
4003
|
-
resolve: (event2, opts) => resolve2(event2, opts).then((response2) => {
|
|
4004
|
-
for (const key2 in headers2) {
|
|
4005
|
-
const value = headers2[key2];
|
|
4006
|
-
response2.headers.set(
|
|
4007
|
-
key2,
|
|
4008
|
-
/** @type {string} */
|
|
4009
|
-
value
|
|
4010
|
-
);
|
|
4011
|
-
}
|
|
4012
|
-
add_cookies_to_headers(response2.headers, Object.values(cookies_to_add));
|
|
4013
|
-
if (state.prerendering && event2.route.id !== null) {
|
|
4014
|
-
response2.headers.set("x-sveltekit-routeid", encodeURI(event2.route.id));
|
|
4015
|
-
}
|
|
4016
|
-
return response2;
|
|
4017
|
-
})
|
|
4018
|
-
});
|
|
4019
|
-
if (response.status === 200 && response.headers.has("etag")) {
|
|
4020
|
-
let if_none_match_value = request.headers.get("if-none-match");
|
|
4021
|
-
if (if_none_match_value?.startsWith('W/"')) {
|
|
4022
|
-
if_none_match_value = if_none_match_value.substring(2);
|
|
4023
|
-
}
|
|
4024
|
-
const etag2 = (
|
|
4025
|
-
/** @type {string} */
|
|
4026
|
-
response.headers.get("etag")
|
|
4027
|
-
);
|
|
4028
|
-
if (if_none_match_value === etag2) {
|
|
4029
|
-
const headers22 = new Headers({ etag: etag2 });
|
|
4030
|
-
for (const key2 of [
|
|
4031
|
-
"cache-control",
|
|
4032
|
-
"content-location",
|
|
4033
|
-
"date",
|
|
4034
|
-
"expires",
|
|
4035
|
-
"vary",
|
|
4036
|
-
"set-cookie"
|
|
4037
|
-
]) {
|
|
4038
|
-
const value = response.headers.get(key2);
|
|
4039
|
-
if (value)
|
|
4040
|
-
headers22.set(key2, value);
|
|
4041
|
-
}
|
|
4042
|
-
return new Response(void 0, {
|
|
4043
|
-
status: 304,
|
|
4044
|
-
headers: headers22
|
|
4045
|
-
});
|
|
4046
|
-
}
|
|
4047
|
-
}
|
|
4048
|
-
if (is_data_request && response.status >= 300 && response.status <= 308) {
|
|
4049
|
-
const location = response.headers.get("location");
|
|
4050
|
-
if (location) {
|
|
4051
|
-
return redirect_json_response(new Redirect(
|
|
4052
|
-
/** @type {any} */
|
|
4053
|
-
response.status,
|
|
4054
|
-
location
|
|
4055
|
-
));
|
|
4056
|
-
}
|
|
4057
|
-
}
|
|
4058
|
-
return response;
|
|
4059
|
-
} catch (e) {
|
|
4060
|
-
if (e instanceof Redirect) {
|
|
4061
|
-
const response = is_data_request ? redirect_json_response(e) : route?.page && is_action_json_request(event) ? action_json_redirect(e) : redirect_response(e.status, e.location);
|
|
4062
|
-
add_cookies_to_headers(response.headers, Object.values(cookies_to_add));
|
|
4063
|
-
return response;
|
|
4064
|
-
}
|
|
4065
|
-
return await handle_fatal_error(event, options2, e);
|
|
4066
|
-
}
|
|
4067
|
-
async function resolve2(event2, opts) {
|
|
4068
|
-
try {
|
|
4069
|
-
if (opts) {
|
|
4070
|
-
resolve_opts = {
|
|
4071
|
-
transformPageChunk: opts.transformPageChunk || default_transform,
|
|
4072
|
-
filterSerializedResponseHeaders: opts.filterSerializedResponseHeaders || default_filter,
|
|
4073
|
-
preload: opts.preload || default_preload
|
|
4074
|
-
};
|
|
4075
|
-
}
|
|
4076
|
-
if (state.prerendering?.fallback) {
|
|
4077
|
-
return await render_response({
|
|
4078
|
-
event: event2,
|
|
4079
|
-
options: options2,
|
|
4080
|
-
manifest,
|
|
4081
|
-
state,
|
|
4082
|
-
page_config: { ssr: false, csr: true },
|
|
4083
|
-
status: 200,
|
|
4084
|
-
error: null,
|
|
4085
|
-
branch: [],
|
|
4086
|
-
fetched: [],
|
|
4087
|
-
resolve_opts
|
|
4088
|
-
});
|
|
4089
|
-
}
|
|
4090
|
-
if (route) {
|
|
4091
|
-
const method = (
|
|
4092
|
-
/** @type {import('types').HttpMethod} */
|
|
4093
|
-
event2.request.method
|
|
4094
|
-
);
|
|
4095
|
-
let response;
|
|
4096
|
-
if (is_data_request) {
|
|
4097
|
-
response = await render_data(
|
|
4098
|
-
event2,
|
|
4099
|
-
route,
|
|
4100
|
-
options2,
|
|
4101
|
-
manifest,
|
|
4102
|
-
state,
|
|
4103
|
-
invalidated_data_nodes,
|
|
4104
|
-
trailing_slash ?? "never"
|
|
4105
|
-
);
|
|
4106
|
-
} else if (route.endpoint && (!route.page || is_endpoint_request(event2))) {
|
|
4107
|
-
response = await render_endpoint(event2, await route.endpoint(), state);
|
|
4108
|
-
} else if (route.page) {
|
|
4109
|
-
if (page_methods.has(method)) {
|
|
4110
|
-
response = await render_page(event2, route.page, options2, manifest, state, resolve_opts);
|
|
4111
|
-
} else {
|
|
4112
|
-
const allowed_methods2 = new Set(allowed_page_methods);
|
|
4113
|
-
const node = await manifest._.nodes[route.page.leaf]();
|
|
4114
|
-
if (node?.server?.actions) {
|
|
4115
|
-
allowed_methods2.add("POST");
|
|
4116
|
-
}
|
|
4117
|
-
if (method === "OPTIONS") {
|
|
4118
|
-
response = new Response(null, {
|
|
4119
|
-
status: 204,
|
|
4120
|
-
headers: {
|
|
4121
|
-
allow: Array.from(allowed_methods2.values()).join(", ")
|
|
4122
|
-
}
|
|
4123
|
-
});
|
|
4124
|
-
} else {
|
|
4125
|
-
const mod = [...allowed_methods2].reduce(
|
|
4126
|
-
(acc, curr) => {
|
|
4127
|
-
acc[curr] = true;
|
|
4128
|
-
return acc;
|
|
4129
|
-
},
|
|
4130
|
-
/** @type {Record<string, any>} */
|
|
4131
|
-
{}
|
|
4132
|
-
);
|
|
4133
|
-
response = method_not_allowed(mod, method);
|
|
4134
|
-
}
|
|
4135
|
-
}
|
|
4136
|
-
} else {
|
|
4137
|
-
throw new Error("This should never happen");
|
|
4138
|
-
}
|
|
4139
|
-
if (request.method === "GET" && route.page && route.endpoint) {
|
|
4140
|
-
const vary = response.headers.get("vary")?.split(",")?.map((v) => v.trim().toLowerCase());
|
|
4141
|
-
if (!(vary?.includes("accept") || vary?.includes("*"))) {
|
|
4142
|
-
response = new Response(response.body, {
|
|
4143
|
-
status: response.status,
|
|
4144
|
-
statusText: response.statusText,
|
|
4145
|
-
headers: new Headers(response.headers)
|
|
4146
|
-
});
|
|
4147
|
-
response.headers.append("Vary", "Accept");
|
|
4148
|
-
}
|
|
4149
|
-
}
|
|
4150
|
-
return response;
|
|
4151
|
-
}
|
|
4152
|
-
if (state.error && event2.isSubRequest) {
|
|
4153
|
-
return await fetch(request, {
|
|
4154
|
-
headers: {
|
|
4155
|
-
"x-sveltekit-error": "true"
|
|
4156
|
-
}
|
|
4157
|
-
});
|
|
4158
|
-
}
|
|
4159
|
-
if (state.error) {
|
|
4160
|
-
return text("Internal Server Error", {
|
|
4161
|
-
status: 500
|
|
4162
|
-
});
|
|
4163
|
-
}
|
|
4164
|
-
if (state.depth === 0) {
|
|
4165
|
-
return await respond_with_error({
|
|
4166
|
-
event: event2,
|
|
4167
|
-
options: options2,
|
|
4168
|
-
manifest,
|
|
4169
|
-
state,
|
|
4170
|
-
status: 404,
|
|
4171
|
-
error: new SvelteKitError(404, "Not Found", `Not found: ${event2.url.pathname}`),
|
|
4172
|
-
resolve_opts
|
|
4173
|
-
});
|
|
4174
|
-
}
|
|
4175
|
-
if (state.prerendering) {
|
|
4176
|
-
return text("not found", { status: 404 });
|
|
4177
|
-
}
|
|
4178
|
-
return await fetch(request);
|
|
4179
|
-
} catch (e) {
|
|
4180
|
-
return await handle_fatal_error(event2, options2, e);
|
|
4181
|
-
} finally {
|
|
4182
|
-
event2.cookies.set = () => {
|
|
4183
|
-
throw new Error("Cannot use `cookies.set(...)` after the response has been generated");
|
|
4184
|
-
};
|
|
4185
|
-
event2.setHeaders = () => {
|
|
4186
|
-
throw new Error("Cannot use `setHeaders(...)` after the response has been generated");
|
|
4187
|
-
};
|
|
4188
|
-
}
|
|
4189
|
-
}
|
|
4190
|
-
}
|
|
4191
|
-
function filter_private_env(env, { public_prefix, private_prefix }) {
|
|
4192
|
-
return Object.fromEntries(
|
|
4193
|
-
Object.entries(env).filter(
|
|
4194
|
-
([k]) => k.startsWith(private_prefix) && (public_prefix === "" || !k.startsWith(public_prefix))
|
|
4195
|
-
)
|
|
4196
|
-
);
|
|
4197
|
-
}
|
|
4198
|
-
function filter_public_env(env, { public_prefix, private_prefix }) {
|
|
4199
|
-
return Object.fromEntries(
|
|
4200
|
-
Object.entries(env).filter(
|
|
4201
|
-
([k]) => k.startsWith(public_prefix) && (private_prefix === "" || !k.startsWith(private_prefix))
|
|
4202
|
-
)
|
|
4203
|
-
);
|
|
4204
|
-
}
|
|
4205
|
-
class Server {
|
|
4206
|
-
/** @type {import('types').SSROptions} */
|
|
4207
|
-
#options;
|
|
4208
|
-
/** @type {import('@sveltejs/kit').SSRManifest} */
|
|
4209
|
-
#manifest;
|
|
4210
|
-
/** @param {import('@sveltejs/kit').SSRManifest} manifest */
|
|
4211
|
-
constructor(manifest) {
|
|
4212
|
-
this.#options = options;
|
|
4213
|
-
this.#manifest = manifest;
|
|
4214
|
-
}
|
|
4215
|
-
/**
|
|
4216
|
-
* @param {{
|
|
4217
|
-
* env: Record<string, string>;
|
|
4218
|
-
* read?: (file: string) => ReadableStream;
|
|
4219
|
-
* }} opts
|
|
4220
|
-
*/
|
|
4221
|
-
async init({ env, read }) {
|
|
4222
|
-
const prefixes = {
|
|
4223
|
-
public_prefix: this.#options.env_public_prefix,
|
|
4224
|
-
private_prefix: this.#options.env_private_prefix
|
|
4225
|
-
};
|
|
4226
|
-
filter_private_env(env, prefixes);
|
|
4227
|
-
const public_env2 = filter_public_env(env, prefixes);
|
|
4228
|
-
set_public_env(
|
|
4229
|
-
public_env2
|
|
4230
|
-
);
|
|
4231
|
-
set_safe_public_env(public_env2);
|
|
4232
|
-
if (!this.#options.hooks) {
|
|
4233
|
-
try {
|
|
4234
|
-
const module = await get_hooks();
|
|
4235
|
-
this.#options.hooks = {
|
|
4236
|
-
handle: module.handle || (({ event, resolve: resolve2 }) => resolve2(event)),
|
|
4237
|
-
handleError: module.handleError || (({ error }) => console.error(error)),
|
|
4238
|
-
handleFetch: module.handleFetch || (({ request, fetch: fetch2 }) => fetch2(request)),
|
|
4239
|
-
reroute: module.reroute || (() => {
|
|
4240
|
-
})
|
|
4241
|
-
};
|
|
4242
|
-
} catch (error) {
|
|
4243
|
-
{
|
|
4244
|
-
throw error;
|
|
4245
|
-
}
|
|
4246
|
-
}
|
|
4247
|
-
}
|
|
4248
|
-
}
|
|
4249
|
-
/**
|
|
4250
|
-
* @param {Request} request
|
|
4251
|
-
* @param {import('types').RequestOptions} options
|
|
4252
|
-
*/
|
|
4253
|
-
async respond(request, options2) {
|
|
4254
|
-
return respond(request, this.#options, this.#manifest, {
|
|
4255
|
-
...options2,
|
|
4256
|
-
error: false,
|
|
4257
|
-
depth: 0
|
|
4258
|
-
});
|
|
4259
|
-
}
|
|
4260
|
-
}
|
|
4261
|
-
|
|
4262
|
-
export { Server };
|
|
4263
|
-
//# sourceMappingURL=index.js.map
|