@builder.io/sdk-vue 0.4.5 → 0.5.1
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/package.json +1 -1
- package/packages/_vue2/dist/block-styles.1cc420e2.js +77 -0
- package/packages/_vue2/dist/block-styles.2b3d669b.cjs +1 -0
- package/packages/_vue2/dist/block-wrapper.563cc17f.cjs +1 -0
- package/packages/_vue2/dist/block-wrapper.ea9a7e90.js +66 -0
- package/packages/_vue2/dist/block.0f28da5b.cjs +3 -0
- package/packages/_vue2/dist/block.7a80ed18.js +178 -0
- package/packages/_vue2/dist/blocks-wrapper.9aacce51.js +72 -0
- package/packages/_vue2/dist/blocks-wrapper.c53a5f23.cjs +1 -0
- package/packages/_vue2/dist/component-ref.a631e3d7.cjs +1 -0
- package/packages/_vue2/dist/component-ref.af9c1a83.js +98 -0
- package/packages/_vue2/dist/content.2c7fa09f.cjs +1 -0
- package/packages/_vue2/dist/content.cb96a18a.js +913 -0
- package/packages/_vue2/dist/css.22755cda.js +21 -0
- package/packages/_vue2/dist/css.30299cfb.cjs +6 -0
- package/packages/_vue2/dist/enable-editor.852e9797.js +427 -0
- package/packages/_vue2/dist/enable-editor.c1b99af3.cjs +1 -0
- package/packages/_vue2/dist/evaluate.80a7f105.cjs +31 -0
- package/packages/_vue2/dist/evaluate.ce05cec9.js +4970 -0
- package/packages/_vue2/dist/get-block-actions.93f4e72e.cjs +1 -0
- package/packages/_vue2/dist/get-block-actions.c73f00d1.js +36 -0
- package/packages/_vue2/dist/get-block-properties.15a37ec1.js +48 -0
- package/packages/_vue2/dist/get-block-properties.d0235e56.cjs +1 -0
- package/packages/_vue2/dist/get-processed-block.d59ca820.js +52 -0
- package/packages/_vue2/dist/get-processed-block.d8938868.cjs +1 -0
- package/packages/_vue2/dist/index.1021dd83.cjs +32 -0
- package/packages/_vue2/dist/{index.dcd9672f.js → index.ed62d736.js} +565 -575
- package/packages/_vue2/dist/inlined-script.3e3c93e8.cjs +1 -0
- package/packages/_vue2/dist/{inlined-script.5b4b5fc3.js → inlined-script.cf733bda.js} +1 -1
- package/packages/_vue2/dist/{inlined-styles.759d26e8.js → inlined-styles.2709172e.js} +1 -1
- package/packages/_vue2/dist/{inlined-styles.9ddda3d7.cjs → inlined-styles.cf1e15e1.cjs} +1 -1
- package/packages/_vue2/dist/interactive-element.d51dde5a.js +42 -0
- package/packages/_vue2/dist/interactive-element.ea2a7d23.cjs +1 -0
- package/packages/_vue2/dist/repeated-block.9a46bc14.js +38 -0
- package/packages/_vue2/dist/repeated-block.a299d789.cjs +1 -0
- package/packages/_vue2/dist/sdk.cjs +1 -1
- package/packages/_vue2/dist/sdk.js +10 -10
- package/packages/_vue2/dist/src/blocks/button/button.vue.d.ts +9 -18
- package/packages/_vue2/dist/src/blocks/button/component-info.d.ts +1 -1
- package/packages/_vue2/dist/src/blocks/columns/columns.vue.d.ts +7 -6
- package/packages/_vue2/dist/src/blocks/columns/component-info.d.ts +1 -1
- package/packages/_vue2/dist/src/blocks/custom-code/component-info.d.ts +1 -1
- package/packages/_vue2/dist/src/blocks/embed/component-info.d.ts +1 -1
- package/packages/_vue2/dist/src/blocks/embed/embed.vue.d.ts +1 -1
- package/packages/_vue2/dist/src/blocks/fragment/component-info.d.ts +1 -1
- package/packages/_vue2/dist/src/blocks/helpers.d.ts +13 -0
- package/packages/_vue2/dist/src/blocks/image/component-info.d.ts +1 -1
- package/packages/_vue2/dist/src/blocks/image/image.vue.d.ts +6 -6
- package/packages/_vue2/dist/src/blocks/img/component-info.d.ts +1 -1
- package/packages/_vue2/dist/src/blocks/img/img.vue.d.ts +27 -6
- package/packages/_vue2/dist/src/blocks/section/component-info.d.ts +1 -1
- package/packages/_vue2/dist/src/blocks/section/section.vue.d.ts +9 -6
- package/packages/_vue2/dist/src/blocks/symbol/component-info.d.ts +1 -1
- package/packages/_vue2/dist/src/blocks/symbol/symbol.helpers.d.ts +14 -0
- package/packages/_vue2/dist/src/blocks/symbol/symbol.vue.d.ts +11 -7
- package/packages/_vue2/dist/src/blocks/text/component-info.d.ts +1 -1
- package/packages/_vue2/dist/src/blocks/video/component-info.d.ts +1 -1
- package/packages/_vue2/dist/src/blocks/video/video.vue.d.ts +7 -3
- package/packages/_vue2/dist/src/components/block/block.helpers.d.ts +13 -0
- package/packages/{_vue3/dist/src/components/render-block/render-block.vue.d.ts → _vue2/dist/src/components/block/block.vue.d.ts} +3 -2
- package/packages/_vue2/dist/src/components/{render-block → block/components}/block-styles.vue.d.ts +4 -4
- package/packages/_vue2/dist/src/components/block/components/block-wrapper.vue.d.ts +29 -0
- package/packages/_vue2/dist/src/components/block/components/component-ref/component-ref.helpers.d.ts +30 -0
- package/packages/_vue2/dist/src/components/block/components/component-ref/component-ref.vue.d.ts +2 -0
- package/packages/_vue2/dist/src/components/block/components/interactive-element.vue.d.ts +30 -0
- package/packages/_vue2/dist/src/components/block/components/repeated-block.vue.d.ts +16 -0
- package/packages/_vue2/dist/src/components/{render-blocks.vue.d.ts → blocks/blocks-wrapper.vue.d.ts} +6 -6
- package/packages/_vue2/dist/src/components/blocks/blocks.vue.d.ts +29 -0
- package/packages/_vue2/dist/src/components/{render-content/render-content.vue.d.ts → content/components/enable-editor.vue.d.ts} +12 -34
- package/packages/{_vue3/dist/src/components/render-content/components/render-styles.helpers.d.ts → _vue2/dist/src/components/content/components/styles.helpers.d.ts} +1 -1
- package/packages/_vue2/dist/src/components/{render-content/components/render-styles.vue.d.ts → content/components/styles.vue.d.ts} +1 -1
- package/packages/_vue2/dist/src/components/content/content.helpers.d.ts +7 -0
- package/packages/{_vue3/dist/src/components/render-content/render-content.types.d.ts → _vue2/dist/src/components/content/content.types.d.ts} +4 -4
- package/packages/_vue2/dist/src/components/content/content.vue.d.ts +26 -0
- package/packages/_vue2/dist/src/components/{render-content-variants/render-content-variants.types.d.ts → content-variants/content-variants.types.d.ts} +5 -5
- package/packages/_vue2/dist/src/components/{render-content-variants/render-content-variants.vue.d.ts → content-variants/content-variants.vue.d.ts} +9 -8
- package/packages/_vue2/dist/src/components/{render-content-variants → content-variants}/helpers.d.ts +4 -4
- package/packages/_vue2/dist/src/constants/sdk-version.d.ts +1 -1
- package/packages/_vue2/dist/src/constants/target.d.ts +1 -1
- package/packages/_vue2/dist/src/context/builder.context.d.ts +1 -1
- package/packages/_vue2/dist/src/context/components.context.d.ts +7 -0
- package/packages/_vue2/dist/src/context/types.d.ts +1 -1
- package/packages/_vue2/dist/src/functions/{evaluate.d.ts → evaluate/evaluate.d.ts} +5 -2
- package/packages/_vue2/dist/src/functions/evaluate/index.d.ts +1 -0
- package/packages/_vue2/dist/src/functions/evaluate/interpreter.d.ts +2 -0
- package/packages/_vue2/dist/src/functions/evaluate/non-node-runtime.d.ts +2 -0
- package/packages/_vue2/dist/src/functions/evaluate/types.d.ts +10 -0
- package/packages/_vue2/dist/src/functions/get-block-actions.d.ts +1 -0
- package/packages/_vue2/dist/src/functions/get-block-properties.d.ts +5 -1
- package/packages/_vue2/dist/src/functions/get-content/index.d.ts +2 -6
- package/packages/_vue2/dist/src/functions/get-processed-block.d.ts +1 -1
- package/packages/_vue2/dist/src/functions/get-react-native-block-styles.d.ts +1 -1
- package/packages/_vue2/dist/src/functions/is-non-node-server.d.ts +4 -0
- package/packages/_vue2/dist/src/functions/register-component.d.ts +2 -1
- package/packages/_vue2/dist/src/helpers/ab-tests.d.ts +2 -2
- package/packages/_vue2/dist/src/helpers/cookie.d.ts +2 -2
- package/packages/_vue2/dist/src/helpers/css.d.ts +1 -1
- package/packages/_vue2/dist/src/helpers/localStorage.d.ts +2 -2
- package/packages/_vue2/dist/src/helpers/preview-lru-cache/get.d.ts +1 -0
- package/packages/_vue2/dist/src/helpers/preview-lru-cache/helpers.d.ts +1 -0
- package/packages/_vue2/dist/src/helpers/preview-lru-cache/init.d.ts +6 -0
- package/packages/_vue2/dist/src/helpers/preview-lru-cache/set.d.ts +7 -0
- package/packages/_vue2/dist/src/helpers/preview-lru-cache/types.d.ts +12 -0
- package/packages/_vue2/dist/src/helpers/sessionId.d.ts +2 -2
- package/packages/_vue2/dist/src/helpers/visitorId.d.ts +1 -1
- package/packages/_vue2/dist/src/index-helpers/blocks-exports.d.ts +2 -2
- package/packages/_vue2/dist/src/index.d.ts +2 -2
- package/packages/_vue2/dist/src/types/builder-props.d.ts +9 -0
- package/packages/_vue2/dist/src/types/components.d.ts +8 -2
- package/packages/_vue2/dist/src/types/enforced-partials.d.ts +1 -1
- package/packages/_vue2/dist/src/types/targets.d.ts +1 -3
- package/packages/_vue2/dist/src/types/typescript.d.ts +3 -0
- package/packages/_vue2/dist/style.css +1 -1
- package/packages/_vue2/dist/{render-styles.b41f1309.js → styles.40b9604d.js} +7 -5
- package/packages/_vue2/dist/{render-styles.ba0e223a.cjs → styles.f4f6200a.cjs} +4 -4
- package/packages/_vue3/dist/block-wrapper.33cc2e78.js +54 -0
- package/packages/_vue3/dist/block-wrapper.d1ace9c6.cjs +1 -0
- package/packages/_vue3/dist/component-ref.20d41b64.js +111 -0
- package/packages/_vue3/dist/component-ref.7c98446d.cjs +1 -0
- package/packages/_vue3/dist/get-block-actions.1279eafb.js +79 -0
- package/packages/_vue3/dist/get-block-actions.9d2cfc9a.cjs +1 -0
- package/packages/_vue3/dist/index.a657fd9d.js +8094 -0
- package/packages/_vue3/dist/index.c5eee389.cjs +99 -0
- package/packages/_vue3/dist/repeated-block.48916c9e.js +33 -0
- package/packages/_vue3/dist/repeated-block.5aa51bc7.cjs +1 -0
- package/packages/_vue3/dist/sdk.cjs +1 -72
- package/packages/_vue3/dist/sdk.js +22 -3275
- package/packages/_vue3/dist/src/blocks/button/button.vue.d.ts +10 -6
- package/packages/_vue3/dist/src/blocks/button/component-info.d.ts +1 -1
- package/packages/_vue3/dist/src/blocks/columns/columns.vue.d.ts +18 -8
- package/packages/_vue3/dist/src/blocks/columns/component-info.d.ts +1 -1
- package/packages/_vue3/dist/src/blocks/custom-code/component-info.d.ts +1 -1
- package/packages/_vue3/dist/src/blocks/custom-code/custom-code.vue.d.ts +3 -3
- package/packages/_vue3/dist/src/blocks/embed/component-info.d.ts +1 -1
- package/packages/_vue3/dist/src/blocks/fragment/component-info.d.ts +1 -1
- package/packages/_vue3/dist/src/blocks/helpers.d.ts +13 -0
- package/packages/_vue3/dist/src/blocks/image/component-info.d.ts +1 -1
- package/packages/_vue3/dist/src/blocks/image/image.vue.d.ts +6 -6
- package/packages/_vue3/dist/src/blocks/img/component-info.d.ts +1 -1
- package/packages/_vue3/dist/src/blocks/img/img.vue.d.ts +9 -7
- package/packages/_vue3/dist/src/blocks/section/component-info.d.ts +1 -1
- package/packages/_vue3/dist/src/blocks/section/section.vue.d.ts +9 -6
- package/packages/_vue3/dist/src/blocks/symbol/component-info.d.ts +1 -1
- package/packages/_vue3/dist/src/blocks/symbol/symbol.helpers.d.ts +14 -0
- package/packages/_vue3/dist/src/blocks/symbol/symbol.vue.d.ts +20 -7
- package/packages/_vue3/dist/src/blocks/text/component-info.d.ts +1 -1
- package/packages/_vue3/dist/src/blocks/video/component-info.d.ts +1 -1
- package/packages/_vue3/dist/src/blocks/video/video.vue.d.ts +7 -3
- package/packages/_vue3/dist/src/components/block/block.helpers.d.ts +13 -0
- package/packages/{_vue2/dist/src/components/render-block/render-block.vue.d.ts → _vue3/dist/src/components/block/block.vue.d.ts} +3 -2
- package/packages/_vue3/dist/src/components/{render-block → block/components}/block-styles.vue.d.ts +4 -4
- package/packages/_vue3/dist/src/components/block/components/block-wrapper.vue.d.ts +29 -0
- package/packages/_vue3/dist/src/components/block/components/component-ref/component-ref.helpers.d.ts +30 -0
- package/packages/_vue3/dist/src/components/block/components/component-ref/component-ref.vue.d.ts +2 -0
- package/packages/_vue3/dist/src/components/block/components/interactive-element.vue.d.ts +30 -0
- package/packages/_vue3/dist/src/components/{render-block/render-repeated-block.vue.d.ts → block/components/repeated-block.vue.d.ts} +3 -0
- package/packages/_vue3/dist/src/components/{render-blocks.vue.d.ts → blocks/blocks-wrapper.vue.d.ts} +6 -6
- package/packages/_vue3/dist/src/components/blocks/blocks.vue.d.ts +29 -0
- package/packages/_vue3/dist/src/components/{render-content/render-content.vue.d.ts → content/components/enable-editor.vue.d.ts} +18 -49
- package/packages/{_vue2/dist/src/components/render-content/components/render-styles.helpers.d.ts → _vue3/dist/src/components/content/components/styles.helpers.d.ts} +1 -1
- package/packages/_vue3/dist/src/components/content/content.helpers.d.ts +7 -0
- package/packages/{_vue2/dist/src/components/render-content/render-content.types.d.ts → _vue3/dist/src/components/content/content.types.d.ts} +4 -4
- package/packages/_vue3/dist/src/components/content/content.vue.d.ts +69 -0
- package/packages/_vue3/dist/src/components/{render-content-variants/render-content-variants.types.d.ts → content-variants/content-variants.types.d.ts} +5 -5
- package/packages/_vue3/dist/src/components/{render-content-variants/render-content-variants.vue.d.ts → content-variants/content-variants.vue.d.ts} +21 -20
- package/packages/_vue3/dist/src/components/{render-content-variants → content-variants}/helpers.d.ts +7 -7
- package/packages/_vue3/dist/src/constants/sdk-version.d.ts +1 -1
- package/packages/_vue3/dist/src/constants/target.d.ts +1 -1
- package/packages/_vue3/dist/src/context/builder.context.d.ts +1 -1
- package/packages/_vue3/dist/src/context/components.context.d.ts +7 -0
- package/packages/_vue3/dist/src/context/types.d.ts +1 -1
- package/packages/_vue3/dist/src/functions/{evaluate.d.ts → evaluate/evaluate.d.ts} +5 -2
- package/packages/_vue3/dist/src/functions/evaluate/index.d.ts +1 -0
- package/packages/_vue3/dist/src/functions/evaluate/interpreter.d.ts +2 -0
- package/packages/_vue3/dist/src/functions/evaluate/non-node-runtime.d.ts +2 -0
- package/packages/_vue3/dist/src/functions/evaluate/types.d.ts +10 -0
- package/packages/_vue3/dist/src/functions/get-block-actions.d.ts +1 -0
- package/packages/_vue3/dist/src/functions/get-block-properties.d.ts +5 -1
- package/packages/_vue3/dist/src/functions/get-content/index.d.ts +2 -6
- package/packages/_vue3/dist/src/functions/get-processed-block.d.ts +1 -1
- package/packages/_vue3/dist/src/functions/get-react-native-block-styles.d.ts +1 -1
- package/packages/_vue3/dist/src/functions/is-non-node-server.d.ts +4 -0
- package/packages/_vue3/dist/src/functions/register-component.d.ts +2 -1
- package/packages/_vue3/dist/src/helpers/ab-tests.d.ts +2 -2
- package/packages/_vue3/dist/src/helpers/cookie.d.ts +2 -2
- package/packages/_vue3/dist/src/helpers/css.d.ts +1 -1
- package/packages/_vue3/dist/src/helpers/localStorage.d.ts +2 -2
- package/packages/_vue3/dist/src/helpers/preview-lru-cache/get.d.ts +1 -0
- package/packages/_vue3/dist/src/helpers/preview-lru-cache/helpers.d.ts +1 -0
- package/packages/_vue3/dist/src/helpers/preview-lru-cache/init.d.ts +6 -0
- package/packages/_vue3/dist/src/helpers/preview-lru-cache/set.d.ts +7 -0
- package/packages/_vue3/dist/src/helpers/preview-lru-cache/types.d.ts +12 -0
- package/packages/_vue3/dist/src/helpers/sessionId.d.ts +2 -2
- package/packages/_vue3/dist/src/helpers/visitorId.d.ts +1 -1
- package/packages/_vue3/dist/src/index-helpers/blocks-exports.d.ts +2 -2
- package/packages/_vue3/dist/src/index.d.ts +2 -2
- package/packages/_vue3/dist/src/types/builder-props.d.ts +9 -0
- package/packages/_vue3/dist/src/types/components.d.ts +8 -2
- package/packages/_vue3/dist/src/types/enforced-partials.d.ts +1 -1
- package/packages/_vue3/dist/src/types/targets.d.ts +1 -3
- package/packages/_vue3/dist/src/types/typescript.d.ts +3 -0
- package/packages/_vue3/dist/style.css +1 -1
- package/packages/_vue2/dist/block-styles.503c2141.cjs +0 -1
- package/packages/_vue2/dist/block-styles.76e698a7.js +0 -72
- package/packages/_vue2/dist/css.1601c108.js +0 -75
- package/packages/_vue2/dist/css.6d92c2ca.cjs +0 -6
- package/packages/_vue2/dist/evaluate.5365c739.js +0 -63
- package/packages/_vue2/dist/evaluate.97a0f474.cjs +0 -4
- package/packages/_vue2/dist/index.4de025de.cjs +0 -32
- package/packages/_vue2/dist/inlined-script.6a6ca760.cjs +0 -1
- package/packages/_vue2/dist/render-block.844495c0.js +0 -263
- package/packages/_vue2/dist/render-block.c0841b5d.cjs +0 -3
- package/packages/_vue2/dist/render-component.a3770d92.cjs +0 -1
- package/packages/_vue2/dist/render-component.a57a8b32.js +0 -38
- package/packages/_vue2/dist/render-content.19fe4991.cjs +0 -1
- package/packages/_vue2/dist/render-content.8d297efd.js +0 -1359
- package/packages/_vue2/dist/render-repeated-block.be86aae1.cjs +0 -1
- package/packages/_vue2/dist/render-repeated-block.f51da3f5.js +0 -38
- package/packages/_vue2/dist/src/blocks/util.d.ts +0 -4
- package/packages/_vue2/dist/src/components/render-block/render-block.helpers.d.ts +0 -12
- package/packages/_vue2/dist/src/components/render-block/render-component.vue.d.ts +0 -16
- package/packages/_vue2/dist/src/components/render-block/render-repeated-block.vue.d.ts +0 -13
- package/packages/_vue2/dist/src/components/render-content/render-content.helpers.d.ts +0 -7
- package/packages/_vue3/dist/src/blocks/util.d.ts +0 -4
- package/packages/_vue3/dist/src/components/render-block/render-block.helpers.d.ts +0 -12
- package/packages/_vue3/dist/src/components/render-block/render-component.vue.d.ts +0 -16
- package/packages/_vue3/dist/src/components/render-content/render-content.helpers.d.ts +0 -7
- /package/packages/_vue2/dist/src/components/{render-block → block}/types.d.ts +0 -0
- /package/packages/_vue2/dist/src/components/{render-content → content}/wrap-component-ref.d.ts +0 -0
- /package/packages/_vue3/dist/src/components/{render-block → block}/types.d.ts +0 -0
- /package/packages/_vue3/dist/src/components/{render-content/components/render-styles.vue.d.ts → content/components/styles.vue.d.ts} +0 -0
- /package/packages/_vue3/dist/src/components/{render-content → content}/wrap-component-ref.d.ts +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is an LRU cache to hold preview content on the server-side.
|
|
3
|
+
*
|
|
4
|
+
* Note: This logic is only used by the NextJS SDK.
|
|
5
|
+
*/
|
|
6
|
+
import type { LRUCache } from 'lru-cache';
|
|
7
|
+
import type { BuilderContent } from '../../types/builder-content';
|
|
8
|
+
type BuilderLRUCache = LRUCache<string, BuilderContent>;
|
|
9
|
+
export type GlobalWCache = typeof globalThis & {
|
|
10
|
+
_BUILDER_PREVIEW_LRU_CACHE: BuilderLRUCache;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CanTrack } from '../types/can-track.js';
|
|
2
|
-
export declare const getSessionId: ({ canTrack
|
|
2
|
+
export declare const getSessionId: ({ canTrack }: CanTrack) => Promise<string | undefined>;
|
|
3
3
|
export declare const createSessionId: () => string;
|
|
4
|
-
export declare const setSessionId: ({ id, canTrack
|
|
4
|
+
export declare const setSessionId: ({ id, canTrack }: {
|
|
5
5
|
id: string;
|
|
6
6
|
} & CanTrack) => Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CanTrack } from '../types/can-track.js';
|
|
2
2
|
export declare const getVisitorId: ({ canTrack }: CanTrack) => string | undefined;
|
|
3
3
|
export declare const createVisitorId: () => string;
|
|
4
|
-
export declare const setVisitorId: ({ id, canTrack
|
|
4
|
+
export declare const setVisitorId: ({ id, canTrack }: {
|
|
5
5
|
id: string;
|
|
6
6
|
} & CanTrack) => void;
|
|
@@ -2,9 +2,9 @@ export { default as Button } from '../blocks/button/button.vue';
|
|
|
2
2
|
export { default as Columns } from '../blocks/columns/columns.vue';
|
|
3
3
|
export { default as Fragment } from '../blocks/fragment/fragment.vue';
|
|
4
4
|
export { default as Image } from '../blocks/image/image.vue';
|
|
5
|
-
export { default as RenderBlocks } from '../components/
|
|
5
|
+
export { default as RenderBlocks } from '../components/blocks/blocks.vue';
|
|
6
6
|
export { default as Section } from '../blocks/section/section.vue';
|
|
7
7
|
export { default as Symbol } from '../blocks/symbol/symbol.vue';
|
|
8
8
|
export { default as Text } from '../blocks/text/text.vue';
|
|
9
9
|
export { default as Video } from '../blocks/video/video.vue';
|
|
10
|
-
export { default as RenderContent } from '../components/
|
|
10
|
+
export { default as RenderContent } from '../components/content-variants/content-variants.vue';
|
|
@@ -7,9 +7,9 @@ export { register } from './functions/register.js';
|
|
|
7
7
|
export type { InsertMenuConfig, InsertMenuItem } from './functions/register.js';
|
|
8
8
|
export { setEditorSettings } from './functions/set-editor-settings.js';
|
|
9
9
|
export type { Settings } from './functions/set-editor-settings.js';
|
|
10
|
-
export { getAllContent, getContent, processContentResult
|
|
10
|
+
export { getAllContent, getContent, processContentResult } from './functions/get-content/index.js';
|
|
11
11
|
export { getBuilderSearchParams } from './functions/get-builder-search-params/index.js';
|
|
12
12
|
export { track } from './functions/track/index.js';
|
|
13
13
|
export type { RegisteredComponent } from './context/types';
|
|
14
14
|
export type { ComponentInfo } from './types/components';
|
|
15
|
-
export type {
|
|
15
|
+
export type { ContentProps } from './components/content/content.types.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { BuilderContextInterface, RegisteredComponents } from '../context/types.js';
|
|
2
|
+
import type { BuilderBlock } from './builder-block.js';
|
|
3
|
+
export type PropsWithBuilderData<T> = T & {
|
|
4
|
+
builderBlock: BuilderBlock;
|
|
5
|
+
builderContext: BuilderContextInterface;
|
|
6
|
+
};
|
|
7
|
+
export type BuilderComponentsProp = {
|
|
8
|
+
builderComponents: RegisteredComponents;
|
|
9
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BuilderElement } from './element';
|
|
2
|
-
import type { Input } from './input';
|
|
1
|
+
import type { BuilderElement } from './element.js';
|
|
2
|
+
import type { Input } from './input.js';
|
|
3
3
|
export interface ComponentInfo {
|
|
4
4
|
/**
|
|
5
5
|
* Name your component something unique, e.g. 'MyButton'. You can override built-in components
|
|
@@ -33,6 +33,12 @@ export interface ComponentInfo {
|
|
|
33
33
|
* like here github.com/BuilderIO/builder/blob/master/packages/react/src/blocks/forms/Input.tsx#L34
|
|
34
34
|
*/
|
|
35
35
|
noWrap?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* TO-DO: make this optional only for RSC SDK.
|
|
38
|
+
*
|
|
39
|
+
* Set this to `true` if your component is a React Server Component (RSC).
|
|
40
|
+
*/
|
|
41
|
+
isRSC?: boolean;
|
|
36
42
|
/**
|
|
37
43
|
* Default children
|
|
38
44
|
*/
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
type
|
|
2
|
-
export type Target = Extract<MitosisTargets, 'vue3' | 'vue2' | 'reactNative' | 'svelte' | 'qwik' | 'react' | 'solid'>;
|
|
3
|
-
export {};
|
|
1
|
+
export type Target = 'vue3' | 'vue2' | 'reactNative' | 'svelte' | 'qwik' | 'react' | 'solid' | 'rsc';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.button-
|
|
1
|
+
.button-2btisl9m7v3[data-v-f2ef3d85]{all:unset}.div-26ii6xmdvep[data-v-ac4c9020]{display:flex;flex-direction:column;align-items:stretch}.div-20vehov4ay6[data-v-23ad84c1]{display:flex;line-height:normal}.div-20vehov4ay6-2[data-v-23ad84c1]{display:flex;flex-direction:column;align-items:stretch}.img-2oob28krk0a[data-v-a7ebd355]{opacity:1;transition:opacity .2s ease-in-out}.div-2oob28krk0a[data-v-a7ebd355]{width:100%;pointer-events:none;font-size:0}.div-2oob28krk0a-2[data-v-a7ebd355]{display:flex;flex-direction:column;align-items:stretch;position:absolute;top:0;left:0;width:100%;height:100%}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("vue"),s=require("./index.4de025de.cjs"),c=require("./css.6d92c2ca.cjs"),S=require("./inlined-styles.9ddda3d7.cjs");require("./evaluate.97a0f474.cjs");const k=h.defineComponent({name:"block-styles",components:{InlinedStyles:S.default},props:["block","context"],data(){return{TARGET:s.TARGET}},computed:{useBlock(){return c.getProcessedBlock({block:this.block,localState:this.context.localState,rootState:this.context.rootState,rootSetState:this.context.rootSetState,context:this.context.context,shouldEvaluateBindings:!0})},canShowBlock(){return s.checkIsDefined(this.useBlock.hide)?!this.useBlock.hide:s.checkIsDefined(this.useBlock.show)?this.useBlock.show:!0},css(){var a;const t=this.useBlock.responsiveStyles,e=this.context.content,o=s.getSizesForBreakpoints(((a=e==null?void 0:e.meta)==null?void 0:a.breakpoints)||{}),l=t==null?void 0:t.large,r=t==null?void 0:t.medium,i=t==null?void 0:t.small,n=this.useBlock.id;if(!n)return"";const u=l?c.createCssClass({className:n,styles:l}):"",d=r?c.createCssClass({className:n,styles:r,mediaQuery:s.getMaxWidthQueryForSize("medium",o)}):"",m=i?c.createCssClass({className:n,styles:i,mediaQuery:s.getMaxWidthQueryForSize("small",o)}):"";return[u,d,m].join(" ")}}});var y=function(){var e=this,o=e._self._c;return e._self._setupProxy,e.TARGET!=="reactNative"&&e.css&&e.canShowBlock?o("inlined-styles",{attrs:{styles:e.css}}):e._e()},f=[],_=s.normalizeComponent(k,y,f,!1,null,null,null,null);const p=_.exports;exports.default=p;
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { defineComponent as S } from "vue";
|
|
2
|
-
import { T as p, c as i, g as k, a as m, n as f } from "./index.dcd9672f.js";
|
|
3
|
-
import { g as _, c as n } from "./css.1601c108.js";
|
|
4
|
-
import y from "./inlined-styles.759d26e8.js";
|
|
5
|
-
import "./evaluate.5365c739.js";
|
|
6
|
-
const B = S({
|
|
7
|
-
name: "block-styles",
|
|
8
|
-
components: { InlinedStyles: y },
|
|
9
|
-
props: ["block", "context"],
|
|
10
|
-
data() {
|
|
11
|
-
return { TARGET: p };
|
|
12
|
-
},
|
|
13
|
-
computed: {
|
|
14
|
-
useBlock() {
|
|
15
|
-
return _({
|
|
16
|
-
block: this.block,
|
|
17
|
-
localState: this.context.localState,
|
|
18
|
-
rootState: this.context.rootState,
|
|
19
|
-
rootSetState: this.context.rootSetState,
|
|
20
|
-
context: this.context.context,
|
|
21
|
-
shouldEvaluateBindings: !0
|
|
22
|
-
});
|
|
23
|
-
},
|
|
24
|
-
canShowBlock() {
|
|
25
|
-
return i(this.useBlock.hide) ? !this.useBlock.hide : i(this.useBlock.show) ? this.useBlock.show : !0;
|
|
26
|
-
},
|
|
27
|
-
css() {
|
|
28
|
-
var a;
|
|
29
|
-
const e = this.useBlock.responsiveStyles, t = this.context.content, s = k(
|
|
30
|
-
((a = t == null ? void 0 : t.meta) == null ? void 0 : a.breakpoints) || {}
|
|
31
|
-
), l = e == null ? void 0 : e.large, r = e == null ? void 0 : e.medium, c = e == null ? void 0 : e.small, o = this.useBlock.id;
|
|
32
|
-
if (!o)
|
|
33
|
-
return "";
|
|
34
|
-
const u = l ? n({
|
|
35
|
-
className: o,
|
|
36
|
-
styles: l
|
|
37
|
-
}) : "", d = r ? n({
|
|
38
|
-
className: o,
|
|
39
|
-
styles: r,
|
|
40
|
-
mediaQuery: m(
|
|
41
|
-
"medium",
|
|
42
|
-
s
|
|
43
|
-
)
|
|
44
|
-
}) : "", h = c ? n({
|
|
45
|
-
className: o,
|
|
46
|
-
styles: c,
|
|
47
|
-
mediaQuery: m(
|
|
48
|
-
"small",
|
|
49
|
-
s
|
|
50
|
-
)
|
|
51
|
-
}) : "";
|
|
52
|
-
return [u, d, h].join(" ");
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
var x = function() {
|
|
57
|
-
var t = this, s = t._self._c;
|
|
58
|
-
return t._self._setupProxy, t.TARGET !== "reactNative" && t.css && t.canShowBlock ? s("inlined-styles", { attrs: { styles: t.css } }) : t._e();
|
|
59
|
-
}, g = [], v = /* @__PURE__ */ f(
|
|
60
|
-
B,
|
|
61
|
-
x,
|
|
62
|
-
g,
|
|
63
|
-
!1,
|
|
64
|
-
null,
|
|
65
|
-
null,
|
|
66
|
-
null,
|
|
67
|
-
null
|
|
68
|
-
);
|
|
69
|
-
const E = v.exports;
|
|
70
|
-
export {
|
|
71
|
-
E as default
|
|
72
|
-
};
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { e as u } from "./evaluate.5365c739.js";
|
|
2
|
-
import { f as p, c as l } from "./index.dcd9672f.js";
|
|
3
|
-
const g = (e, t, n) => {
|
|
4
|
-
if (Object(e) !== e)
|
|
5
|
-
return e;
|
|
6
|
-
const s = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
|
|
7
|
-
return s.slice(0, -1).reduce(
|
|
8
|
-
(o, r, c) => Object(o[r]) === o[r] ? o[r] : o[r] = Math.abs(Number(s[c + 1])) >> 0 === +s[c + 1] ? [] : {},
|
|
9
|
-
e
|
|
10
|
-
)[s[s.length - 1]] = n, e;
|
|
11
|
-
};
|
|
12
|
-
const d = ({
|
|
13
|
-
block: e,
|
|
14
|
-
context: t,
|
|
15
|
-
localState: n,
|
|
16
|
-
rootState: s,
|
|
17
|
-
rootSetState: o
|
|
18
|
-
}) => {
|
|
19
|
-
if (!e.bindings)
|
|
20
|
-
return e;
|
|
21
|
-
const r = p(e), c = {
|
|
22
|
-
...r,
|
|
23
|
-
properties: { ...r.properties },
|
|
24
|
-
actions: { ...r.actions }
|
|
25
|
-
};
|
|
26
|
-
for (const i in e.bindings) {
|
|
27
|
-
const a = e.bindings[i], f = u({
|
|
28
|
-
code: a,
|
|
29
|
-
localState: n,
|
|
30
|
-
rootState: s,
|
|
31
|
-
rootSetState: o,
|
|
32
|
-
context: t
|
|
33
|
-
});
|
|
34
|
-
g(c, i, f);
|
|
35
|
-
}
|
|
36
|
-
return c;
|
|
37
|
-
};
|
|
38
|
-
function v({
|
|
39
|
-
block: e,
|
|
40
|
-
context: t,
|
|
41
|
-
shouldEvaluateBindings: n,
|
|
42
|
-
localState: s,
|
|
43
|
-
rootState: o,
|
|
44
|
-
rootSetState: r
|
|
45
|
-
}) {
|
|
46
|
-
const c = e;
|
|
47
|
-
return n ? d({
|
|
48
|
-
block: c,
|
|
49
|
-
localState: s,
|
|
50
|
-
rootState: o,
|
|
51
|
-
rootSetState: r,
|
|
52
|
-
context: t
|
|
53
|
-
}) : c;
|
|
54
|
-
}
|
|
55
|
-
const m = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), C = (e) => Object.entries(e).map(([n, s]) => {
|
|
56
|
-
if (typeof s == "string")
|
|
57
|
-
return `${m(n)}: ${s};`;
|
|
58
|
-
}).filter(l), $ = (e) => C(e).join(`
|
|
59
|
-
`), A = ({
|
|
60
|
-
mediaQuery: e,
|
|
61
|
-
className: t,
|
|
62
|
-
styles: n
|
|
63
|
-
}) => {
|
|
64
|
-
const s = `.${t} {
|
|
65
|
-
${$(n)}
|
|
66
|
-
}`;
|
|
67
|
-
return e ? `${e} {
|
|
68
|
-
${s}
|
|
69
|
-
}` : s;
|
|
70
|
-
};
|
|
71
|
-
export {
|
|
72
|
-
C as a,
|
|
73
|
-
A as c,
|
|
74
|
-
v as g
|
|
75
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";const f=require("./evaluate.97a0f474.cjs"),a=require("./index.4de025de.cjs"),p=(e,t,n)=>{if(Object(e)!==e)return e;const s=Array.isArray(t)?t:t.toString().match(/[^.[\]]+/g);return s.slice(0,-1).reduce((c,r,o)=>Object(c[r])===c[r]?c[r]:c[r]=Math.abs(Number(s[o+1]))>>0===+s[o+1]?[]:{},e)[s[s.length-1]]=n,e};const g=({block:e,context:t,localState:n,rootState:s,rootSetState:c})=>{if(!e.bindings)return e;const r=a.fastClone(e),o={...r,properties:{...r.properties},actions:{...r.actions}};for(const i in e.bindings){const l=e.bindings[i],d=f.evaluate({code:l,localState:n,rootState:s,rootSetState:c,context:t});p(o,i,d)}return o};function C({block:e,context:t,shouldEvaluateBindings:n,localState:s,rootState:c,rootSetState:r}){const o=e;return n?g({block:o,localState:s,rootState:c,rootSetState:r,context:t}):o}const S=e=>e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),u=e=>Object.entries(e).map(([n,s])=>{if(typeof s=="string")return`${S(n)}: ${s};`}).filter(a.checkIsDefined),v=e=>u(e).join(`
|
|
2
|
-
`),y=({mediaQuery:e,className:t,styles:n})=>{const s=`.${t} {
|
|
3
|
-
${v(n)}
|
|
4
|
-
}`;return e?`${e} {
|
|
5
|
-
${s}
|
|
6
|
-
}`:s};exports.convertStyleMapToCSSArray=u;exports.createCssClass=y;exports.getProcessedBlock=C;
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { i as d, b as w } from "./index.dcd9672f.js";
|
|
2
|
-
function h({
|
|
3
|
-
code: n,
|
|
4
|
-
context: r,
|
|
5
|
-
localState: e,
|
|
6
|
-
rootState: s,
|
|
7
|
-
rootSetState: i,
|
|
8
|
-
event: u,
|
|
9
|
-
isExpression: c = !0
|
|
10
|
-
}) {
|
|
11
|
-
if (n === "") {
|
|
12
|
-
console.warn("Skipping evaluation of empty code block.");
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
const t = {
|
|
16
|
-
isEditing: d(),
|
|
17
|
-
isBrowser: w(),
|
|
18
|
-
isServer: !w()
|
|
19
|
-
}, l = c && !(n.includes(";") || n.includes(" return ") || n.trim().startsWith("return ")) ? `return (${n});` : n;
|
|
20
|
-
try {
|
|
21
|
-
return new Function(
|
|
22
|
-
"builder",
|
|
23
|
-
"Builder",
|
|
24
|
-
"state",
|
|
25
|
-
"context",
|
|
26
|
-
"event",
|
|
27
|
-
l
|
|
28
|
-
)(
|
|
29
|
-
t,
|
|
30
|
-
t,
|
|
31
|
-
o(s, e, i),
|
|
32
|
-
r,
|
|
33
|
-
u
|
|
34
|
-
);
|
|
35
|
-
} catch (f) {
|
|
36
|
-
console.warn(
|
|
37
|
-
`Builder custom code error:
|
|
38
|
-
While Evaluating:
|
|
39
|
-
`,
|
|
40
|
-
l,
|
|
41
|
-
`
|
|
42
|
-
`,
|
|
43
|
-
f
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
function o(n, r, e) {
|
|
48
|
-
if (n === r)
|
|
49
|
-
throw new Error("rootState === localState");
|
|
50
|
-
return new Proxy(n, {
|
|
51
|
-
get: (s, i) => r && i in r ? r[i] : n[i],
|
|
52
|
-
set: (s, i, u) => {
|
|
53
|
-
if (r && i in r)
|
|
54
|
-
throw new Error(
|
|
55
|
-
"Writing to local state is not allowed as it is read-only."
|
|
56
|
-
);
|
|
57
|
-
return n[i] = u, e == null || e(n), !0;
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
export {
|
|
62
|
-
h as e
|
|
63
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";const t=require("./index.4de025de.cjs");function f({code:n,context:r,localState:i,rootState:s,rootSetState:e,event:u,isExpression:l=!0}){if(n===""){console.warn("Skipping evaluation of empty code block.");return}const c={isEditing:t.isEditing(),isBrowser:t.isBrowser(),isServer:!t.isBrowser()},d=l&&!(n.includes(";")||n.includes(" return ")||n.trim().startsWith("return "))?`return (${n});`:n;try{return new Function("builder","Builder","state","context","event",d)(c,c,o(s,i,e),r,u)}catch(w){console.warn(`Builder custom code error:
|
|
2
|
-
While Evaluating:
|
|
3
|
-
`,d,`
|
|
4
|
-
`,w)}}function o(n,r,i){if(n===r)throw new Error("rootState === localState");return new Proxy(n,{get:(s,e)=>r&&e in r?r[e]:n[e],set:(s,e,u)=>{if(r&&e in r)throw new Error("Writing to local state is not allowed as it is read-only.");return n[e]=u,i==null||i(n),!0}})}exports.evaluate=f;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";const y=require("vue"),ft=y.defineComponent({name:"builder-button",props:["attributes","text","link","openLinkInNewTab"],methods:{filterAttrs:function(t={},n){const r="v-on:";return Object.keys(t).filter(o=>{if(!t[o])return!1;const s=o.startsWith(r);return n?s:!s}).reduce((o,s)=>({...o,[s.replace(r,"")]:t[s]}),{})},_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const r of n)t[r]=!0;return t}}});function _(e,t,n,r,o,s,i,d){var a=typeof e=="function"?e.options:e;t&&(a.render=t,a.staticRenderFns=n,a._compiled=!0),r&&(a.functional=!0),s&&(a._scopeId="data-v-"+s);var u;if(i?(u=function(c){c=c||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!c&&typeof __VUE_SSR_CONTEXT__<"u"&&(c=__VUE_SSR_CONTEXT__),o&&o.call(this,c),c&&c._registeredComponents&&c._registeredComponents.add(i)},a._ssrRegister=u):o&&(u=d?function(){o.call(this,(a.functional?this.parent:this).$root.$options.shadowRoot)}:o),u)if(a.functional){a._injectStyles=u;var m=a.render;a.render=function(f,l){return u.call(l),m(f,l)}}else{var p=a.beforeCreate;a.beforeCreate=p?[].concat(p,u):[u]}return{exports:e,options:a}}var mt=function(){var t=this,n=t._self._c;return t._self._setupProxy,t.link?n("a",t._g(t._b({attrs:{role:"button",href:t.link,target:t.openLinkInNewTab?"_blank":void 0}},"a",t.filterAttrs(t.attributes,!1),!1),t.filterAttrs(t.attributes,!0)),[t._v(" "+t._s(t.text)+" ")]):n("button",t._g(t._b({class:t._classStringToObject(t.attributes.class+" button-t9spj7joih")},"button",t.filterAttrs(t.attributes,!1),!1),t.filterAttrs(t.attributes,!0)),[t._v(" "+t._s(t.text)+" ")])},pt=[],ht=_(ft,mt,pt,!1,null,"90ea412a",null,null);const gt=ht.exports,R=e=>JSON.parse(JSON.stringify(e)),F={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},_t=(e,t=F)=>`@media (max-width: ${t[e].max}px)`,M=({small:e,medium:t})=>{const n=R(F);if(!e||!t)return n;const r=Math.floor(e/2);n.small={max:e,min:r,default:r+1};const o=n.small.max+1;n.medium={max:t,min:o,default:o+1};const s=n.medium.max+1;return n.large={max:2e3,min:s,default:s+1},n},x="vue2",bt=Symbol(),I={Builder:{content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,registeredComponents:{},inheritedStyles:{}},key:bt},yt=()=>Promise.resolve().then(()=>W).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderBlocks at ../../components/render-blocks.vue",e),e}),vt=()=>Promise.resolve().then(()=>require("./inlined-styles.9ddda3d7.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component InlinedStyles at ../../components/inlined-styles.vue",e),e}),St=y.defineComponent({name:"builder-columns",components:{InlinedStyles:vt,RenderBlocks:yt},props:["space","columns","stackColumnsAt","reverseColumnsWhenStacked","builderBlock"],data(){return{gutterSize:typeof this.space=="number"?this.space||0:20,cols:this.columns||[],stackAt:this.stackColumnsAt||"tablet",flexDir:this.stackColumnsAt==="never"?"row":this.reverseColumnsWhenStacked?"column-reverse":"column",TARGET:x}},inject:{builderContext:I.key},computed:{columnsCssVars(){return{"--flex-dir":this.flexDir,"--flex-dir-tablet":this.getTabletStyle({stackedStyle:this.flexDir,desktopStyle:"row"})}},columnsStyles(){return`
|
|
2
|
-
@media (max-width: ${this.getWidthForBreakpointSize("medium")}px) {
|
|
3
|
-
.${this.builderBlock.id}-breakpoints {
|
|
4
|
-
flex-direction: var(--flex-dir-tablet);
|
|
5
|
-
align-items: stretch;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.${this.builderBlock.id}-breakpoints > .builder-column {
|
|
9
|
-
width: var(--column-width-tablet) !important;
|
|
10
|
-
margin-left: var(--column-margin-left-tablet) !important;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
@media (max-width: ${this.getWidthForBreakpointSize("small")}px) {
|
|
15
|
-
.${this.builderBlock.id}-breakpoints {
|
|
16
|
-
flex-direction: var(--flex-dir);
|
|
17
|
-
align-items: stretch;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.${this.builderBlock.id}-breakpoints > .builder-column {
|
|
21
|
-
width: var(--column-width-mobile) !important;
|
|
22
|
-
margin-left: var(--column-margin-left-mobile) !important;
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
`}},methods:{getWidth(e){var t;return((t=this.cols[e])==null?void 0:t.width)||100/this.cols.length},getColumnCssWidth(e){const t=this.gutterSize*(this.cols.length-1)/this.cols.length;return`calc(${this.getWidth(e)}% - ${t}px)`},getTabletStyle({stackedStyle:e,desktopStyle:t}){return this.stackAt==="tablet"?e:t},getMobileStyle({stackedStyle:e,desktopStyle:t}){return this.stackAt==="never"?t:e},columnCssVars(e){const t=e===0?0:this.gutterSize,n=this.getColumnCssWidth(e),r=`${t}px`,o="100%",s=0;return{width:n,"margin-left":r,"--column-width-mobile":this.getMobileStyle({stackedStyle:o,desktopStyle:n}),"--column-margin-left-mobile":this.getMobileStyle({stackedStyle:s,desktopStyle:r}),"--column-width-tablet":this.getTabletStyle({stackedStyle:o,desktopStyle:n}),"--column-margin-left-tablet":this.getTabletStyle({stackedStyle:s,desktopStyle:r})}},getWidthForBreakpointSize(e){var n,r;return M(((r=(n=this.builderContext.content)==null?void 0:n.meta)==null?void 0:r.breakpoints)||{})[e].max},_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const r of n)t[r]=!0;return t}}});var kt=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("div",{class:t._classStringToObject(`builder-columns ${t.builderBlock.id}-breakpoints div-2brhoa1k8gd`),style:t.columnsCssVars,attrs:{dataSet:{"builder-block-name":"builder-columns"}}},[t.TARGET!=="reactNative"?[n("inlined-styles",{attrs:{styles:t.columnsStyles}})]:t._e(),t._l(t.columns,function(r,o){return n("div",{key:o,staticClass:"builder-column div-2brhoa1k8gd-2",style:t.columnCssVars(o),attrs:{dataSet:{"builder-block-name":"builder-column"}}},[n("render-blocks",{attrs:{blocks:r.blocks,path:`component.options.columns.${o}.blocks`,parent:t.builderBlock.id,styleProp:{flexGrow:"1"}}})],1)})],2)},xt=[],Ct=_(St,kt,xt,!1,null,"7bfe490c",null,null);const wt=Ct.exports,$t=y.defineComponent({name:"builder-fragment-component",props:[]});var Tt=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("span",[t._t("default")],2)},Rt=[],It=_($t,Tt,Rt,!1,null,null,null,null);const Vt=It.exports;function O(e){return e.replace(/http(s)?:/,"")}function Et(e="",t,n){const r=new RegExp("([?&])"+t+"=.*?(&|$)","i"),o=e.indexOf("?")!==-1?"&":"?";return e.match(r)?e.replace(r,"$1"+t+"="+encodeURIComponent(n)+"$2"):e+o+t+"="+encodeURIComponent(n)}function Pt(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return O(e);const n=e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);if(n){const r=e.split(n[0]),o=n[3],s=t.match("x")?t:`${t}x`;return O(`${r[0]}_${s}${o}`)}return null}function V(e){if(!e)return e;const t=[100,200,400,800,1200,1600,2e3];if(e.match(/builder\.io/)){let n=e;const r=Number(e.split("?width=")[1]);return isNaN(r)||(n=`${n} ${r}w`),t.filter(o=>o!==r).map(o=>`${Et(e,"width",o)} ${o}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[Pt(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,r])=>`${n} ${r}w`).concat([e]).join(", "):e}const At=y.defineComponent({name:"builder-image",props:["image","src","srcset","noWebp","aspectRatio","altText","backgroundPosition","backgroundSize","className","sizes","builderBlock","fitContent"],computed:{srcSetToUse(){var n;const t=this.image||this.src;if(!t||!(t.match(/builder\.io/)||t.match(/cdn\.shopify\.com/)))return this.srcset;if(this.srcset&&((n=this.image)==null?void 0:n.includes("builder.io/api/v1/image"))){if(!this.srcset.includes(this.image.split("?")[0]))return console.debug("Removed given srcset"),V(t)}else if(this.image&&!this.srcset)return V(t);return V(t)},webpSrcSet(){var e;return((e=this.srcSetToUse)==null?void 0:e.match(/builder\.io/))&&!this.noWebp?this.srcSetToUse.replace(/\?/g,"?format=webp&"):""},aspectRatioCss(){const e={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return this.aspectRatio?e:void 0}},methods:{_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const r of n)t[r]=!0;return t}}});var Ot=function(){var r,o,s,i;var t=this,n=t._self._c;return t._self._setupProxy,n("div",[n("picture",[t.webpSrcSet?[n("source",{attrs:{type:"image/webp",srcset:t.webpSrcSet}})]:t._e(),n("img",{class:t._classStringToObject("builder-image"+(t.className?" "+t.className:"")+" img-29wpyomtntv"),style:{objectPosition:t.backgroundPosition||"center",objectFit:t.backgroundSize||"cover",...t.aspectRatioCss},attrs:{loading:"lazy",alt:t.altText,role:t.altText?"presentation":void 0,src:t.image,srcset:t.srcSetToUse,sizes:t.sizes}})],2),t.aspectRatio&&!(((o=(r=t.builderBlock)==null?void 0:r.children)==null?void 0:o.length)&&t.fitContent)?[n("div",{staticClass:"builder-image-sizer div-29wpyomtntv",style:{paddingTop:t.aspectRatio*100+"%"}})]:t._e(),((i=(s=t.builderBlock)==null?void 0:s.children)==null?void 0:i.length)&&t.fitContent?[t._t("default")]:t._e(),!t.fitContent&&t.children?[n("div",{staticClass:"div-29wpyomtntv-2"},[t._t("default")],2)]:t._e()],2)},jt=[],Bt=_(At,Ot,jt,!1,null,"28890a77",null,null);const Nt=Bt.exports;function b(){return typeof window<"u"&&typeof document<"u"}function Ft(){return b()&&window.self!==window.top}function w(){return Ft()&&window.location.search.indexOf("builder.frameEditing=")!==-1}const Mt=()=>Promise.resolve().then(()=>require("./block-styles.503c2141.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component BlockStyles at ./render-block/block-styles.vue",e),e}),Ut=()=>Promise.resolve().then(()=>require("./render-block.c0841b5d.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderBlock at ./render-block/render-block.vue",e),e}),Wt=y.defineComponent({name:"render-blocks",components:{RenderBlock:Ut,BlockStyles:Mt},props:["blocks","parent","path","styleProp"],inject:{builderContext:I.key},computed:{className(){var e;return"builder-blocks"+((e=this.blocks)!=null&&e.length?"":" no-blocks")}},methods:{onClick(){var e,t;w()&&!((e=this.blocks)!=null&&e.length)&&((t=window.parent)==null||t.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:this.parent,dataPath:this.path}},"*"))},onMouseEnter(){var e,t;w()&&!((e=this.blocks)!=null&&e.length)&&((t=window.parent)==null||t.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:this.parent,dataPath:this.path}},"*"))},_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const r of n)t[r]=!0;return t}}});var Lt=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("div",{class:t._classStringToObject(t.className+" div-2fnk003dqad"),style:t.styleProp,attrs:{"builder-path":t.path,"builder-parent-id":t.parent,dataSet:{class:t.className}},on:{click:function(r){return t.onClick()},mouseenter:function(r){return t.onMouseEnter()},keypress:function(r){return t.onClick()}}},[t.blocks?t._l(t.blocks,function(r,o){return n("render-block",{key:"render-block-"+r.id,attrs:{block:r,context:t.builderContext}})}):t._e(),t.blocks?t._l(t.blocks,function(r,o){return n("block-styles",{key:"block-style-"+r.id,attrs:{block:r,context:t.builderContext}})}):t._e()],2)},zt=[],Kt=_(Wt,Lt,zt,!1,null,"b740fd05",null,null);const U=Kt.exports,W=Object.freeze(Object.defineProperty({__proto__:null,default:U},Symbol.toStringTag,{value:"Module"})),Gt=y.defineComponent({name:"builder-section-component",props:["maxWidth","attributes"],methods:{filterAttrs:function(t={},n){const r="v-on:";return Object.keys(t).filter(o=>{if(!t[o])return!1;const s=o.startsWith(r);return n?s:!s}).reduce((o,s)=>({...o,[s.replace(r,"")]:t[s]}),{})}}});var Dt=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("section",t._g(t._b({style:{width:"100%",alignSelf:"stretch",flexGrow:1,boxSizing:"border-box",maxWidth:t.maxWidth||1200,display:"flex",flexDirection:"column",alignItems:"stretch",marginLeft:"auto",marginRight:"auto"}},"section",t.filterAttrs(t.attributes,!1),!1),t.filterAttrs(t.attributes,!0)),[t._t("default")],2)},qt=[],Ht=_(Gt,Dt,qt,!1,null,null,null,null);const Jt=Ht.exports,$="[Builder.io]: ",v={log:(...e)=>console.log($,...e),error:(...e)=>console.error($,...e),warn:(...e)=>console.warn($,...e),debug:(...e)=>console.debug($,...e)},k=e=>e!=null,Qt=e=>{if(e==="localhost"||e==="127.0.0.1")return e;const t=e.split(".");return t.length>2?t.slice(1).join("."):e},L=({name:e,canTrack:t})=>{var n;try{return t?(n=document.cookie.split("; ").find(r=>r.startsWith(`${e}=`)))==null?void 0:n.split("=")[1]:void 0}catch(r){v.warn("[COOKIE] GET error: ",(r==null?void 0:r.message)||r);return}},z=async e=>L(e),Xt=e=>e.map(([t,n])=>n?`${t}=${n}`:t).filter(k).join("; "),Yt=[["secure",""],["SameSite","None"]],Zt=({name:e,value:t,expires:n})=>{const o=(b()?location.protocol==="https:":!0)?Yt:[[]],s=n?[["expires",n.toUTCString()]]:[[]],i=[[e,t],...s,["path","/"],["domain",Qt(window.location.hostname)],...o];return Xt(i)},K=async({name:e,value:t,expires:n,canTrack:r})=>{try{if(!r)return;const o=Zt({name:e,value:t,expires:n});document.cookie=o}catch(o){v.warn("[COOKIE] SET error: ",(o==null?void 0:o.message)||o)}},te="builder.tests",A=e=>`${te}.${e}`,ee=({contentId:e})=>z({name:A(e),canTrack:!0}),ne=({contentId:e})=>L({name:A(e),canTrack:!0}),re=({contentId:e,value:t})=>K({name:A(e),value:t,canTrack:!0}),G=e=>k(e.id)&&k(e.variations)&&Object.keys(e.variations).length>0,oe=({id:e,variations:t})=>{var o;let n=0;const r=Math.random();for(const s in t){const i=(o=t[s])==null?void 0:o.testRatio;if(n+=i,r<n)return s}return e},D=e=>{const t=oe(e);return re({contentId:e.id,value:t}).catch(n=>{v.error("could not store A/B test variation: ",n)}),t},q=({item:e,testGroupId:t})=>{const n=e.variations[t];return t===e.id||!n?{testVariationId:e.id,testVariationName:"Default"}:{data:n.data,testVariationId:n.id,testVariationName:n.name||(n.id===e.id?"Default":"")}},se=({item:e,canTrack:t})=>{if(!t)return e;if(!e)return;if(!G(e))return e;const n=ne({contentId:e.id})||D({variations:e.variations,id:e.id}),r=q({item:e,testGroupId:n});return{...e,...r}},ie=async({item:e,canTrack:t})=>{if(!t||!G(e))return e;const r=await ee({contentId:e.id})||D({variations:e.variations,id:e.id}),o=q({item:e,testGroupId:r});return{...e,...o}},E=e=>k(e)?e:!0;function ae(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:globalThis}function ce(){const e=ae().fetch;if(typeof e>"u")throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
26
|
-
For more information, read https://github.com/BuilderIO/this-package-uses-fetch`),new Error("Builder SDK could not find a global `fetch` function");return e}const H=ce();function P(e,t=null,n="."){return Object.keys(e).reduce((r,o)=>{const s=e[o],i=[t,o].filter(Boolean).join(n);return[typeof s=="object",s!==null,!(Array.isArray(s)&&s.length===0)].every(Boolean)?{...r,...P(s,i,n)}:{...r,[i]:s}},{})}const j="builder.",le="options.",de=e=>{const t={};return e.forEach((n,r)=>{t[r]=n}),t},J=e=>{if(!e)return{};const t=Q(e),n={};return Object.keys(t).forEach(r=>{if(r.startsWith(j)){const o=r.replace(j,"").replace(le,"");n[o]=t[r]}}),n},ue=()=>{if(!b())return{};const e=new URLSearchParams(window.location.search);return J(e)},Q=e=>e instanceof URLSearchParams?de(e):e,fe="v3",X=e=>{const{limit:t=30,userAttributes:n,query:r,noTraverse:o=!1,model:s,apiKey:i,includeRefs:d=!0,enrich:a,locale:u,apiVersion:m=fe}=e;if(!i)throw new Error("Missing API key");if(!["v2","v3"].includes(m))throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${m}'`);const p=new URL(`https://cdn.builder.io/api/${m}/content/${s}?apiKey=${i}&limit=${t}&noTraverse=${o}&includeRefs=${d}${u?`&locale=${u}`:""}${a?`&enrich=${a}`:""}`),c={...ue(),...Q(e.options||{})},f=P(c);for(const l in f)p.searchParams.set(l,String(f[l]));if(n&&p.searchParams.set("userAttributes",JSON.stringify(n)),r){const l=P({query:r});for(const h in l)p.searchParams.set(h,JSON.stringify(l[h]))}return p},Y=e=>"results"in e;async function Z(e){const t=await et({...e,limit:1});return t&&Y(t)&&t.results[0]||null}const me=async e=>{const t=X(e);return await(await H(t.href)).json()},tt=async(e,t)=>{const n=E(e.canTrack);if(!n||!(b()||x==="reactNative"))return t;try{const r=[];for(const o of t.results)r.push(await ie({item:o,canTrack:n}));t.results=r}catch(r){v.error("Could not process A/B tests. ",r)}return t};async function et(e){try{const t=X(e),n=await me(e);return Y(n)?tt(e,n):(v.error("Error fetching data. ",{url:t,content:n,options:e}),n)}catch(t){return v.error("Error fetching data. ",t),null}}const pe=()=>Promise.resolve().then(()=>Ke).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderContentVariants at ../../components/render-content-variants/render-content-variants.vue",e),e}),he=y.defineComponent({name:"builder-symbol",components:{RenderContentVariants:pe},props:["attributes","symbol","dynamic"],data(){var e,t,n;return{className:[...Object.keys(this.attributes.class),"builder-symbol",(e=this.symbol)!=null&&e.inline?"builder-inline-symbol":void 0,((t=this.symbol)==null?void 0:t.dynamic)||this.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" "),contentToUse:(n=this.symbol)==null?void 0:n.content}},inject:{builderContext:I.key},mounted(){this.fetchContent()},watch:{onUpdateHook0:{handler(){this.fetchContent()},immediate:!0}},computed:{onUpdateHook0(){return{0:this.symbol}}},methods:{fetchContent(){var e,t,n;!this.contentToUse&&((e=this.symbol)==null?void 0:e.model)&&((t=this.builderContext)==null?void 0:t.apiKey)&&Z({model:this.symbol.model,apiKey:this.builderContext.apiKey,apiVersion:this.builderContext.apiVersion,...((n=this.symbol)==null?void 0:n.entry)&&{query:{id:this.symbol.entry}}}).then(r=>{r&&(this.contentToUse=r)}).catch(r=>{v.error("Could not fetch symbol content: ",r)})},filterAttrs:function(t={},n){const r="v-on:";return Object.keys(t).filter(o=>{if(!t[o])return!1;const s=o.startsWith(r);return n?s:!s}).reduce((o,s)=>({...o,[s.replace(r,"")]:t[s]}),{})},_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const r of n)t[r]=!0;return t}}});var ge=function(){var r,o,s,i;var t=this,n=t._self._c;return t._self._setupProxy,n("div",t._g(t._b({class:t._classStringToObject(t.className),attrs:{dataSet:{class:t.className}}},"div",t.filterAttrs(t.attributes,!1),!1),t.filterAttrs(t.attributes,!0)),[n("render-content-variants",{attrs:{__isNestedRender:!0,apiVersion:t.builderContext.apiVersion,apiKey:t.builderContext.apiKey,context:t.builderContext.context,customComponents:Object.values(t.builderContext.registeredComponents),data:{...(r=t.symbol)==null?void 0:r.data,...t.builderContext.localState,...(s=(o=t.contentToUse)==null?void 0:o.data)==null?void 0:s.state},model:(i=t.symbol)==null?void 0:i.model,content:t.contentToUse}})],1)},_e=[],be=_(he,ge,_e,!1,null,null,null,null);const ye=be.exports,ve=y.defineComponent({name:"builder-text",props:["text"]});var Se=function(){var r;var t=this,n=t._self._c;return t._self._setupProxy,n("span",{staticClass:"builder-text",style:{outline:"none"},domProps:{innerHTML:t._s((r=t.text)==null?void 0:r.toString())}})},ke=[],xe=_(ve,Se,ke,!1,null,null,null,null);const Ce=xe.exports,we=y.defineComponent({name:"builder-video",props:["autoPlay","muted","controls","loop","playsInline","attributes","fit","position","video","posterImage"],computed:{videoProps(){return{...this.autoPlay===!0?{autoPlay:!0}:{},...this.muted===!0?{muted:!0}:{},...this.controls===!0?{controls:!0}:{},...this.loop===!0?{loop:!0}:{},...this.playsInline===!0?{playsInline:!0}:{}}},spreadProps(){return{...this.attributes,...this.videoProps}}}});var $e=function(){var r;var t=this,n=t._self._c;return t._self._setupProxy,n("video",t._b({style:{width:"100%",height:"100%",...(r=t.attributes)==null?void 0:r.style,objectFit:t.fit,objectPosition:t.position,borderRadius:1},attrs:{src:t.video||"no-src",poster:t.posterImage}},"video",t.spreadProps,!1))},Te=[],Re=_(we,$e,Te,!1,null,null,null,null);const Ie=Re.exports,T=e=>Object.values((e==null?void 0:e.variations)||{}).map(t=>({...t,testVariationId:t.id,id:e==null?void 0:e.id})),Ve=({canTrack:e,content:t})=>!(!(T(t).length>0)||!e);function Ee(e,t,n){var i;function r(){function d(l,h,S){let C="";if(S){const g=new Date;g.setTime(g.getTime()+S*24*60*60*1e3),C="; expires="+g.toUTCString()}document.cookie=l+"="+(h||"")+C+"; path=/; Secure; SameSite=None"}function a(l){const h=l+"=",S=document.cookie.split(";");for(let C=0;C<S.length;C++){let g=S[C];for(;g.charAt(0)===" ";)g=g.substring(1,g.length);if(g.indexOf(h)===0)return g.substring(h.length,g.length)}return null}const u=`builder.tests.${e}`,m=a(u),p=t.map(l=>l.id).concat(e);if(m&&p.includes(m))return m;let c=0;const f=Math.random();for(let l=0;l<t.length;l++){const h=t[l],S=h.testRatio;if(c+=S,f<c)return d(u,h.id),h.id}return d(u,e),e}const o=r(),s=(i=document.currentScript)==null?void 0:i.previousElementSibling;if(n){s.remove();const d=document.currentScript;d==null||d.remove()}else{const d=t.concat({id:e}).filter(a=>a.id!==o).map(a=>`.variant-${a.id} { display: none; }
|
|
27
|
-
`).join("");s.innerHTML=d}}function Pe(e,t,n){var a;if(!navigator.cookieEnabled)return;function r(u){const m=u+"=",p=document.cookie.split(";");for(let c=0;c<p.length;c++){let f=p[c];for(;f.charAt(0)===" ";)f=f.substring(1,f.length);if(f.indexOf(m)===0)return f.substring(m.length,f.length)}return null}const o=`builder.tests.${t}`,s=r(o),i=(a=document.currentScript)==null?void 0:a.parentElement,d=e===t;if(s===e){if(d)return;i==null||i.removeAttribute("hidden"),i==null||i.removeAttribute("aria-hidden")}else{d&&(n?i==null||i.remove():(i==null||i.setAttribute("hidden","true"),i==null||i.setAttribute("aria-hidden","true")));return}}const Ae=e=>e==="react"||e==="reactNative",nt=Ae(x),rt="builderIoAbTest",ot="builderIoRenderContent",Oe=()=>{const e=Ee.toString().replace(/\s+/g," "),t=Pe.toString().replace(/\s+/g," ");return`
|
|
28
|
-
window.${rt} = ${e}
|
|
29
|
-
window.${ot} = ${t}
|
|
30
|
-
`},je=(e,t)=>`
|
|
31
|
-
window.${rt}("${t}",${JSON.stringify(e)}, ${nt})`,Be=({contentId:e,variationId:t})=>`
|
|
32
|
-
window.${ot}("${t}", "${e}", ${nt})`,Ne=()=>Promise.resolve().then(()=>require("./render-content.19fe4991.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderContent at ../render-content/render-content.vue",e),e}),Fe=()=>Promise.resolve().then(()=>require("./inlined-styles.9ddda3d7.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component InlinedStyles at ../inlined-styles.vue",e),e}),Me=()=>Promise.resolve().then(()=>require("./inlined-script.6a6ca760.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component InlinedScript at ../inlined-script.vue",e),e}),Ue=y.defineComponent({name:"render-content-variants",components:{InlinedScript:Me,InlinedStyles:Fe,RenderContent:Ne},props:["canTrack","content","__isNestedRender","model","data","context","apiKey","apiVersion","customComponents","locale","includeRefs","enrich"],data(){var e;return{shouldRenderVariants:Ve({canTrack:E(this.canTrack),content:this.content}),variantScriptStr:je(T(this.content).map(t=>({id:t.testVariationId,testRatio:t.testRatio})),((e=this.content)==null?void 0:e.id)||""),hideVariantsStyleString:T(this.content).map(t=>`.variant-${t.testVariationId} { display: none; } `).join(""),getScriptString:Oe,getVariants:T,getDefaultCanTrack:E,handleABTestingSync:se,TARGET:x}},mounted(){this.shouldRenderVariants=!1}});var We=function(){var r,o;var t=this,n=t._self._c;return t._self._setupProxy,n("div",[!t.__isNestedRender&&t.TARGET!=="reactNative"?[n("inlined-script",{attrs:{scriptStr:t.getScriptString()}})]:t._e(),t.shouldRenderVariants?[n("inlined-styles",{attrs:{id:`variants-styles-${(r=t.content)==null?void 0:r.id}`,styles:t.hideVariantsStyleString}}),n("inlined-script",{attrs:{scriptStr:t.variantScriptStr}}),t._l(t.getVariants(t.content),function(s,i){return n("render-content",{key:s.testVariationId,attrs:{content:s,showContent:!1,classNameProp:void 0,model:t.model,data:t.data,context:t.context,apiKey:t.apiKey,apiVersion:t.apiVersion,customComponents:t.customComponents,canTrack:t.canTrack,locale:t.locale,includeRefs:t.includeRefs,enrich:t.enrich,isSsrAbTest:t.shouldRenderVariants}})})]:t._e(),n("render-content",t._b({attrs:{content:t.shouldRenderVariants?t.content:t.handleABTestingSync({item:t.content,canTrack:t.getDefaultCanTrack(t.canTrack)}),classNameProp:`variant-${(o=t.content)==null?void 0:o.id}`,showContent:!0,model:t.model,data:t.data,context:t.context,apiKey:t.apiKey,apiVersion:t.apiVersion,customComponents:t.customComponents,canTrack:t.canTrack,locale:t.locale,includeRefs:t.includeRefs,enrich:t.enrich,isSsrAbTest:t.shouldRenderVariants}},"render-content",{key:t.shouldRenderVariants.toString()},!1))],2)},Le=[],ze=_(Ue,We,Le,!1,null,null,null,null);const st=ze.exports,Ke=Object.freeze(Object.defineProperty({__proto__:null,default:st},Symbol.toStringTag,{value:"Module"}));function Ge(){return!b()||w()?!1:Boolean(location.search.indexOf("builder.preview=")!==-1)}const it=e=>{const t=e.toString().trim();return`return (${!t.startsWith("function")&&!t.startsWith("(")?"function ":""}${t}).apply(this, arguments)`},De=[],qe=({component:e,...t})=>({type:"builder.registerComponent",data:Je(t)}),He=e=>typeof e=="function"?it(e):R(e),Je=({inputs:e,...t})=>({...R(t),inputs:e==null?void 0:e.map(n=>Object.entries(n).reduce((r,[o,s])=>({...r,[o]:He(s)}),{}))}),B={};function Qe(e,t){let n=B[e];if(n||(n=B[e]=[]),n.push(t),b()){const r={type:"builder.register",data:{type:e,info:t}};try{parent.postMessage(r,"*"),parent!==window&&window.postMessage(r,"*")}catch(o){console.debug("Could not postmessage",o)}}}const N={};function Xe(e){if(b()){Object.assign(N,e);const t={type:"builder.settingsChange",data:N};parent.postMessage(t,"*")}}function Ye(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}function at(){return Ye().replace(/-/g,"")}const ct="builderSessionId",Ze=async({canTrack:e})=>{if(!e)return;const t=await z({name:ct,canTrack:e});if(k(t))return t;{const n=tn();return en({id:n,canTrack:e}),n}},tn=()=>at(),en=({id:e,canTrack:t})=>K({name:ct,value:e,canTrack:t}),lt=()=>b()&&typeof localStorage<"u"?localStorage:void 0,nn=({key:e,canTrack:t})=>{var n;try{return t?(n=lt())==null?void 0:n.getItem(e):void 0}catch(r){console.debug("[LocalStorage] GET error: ",r);return}},rn=({key:e,canTrack:t,value:n})=>{var r;try{t&&((r=lt())==null||r.setItem(e,n))}catch(o){console.debug("[LocalStorage] SET error: ",o)}},dt="builderVisitorId",on=({canTrack:e})=>{if(!e)return;const t=nn({key:dt,canTrack:e});if(k(t))return t;{const n=sn();return an({id:n,canTrack:e}),n}},sn=()=>at(),an=({id:e,canTrack:t})=>rn({key:dt,value:e,canTrack:t}),cn=()=>{if(b()){const e=new URL(location.href);return e.pathname===""&&(e.pathname="/"),e}else return console.warn("Cannot get location for tracking in non-browser environment"),null},ln=()=>typeof navigator=="object"&&navigator.userAgent||"",dn=()=>{const e=ln(),t={Android(){return e.match(/Android/i)},BlackBerry(){return e.match(/BlackBerry/i)},iOS(){return e.match(/iPhone|iPod/i)},Opera(){return e.match(/Opera Mini/i)},Windows(){return e.match(/IEMobile/i)||e.match(/WPDesktop/i)},any(){return t.Android()||t.BlackBerry()||t.iOS()||t.Opera()||t.Windows()||x==="reactNative"}},n=e.match(/Tablet|iPad/i),r=cn();return{urlPath:r==null?void 0:r.pathname,host:(r==null?void 0:r.host)||(r==null?void 0:r.hostname),device:n?"tablet":t.any()?"mobile":"desktop"}},un=async({canTrack:e})=>{if(!e)return{visitorId:void 0,sessionId:void 0};const t=await Ze({canTrack:e}),n=on({canTrack:e});return{sessionId:t,visitorId:n}},fn=async({type:e,canTrack:t,apiKey:n,metadata:r,...o})=>({type:e,data:{...o,metadata:{url:location.href,...r},...await un({canTrack:t}),userAttributes:dn(),ownerId:n}});async function ut(e){if(!e.apiKey){v.error("Missing API key for track call. Please provide your API key.");return}if(!!e.canTrack&&!w()&&!!(b()||x==="reactNative"))return fetch("https://cdn.builder.io/api/v1/track",{method:"POST",body:JSON.stringify({events:[await fn(e)]}),headers:{"content-type":"application/json"},mode:"cors"}).catch(t=>{console.error("Failed to track: ",t)})}const mn=e=>ut({...e,canTrack:!0});exports.BuilderContext=I;exports.Button=gt;exports.Columns=wt;exports.Fragment=Vt;exports.Image=Nt;exports.Section=Jt;exports.Symbol=ye;exports.TARGET=x;exports.Text=Ce;exports.Video=Ie;exports._track=ut;exports.checkIsDefined=k;exports.components=De;exports.createRegisterComponentMessage=qe;exports.fastClone=R;exports.fetch=H;exports.getAllContent=et;exports.getBuilderSearchParams=J;exports.getContent=Z;exports.getMaxWidthQueryForSize=_t;exports.getRenderContentScriptString=Be;exports.getSizesForBreakpoints=M;exports.isBrowser=b;exports.isEditing=w;exports.isPreviewing=Ge;exports.logger=v;exports.normalizeComponent=_;exports.processContentResult=tt;exports.register=Qe;exports.renderBlocks=U;exports.renderBlocks$1=W;exports.renderContentVariants=st;exports.serializeFn=it;exports.setEditorSettings=Xe;exports.track=mn;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),t=require("./index.4de025de.cjs"),s=r.defineComponent({name:"inlined-script",props:["scriptStr","id"]});var i=function(){var e=this,n=e._self._c;return e._self._setupProxy,n("script",{tag:"component",attrs:{id:e.id},domProps:{innerHTML:e._s(e.scriptStr)}})},o=[],c=t.normalizeComponent(s,i,o,!1,null,null,null,null);const l=c.exports;exports.default=l;
|