import { n as cn } from "./utils-DXzSsU1e.js";
import { n as elementDefaultStyle } from "./registry-CjoawJ_B.js";
import { computed, createBlock, defineComponent, mergeProps, openBlock, ref, unref } from "vue";
import { reactiveOmit } from "@vueuse/core";
import { Separator } from "reka-ui";
import { defineStore } from "pinia";
//#region src/definitions/shared/base.ts
/**
* Split a dot-notation `type` back into `{ category, style }`. Useful
* for inspectors / debug badges that want to display the style suffix
* without re-parsing inline.
*/
function splitElementType(type) {
	const dot = type.indexOf(".");
	if (dot < 0) return {
		category: type,
		style: ""
	};
	return {
		category: type.slice(0, dot),
		style: type.slice(dot + 1)
	};
}
/** Build a `BaseElement["type"]` from a `(category, style)` pair. */
function joinElementType(category, style) {
	return `${category}.${style}`;
}
//#endregion
//#region src/definitions/cards/CardListCard.ts
var CardListCardDefaults = {
	cardType: "card-list",
	cardList: [],
	showCard: true,
	columns: 12,
	columnsSm: 12,
	columnsMd: 12,
	columnsLg: 12,
	columnsXl: 12,
	draggable: false,
	gutterY: "1rem",
	gutterX: "1rem"
};
var CardListCardMetadata = {
	icon: "th-large",
	displayLabel: "Card List",
	elementCategory: "display",
	description: "A list of nested cards. The default container for grouping cards together."
};
var CardListCardEditConfig = {
	title: {
		type: "input.text",
		label: "Title",
		columns: 12,
		section: "configuration"
	},
	showCard: {
		type: "boolean.switch",
		defaultValue: true,
		label: "Show Card Chrome",
		columns: 12,
		section: "layout"
	},
	draggable: {
		type: "boolean.switch",
		defaultValue: false,
		label: "Allow Drag & Drop",
		columns: 12,
		section: "configuration"
	},
	dragTargetData: {
		type: "input.text",
		label: "Drag Target Identifier",
		columns: 12,
		section: "configuration",
		conditionParams: [{
			name: "draggable",
			logic: "==",
			value: true
		}]
	},
	gutterY: {
		type: "input.text",
		label: "Vertical Gap",
		columns: 6,
		section: "layout"
	},
	gutterX: {
		type: "input.text",
		label: "Horizontal Gap",
		columns: 6,
		section: "layout"
	}
};
/**
* EditConfig variant for a CardListCard nested inside a TabListCard
* — picks up extra inspector fields (icon, image asset) used by the tab
* label.
*/
var TabContainerCardListCardEditConfig = {
	...CardListCardEditConfig,
	icon: {
		type: "picker.icon",
		label: "Tab Icon",
		columns: 6,
		section: "configuration"
	},
	imageAsset: {
		type: "file.asset-picker",
		label: "Tab Image",
		columns: 6,
		section: "configuration"
	}
};
//#endregion
//#region src/definitions/cards/DataTableCard.ts
var DataTableCardDefaults = {
	cardType: "datatable",
	headers: [],
	showCard: true,
	columns: 12,
	columnsSm: 12,
	columnsMd: 12,
	columnsLg: 12,
	columnsXl: 12,
	selectable: false,
	options: {
		paginated: true,
		defaultItemsPerPage: 10,
		defaultSortDirection: "desc"
	}
};
var DataTableCardMetadata = {
	icon: "table",
	displayLabel: "Data Table",
	elementCategory: "display",
	description: "A table that displays data in a grid format with sorting, pagination, filtering, and CRUD actions."
};
var DataTableCardEditConfig = {
	title: {
		type: "input.text",
		label: "Title",
		columns: 12,
		section: "configuration"
	},
	tableTitle: {
		type: "input.text",
		label: "Table Title",
		columns: 12,
		section: "configuration"
	},
	emptyMessage: {
		type: "input.text",
		label: "Empty-state Message",
		columns: 12,
		section: "configuration"
	},
	selectable: {
		type: "boolean.switch",
		defaultValue: false,
		label: "Enable Row Selection",
		columns: 6,
		section: "configuration"
	},
	listKey: {
		type: "input.text",
		label: "List Key (for nested data)",
		columns: 6,
		section: "configuration"
	},
	showCard: {
		type: "boolean.switch",
		defaultValue: true,
		label: "Show Card Chrome",
		columns: 12,
		section: "layout"
	}
};
//#endregion
//#region src/definitions/cards/ElementDisplayCard.ts
var ElementDisplayCardDefaults = {
	cardType: "element-display",
	showCard: false,
	columns: 12,
	columnsSm: 12,
	columnsMd: 12,
	columnsLg: 12,
	columnsXl: 12
};
var ElementDisplayCardMetadata = {
	icon: "chart-line",
	displayLabel: "Element Display",
	elementCategory: "display",
	description: "A card to display a single element."
};
var ElementDisplayCardEditConfig = {
	title: {
		type: "input.text",
		label: "Title",
		columns: 12,
		section: "configuration"
	},
	elementId: {
		type: "option-select.select",
		label: "Element",
		columns: 12,
		section: "configuration",
		selectOptions: []
	},
	showCard: {
		type: "boolean.switch",
		defaultValue: false,
		label: "Show Card Chrome",
		columns: 12,
		section: "layout"
	}
};
//#endregion
//#region src/definitions/cards/ElementListCard.ts
var ElementListCardDefaults = {
	cardType: "element-list",
	elementList: [],
	showCard: true,
	columns: 12,
	columnsSm: 12,
	columnsMd: 12,
	columnsLg: 12,
	columnsXl: 12,
	gutterY: "1rem",
	gutterX: "1rem"
};
var ElementListCardMetadata = {
	icon: "list",
	displayLabel: "Element List",
	elementCategory: "display",
	description: "A vertical stack of CardElements. The default container for forms and detail panels."
};
var ElementListCardEditConfig = {
	title: {
		type: "input.text",
		label: "Title",
		columns: 12,
		section: "configuration"
	},
	showCard: {
		type: "boolean.switch",
		defaultValue: true,
		label: "Show Card Chrome",
		columns: 12,
		section: "layout"
	},
	gutterY: {
		type: "input.text",
		label: "Vertical Gap",
		columns: 6,
		section: "layout"
	},
	gutterX: {
		type: "input.text",
		label: "Horizontal Gap",
		columns: 6,
		section: "layout"
	}
};
/**
* EditConfig variant for an ElementListCard nested inside a TabListCard
* — picks up extra inspector fields (icon, image asset) used by the tab
* label.
*/
var TabContainerElementListCardEditConfig = {
	...ElementListCardEditConfig,
	icon: {
		type: "picker.icon",
		label: "Tab Icon",
		columns: 6,
		section: "configuration"
	},
	imageAsset: {
		type: "file.asset-picker",
		label: "Tab Image",
		columns: 6,
		section: "configuration"
	}
};
//#endregion
//#region src/definitions/cards/GridViewCard.ts
var GridViewCardDefaults = {
	cardType: "grid-view",
	showCard: true,
	columns: 12,
	columnsSm: 12,
	columnsMd: 12,
	columnsLg: 12,
	columnsXl: 12,
	autoResizeHeight: true,
	rowHeight: 150,
	margin: [10, 10],
	containerPadding: [10, 10],
	isDraggable: false,
	isResizable: false,
	breakpoints: {
		lg: 1200,
		md: 996,
		sm: 768,
		xs: 480,
		xxs: 0
	},
	cols: {
		lg: 12,
		md: 10,
		sm: 6,
		xs: 4,
		xxs: 2
	},
	gridLayout: { xs: [] }
};
var GridViewCardMetadata = {
	icon: "grid",
	displayLabel: "Grid View",
	elementCategory: "display",
	description: "A grid view to display dashboard elements in a locking grid format."
};
var GridViewCardEditConfig = {
	title: {
		type: "input.text",
		label: "Title",
		columns: 12,
		section: "configuration"
	},
	autoResizeHeight: {
		type: "boolean.switch",
		defaultValue: true,
		label: "Auto Resize Height",
		columns: 6,
		section: "layout"
	},
	rowHeight: {
		type: "input.text",
		contentType: "number",
		defaultValue: 150,
		label: "Row Height (px)",
		columns: 6,
		section: "layout"
	},
	isDraggable: {
		type: "boolean.switch",
		defaultValue: false,
		label: "Allow Drag to Reorder",
		columns: 6,
		section: "configuration"
	},
	isResizable: {
		type: "boolean.switch",
		defaultValue: false,
		label: "Allow Resize",
		columns: 6,
		section: "configuration"
	},
	showCard: {
		type: "boolean.switch",
		defaultValue: true,
		label: "Show Card Chrome",
		columns: 12,
		section: "layout"
	}
};
//#endregion
//#region src/definitions/cards/InfoCard.ts
var InfoCardDefaults = {
	cardType: "info-card",
	showCard: true,
	columns: 12,
	columnsSm: 12,
	columnsMd: 12,
	columnsLg: 12,
	columnsXl: 12,
	fields: [],
	lessPadding: false
};
var InfoCardMetadata = {
	icon: "image",
	displayLabel: "Info Card",
	elementCategory: "display",
	description: "A fully customizable card to display information."
};
var InfoCardEditConfig = {
	title: {
		type: "input.text",
		label: "Title",
		columns: 12,
		section: "configuration"
	},
	subtitle: {
		type: "input.text",
		label: "Subtitle",
		columns: 12,
		section: "configuration"
	},
	icon: {
		type: "picker.icon",
		label: "Header Icon",
		columns: 6,
		section: "configuration"
	},
	iconColor: {
		type: "input.text",
		label: "Icon Color",
		columns: 6,
		section: "configuration"
	},
	headerImage: {
		type: "file.asset-picker",
		label: "Header Image",
		columns: 12,
		section: "configuration",
		acceptedFileTypes: [
			".jpg",
			".jpeg",
			".png",
			".gif",
			".svg",
			".webp"
		]
	},
	headerRatio: {
		type: "input.text",
		label: "Header Image Aspect Ratio",
		columns: 6,
		section: "layout"
	},
	lessPadding: {
		type: "boolean.switch",
		label: "Reduce Padding",
		columns: 6,
		section: "layout"
	},
	showCard: {
		type: "boolean.switch",
		defaultValue: true,
		label: "Show Card Chrome",
		columns: 12,
		section: "layout"
	},
	fields: {
		type: "configuration-block.repeatable",
		label: "Display Fields",
		columns: 12,
		section: "configuration",
		defaultValue: [],
		name: "fields",
		optionLabelFields: ["label", "value"],
		selectOptions: [
			{
				label: "Label",
				name: "label",
				type: "input.text",
				columns: 6
			},
			{
				label: "Value (data path)",
				name: "value",
				type: "input.text",
				columns: 6
			},
			{
				label: "Icon",
				name: "icon",
				type: "picker.icon",
				columns: 4
			},
			{
				label: "Format",
				name: "format",
				type: "input.text",
				columns: 4
			},
			{
				label: "Prepend",
				name: "prepend",
				type: "input.text",
				columns: 4
			},
			{
				label: "Append",
				name: "append",
				type: "input.text",
				columns: 4
			}
		]
	}
};
//#endregion
//#region src/definitions/cards/TabListCard.ts
var TabListCardDefaults = {
	cardType: "tab-list",
	tabList: [],
	showCard: true,
	columns: 12,
	columnsSm: 12,
	columnsMd: 12,
	columnsLg: 12,
	columnsXl: 12,
	style: "default",
	navOnTop: false,
	hideNav: false,
	controlTabId: null
};
var TabListCardMetadata = {
	icon: "folder-closed",
	displayLabel: "Tab List",
	elementCategory: "display",
	description: "A list of tabs that can be used to display and organize display cards."
};
var TabListCardEditConfig = {
	title: {
		type: "input.text",
		label: "Title",
		columns: 12,
		section: "configuration"
	},
	style: {
		type: "option-select.select",
		label: "Style",
		columns: 12,
		section: "layout",
		selectOptions: [{
			label: "Vertical",
			value: "default"
		}, {
			label: "Horizontal",
			value: "horizontal"
		}]
	},
	navOnTop: {
		type: "boolean.switch",
		label: "Use Top Navigation",
		section: "layout",
		columns: 12
	},
	hideNav: {
		type: "boolean.switch",
		label: "Hide Navigation Bar",
		section: "layout",
		columns: 12
	},
	showCard: {
		type: "boolean.switch",
		defaultValue: true,
		label: "Show Card Chrome",
		columns: 12,
		section: "layout"
	},
	imageAsset: {
		type: "file.asset-picker",
		label: "Image Asset",
		columns: 6,
		section: "configuration",
		acceptedFileTypes: [
			".jpg",
			".jpeg",
			".png",
			".gif",
			".svg",
			".webp"
		]
	},
	icon: {
		type: "picker.icon",
		label: "Icon",
		columns: 6,
		section: "configuration"
	},
	controlTabId: {
		type: "option-select.select",
		label: "Control Tab ID (Allow this tab navigation to control this tab list)",
		columns: 12,
		section: "layout",
		selectOptions: []
	}
};
//#endregion
//#region src/definitions/cards/index.ts
/**
* Runtime registry of card metadata keyed by `cardType`. Used by the
* FormBuilder palette to enumerate available cards.
*/
var DisplayCardMetadataMap = {
	"card-list": CardListCardMetadata,
	datatable: DataTableCardMetadata,
	"element-display": ElementDisplayCardMetadata,
	"element-list": ElementListCardMetadata,
	"grid-view": GridViewCardMetadata,
	"info-card": InfoCardMetadata,
	"tab-list": TabListCardMetadata
};
//#endregion
//#region src/components/ui/separator/Separator.vue
var Separator_default = /* @__PURE__ */ defineComponent({
	__name: "Separator",
	props: {
		class: { type: [
			Boolean,
			null,
			String,
			Object,
			Array
		] },
		orientation: { default: "horizontal" },
		decorative: {
			type: Boolean,
			default: true
		},
		asChild: { type: Boolean },
		as: {}
	},
	setup(__props) {
		const props = __props;
		const delegatedProps = reactiveOmit(props, "class");
		return (_ctx, _cache) => {
			return openBlock(), createBlock(unref(Separator), mergeProps(unref(delegatedProps), { class: unref(cn)("shrink-0 bg-border", props.orientation === "horizontal" ? "h-px w-full" : "w-px h-full", props.class) }), null, 16, ["class"]);
		};
	}
});
//#endregion
//#region src/adapters/snippets.ts
/**
* Snippet placement helpers, shared by the v1↔v2 adapters and the builder.
*
* A *snippet* is a reusable, named config fragment (a card or an element)
* referenced by key instead of duplicated. The definitions live elsewhere
* (in the builder schema's `snippets` map / the host's
* `version.settings.snippets`); these helpers concern only the *placement* of
* a snippet inside a form's child arrays.
*
* Wire formats:
*   - v1: a node `{ type: "snippet", key: "<key>", ...overrides }` placed
*     anywhere a card or element/field can go. Extra keys (anything except
*     `type`/`key`) shallow-merge over the stored fragment per use.
*   - v2: a bare token string in a container's `elementList` / `cardList` /
*     `tabList` (no backing entry in the `cards` / `elements` maps — the
*     `snippet#` prefix is the signal):
*       • `snippet#<key>`                — placement with no per-use overrides.
*       • `snippet#<key>:<instanceId>`   — placement WITH overrides; the
*         override values live in `schema.snippetOverrides[instanceId]`.
*     The instanceId is unique per placement, so the same key reused with
*     different overrides never collides.
*/
/** Prefix marking a child-array id as a snippet placement. */
var SNIPPET_PREFIX = "snippet#";
/** Separator between the snippet key and a per-placement instance id. */
var SNIPPET_INSTANCE_SEP = ":";
/** True when an id string is a snippet placement token. */
function isSnippetToken(id) {
	return typeof id === "string" && id.startsWith("snippet#");
}
/**
* Build a placement token. With `instanceId` the token is
* `snippet#<key>:<instanceId>` (it has per-use overrides); without it the
* token is the bare `snippet#<key>`.
*/
function snippetToken(key, instanceId) {
	return instanceId ? `${SNIPPET_PREFIX}${key}:${instanceId}` : `${SNIPPET_PREFIX}${key}`;
}
/** Split a placement token into its `{ key, instanceId? }` parts. */
function parseSnippetToken(id) {
	const body = id.startsWith("snippet#") ? id.slice(8) : id;
	const sep = body.indexOf(":");
	if (sep === -1) return { key: body };
	return {
		key: body.slice(0, sep),
		instanceId: body.slice(sep + 1)
	};
}
/** The snippet key part of a placement token. */
function snippetKeyFromToken(id) {
	return parseSnippetToken(id).key;
}
/** The per-placement instance id of a token (undefined when none). */
function snippetInstanceFromToken(id) {
	return parseSnippetToken(id).instanceId;
}
/** True when a v1 node is a snippet reference (`{ type: "snippet", key }`). */
function isSnippetNode(node) {
	return typeof node === "object" && node !== null && node.type === "snippet" && typeof node.key === "string";
}
/**
* The override values of a v1 snippet node — everything except the structural
* keys `type`, `key`, and `id` (the `id` is the placement instance id, carried
* by the token, not an override value).
*/
function snippetOverridesOf(node) {
	const out = { ...node };
	delete out.type;
	delete out.key;
	delete out.id;
	return out;
}
/**
* Build a v1 snippet reference node from a key (+ optional instance id and
* overrides). The instance id is emitted as the node's `id`.
*/
function v1SnippetNode(key, overrides, instanceId) {
	return {
		...instanceId ? { id: instanceId } : {},
		type: "snippet",
		key,
		...overrides ?? {}
	};
}
//#endregion
//#region src/stores/formBuilderStore.ts
/**
* Separator used to address a single tab inside a `card.tab` element as a
* drag/drop container: `"<elementId>::tab::<tabId>"`. Each tab owns its own
* `elementList`, so this lets the generic container machinery (add / move /
* reorder / remove) operate on a tab's contents with no special-casing.
*/
var TAB_SEP = "::tab::";
/** Build a composite container id addressing a tab within a card.tab element. */
function tabContainerId(elementId, tabId) {
	return `${elementId}${TAB_SEP}${tabId}`;
}
var idCounter = 0;
function nextId(prefix) {
	idCounter += 1;
	return `${prefix}-${Date.now()}-${idCounter}`;
}
/** Test helper to make ids deterministic. */
function __resetFormBuilderIdCounter() {
	idCounter = 0;
}
/** Deep clone of plain-JSON snippet definitions (no functions/refs inside). */
function structuredCloneSafe(value) {
	return JSON.parse(JSON.stringify(value));
}
function emptyRoot(rootId) {
	return {
		rootCardId: rootId,
		cards: { [rootId]: {
			id: rootId,
			cardType: "element-list",
			title: "",
			elementList: []
		} },
		elements: {}
	};
}
var useFormBuilderStore = defineStore("gx-modui/formBuilder", () => {
	/**
	* Per-builder state, keyed by `builderId`. Lets multiple builders
	* coexist on the same page without colliding.
	*/
	const builders = ref({});
	const selections = ref({});
	/**
	* Per-builder active snippet key. When set, content mutations operate on
	* that snippet's self-contained sub-schema instead of the main schema
	* (so the user can edit a snippet definition in place). `null`/absent ⇒
	* the main schema is the working scope.
	*/
	const snippetScopes = ref({});
	function ensureSnippets(schema) {
		if (!schema.snippets) schema.snippets = {};
		return schema.snippets;
	}
	/**
	* The schema that content operations currently target: the active snippet's
	* sub-schema when one is being edited, otherwise the main schema.
	*/
	function workingSchema(builderId) {
		const main = ensureBuilder(builderId);
		const key = snippetScopes.value[builderId];
		if (key && main.snippets?.[key]) return main.snippets[key];
		return main;
	}
	/**
	* Return the raw mutable bag for a container ID. A container is either a
	* DisplayCard (in schema.cards), a card-type element (schema.elements
	* with a type starting with "card."), or a single tab inside a
	* `card.tab` element addressed as `"<elementId>::tab::<tabId>"`. Each
	* resolved bag carries an `elementList` array.
	*/
	function getContainerBag(schema, containerId) {
		const tabSep = containerId.indexOf(TAB_SEP);
		if (tabSep !== -1) {
			const elId = containerId.slice(0, tabSep);
			const tabId = containerId.slice(tabSep + 7);
			const el = schema.elements[elId];
			if (!el) return null;
			const tab = (el.tabs ?? []).find((t) => t.id === tabId);
			if (!tab) return null;
			if (!Array.isArray(tab.elementList)) tab.elementList = [];
			return tab;
		}
		const card = schema.cards[containerId];
		if (card) return card;
		const el = schema.elements[containerId];
		if (el) {
			const bag = el;
			if (typeof bag.type === "string" && bag.type.startsWith("card.")) return bag;
		}
		return null;
	}
	function ensureBuilder(builderId) {
		if (!builders.value[builderId]) {
			const rootId = nextId("root");
			builders.value[builderId] = emptyRoot(rootId);
			selections.value[builderId] = {
				kind: null,
				id: null
			};
		}
		return builders.value[builderId];
	}
	function loadSchema(builderId, schema) {
		builders.value[builderId] = {
			rootCardId: schema.rootCardId,
			cards: { ...schema.cards },
			elements: { ...schema.elements },
			...schema.snippets ? { snippets: structuredCloneSafe(schema.snippets) } : {},
			...schema.snippetOverrides ? { snippetOverrides: structuredCloneSafe(schema.snippetOverrides) } : {}
		};
		selections.value[builderId] = {
			kind: null,
			id: null
		};
		snippetScopes.value[builderId] = null;
	}
	function resetBuilder(builderId) {
		delete builders.value[builderId];
		delete selections.value[builderId];
		delete snippetScopes.value[builderId];
	}
	/**
	* Append a fresh element of `type` to the given parent card's
	* elementList. `type` is the dot-notation discriminator
	* (e.g. `"input.text"`). When only a category is supplied
	* (`"input"`), the parent's default style is appended.
	*
	* Returns the new element's id so callers can immediately select it
	* for editing.
	*/
	function addElement(builderId, containerId, type) {
		const schema = workingSchema(builderId);
		const bag = getContainerBag(schema, containerId);
		if (!bag) throw new Error(`addElement: container ${containerId} not found in builder ${builderId}`);
		const dotType = type.includes(".") ? type : `${type}.${elementDefaultStyle[type] ?? "text"}`;
		const id = nextId(`el-${dotType.replace(".", "-")}`);
		const element = {
			id,
			type: dotType,
			label: `New ${dotType}`
		};
		if (dotType === "card.tab") element.tabs = [{
			id: nextId("tab"),
			label: "Tab 1",
			elementList: []
		}];
		schema.elements[id] = element;
		bag.elementList = [...bag.elementList ?? [], id];
		return id;
	}
	/**
	* Append a fresh card of `cardType` to the given parent's cardList /
	* tabList. Returns the new card's id.
	*/
	function addCard(builderId, parentCardId, cardType) {
		const schema = workingSchema(builderId);
		const parent = schema.cards[parentCardId];
		if (!parent) throw new Error(`addCard: parent card ${parentCardId} not found`);
		const id = nextId(`card-${cardType}`);
		const card = {
			id,
			cardType,
			title: `New ${cardType}`
		};
		if (cardType === "element-list") card.elementList = [];
		else if (cardType === "card-list") card.cardList = [];
		else if (cardType === "tab-list") card.tabList = [];
		schema.cards[id] = card;
		const parentBag = parent;
		if (parent.cardType === "card-list") parentBag.cardList = [...parentBag.cardList ?? [], id];
		else if (parent.cardType === "tab-list") parentBag.tabList = [...parentBag.tabList ?? [], id];
		else throw new Error(`addCard: parent ${parentCardId} (cardType=${parent.cardType}) does not accept nested cards`);
		return id;
	}
	/**
	* Ensure a top-level "root" card exists under a specific id (used for the
	* main root and for each advanced card list, which are keyed by name —
	* e.g. `"settings"`, `"formTemplate"`). No-op if the card already exists
	* (so loading a saved schema that already contains the root is preserved).
	* A `tab-list` root is seeded with one empty element-list tab so it is
	* immediately editable.
	*/
	function createRootCard(builderId, cardId, cardType, opts) {
		const schema = ensureBuilder(builderId);
		if (schema.cards[cardId]) return;
		const card = {
			id: cardId,
			cardType,
			title: opts?.title ?? ""
		};
		if (cardType === "tab-list") {
			card.tabList = [];
			schema.cards[cardId] = card;
			updateCard(builderId, addCard(builderId, cardId, "element-list"), { title: "Tab 1" });
			return;
		}
		if (cardType === "element-list") card.elementList = [];
		else if (cardType === "card-list") card.cardList = [];
		schema.cards[cardId] = card;
	}
	/**
	* Convert the root into a `tab-list` whose children are `element-list`
	* "tab" cards. Idempotent — if the root is already a tab-list it is left
	* untouched. Any elements directly on the old element-list root are
	* migrated into the first tab so toggling the mode never drops content.
	*/
	function initRootTabs(builderId) {
		const schema = ensureBuilder(builderId);
		const rootId = schema.rootCardId;
		const root = schema.cards[rootId];
		if (!root || root.cardType === "tab-list") return;
		const existing = root.elementList ?? [];
		const tabId = nextId("tab-card");
		schema.cards[tabId] = {
			id: tabId,
			cardType: "element-list",
			title: "Tab 1",
			elementList: existing
		};
		schema.cards[rootId] = {
			id: rootId,
			cardType: "tab-list",
			title: "",
			tabList: [tabId]
		};
	}
	/**
	* Append a new element-list "tab" card to the root tab-list. Returns the
	* new tab card's id (empty string if the root isn't a tab-list).
	*/
	function addRootTab(builderId, title, icon, rootCardId) {
		const schema = workingSchema(builderId);
		const rootId = rootCardId ?? schema.rootCardId;
		const root = schema.cards[rootId];
		if (!root || root.cardType !== "tab-list") return "";
		const tabCount = (root.tabList ?? []).length;
		const id = addCard(builderId, rootId, "element-list");
		updateCard(builderId, id, {
			title: title ?? `Tab ${tabCount + 1}`,
			...icon ? { icon } : {}
		});
		return id;
	}
	/** Reorder the root tab-list's tab cards (drag-reorder in the chrome bar). */
	function reorderRootTab(builderId, fromIndex, toIndex, rootCardId) {
		const schema = workingSchema(builderId);
		const rootId = rootCardId ?? schema.rootCardId;
		const root = schema.cards[rootId];
		if (!root || root.cardType !== "tab-list") return;
		const list = [...root.tabList ?? []];
		if (fromIndex < 0 || fromIndex >= list.length || toIndex < 0 || toIndex >= list.length || fromIndex === toIndex) return;
		const [moved] = list.splice(fromIndex, 1);
		list.splice(toIndex, 0, moved);
		updateCard(builderId, rootId, { tabList: list });
	}
	/** Remove an element by id from the schema and from its parent's list. */
	function removeElement(builderId, elementId) {
		const schema = workingSchema(builderId);
		if (!schema.elements[elementId]) return;
		const elBag = schema.elements[elementId];
		if (typeof elBag.type === "string" && elBag.type.startsWith("card.")) {
			for (const childId of elBag.elementList ?? []) delete schema.elements[childId];
			for (const tab of elBag.tabs ?? []) for (const childId of tab.elementList ?? []) delete schema.elements[childId];
		}
		delete schema.elements[elementId];
		for (const card of Object.values(schema.cards)) {
			const bag = card;
			const list = bag.elementList;
			if (list?.includes(elementId)) bag.elementList = list.filter((id) => id !== elementId);
		}
		for (const el of Object.values(schema.elements)) {
			const bag = el;
			if (typeof bag.type === "string" && bag.type.startsWith("card.")) {
				const list = bag.elementList;
				if (list?.includes(elementId)) bag.elementList = list.filter((id) => id !== elementId);
				for (const tab of bag.tabs ?? []) {
					const tabList = tab.elementList;
					if (tabList?.includes(elementId)) tab.elementList = tabList.filter((id) => id !== elementId);
				}
			}
		}
		const sel = selections.value[builderId];
		if (sel && sel.kind === "element" && sel.id === elementId) selections.value[builderId] = {
			kind: null,
			id: null
		};
	}
	/** Remove a card (and its descendants) recursively. */
	function removeCard(builderId, cardId) {
		const schema = workingSchema(builderId);
		if (cardId === schema.rootCardId) return;
		const card = schema.cards[cardId];
		if (!card) return;
		const bag = card;
		for (const elId of bag.elementList ?? []) delete schema.elements[elId];
		for (const childId of bag.cardList ?? []) removeCard(builderId, childId);
		for (const childId of bag.tabList ?? []) removeCard(builderId, childId);
		delete schema.cards[cardId];
		for (const other of Object.values(schema.cards)) {
			const obag = other;
			for (const key of ["cardList", "tabList"]) {
				const list = obag[key];
				if (list?.includes(cardId)) obag[key] = list.filter((id) => id !== cardId);
			}
		}
		const sel = selections.value[builderId];
		if (sel && sel.kind === "card" && sel.id === cardId) selections.value[builderId] = {
			kind: null,
			id: null
		};
	}
	/** Move an element within a container's elementList (drag-reorder). */
	function reorderElement(builderId, containerId, fromIndex, toIndex) {
		const bag = getContainerBag(workingSchema(builderId), containerId);
		if (!bag) return;
		const list = bag.elementList ?? [];
		if (fromIndex < 0 || fromIndex >= list.length || toIndex < 0 || toIndex >= list.length) return;
		const next = [...list];
		const [moved] = next.splice(fromIndex, 1);
		if (moved !== void 0) {
			next.splice(toIndex, 0, moved);
			bag.elementList = next;
		}
	}
	/** Move an element from one container to another (cross-container drag). */
	function moveElement(builderId, fromContainerId, toContainerId, elementId, toIndex) {
		if (fromContainerId === toContainerId) return;
		const schema = workingSchema(builderId);
		const fromBag = getContainerBag(schema, fromContainerId);
		const toBag = getContainerBag(schema, toContainerId);
		if (!fromBag || !toBag) return;
		const fromList = fromBag.elementList ?? [];
		if (!fromList.includes(elementId)) return;
		fromBag.elementList = fromList.filter((id) => id !== elementId);
		const toList = toBag.elementList ?? [];
		const clamped = Math.max(0, Math.min(toIndex, toList.length));
		const next = [...toList];
		next.splice(clamped, 0, elementId);
		toBag.elementList = next;
	}
	/** Patch an element's properties (used by the Inspector on every input). */
	function updateElement(builderId, elementId, patch) {
		const schema = workingSchema(builderId);
		const current = schema.elements[elementId];
		if (!current) return;
		schema.elements[elementId] = {
			...current,
			...patch
		};
	}
	/** Patch a card's properties. */
	function updateCard(builderId, cardId, patch) {
		const schema = workingSchema(builderId);
		const current = schema.cards[cardId];
		if (!current) return;
		schema.cards[cardId] = {
			...current,
			...patch
		};
	}
	function tabsOf(schema, elementId) {
		const bag = schema.elements[elementId];
		if (!bag || bag.type !== "card.tab") return null;
		if (!Array.isArray(bag.tabs)) bag.tabs = [];
		return bag.tabs;
	}
	/** Append a new tab to a card.tab element. Returns the new tab id. */
	function addTab(builderId, elementId, label) {
		const tabs = tabsOf(workingSchema(builderId), elementId);
		if (!tabs) return "";
		const id = nextId("tab");
		updateElement(builderId, elementId, { tabs: [...tabs, {
			id,
			label: label ?? `Tab ${tabs.length + 1}`,
			elementList: []
		}] });
		return id;
	}
	/** Patch a tab's label (or other props). */
	function updateTab(builderId, elementId, tabId, patch) {
		const tabs = tabsOf(workingSchema(builderId), elementId);
		if (!tabs) return;
		updateElement(builderId, elementId, { tabs: tabs.map((t) => t.id === tabId ? {
			...t,
			...patch
		} : t) });
	}
	/** Remove a tab and cascade-delete the elements it contained. */
	function removeTab(builderId, elementId, tabId) {
		const schema = workingSchema(builderId);
		const tabs = tabsOf(schema, elementId);
		if (!tabs) return;
		const target = tabs.find((t) => t.id === tabId);
		for (const childId of target?.elementList ?? []) delete schema.elements[childId];
		updateElement(builderId, elementId, { tabs: tabs.filter((t) => t.id !== tabId) });
	}
	/** Move a tab from one index to another. */
	function reorderTab(builderId, elementId, fromIndex, toIndex) {
		const tabs = tabsOf(workingSchema(builderId), elementId);
		if (!tabs) return;
		if (fromIndex < 0 || fromIndex >= tabs.length || toIndex < 0 || toIndex >= tabs.length || fromIndex === toIndex) return;
		const next = [...tabs];
		const [moved] = next.splice(fromIndex, 1);
		next.splice(toIndex, 0, moved);
		updateElement(builderId, elementId, { tabs: next });
	}
	/** All snippet keys defined on the schema. */
	function listSnippets(builderId) {
		const main = ensureBuilder(builderId);
		return Object.keys(main.snippets ?? {});
	}
	/** Return a snippet definition (or null). */
	function getSnippet(builderId, key) {
		return ensureBuilder(builderId).snippets?.[key] ?? null;
	}
	/**
	* Create an empty snippet definition under `key`. `kind` controls its root
	* (element-list for a field snippet, card-list for a card snippet). No-op
	* if a snippet with that key already exists. Returns the new root id.
	*/
	function addSnippet(builderId, key, opts) {
		const snippets = ensureSnippets(ensureBuilder(builderId));
		if (snippets[key]) return snippets[key].rootCardId;
		const rootId = nextId("snippet-root");
		const cardType = opts?.kind === "card" ? "card-list" : "element-list";
		const root = {
			id: rootId,
			cardType,
			title: opts?.label ?? key
		};
		if (cardType === "card-list") root.cardList = [];
		else root.elementList = [];
		snippets[key] = {
			rootCardId: rootId,
			cards: { [rootId]: root },
			elements: {},
			label: opts?.label ?? key
		};
		return rootId;
	}
	/** Scan a schema's id lists for any placement token of snippet `key`. */
	function schemaUsesSnippetKey(schema, key) {
		const listUsesKey = (list) => Boolean(list?.some((id) => isSnippetToken(id) && parseSnippetToken(id).key === key));
		for (const card of Object.values(schema.cards)) {
			const bag = card;
			for (const listKey of [
				"elementList",
				"cardList",
				"tabList"
			]) if (listUsesKey(bag[listKey])) return true;
		}
		for (const el of Object.values(schema.elements)) {
			const bag = el;
			if (listUsesKey(bag.elementList)) return true;
			for (const tab of bag.tabs ?? []) if (listUsesKey(tab.elementList)) return true;
		}
		return false;
	}
	/** True when a placement of snippet `key` appears anywhere in the schema. */
	function isSnippetUsed(builderId, key) {
		const main = ensureBuilder(builderId);
		if (schemaUsesSnippetKey(main, key)) return true;
		for (const [k, def] of Object.entries(main.snippets ?? {})) {
			if (k === key) continue;
			if (schemaUsesSnippetKey(def, key)) return true;
		}
		return false;
	}
	/**
	* Remove a snippet definition. Refuses (returns false) if the snippet is
	* still referenced anywhere in the form.
	*/
	function removeSnippet(builderId, key) {
		const main = ensureBuilder(builderId);
		if (!main.snippets?.[key]) return false;
		if (isSnippetUsed(builderId, key)) return false;
		delete main.snippets[key];
		if (snippetScopes.value[builderId] === key) snippetScopes.value[builderId] = null;
		return true;
	}
	/**
	* Place a snippet reference (`snippet#<key>`) into a container's element
	* list in the current working scope, at `index` (default end).
	*/
	function placeSnippet(builderId, containerId, key, index) {
		const bag = getContainerBag(workingSchema(builderId), containerId);
		if (!bag) return;
		const next = [...bag.elementList ?? []];
		const at = index ?? next.length;
		next.splice(Math.max(0, Math.min(at, next.length)), 0, snippetToken(key, nextId("snip")));
		bag.elementList = next;
	}
	/** Read a snippet placement's per-instance override values (or `{}`). */
	function getSnippetOverride(builderId, token) {
		const { instanceId } = parseSnippetToken(token);
		if (!instanceId) return {};
		return workingSchema(builderId).snippetOverrides?.[instanceId] ?? {};
	}
	/**
	* Merge `patch` into a snippet placement's per-instance override values
	* (e.g. a resized `colSpan`). Stored in the working scope's
	* `snippetOverrides`, keyed by the token's instance id.
	*/
	function updateSnippetOverride(builderId, token, patch) {
		const { instanceId } = parseSnippetToken(token);
		if (!instanceId) return;
		const schema = workingSchema(builderId);
		if (!schema.snippetOverrides) schema.snippetOverrides = {};
		schema.snippetOverrides[instanceId] = {
			...schema.snippetOverrides[instanceId] ?? {},
			...patch
		};
	}
	/**
	* Remove a snippet placement token from every container list in the current
	* working scope (the snippet definition itself is left intact).
	*/
	function removeSnippetPlacement(builderId, token) {
		const schema = workingSchema(builderId);
		const drop = (list) => list?.includes(token) ? list.filter((id) => id !== token) : list;
		for (const card of Object.values(schema.cards)) {
			const bag = card;
			bag.elementList = drop(bag.elementList);
			bag.cardList = drop(bag.cardList);
			bag.tabList = drop(bag.tabList);
		}
		for (const el of Object.values(schema.elements)) {
			const bag = el;
			bag.elementList = drop(bag.elementList);
			for (const tab of bag.tabs ?? []) tab.elementList = drop(tab.elementList);
		}
		const { instanceId } = parseSnippetToken(token);
		if (instanceId && schema.snippetOverrides) delete schema.snippetOverrides[instanceId];
		const sel = selections.value[builderId];
		if (sel && sel.id === token) selections.value[builderId] = {
			kind: null,
			id: null
		};
	}
	/** Collect an element id plus all descendant element ids (card.* + tabs). */
	function collectElementSubtree(schema, elementId, acc = /* @__PURE__ */ new Set()) {
		if (acc.has(elementId)) return acc;
		acc.add(elementId);
		const bag = schema.elements[elementId];
		if (!bag) return acc;
		for (const childId of bag.elementList ?? []) if (!isSnippetToken(childId)) collectElementSubtree(schema, childId, acc);
		for (const tab of bag.tabs ?? []) for (const childId of tab.elementList ?? []) if (!isSnippetToken(childId)) collectElementSubtree(schema, childId, acc);
		return acc;
	}
	/** Replace the first occurrence of an id in any container list with a token. */
	function replaceIdWithToken(schema, oldId, token) {
		const swap = (list) => {
			if (!list) return list;
			const idx = list.indexOf(oldId);
			if (idx === -1) return list;
			const next = [...list];
			next[idx] = token;
			return next;
		};
		for (const card of Object.values(schema.cards)) {
			const bag = card;
			bag.elementList = swap(bag.elementList);
			bag.cardList = swap(bag.cardList);
			bag.tabList = swap(bag.tabList);
		}
		for (const el of Object.values(schema.elements)) {
			const bag = el;
			bag.elementList = swap(bag.elementList);
			for (const tab of bag.tabs ?? []) tab.elementList = swap(tab.elementList);
		}
	}
	/**
	* Convert the element subtree rooted at `elementId` (in the current working
	* scope) into a snippet definition stored under `key`, and replace its
	* placement with a `snippet#<key>` token. No-op (returns false) if `key`
	* already exists or the element isn't found.
	*/
	function convertElementToSnippet(builderId, elementId, key, label) {
		const main = ensureBuilder(builderId);
		const schema = workingSchema(builderId);
		const snippets = ensureSnippets(main);
		if (snippets[key] || !schema.elements[elementId]) return false;
		const ids = collectElementSubtree(schema, elementId);
		const defElements = {};
		for (const id of ids) {
			const el = schema.elements[id];
			if (el) defElements[id] = el;
		}
		const rootId = nextId("snippet-root");
		snippets[key] = {
			rootCardId: rootId,
			cards: { [rootId]: {
				id: rootId,
				cardType: "element-list",
				title: label ?? key,
				elementList: [elementId]
			} },
			elements: defElements,
			label: label ?? key
		};
		for (const id of ids) delete schema.elements[id];
		replaceIdWithToken(schema, elementId, snippetToken(key, nextId("snip")));
		const sel = selections.value[builderId];
		if (sel && sel.id === elementId) selections.value[builderId] = {
			kind: null,
			id: null
		};
		return true;
	}
	/** Deep-clone an element subtree from `src` into `dest`, assigning fresh ids. */
	function cloneElementSubtree(src, srcId, dest) {
		const original = src[srcId];
		if (!original) return "";
		const clone = structuredCloneSafe(original);
		const newId = nextId("el");
		clone.id = newId;
		if (String(clone.type ?? "").startsWith("card.")) {
			if (Array.isArray(clone.elementList)) clone.elementList = clone.elementList.map((cid) => isSnippetToken(cid) ? cid : cloneElementSubtree(src, cid, dest));
			if (Array.isArray(clone.tabs)) clone.tabs = clone.tabs.map((t) => ({
				...t,
				id: nextId("tab"),
				elementList: (t.elementList ?? []).map((cid) => isSnippetToken(cid) ? cid : cloneElementSubtree(src, cid, dest))
			}));
		}
		dest[newId] = clone;
		return newId;
	}
	/** Replace a token in any elementList (cards + card.* elements/tabs) with ids. */
	function replaceTokenWithIds(schema, token, ids) {
		const swap = (list) => {
			if (!list) return list;
			const idx = list.indexOf(token);
			if (idx === -1) return list;
			const next = [...list];
			next.splice(idx, 1, ...ids);
			return next;
		};
		for (const card of Object.values(schema.cards)) {
			const bag = card;
			bag.elementList = swap(bag.elementList);
		}
		for (const el of Object.values(schema.elements)) {
			const bag = el;
			bag.elementList = swap(bag.elementList);
			for (const tab of bag.tabs ?? []) tab.elementList = swap(tab.elementList);
		}
	}
	/**
	* Replace a snippet placement with an independent, editable COPY of the
	* snippet's current definition content. Clones the definition's root
	* children (with fresh ids) into the working scope and splices them in where
	* the token was — detaching this placement from the shared snippet. Returns
	* the new top-level element ids.
	*/
	function inlineSnippet(builderId, token) {
		const main = ensureBuilder(builderId);
		const schema = workingSchema(builderId);
		const { key, instanceId } = parseSnippetToken(token);
		const def = main.snippets?.[key];
		const root = def?.cards[def.rootCardId];
		if (!def || !root) return [];
		const childIds = root.elementList ?? [];
		const newIds = [];
		for (const cid of childIds) {
			if (isSnippetToken(cid)) {
				const nested = parseSnippetToken(cid);
				const newInstance = nextId("snip");
				const ov = nested.instanceId ? def.snippetOverrides?.[nested.instanceId] : void 0;
				if (ov) {
					if (!schema.snippetOverrides) schema.snippetOverrides = {};
					schema.snippetOverrides[newInstance] = { ...ov };
				}
				newIds.push(snippetToken(nested.key, newInstance));
				continue;
			}
			const newId = cloneElementSubtree(def.elements, cid, schema.elements);
			if (newId) newIds.push(newId);
		}
		replaceTokenWithIds(schema, token, newIds);
		if (instanceId && schema.snippetOverrides) delete schema.snippetOverrides[instanceId];
		const sel = selections.value[builderId];
		if (sel && sel.id === token) selections.value[builderId] = {
			kind: null,
			id: null
		};
		return newIds;
	}
	/** Enter (key) / leave (null) a snippet-editing scope. */
	function setActiveSnippet(builderId, key) {
		snippetScopes.value[builderId] = key;
		selections.value[builderId] = {
			kind: null,
			id: null
		};
	}
	function getActiveSnippet(builderId) {
		return snippetScopes.value[builderId] ?? null;
	}
	function select(builderId, kind, id) {
		selections.value[builderId] = {
			kind,
			id
		};
	}
	function getSelection(builderId) {
		return selections.value[builderId] ?? {
			kind: null,
			id: null
		};
	}
	/** Convenience getter returning the (full main) schema for export. */
	function getSchema(builderId) {
		return ensureBuilder(builderId);
	}
	/** The schema the UI currently edits (main, or the active snippet's). */
	function getWorkingSchema(builderId) {
		return workingSchema(builderId);
	}
	return {
		builders,
		selections,
		ensureBuilder,
		loadSchema,
		resetBuilder,
		addElement,
		addCard,
		createRootCard,
		initRootTabs,
		addRootTab,
		reorderRootTab,
		removeElement,
		removeCard,
		reorderElement,
		moveElement,
		updateElement,
		updateCard,
		addTab,
		updateTab,
		removeTab,
		reorderTab,
		select,
		getSelection,
		getSchema,
		getWorkingSchema,
		listSnippets,
		getSnippet,
		addSnippet,
		removeSnippet,
		isSnippetUsed,
		placeSnippet,
		removeSnippetPlacement,
		getSnippetOverride,
		updateSnippetOverride,
		convertElementToSnippet,
		inlineSnippet,
		setActiveSnippet,
		getActiveSnippet
	};
});
/** Composable wrapping store access for a single builder instance. */
function useFormBuilder(builderId) {
	const store = useFormBuilderStore();
	store.ensureBuilder(builderId);
	return {
		schema: computed(() => store.getSchema(builderId)),
		/** Schema for the active scope (main, or the snippet being edited). */
		workingSchema: computed(() => store.getWorkingSchema(builderId)),
		activeSnippet: computed(() => store.getActiveSnippet(builderId)),
		selection: computed(() => store.getSelection(builderId)),
		addElement: (parentId, type) => store.addElement(builderId, parentId, type),
		addCard: (parentId, cardType) => store.addCard(builderId, parentId, cardType),
		createRootCard: (cardId, cardType, opts) => store.createRootCard(builderId, cardId, cardType, opts),
		initRootTabs: () => store.initRootTabs(builderId),
		addRootTab: (title, icon, rootCardId) => store.addRootTab(builderId, title, icon, rootCardId),
		reorderRootTab: (from, to, rootCardId) => store.reorderRootTab(builderId, from, to, rootCardId),
		removeElement: (id) => store.removeElement(builderId, id),
		removeCard: (id) => store.removeCard(builderId, id),
		reorderElement: (containerId, from, to) => store.reorderElement(builderId, containerId, from, to),
		moveElement: (fromContainerId, toContainerId, elementId, toIndex) => store.moveElement(builderId, fromContainerId, toContainerId, elementId, toIndex),
		updateElement: (id, patch) => store.updateElement(builderId, id, patch),
		updateCard: (id, patch) => store.updateCard(builderId, id, patch),
		addTab: (elementId, label) => store.addTab(builderId, elementId, label),
		updateTab: (elementId, tabId, patch) => store.updateTab(builderId, elementId, tabId, patch),
		removeTab: (elementId, tabId) => store.removeTab(builderId, elementId, tabId),
		reorderTab: (elementId, from, to) => store.reorderTab(builderId, elementId, from, to),
		select: (kind, id) => store.select(builderId, kind, id),
		loadSchema: (schema) => store.loadSchema(builderId, schema),
		reset: () => store.resetBuilder(builderId),
		listSnippets: () => store.listSnippets(builderId),
		getSnippet: (key) => store.getSnippet(builderId, key),
		addSnippet: (key, opts) => store.addSnippet(builderId, key, opts),
		removeSnippet: (key) => store.removeSnippet(builderId, key),
		isSnippetUsed: (key) => store.isSnippetUsed(builderId, key),
		placeSnippet: (containerId, key, index) => store.placeSnippet(builderId, containerId, key, index),
		removeSnippetPlacement: (token) => store.removeSnippetPlacement(builderId, token),
		getSnippetOverride: (token) => store.getSnippetOverride(builderId, token),
		updateSnippetOverride: (token, patch) => store.updateSnippetOverride(builderId, token, patch),
		convertElementToSnippet: (elementId, key, label) => store.convertElementToSnippet(builderId, elementId, key, label),
		inlineSnippet: (token) => store.inlineSnippet(builderId, token),
		setActiveSnippet: (key) => store.setActiveSnippet(builderId, key)
	};
}
//#endregion
export { ElementDisplayCardDefaults as A, joinElementType as B, GridViewCardDefaults as C, ElementListCardEditConfig as D, ElementListCardDefaults as E, DataTableCardMetadata as F, CardListCardDefaults as I, CardListCardEditConfig as L, ElementDisplayCardMetadata as M, DataTableCardDefaults as N, ElementListCardMetadata as O, DataTableCardEditConfig as P, CardListCardMetadata as R, InfoCardMetadata as S, GridViewCardMetadata as T, splitElementType as V, TabListCardDefaults as _, SNIPPET_INSTANCE_SEP as a, InfoCardDefaults as b, isSnippetToken as c, snippetKeyFromToken as d, snippetOverridesOf as f, DisplayCardMetadataMap as g, Separator_default as h, useFormBuilderStore as i, ElementDisplayCardEditConfig as j, TabContainerElementListCardEditConfig as k, parseSnippetToken as l, v1SnippetNode as m, tabContainerId as n, SNIPPET_PREFIX as o, snippetToken as p, useFormBuilder as r, isSnippetNode as s, __resetFormBuilderIdCounter as t, snippetInstanceFromToken as u, TabListCardEditConfig as v, GridViewCardEditConfig as w, InfoCardEditConfig as x, TabListCardMetadata as y, TabContainerCardListCardEditConfig as z };

//# sourceMappingURL=formBuilderStore-DAIxcb_9.js.map