formeo 4.2.5 → 5.0.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.
@@ -1,7 +1,7 @@
1
1
 
2
2
  /**
3
3
  formeo - https://formeo.io
4
- Version: 4.2.4
4
+ Version: 5.0.0
5
5
  Author: Draggable https://draggable.io
6
6
  */
7
7
 
@@ -9,6 +9,7 @@ Author: Draggable https://draggable.io
9
9
  typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.formeo = {}));
10
10
  })(this, (function(exports2) {
11
11
  "use strict";
12
+ const e = { "en-US": { "en-US": "English", dir: "ltr", "af-ZA": "Afrikaans (South Africa)", "ar-TN": "Arabic (Tunisia)", "cs-CZ": "Czech (Czechia)", "de-DE": "German (Germany)", "es-ES": "European Spanish", "fa-IR": "Persian (Iran)", "fi-FI": "Finnish (Finland)", "fr-FR": "French (France)", "hu-HU": "Hungarian (Hungary)", "it-IT": "Italian (Italy)", "ja-JP": "Japanese (Japan)", "nb-NO": "Norwegian Bokmål (Norway)", "pl-PL": "Polish (Poland)", "pt-BR": "Brazilian Portuguese", "pt-PT": "European Portuguese", "ro-RO": "Romanian (Romania)", "ru-RU": "Russian (Russia)", "th-TH": "Thai (Thailand)", "tr-TR": "Turkish (Türkiye)", "zh-CN": "Chinese (China)", "zh-HK": "Chinese (Hong Kong SAR China)", "action.add.attrs.attr": "What attribute would you like to add?", "action.add.attrs.value": "Default Value", addOption: "Add Option", allFieldsRemoved: "All fields were removed.", allowSelect: "Allow Select", and: "and", attribute: "Attribute", attributeNotPermitted: 'Attribute "{attribute}" is not permitted, please choose another.', attributes: "Attributes", "attrs.class": "Class", "attrs.className": "Class", "attrs.dir": "Direction", "attrs.id": "Id", "attrs.required": "Required", "attrs.style": "Style", "attrs.title": "Title", "attrs.type": "Type", "attrs.value": "Value", autocomplete: "Autocomplete", button: "Button", cannotBeEmpty: "This field cannot be empty", cannotClearFields: "There are no fields to clear", checkbox: "Checkbox", checkboxes: "Checkboxes", class: "Class", clear: "Clear", clearAllMessage: "Are you sure you want to clear all fields?", close: "Close", column: "Column", "condition.target.placeholder": "target", "condition.type.and": "And", "condition.type.if": "If", "condition.type.or": "Or", "condition.type.then": "Then", "condition.value.placeholder": "value", confirmClearAll: "Are you sure you want to remove all fields?", content: "Content", control: "Control", "controlGroups.nextGroup": "Next Group", "controlGroups.prevGroup": "Previous Group", "controls.filteringTerm": 'Filtering "{term}"', "controls.form.button": "Button", "controls.form.checkbox-group": "Checkbox Group", "controls.form.input.date": "Date", "controls.form.input.email": "Email", "controls.form.input.file": "File Upload", "controls.form.input.hidden": "Hidden Input", "controls.form.input.number": "Number", "controls.form.input.text": "Text Input", "controls.form.radio-group": "Radio Group", "controls.form.select": "Select", "controls.form.textarea": "TextArea", "controls.groups.form": "Form Fields", "controls.groups.html": "HTML Elements", "controls.groups.layout": "Layout", "controls.html.divider": "Divider", "controls.html.header": "Header", "controls.html.paragraph": "Paragraph", "controls.layout.column": "Column", "controls.layout.row": "Row", copy: "Copy To Clipboard", danger: "Danger", defineColumnLayout: "Define a column layout", defineColumnWidths: "Define column widths", description: "Help Text", descriptionField: "Description", "editing.row": "Editing Row", editorTitle: "Form Elements", field: "Field", "field.property.invalid": "not valid", "field.property.isChecked": "is checked", "field.property.isNotVisible": "is not visible", "field.property.isVisible": "is visible", "field.property.label": "label", "field.property.valid": "valid", "field.property.value": "value", fieldNonEditable: "This field cannot be edited.", fieldRemoveWarning: "Are you sure you want to remove this field?", fileUpload: "File Upload", formUpdated: "Form Updated", getStarted: "Drag a field from the right to get started.", group: "Group", grouped: "Grouped", hidden: "Hidden Input", hide: "Edit", htmlElements: "HTML Elements", if: "If", "if.condition.source.placeholder": "source", "if.condition.target.placeholder": "target / value", info: "Info", "input.date": "Date", "input.text": "Text", label: "Label", labelCount: "{label} {count}", labelEmpty: "Field Label cannot be empty", "lang.af": "Afrikaans", "lang.ar": "Arabic", "lang.cs": "Czech", "lang.de": "German", "lang.en": "English", "lang.es": "Spanish", "lang.fa": "Persian", "lang.fi": "Finnish", "lang.fr": "French", "lang.hu": "Hungarian", "lang.it": "Italian", "lang.ja": "Japanese", "lang.nb": "Norwegian Bokmål", "lang.pl": "Polish", "lang.pt": "Portuguese", "lang.ro": "Romanian", "lang.ru": "Russian", "lang.th": "Thai", "lang.tr": "Turkish", "lang.zh": "Chinese", layout: "Layout", limitRole: "Limit access to one or more of the following roles:", mandatory: "Mandatory", maxlength: "Max Length", "meta.group": "Group", "meta.icon": "Ico", "meta.label": "Label", minOptionMessage: "This field requires a minimum of 2 options", name: "Name", newOptionLabel: "New {type}", no: "No", number: "Number", off: "Off", on: "On", "operator.contains": "contains", "operator.equals": "equals", "operator.notContains": "not contains", "operator.notEquals": "not equal", "operator.notVisible": "not visible", "operator.visible": "visible", option: "Option", optional: "optional", optionEmpty: "Option value required", optionLabel: "Option {count}", options: "Options", or: "or", order: "Order", "panel.label.attrs": "Attributes", "panel.label.conditions": "Conditions", "panel.label.config": "Configuration", "panel.label.meta": "Meta", "panel.label.options": "Options", "panelEditButtons.attrs": "+ Attribute", "panelEditButtons.conditions": "+ Condition", "panelEditButtons.options": "+ Option", placeholder: "Placeholder", "placeholder.className": "space separated classes", "placeholder.email": "Enter you email", "placeholder.label": "Label", "placeholder.password": "Enter your password", "placeholder.placeholder": "Placeholder", "placeholder.text": "Enter some Text", "placeholder.textarea": "Enter a lot of text", "placeholder.value": "Value", preview: "Preview", primary: "Primary", remove: "Remove", removeMessage: "Remove Element", removeType: "Remove {type}", required: "Required", reset: "Reset", richText: "Rich Text Editor", roles: "Access", row: "Row", "row.makeInputGroup": "Make this row an input group.", "row.makeInputGroupDesc": "Input Groups enable users to add sets of inputs at a time.", "row.settings.fieldsetWrap": "Wrap row in a <fieldset> tag", "row.settings.fieldsetWrap.aria": "Wrap Row in Fieldset", save: "Save", secondary: "Secondary", select: "Select", selectColor: "Select Color", selectionsMessage: "Allow Multiple Selections", selectOptions: "Options", separator: "Separator", settings: "Settings", size: "Size", sizes: "Sizes", "sizes.lg": "Large", "sizes.m": "Default", "sizes.sm": "Small", "sizes.xs": "Extra Small", style: "Style", styles: "Styles", "styles.btn": "Button Style", "styles.btn.danger": "Danger", "styles.btn.default": "Default", "styles.btn.info": "Info", "styles.btn.primary": "Primary", "styles.btn.success": "Success", "styles.btn.warning": "Warning", subtype: "Type", success: "Success", text: "Text Field", then: "Then", "then.condition.target.placeholder": "target", toggle: "Toggle", ungrouped: "Un-Grouped", warning: "Warning", yes: "Yes" } }, i = e["en-US"];
12
13
  async function fetchData(url) {
13
14
  try {
14
15
  const response = await fetch(url);
@@ -53,8 +54,8 @@ Author: Draggable https://draggable.io
53
54
  this.config = { location: parsedLocation, ...restOptions };
54
55
  const { override, preloaded = {} } = this.config;
55
56
  const allLangs = Object.entries(this.langs).concat(Object.entries(override || preloaded));
56
- this.langs = allLangs.reduce((acc, [locale2, lang]) => {
57
- acc[locale2] = this.applyLanguage(locale2, lang);
57
+ this.langs = allLangs.reduce((acc, [locale, lang]) => {
58
+ acc[locale] = this.applyLanguage(locale, lang);
58
59
  return acc;
59
60
  }, {});
60
61
  this.locale = this.config.locale || this.config.langs[0];
@@ -73,9 +74,9 @@ Author: Draggable https://draggable.io
73
74
  * @param {String} locale
74
75
  * @param {String|Object} lang
75
76
  */
76
- addLanguage(locale2, lang = {}) {
77
+ addLanguage(locale, lang = {}) {
77
78
  lang = typeof lang === "string" ? I18N.processFile(lang) : lang;
78
- this.applyLanguage(locale2, lang);
79
+ this.applyLanguage(locale, lang);
79
80
  this.config.langs.push("locale");
80
81
  }
81
82
  /**
@@ -84,9 +85,9 @@ Author: Draggable https://draggable.io
84
85
  * @param {String} locale - locale to check for value
85
86
  * @return {String} language string or undefined
86
87
  */
87
- getValue(key, locale2 = this.locale) {
88
+ getValue(key, locale = this.locale) {
88
89
  var _a;
89
- const value = (_a = this.langs[locale2]) == null ? void 0 : _a[key];
90
+ const value = (_a = this.langs[locale]) == null ? void 0 : _a[key];
90
91
  return value || this.getFallbackValue(key);
91
92
  }
92
93
  /**
@@ -178,22 +179,22 @@ Author: Draggable https://draggable.io
178
179
  * @param {Boolean} useCache
179
180
  * @return {Promise} resolves response
180
181
  */
181
- loadLang(locale2, useCache = true) {
182
+ loadLang(locale, useCache = true) {
182
183
  const _this = this;
183
184
  return new Promise(function(resolve, reject) {
184
- if (_this.loaded.indexOf(locale2) !== -1 && useCache) {
185
- _this.applyLanguage(_this.langs[locale2]);
186
- return resolve(_this.langs[locale2]);
185
+ if (_this.loaded.indexOf(locale) !== -1 && useCache) {
186
+ _this.applyLanguage(_this.langs[locale]);
187
+ return resolve(_this.langs[locale]);
187
188
  } else {
188
- const langFile = [_this.config.location, locale2, _this.config.extension].join("");
189
+ const langFile = [_this.config.location, locale, _this.config.extension].join("");
189
190
  return fetchData(langFile).then((lang) => {
190
191
  const processedFile = I18N.processFile(lang);
191
- _this.applyLanguage(locale2, processedFile);
192
- _this.loaded.push(locale2);
193
- return resolve(_this.langs[locale2]);
192
+ _this.applyLanguage(locale, processedFile);
193
+ _this.loaded.push(locale);
194
+ return resolve(_this.langs[locale]);
194
195
  }).catch((err) => {
195
196
  console.error(err);
196
- const lang = _this.applyLanguage(locale2);
197
+ const lang = _this.applyLanguage(locale);
197
198
  resolve(lang);
198
199
  });
199
200
  }
@@ -205,11 +206,11 @@ Author: Draggable https://draggable.io
205
206
  * @param {Object} lang
206
207
  * @return {Object} overriden language
207
208
  */
208
- applyLanguage(locale2, lang = {}) {
209
- const override = this.config.override[locale2] || {};
210
- const existingLang = this.langs[locale2] || {};
211
- this.langs[locale2] = { ...existingLang, ...lang, ...override };
212
- return this.langs[locale2];
209
+ applyLanguage(locale, lang = {}) {
210
+ const override = this.config.override[locale] || {};
211
+ const existingLang = this.langs[locale] || {};
212
+ this.langs[locale] = { ...existingLang, ...lang, ...override };
213
+ return this.langs[locale];
213
214
  }
214
215
  /**
215
216
  * return currently available languages
@@ -223,10 +224,10 @@ Author: Draggable https://draggable.io
223
224
  * @param {String} locale
224
225
  * @return {Promise} language
225
226
  */
226
- async setCurrent(locale2 = "en-US") {
227
- await this.loadLang(locale2);
228
- this.locale = locale2;
229
- this.current = this.langs[locale2];
227
+ async setCurrent(locale = "en-US") {
228
+ await this.loadLang(locale);
229
+ this.locale = locale;
230
+ this.current = this.langs[locale];
230
231
  return this.current;
231
232
  }
232
233
  }
@@ -435,7 +436,7 @@ Author: Draggable https://draggable.io
435
436
  window.SmartTooltip = SmartTooltip;
436
437
  }
437
438
  const name$1 = "formeo";
438
- const version$2 = "4.2.4";
439
+ const version$2 = "5.0.0";
439
440
  const pkg = {
440
441
  name: name$1,
441
442
  version: version$2
@@ -2170,7 +2171,7 @@ Author: Draggable https://draggable.io
2170
2171
  }
2171
2172
  return result;
2172
2173
  }
2173
- const BUNDLED_SVG_SPRITE = '<?xml version="1.0" encoding="utf-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><symbol id="f-i-autocomplete" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M6,5h1v1H6V5z M4,4H3v1h1V4z M6,4H5v1h1V4z M2,5v1h1V5H2z M3,7h1V6H3V7z M5,7h1V6H5V7z M4,5v1h1V5H4z M2,14h1v-1H2V14z M4,14h1v-1H4V14z M6,14h1v-1H6V14z M9,13H8v1h1V13z M16,3.5v4C16,8.3,15.3,9,14.5,9H14v3v3c0,0.6-0.4,1-1,1H1c-0.6,0-1-0.4-1-1V3.5 C0,2.7,0.7,2,1.5,2h3H8V1.5V1H7H6V0.5V0h2.5H11v0.5V1h-1H9v0.5V2h3h2.5C15.3,2,16,2.7,16,3.5z M13,12H7H1v3h12V12z M3,11v-1H2v1H3z M5,11v-1H4v1H5z M15,3.5C15,3.2,14.8,3,14.5,3H9v2.5V8H8.5H8V7.5V7H7V6h1V5.5V5H7V4h1V3.5V3H1.5C1.2,3,1,3.2,1,3.5v4 C1,7.8,1.2,8,1.5,8H8v1H6v0.5V10h2.5H11V9.5V9H9V8h5.5C14.8,8,15,7.8,15,7.5V3.5z"/></symbol><symbol viewBox="0 0 32 32" id="f-i-bin" xmlns="http://www.w3.org/2000/svg"><path d="M4 10v20c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2v-20h-22zM10 28h-2v-14h2v14zM14 28h-2v-14h2v14zM18 28h-2v-14h2v14zM22 28h-2v-14h2v14zM26.5 4h-6.5v-2.5c0-.825-.675-1.5-1.5-1.5h-7c-.825 0-1.5.675-1.5 1.5v2.5h-6.5c-.825 0-1.5.675-1.5 1.5v2.5h26v-2.5c0-.825-.675-1.5-1.5-1.5zM18 4h-6v-1.975h6v1.975z"/></symbol><symbol id="f-i-button" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><metadata id="acprefix__metadata8"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><path id="acprefix__rect4140" d="M 0.4765625,4 A 0.47706934,0.47706934 0 0 0 0,4.4765625 L 0,11.523438 A 0.47706934,0.47706934 0 0 0 0.4765625,12 L 15.523438,12 A 0.47706934,0.47706934 0 0 0 16,11.523438 L 16,4.4765625 A 0.47706934,0.47706934 0 0 0 15.523438,4 L 0.4765625,4 Z m 0.4765625,0.953125 14.09375,0 0,6.09375 -14.09375,0 0,-6.09375 z"/><g id="acprefix__layer1"><g id="acprefix__text4203"><g id="acprefix__g4212" transform="translate(0.10112835,0.1001358)"><path id="acprefix__path4208" d="m 6.0690374,6.4093857 q -0.5371093,0 -0.8544922,0.4003906 -0.3149414,0.4003906 -0.3149414,1.0913086 0,0.6884766 0.3149414,1.0888672 0.3173829,0.4003906 0.8544922,0.4003906 0.5371094,0 0.8496094,-0.4003906 0.3149414,-0.4003906 0.3149414,-1.0888672 0,-0.690918 -0.3149414,-1.0913086 -0.3125,-0.4003906 -0.8496094,-0.4003906 z m 0,-0.4003906 q 0.7666016,0 1.225586,0.5151367 0.4589843,0.5126953 0.4589843,1.3769531 0,0.8618164 -0.4589843,1.3769531 -0.4589844,0.5126953 -1.225586,0.5126953 -0.7690429,0 -1.2304687,-0.5126953 -0.4589844,-0.5126953 -0.4589844,-1.3769531 0,-0.8642578 0.4589844,-1.3769531 0.4614258,-0.5151367 1.2304687,-0.5151367 z"/><path id="acprefix__path4210" d="m 8.5250921,6.074913 0.4931641,0 0,1.5405274 1.6357418,-1.5405274 0.634766,0 -1.809082,1.6992188 1.938477,1.9458008 -0.649415,0 -1.7504878,-1.7553711 0,1.7553711 -0.4931641,0 0,-3.6450196 z"/></g></g></g></symbol><symbol viewBox="0 0 32 32" id="f-i-calendar" xmlns="http://www.w3.org/2000/svg"><path d="M12.048 16.961c-0.178 0.257-0.395 0.901-0.652 1.059-0.257 0.157-0.547 0.267-0.869 0.328-0.323 0.062-0.657 0.089-1.002 0.079v1.527h2.467v6.046h1.991v-9.996h-1.584c-0.056 0.381-0.173 0.7-0.351 0.957zM23 8h2c0.553 0 1-0.448 1-1v-6c0-0.552-0.447-1-1-1h-2c-0.553 0-1 0.448-1 1v6c0 0.552 0.447 1 1 1zM7 8h2c0.552 0 1-0.448 1-1v-6c0-0.552-0.448-1-1-1h-2c-0.552 0-1 0.448-1 1v6c0 0.552 0.448 1 1 1zM30 4h-2v5c0 0.552-0.447 1-1 1h-6c-0.553 0-1-0.448-1-1v-5h-8v5c0 0.552-0.448 1-1 1h-6c-0.552 0-1-0.448-1-1v-5h-2c-1.104 0-2 0.896-2 2v24c0 1.104 0.896 2 2 2h28c1.104 0 2-0.896 2-2v-24c0-1.104-0.896-2-2-2zM30 29c0 0.553-0.447 1-1 1h-26c-0.552 0-1-0.447-1-1v-16c0-0.552 0.448-1 1-1h26c0.553 0 1 0.448 1 1v16zM15.985 17.982h4.968c-0.936 1.152-1.689 2.325-2.265 3.705-0.575 1.381-0.638 2.818-0.749 4.312h2.131c0.009-0.666-0.195-1.385-0.051-2.156 0.146-0.771 0.352-1.532 0.617-2.285 0.267-0.752 0.598-1.461 0.996-2.127 0.396-0.667 0.853-1.229 1.367-1.686v-1.742h-7.015v1.979z"/></symbol><symbol id="f-i-checkbox" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M13.5,5v8c0,0.8-0.7,1.5-1.5,1.5H3c-0.8,0-1.5-0.7-1.5-1.5V4c0-0.8,0.7-1.5,1.5-1.5h9c0.7,0,1.3,0.5,1.5,1.2l2.4-1.4L13.5,5 z M12.5,6.2L7.7,12L2.8,5.5l4.9,1.6l4.8-2.9V4c0-0.3-0.2-0.5-0.5-0.5H3C2.7,3.5,2.5,3.7,2.5,4v9c0,0.3,0.2,0.5,0.5,0.5h9 c0.3,0,0.5-0.2,0.5-0.5V6.2z"/></symbol><symbol id="f-i-checkbox-group" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M0,1h16V0H0V1z M0,3h16V2H0V3z M6,5v1h9V5H6z M15,14v-1H6v1H15z M6,10h9V9H6V10z M4,12l-2.5,1.5L0,13l1.5,2L4,12z M4,8 L1.5,9.5L0,9l1.5,2L4,8z M4,4L1.5,5.5L0,5l1.5,2L4,4z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-columns" xmlns="http://www.w3.org/2000/svg"><metadata id="agprefix__metadata4318"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><path id="agprefix__rect4860-3-5" d="M 16,0.5 A 0.50004997,0.50004997 0 0 0 15.5,0 l -5,0 -5,0 -5,0 A 0.50004997,0.50004997 0 0 0 0,0.5 l 0,15 A 0.50004997,0.50004997 0 0 0 0.5,16 l 5,0 5,0 5,0 A 0.50004997,0.50004997 0 0 0 16,15.5 l 0,-15 z M 15,1 15,15 11,15 11,1 15,1 Z M 10,1 10,15 6,15 6,1 10,1 Z M 5,1 5,15 1,15 1,1 5,1 Z"/></symbol><symbol viewBox="0 0 32 32" id="f-i-copy" xmlns="http://www.w3.org/2000/svg"><path d="M20 8v-8h-14l-6 6v18h12v8h20v-24h-12zM6 2.828v3.172h-3.172l3.172-3.172zM2 22v-14h6v-6h10v6l-6 6v8h-10zM18 10.828v3.172h-3.172l3.172-3.172zM30 30h-16v-14h6v-6h10v20z"/></symbol><symbol id="f-i-divider" viewBox="0 0 15 15" xmlns="http://www.w3.org/2000/svg"><metadata id="aiprefix__metadata10"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><rect y="7" x="0" height="1" width="15" id="aiprefix__rect4182"/></symbol><symbol viewBox="0 0 28 32" id="f-i-edit" xmlns="http://www.w3.org/2000/svg"><path d="M22 2l-4 4 6 6 4-4-6-6zM0 24l0.021 6.018 5.979-0.018 16-16-6-6-16 16zM6 28h-4v-4h2v2h2v2z"/></symbol><symbol fill="#000000" viewBox="0 0 24 24" id="f-i-email" xmlns="http://www.w3.org/2000/svg"><path d="M12,2 C17.4292399,2 21.8479317,6.32667079 21.9961582,11.7200952 L22,12 L22,13 C22,15.1729208 20.477434,17 18.5,17 C17.3269391,17 16.3139529,16.3570244 15.6839382,15.3803024 C14.770593,16.3757823 13.4581934,17 12,17 C9.23857625,17 7,14.7614237 7,12 C7,9.23857625 9.23857625,7 12,7 C14.6887547,7 16.8818181,9.12230671 16.9953805,11.7831104 L17,12 L17,13 C17,14.1407877 17.7160103,15 18.5,15 C19.2447902,15 19.928229,14.2245609 19.9947109,13.1689341 L20,13 L20,12 C20,7.581722 16.418278,4 12,4 C7.581722,4 4,7.581722 4,12 C4,16.418278 7.581722,20 12,20 C13.1630948,20 14.2892822,19.7522618 15.3225159,19.2798331 C15.8247876,19.0501777 16.4181317,19.271177 16.647787,19.7734487 C16.8774423,20.2757205 16.656443,20.8690646 16.1541713,21.0987199 C14.861218,21.689901 13.4515463,22 12,22 C6.4771525,22 2,17.5228475 2,12 C2,6.4771525 6.4771525,2 12,2 Z M12,9 C10.3431458,9 9,10.3431458 9,12 C9,13.6568542 10.3431458,15 12,15 C13.6568542,15 15,13.6568542 15,12 C15,10.3431458 13.6568542,9 12,9 Z"/></symbol><symbol viewBox="0 0 32 32" id="f-i-floppy-disk" xmlns="http://www.w3.org/2000/svg"><path d="M28 0h-28v32h32v-28l-4-4zM16 4h4v8h-4v-8zM28 28h-24v-24h2v10h18v-10h2.343l1.657 1.657v22.343z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-handle" xmlns="http://www.w3.org/2000/svg"><metadata id="aqprefix__metadata8"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><g transform="translate(0,-2)" id="aqprefix__g4220"><rect id="aqprefix__rect4191" width="2" height="2" x="2" y="7"/><rect id="aqprefix__rect4191-2" width="2" height="2" x="7" y="7"/><rect id="aqprefix__rect4191-4" width="2" height="2" x="12" y="7"/></g><g transform="translate(0,2)" id="aqprefix__g4220-6"><rect id="aqprefix__rect4191-40" width="2" height="2" x="2" y="7"/><rect id="aqprefix__rect4191-2-3" width="2" height="2" x="7" y="7"/><rect id="aqprefix__rect4191-4-9" width="2" height="2" x="12" y="7"/></g></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-handle-column" xmlns="http://www.w3.org/2000/svg"><path d="M2 7h2v2H2zM7 7h2v2H7zM12 7h2v2h-2zM2 12h2v2H2zM7 12h2v2H7zM12 12h2v2h-2z" transform="rotate(90 9.25 9.25)"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-handle-field" xmlns="http://www.w3.org/2000/svg"><path d="M9.5-6.5h2v2h-2zm-5 0h2v2h-2zm5-5h2v2h-2zm-5 0h2v2h-2z" transform="rotate(90)"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-handle-row" xmlns="http://www.w3.org/2000/svg"><path d="M12 9.5h2v2h-2zm-5 0h2v2H7Zm-5 0h2v2H2Zm10-5h2v2h-2zm-5 0h2v2H7Zm-5 0h2v2H2Z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-handle-stage" xmlns="http://www.w3.org/2000/svg"><path d="M2 4.5h2v2H2zM7 4.5h2v2H7zM12 4.5h2v2h-2zM2 9.5h2v2H2zM7 9.5h2v2H7zM12 9.5h2v2h-2zM2-.5h2v2H2zM7-.5h2v2H7zM12-.5h2v2h-2z" transform="translate(0 2.5)"/></symbol><symbol viewBox="0 0 448 512" id="f-i-hash" xmlns="http://www.w3.org/2000/svg"><g id="arprefix__icomoon-ignore"/><path fill="#000" d="M448 192v-64h-80.064l16-128h-64l-16 128h-127.968l16-128h-64l-16 128h-111.968v64h103.968l-15.968 128h-88v64h80l-16 128h64l16-128h127.968l-16 128h64.032l16-128h112v-64h-104l15.936-128h88.064zM279.968 320h-127.968l15.968-128h127.968l-15.968 128z"/></symbol><symbol viewBox="0 0 28 28" id="f-i-header" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M26.281 26q-0.688 0-2.070-0.055t-2.086-0.055q-0.688 0-2.063 0.055t-2.063 0.055q-0.375 0-0.578-0.32t-0.203-0.711q0-0.484 0.266-0.719t0.609-0.266 0.797-0.109 0.703-0.234q0.516-0.328 0.516-2.188l-0.016-6.109q0-0.328-0.016-0.484-0.203-0.063-0.781-0.063h-10.547q-0.594 0-0.797 0.063-0.016 0.156-0.016 0.484l-0.016 5.797q0 2.219 0.578 2.562 0.25 0.156 0.75 0.203t0.891 0.055 0.703 0.234 0.313 0.711q0 0.406-0.195 0.75t-0.57 0.344q-0.734 0-2.18-0.055t-2.164-0.055q-0.672 0-2 0.055t-1.984 0.055q-0.359 0-0.555-0.328t-0.195-0.703q0-0.469 0.242-0.703t0.562-0.273 0.742-0.117 0.656-0.234q0.516-0.359 0.516-2.234l-0.016-0.891v-12.703q0-0.047 0.008-0.406t0-0.57-0.023-0.602-0.055-0.656-0.102-0.57-0.172-0.492-0.25-0.281q-0.234-0.156-0.703-0.187t-0.828-0.031-0.641-0.219-0.281-0.703q0-0.406 0.187-0.75t0.562-0.344q0.719 0 2.164 0.055t2.164 0.055q0.656 0 1.977-0.055t1.977-0.055q0.391 0 0.586 0.344t0.195 0.75q0 0.469-0.266 0.68t-0.602 0.227-0.773 0.063-0.672 0.203q-0.547 0.328-0.547 2.5l0.016 5q0 0.328 0.016 0.5 0.203 0.047 0.609 0.047h10.922q0.391 0 0.594-0.047 0.016-0.172 0.016-0.5l0.016-5q0-2.172-0.547-2.5-0.281-0.172-0.914-0.195t-1.031-0.203-0.398-0.773q0-0.406 0.195-0.75t0.586-0.344q0.688 0 2.063 0.055t2.063 0.055q0.672 0 2.016-0.055t2.016-0.055q0.391 0 0.586 0.344t0.195 0.75q0 0.469-0.273 0.688t-0.625 0.227-0.805 0.047-0.688 0.195q-0.547 0.359-0.547 2.516l0.016 14.734q0 1.859 0.531 2.188 0.25 0.156 0.719 0.211t0.836 0.070 0.648 0.242 0.281 0.695q0 0.406-0.187 0.75t-0.562 0.344z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-hidden" xmlns="http://www.w3.org/2000/svg"><path d="M0 12h1v-1H0Zm15-7h1V4h-1zm-1 7h1v-1h-1zm-2 0h1v-1h-1zm-2 0h1v-1h-1Zm-2 0h1v-1H8Zm-2 0h1v-1H6Zm-2 0h1v-1H4Zm-2 0h1v-1H2Zm13-1h1v-1h-1ZM0 10h1V9H0Zm15-1h1V8h-1ZM0 8h1V7H0Zm15-1h1V6h-1ZM0 6h1V5H0Zm13-1h1V4h-1zm-2 0h1V4h-1ZM9 5h1V4H9ZM7 5h1V4H7ZM5 5h1V4H5ZM3 5h1V4H3ZM1 5h1V4H1Z"/></symbol><symbol viewBox="0 0 384 512" id="f-i-menu" xmlns="http://www.w3.org/2000/svg"><g id="auprefix__icomoon-ignore"/><path d="M0 96v64h384v-64h-384zM0 288h384v-64h-384v64zM0 416h384v-64h-384v64z"/></symbol><symbol viewBox="0 0 24 24" fill="none" id="f-i-minus" xmlns="http://www.w3.org/2000/svg"><path d="M6 12L18 12" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></symbol><symbol viewBox="0 0 512 512" id="f-i-move" xmlns="http://www.w3.org/2000/svg"><path d="M287.744 94.736v129.008h128v-64l96.256 96.256-96.256 96.24v-65.488h-128v129.008h64.496l-96.24 96.24-96.256-96.24h64v-129.008h-128v64.992l-95.744-95.744 95.744-95.744v63.488h128v-129.008h-62.496l94.752-94.736 94.752 94.736h-63.008z"/></symbol><symbol viewBox="0 0 512 512" id="f-i-move-vertical" xmlns="http://www.w3.org/2000/svg"><metadata id="awprefix__metadata10"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="3440" inkscape:window-height="1416" id="awprefix__namedview6" showgrid="false" inkscape:zoom="1.84375" inkscape:cx="421.4312" inkscape:cy="218.56484" inkscape:window-x="0" inkscape:window-y="24" inkscape:window-maximized="1" inkscape:current-layer="svg2" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"/><path d="m 287.744,94.736 0,321.024 64.496,0 L 256,512 l -96.256,-96.24 64,0 0,-321.024 -62.496,0 L 256,0 350.752,94.736 Z" id="awprefix__path4" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" inkscape:connector-curvature="0" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" sodipodi:nodetypes="ccccccccccc"/></symbol><symbol viewBox="0 0 20 28" id="f-i-paragraph" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M19.969 2.953v1.141q0 0.453-0.289 0.953t-0.664 0.5q-0.781 0-0.844 0.016-0.406 0.094-0.5 0.484-0.047 0.172-0.047 1v18q0 0.391-0.281 0.672t-0.672 0.281h-1.687q-0.391 0-0.672-0.281t-0.281-0.672v-19.031h-2.234v19.031q0 0.391-0.273 0.672t-0.68 0.281h-1.687q-0.406 0-0.68-0.281t-0.273-0.672v-7.75q-2.297-0.187-3.828-0.922-1.969-0.906-3-2.797-1-1.828-1-4.047 0-2.594 1.375-4.469 1.375-1.844 3.266-2.484 1.734-0.578 6.516-0.578h7.484q0.391 0 0.672 0.281t0.281 0.672z"/></symbol><symbol id="f-i-phone-receiver" viewBox="0 0 578.106 578.106" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><g><g><path d="M577.83,456.128c1.225,9.385-1.635,17.545-8.568,24.48l-81.396,80.781 c-3.672,4.08-8.465,7.551-14.381,10.404c-5.916,2.857-11.729,4.693-17.439,5.508c-0.408,0-1.635,0.105-3.676,0.309 c-2.037,0.203-4.689,0.307-7.953,0.307c-7.754,0-20.301-1.326-37.641-3.979s-38.555-9.182-63.645-19.584 c-25.096-10.404-53.553-26.012-85.376-46.818c-31.823-20.805-65.688-49.367-101.592-85.68 c-28.56-28.152-52.224-55.08-70.992-80.783c-18.768-25.705-33.864-49.471-45.288-71.299 c-11.425-21.828-19.993-41.616-25.705-59.364S4.59,177.362,2.55,164.51s-2.856-22.95-2.448-30.294 c0.408-7.344,0.612-11.424,0.612-12.24c0.816-5.712,2.652-11.526,5.508-17.442s6.324-10.71,10.404-14.382L98.022,8.756 c5.712-5.712,12.24-8.568,19.584-8.568c5.304,0,9.996,1.53,14.076,4.59s7.548,6.834,10.404,11.322l65.484,124.236 c3.672,6.528,4.692,13.668,3.06,21.42c-1.632,7.752-5.1,14.28-10.404,19.584l-29.988,29.988c-0.816,0.816-1.53,2.142-2.142,3.978 s-0.918,3.366-0.918,4.59c1.632,8.568,5.304,18.36,11.016,29.376c4.896,9.792,12.444,21.726,22.644,35.802 s24.684,30.293,43.452,48.653c18.36,18.77,34.68,33.354,48.96,43.76c14.277,10.4,26.215,18.053,35.803,22.949 c9.588,4.896,16.932,7.854,22.031,8.871l7.648,1.531c0.816,0,2.145-0.307,3.979-0.918c1.836-0.613,3.162-1.326,3.979-2.143 l34.883-35.496c7.348-6.527,15.912-9.791,25.705-9.791c6.938,0,12.443,1.223,16.523,3.672h0.611l118.115,69.768 C571.098,441.238,576.197,447.968,577.83,456.128z"/></g></g><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/></symbol><symbol viewBox="0 0 24 24" fill="none" id="f-i-plus" xmlns="http://www.w3.org/2000/svg"><path d="M6 12H18M12 6V18" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></symbol><symbol id="f-i-radio-group" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M0,1h16V0H0V1z M0,3h16V2H0V3z M5,6h10V5H5V6z M15,9H5v1h10V9z M15,14v-1H5v1H15z M1.5,7C0.7,7,0,6.3,0,5.5S0.7,4,1.5,4 S3,4.7,3,5.5S2.3,7,1.5,7z M1.5,5C1.2,5,1,5.2,1,5.5S1.2,6,1.5,6S2,5.8,2,5.5S1.8,5,1.5,5z M1.5,11.1C0.7,11.1,0,10.4,0,9.6 s0.7-1.5,1.5-1.5S3,8.7,3,9.6S2.3,11.1,1.5,11.1z M1.5,9.1C1.2,9.1,1,9.3,1,9.6s0.2,0.5,0.5,0.5S2,9.8,2,9.6S1.8,9.1,1.5,9.1z M1.5,15C0.7,15,0,14.3,0,13.5S0.7,12,1.5,12S3,12.7,3,13.5S2.3,15,1.5,15z M1.5,13C1.2,13,1,13.2,1,13.5S1.2,14,1.5,14 S2,13.8,2,13.5S1.8,13,1.5,13z"/></symbol><symbol viewBox="0 0 512 512" id="f-i-remove" xmlns="http://www.w3.org/2000/svg"><path d="M193.694-139.2h87.322v510.916h-87.322zM-18.103 159.92V72.597h510.915v87.322z" transform="rotate(45 77.994 208.636)"/></symbol><symbol id="f-i-rich-text" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M15,1H1C0.4,1,0,1.4,0,2v12c0,0.6,0.4,1,1,1h14c0.6,0,1-0.4,1-1V2C16,1.4,15.6,1,15,1z M1,3.1h0.8v0.3H1V3.1z M1,3.6h0.8 v0.3H1V3.6z M15,14H1V5.1h14V14z M15,4.9H1V4.6h14V4.9z M15,4.4H1V4.1h0.8v0.2h1.5V4.1h1.3v0.2H6V4.1h1.3v0.2h1.5V4.1H10v0.2h1.5 V4.1h1.3v0.2h1.5V4.1H15V4.4z M4.5,3.6v0.3H3.3V3.6H4.5z M3.3,3.4V3.1h1.3v0.3H3.3z M7.3,3.6v0.3H6V3.6H7.3z M6,3.4V3.1h1.3v0.3H6z M10,3.6v0.3H8.8V3.6H10z M8.8,3.4V3.1H10v0.3H8.8z M12.8,3.6v0.3h-1.3V3.6H12.8z M11.5,3.4V3.1h1.3v0.3H11.5z M15,3.9h-0.8V3.6H15 V3.9z M15,3.4h-0.8V3.1H15V3.4z M15,2.9h-0.8V2.8h-1.5v0.2h-1.3V2.8H10v0.2H8.8V2.8H7.3v0.2H6V2.8H4.5v0.2H3.3V2.8H1.8v0.2H1V2.6h14 V2.9z M15,2.4H1V2.1h14V2.4z M3,12v-1h10v1H3z M13,10H3V9h10V10z M11,8H3V7h8V8z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-rows" xmlns="http://www.w3.org/2000/svg"><metadata id="beprefix__metadata4318"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><g transform="matrix(0,1,-1,0,3.0984025,11.835155)" id="beprefix__g7209"><path id="beprefix__rect4860-3-5" d="m 4.1640625,-12.402344 a 0.50004997,0.50004997 0 0 0 -0.5,-0.5 l -5,0 -5,0 -5.0000005,0 a 0.50004997,0.50004997 0 0 0 -0.5,0.5 l 0,15.0000002 a 0.50004997,0.50004997 0 0 0 0.5,0.5 l 4.9648442,0 a 0.50004997,0.50004997 0 0 0 0.035156,0 l 4.9648437,0 a 0.50004997,0.50004997 0 0 0 0.035156,0 l 5,0 a 0.50004997,0.50004997 0 0 0 0.5,-0.5 l 0,-15.0000002 z m -1,0.5 0,14.0000002 -4,0 0,-14.0000002 4,0 z m -5,0 0,14.0000002 -4,0 0,-14.0000002 4,0 z m -5,0 0,14.0000002 -4.0000005,0 0,-14.0000002 4.0000005,0 z"/></g></symbol><symbol id="f-i-select" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path id="bfprefix__XMLID_1_" d="M0,0v14h0c0,0.6,0.4,1,1,1h10c0.6,0,1-0.4,1-1h0V5h4V0H0z M1,1h10v3H1V1z M1,7h10v3H1V7z M1,14v-3h10v3H1z M15,4h-3V1h3V4z M2,2h1v1H2V2z M2,12h1v1H2V12z M4,12h1v1H4V12z M6,12h1v1H6V12z M9,12v1H8v-1H9z M2,8h1v1H2V8z M4,8h1v1H4V8z M6,8 h1v1H6V8z M13.5,3.1l-1-1.1h1.9L13.5,3.1z M2,6V5h1v1H2L2,6z M4,6V5h1v1H4L4,6z"/></symbol><symbol viewBox="0 0 448 512" id="f-i-settings" xmlns="http://www.w3.org/2000/svg"><g id="bgprefix__icomoon-ignore"/><path d="M223.969 175c-44.703 0-80.969 36.266-80.969 81 0 44.688 36.266 81.031 80.969 81.031 44.719 0 80.719-36.344 80.719-81.031-0-44.734-36-81-80.719-81zM386.313 302.531l-14.594 35.156 29.469 57.875-36.094 36.094-59.218-27.969-35.156 14.438-17.844 54.625-2.281 7.25h-51.016l-22.078-61.656-35.156-14.5-57.952 29.344-36.078-36.063 27.938-59.25-14.484-35.125-61.767-20.156v-50.984l61.703-22.109 14.485-35.094-25.953-51.234-3.422-6.719 36.031-36.031 59.297 27.922 35.109-14.516 17.828-54.594 2.297-7.234h51l22.094 61.734 35.063 14.516 58.031-29.406 36.063 36.031-27.938 59.203 14.438 35.172 61.875 20.125v50.969l-61.688 22.187z"/></symbol><symbol id="f-i-text-input" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path id="bhprefix__XMLID_10_" d="M15,4H4.5V3H6V2H4.5h-1H2v1h1.5v1H1C0.4,4,0,4.5,0,5v6c0,0.6,0.4,1,1,1h2.5v1H2v1h4v-1H4.5v-1H15 c0.6,0,1-0.4,1-1V5C16,4.5,15.6,4,15,4z M1,11V5h2.5v6H1z M15,11H4.5V5H15V11z"/></symbol><symbol id="f-i-textarea" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path id="biprefix__XMLID_1_" d="M3,11v-1h8v1H3L3,11z M3,7h10V6H3V7L3,7z M3,8v1h10V8H3L3,8z M13,4H3v1h10V4L13,4z M16,14V2c0-0.6-0.4-1-1-1 H1C0.4,1,0,1.4,0,2v12c0,0.6,0.4,1,1,1h14C15.6,15,16,14.6,16,14z M15,2v12H1V2H15z"/></symbol><symbol viewBox="0 0 24 32" id="f-i-triangle-down" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M0 12l11.992 11.992 11.992-11.992h-23.984z"/></symbol><symbol viewBox="0 0 12 32" id="f-i-triangle-left" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M0 15.996l11.992 11.992v-23.984l-11.992 11.992z"/></symbol><symbol viewBox="0 0 12 32" id="f-i-triangle-right" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M0.002 4.008l11.992 11.992-11.992 11.992v-23.984z"/></symbol><symbol viewBox="0 0 24 32" id="f-i-triangle-up" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M11.992 8l-11.992 11.992h23.984l-11.992-11.992z"/></symbol><symbol viewBox="0 0 512 512" id="f-i-upload" xmlns="http://www.w3.org/2000/svg"><g id="bnprefix__icomoon-ignore"/><path d="M240 352h-240v128h480v-128h-240zM448 416h-64v-32h64v32zM112 160l128-128 128 128h-80v160h-96v-160z"/></symbol></svg>';
2174
+ const BUNDLED_SVG_SPRITE = '<?xml version="1.0" encoding="utf-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><symbol id="f-i-autocomplete" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M6,5h1v1H6V5z M4,4H3v1h1V4z M6,4H5v1h1V4z M2,5v1h1V5H2z M3,7h1V6H3V7z M5,7h1V6H5V7z M4,5v1h1V5H4z M2,14h1v-1H2V14z M4,14h1v-1H4V14z M6,14h1v-1H6V14z M9,13H8v1h1V13z M16,3.5v4C16,8.3,15.3,9,14.5,9H14v3v3c0,0.6-0.4,1-1,1H1c-0.6,0-1-0.4-1-1V3.5 C0,2.7,0.7,2,1.5,2h3H8V1.5V1H7H6V0.5V0h2.5H11v0.5V1h-1H9v0.5V2h3h2.5C15.3,2,16,2.7,16,3.5z M13,12H7H1v3h12V12z M3,11v-1H2v1H3z M5,11v-1H4v1H5z M15,3.5C15,3.2,14.8,3,14.5,3H9v2.5V8H8.5H8V7.5V7H7V6h1V5.5V5H7V4h1V3.5V3H1.5C1.2,3,1,3.2,1,3.5v4 C1,7.8,1.2,8,1.5,8H8v1H6v0.5V10h2.5H11V9.5V9H9V8h5.5C14.8,8,15,7.8,15,7.5V3.5z"/></symbol><symbol viewBox="0 0 32 32" id="f-i-bin" xmlns="http://www.w3.org/2000/svg"><path d="M4 10v20c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2v-20h-22zM10 28h-2v-14h2v14zM14 28h-2v-14h2v14zM18 28h-2v-14h2v14zM22 28h-2v-14h2v14zM26.5 4h-6.5v-2.5c0-.825-.675-1.5-1.5-1.5h-7c-.825 0-1.5.675-1.5 1.5v2.5h-6.5c-.825 0-1.5.675-1.5 1.5v2.5h26v-2.5c0-.825-.675-1.5-1.5-1.5zM18 4h-6v-1.975h6v1.975z"/></symbol><symbol id="f-i-button" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><metadata id="acprefix__metadata8"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><path id="acprefix__rect4140" d="M 0.4765625,4 A 0.47706934,0.47706934 0 0 0 0,4.4765625 L 0,11.523438 A 0.47706934,0.47706934 0 0 0 0.4765625,12 L 15.523438,12 A 0.47706934,0.47706934 0 0 0 16,11.523438 L 16,4.4765625 A 0.47706934,0.47706934 0 0 0 15.523438,4 L 0.4765625,4 Z m 0.4765625,0.953125 14.09375,0 0,6.09375 -14.09375,0 0,-6.09375 z"/><g id="acprefix__layer1"><g id="acprefix__text4203"><g id="acprefix__g4212" transform="translate(0.10112835,0.1001358)"><path id="acprefix__path4208" d="m 6.0690374,6.4093857 q -0.5371093,0 -0.8544922,0.4003906 -0.3149414,0.4003906 -0.3149414,1.0913086 0,0.6884766 0.3149414,1.0888672 0.3173829,0.4003906 0.8544922,0.4003906 0.5371094,0 0.8496094,-0.4003906 0.3149414,-0.4003906 0.3149414,-1.0888672 0,-0.690918 -0.3149414,-1.0913086 -0.3125,-0.4003906 -0.8496094,-0.4003906 z m 0,-0.4003906 q 0.7666016,0 1.225586,0.5151367 0.4589843,0.5126953 0.4589843,1.3769531 0,0.8618164 -0.4589843,1.3769531 -0.4589844,0.5126953 -1.225586,0.5126953 -0.7690429,0 -1.2304687,-0.5126953 -0.4589844,-0.5126953 -0.4589844,-1.3769531 0,-0.8642578 0.4589844,-1.3769531 0.4614258,-0.5151367 1.2304687,-0.5151367 z"/><path id="acprefix__path4210" d="m 8.5250921,6.074913 0.4931641,0 0,1.5405274 1.6357418,-1.5405274 0.634766,0 -1.809082,1.6992188 1.938477,1.9458008 -0.649415,0 -1.7504878,-1.7553711 0,1.7553711 -0.4931641,0 0,-3.6450196 z"/></g></g></g></symbol><symbol viewBox="0 0 32 32" id="f-i-calendar" xmlns="http://www.w3.org/2000/svg"><path d="M12.048 16.961c-0.178 0.257-0.395 0.901-0.652 1.059-0.257 0.157-0.547 0.267-0.869 0.328-0.323 0.062-0.657 0.089-1.002 0.079v1.527h2.467v6.046h1.991v-9.996h-1.584c-0.056 0.381-0.173 0.7-0.351 0.957zM23 8h2c0.553 0 1-0.448 1-1v-6c0-0.552-0.447-1-1-1h-2c-0.553 0-1 0.448-1 1v6c0 0.552 0.447 1 1 1zM7 8h2c0.552 0 1-0.448 1-1v-6c0-0.552-0.448-1-1-1h-2c-0.552 0-1 0.448-1 1v6c0 0.552 0.448 1 1 1zM30 4h-2v5c0 0.552-0.447 1-1 1h-6c-0.553 0-1-0.448-1-1v-5h-8v5c0 0.552-0.448 1-1 1h-6c-0.552 0-1-0.448-1-1v-5h-2c-1.104 0-2 0.896-2 2v24c0 1.104 0.896 2 2 2h28c1.104 0 2-0.896 2-2v-24c0-1.104-0.896-2-2-2zM30 29c0 0.553-0.447 1-1 1h-26c-0.552 0-1-0.447-1-1v-16c0-0.552 0.448-1 1-1h26c0.553 0 1 0.448 1 1v16zM15.985 17.982h4.968c-0.936 1.152-1.689 2.325-2.265 3.705-0.575 1.381-0.638 2.818-0.749 4.312h2.131c0.009-0.666-0.195-1.385-0.051-2.156 0.146-0.771 0.352-1.532 0.617-2.285 0.267-0.752 0.598-1.461 0.996-2.127 0.396-0.667 0.853-1.229 1.367-1.686v-1.742h-7.015v1.979z"/></symbol><symbol id="f-i-checkbox" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M13.5,5v8c0,0.8-0.7,1.5-1.5,1.5H3c-0.8,0-1.5-0.7-1.5-1.5V4c0-0.8,0.7-1.5,1.5-1.5h9c0.7,0,1.3,0.5,1.5,1.2l2.4-1.4L13.5,5 z M12.5,6.2L7.7,12L2.8,5.5l4.9,1.6l4.8-2.9V4c0-0.3-0.2-0.5-0.5-0.5H3C2.7,3.5,2.5,3.7,2.5,4v9c0,0.3,0.2,0.5,0.5,0.5h9 c0.3,0,0.5-0.2,0.5-0.5V6.2z"/></symbol><symbol id="f-i-checkbox-group" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M0,1h16V0H0V1z M0,3h16V2H0V3z M6,5v1h9V5H6z M15,14v-1H6v1H15z M6,10h9V9H6V10z M4,12l-2.5,1.5L0,13l1.5,2L4,12z M4,8 L1.5,9.5L0,9l1.5,2L4,8z M4,4L1.5,5.5L0,5l1.5,2L4,4z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-columns" xmlns="http://www.w3.org/2000/svg"><metadata id="agprefix__metadata4318"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><path id="agprefix__rect4860-3-5" d="M 16,0.5 A 0.50004997,0.50004997 0 0 0 15.5,0 l -5,0 -5,0 -5,0 A 0.50004997,0.50004997 0 0 0 0,0.5 l 0,15 A 0.50004997,0.50004997 0 0 0 0.5,16 l 5,0 5,0 5,0 A 0.50004997,0.50004997 0 0 0 16,15.5 l 0,-15 z M 15,1 15,15 11,15 11,1 15,1 Z M 10,1 10,15 6,15 6,1 10,1 Z M 5,1 5,15 1,15 1,1 5,1 Z"/></symbol><symbol viewBox="0 0 32 32" id="f-i-copy" xmlns="http://www.w3.org/2000/svg"><path d="M20 8v-8h-14l-6 6v18h12v8h20v-24h-12zM6 2.828v3.172h-3.172l3.172-3.172zM2 22v-14h6v-6h10v6l-6 6v8h-10zM18 10.828v3.172h-3.172l3.172-3.172zM30 30h-16v-14h6v-6h10v20z"/></symbol><symbol id="f-i-divider" viewBox="0 0 15 15" xmlns="http://www.w3.org/2000/svg"><metadata id="aiprefix__metadata10"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><rect y="7" x="0" height="1" width="15" id="aiprefix__rect4182"/></symbol><symbol viewBox="0 0 28 32" id="f-i-edit" xmlns="http://www.w3.org/2000/svg"><path d="M22 2l-4 4 6 6 4-4-6-6zM0 24l0.021 6.018 5.979-0.018 16-16-6-6-16 16zM6 28h-4v-4h2v2h2v2z"/></symbol><symbol fill="#000000" viewBox="0 0 24 24" id="f-i-email" xmlns="http://www.w3.org/2000/svg"><path d="M12,2 C17.4292399,2 21.8479317,6.32667079 21.9961582,11.7200952 L22,12 L22,13 C22,15.1729208 20.477434,17 18.5,17 C17.3269391,17 16.3139529,16.3570244 15.6839382,15.3803024 C14.770593,16.3757823 13.4581934,17 12,17 C9.23857625,17 7,14.7614237 7,12 C7,9.23857625 9.23857625,7 12,7 C14.6887547,7 16.8818181,9.12230671 16.9953805,11.7831104 L17,12 L17,13 C17,14.1407877 17.7160103,15 18.5,15 C19.2447902,15 19.928229,14.2245609 19.9947109,13.1689341 L20,13 L20,12 C20,7.581722 16.418278,4 12,4 C7.581722,4 4,7.581722 4,12 C4,16.418278 7.581722,20 12,20 C13.1630948,20 14.2892822,19.7522618 15.3225159,19.2798331 C15.8247876,19.0501777 16.4181317,19.271177 16.647787,19.7734487 C16.8774423,20.2757205 16.656443,20.8690646 16.1541713,21.0987199 C14.861218,21.689901 13.4515463,22 12,22 C6.4771525,22 2,17.5228475 2,12 C2,6.4771525 6.4771525,2 12,2 Z M12,9 C10.3431458,9 9,10.3431458 9,12 C9,13.6568542 10.3431458,15 12,15 C13.6568542,15 15,13.6568542 15,12 C15,10.3431458 13.6568542,9 12,9 Z"/></symbol><symbol viewBox="0 0 32 32" id="f-i-floppy-disk" xmlns="http://www.w3.org/2000/svg"><path d="M28 0h-28v32h32v-28l-4-4zM16 4h4v8h-4v-8zM28 28h-24v-24h2v10h18v-10h2.343l1.657 1.657v22.343z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-handle" xmlns="http://www.w3.org/2000/svg"><metadata id="aqprefix__metadata8"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><g transform="translate(0,-2)" id="aqprefix__g4220"><rect id="aqprefix__rect4191" width="2" height="2" x="2" y="7"/><rect id="aqprefix__rect4191-2" width="2" height="2" x="7" y="7"/><rect id="aqprefix__rect4191-4" width="2" height="2" x="12" y="7"/></g><g transform="translate(0,2)" id="aqprefix__g4220-6"><rect id="aqprefix__rect4191-40" width="2" height="2" x="2" y="7"/><rect id="aqprefix__rect4191-2-3" width="2" height="2" x="7" y="7"/><rect id="aqprefix__rect4191-4-9" width="2" height="2" x="12" y="7"/></g></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-handle-column" xmlns="http://www.w3.org/2000/svg"><path d="M2 7h2v2H2zM7 7h2v2H7zM12 7h2v2h-2zM2 12h2v2H2zM7 12h2v2H7zM12 12h2v2h-2z" transform="rotate(90 9.25 9.25)"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-handle-field" xmlns="http://www.w3.org/2000/svg"><path d="M9.5-6.5h2v2h-2zm-5 0h2v2h-2zm5-5h2v2h-2zm-5 0h2v2h-2z" transform="rotate(90)"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-handle-row" xmlns="http://www.w3.org/2000/svg"><path d="M12 9.5h2v2h-2zm-5 0h2v2H7Zm-5 0h2v2H2Zm10-5h2v2h-2zm-5 0h2v2H7Zm-5 0h2v2H2Z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-handle-stage" xmlns="http://www.w3.org/2000/svg"><path d="M2 4.5h2v2H2zM7 4.5h2v2H7zM12 4.5h2v2h-2zM2 9.5h2v2H2zM7 9.5h2v2H7zM12 9.5h2v2h-2zM2-.5h2v2H2zM7-.5h2v2H7zM12-.5h2v2h-2z" transform="translate(0 2.5)"/></symbol><symbol viewBox="0 0 448 512" id="f-i-hash" xmlns="http://www.w3.org/2000/svg"><g id="arprefix__icomoon-ignore"/><path fill="#000" d="M448 192v-64h-80.064l16-128h-64l-16 128h-127.968l16-128h-64l-16 128h-111.968v64h103.968l-15.968 128h-88v64h80l-16 128h64l16-128h127.968l-16 128h64.032l16-128h112v-64h-104l15.936-128h88.064zM279.968 320h-127.968l15.968-128h127.968l-15.968 128z"/></symbol><symbol viewBox="0 0 28 28" id="f-i-header" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M26.281 26q-0.688 0-2.070-0.055t-2.086-0.055q-0.688 0-2.063 0.055t-2.063 0.055q-0.375 0-0.578-0.32t-0.203-0.711q0-0.484 0.266-0.719t0.609-0.266 0.797-0.109 0.703-0.234q0.516-0.328 0.516-2.188l-0.016-6.109q0-0.328-0.016-0.484-0.203-0.063-0.781-0.063h-10.547q-0.594 0-0.797 0.063-0.016 0.156-0.016 0.484l-0.016 5.797q0 2.219 0.578 2.562 0.25 0.156 0.75 0.203t0.891 0.055 0.703 0.234 0.313 0.711q0 0.406-0.195 0.75t-0.57 0.344q-0.734 0-2.18-0.055t-2.164-0.055q-0.672 0-2 0.055t-1.984 0.055q-0.359 0-0.555-0.328t-0.195-0.703q0-0.469 0.242-0.703t0.562-0.273 0.742-0.117 0.656-0.234q0.516-0.359 0.516-2.234l-0.016-0.891v-12.703q0-0.047 0.008-0.406t0-0.57-0.023-0.602-0.055-0.656-0.102-0.57-0.172-0.492-0.25-0.281q-0.234-0.156-0.703-0.187t-0.828-0.031-0.641-0.219-0.281-0.703q0-0.406 0.187-0.75t0.562-0.344q0.719 0 2.164 0.055t2.164 0.055q0.656 0 1.977-0.055t1.977-0.055q0.391 0 0.586 0.344t0.195 0.75q0 0.469-0.266 0.68t-0.602 0.227-0.773 0.063-0.672 0.203q-0.547 0.328-0.547 2.5l0.016 5q0 0.328 0.016 0.5 0.203 0.047 0.609 0.047h10.922q0.391 0 0.594-0.047 0.016-0.172 0.016-0.5l0.016-5q0-2.172-0.547-2.5-0.281-0.172-0.914-0.195t-1.031-0.203-0.398-0.773q0-0.406 0.195-0.75t0.586-0.344q0.688 0 2.063 0.055t2.063 0.055q0.672 0 2.016-0.055t2.016-0.055q0.391 0 0.586 0.344t0.195 0.75q0 0.469-0.273 0.688t-0.625 0.227-0.805 0.047-0.688 0.195q-0.547 0.359-0.547 2.516l0.016 14.734q0 1.859 0.531 2.188 0.25 0.156 0.719 0.211t0.836 0.070 0.648 0.242 0.281 0.695q0 0.406-0.187 0.75t-0.562 0.344z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-hidden" xmlns="http://www.w3.org/2000/svg"><path d="M0 12h1v-1H0Zm15-7h1V4h-1zm-1 7h1v-1h-1zm-2 0h1v-1h-1zm-2 0h1v-1h-1Zm-2 0h1v-1H8Zm-2 0h1v-1H6Zm-2 0h1v-1H4Zm-2 0h1v-1H2Zm13-1h1v-1h-1ZM0 10h1V9H0Zm15-1h1V8h-1ZM0 8h1V7H0Zm15-1h1V6h-1ZM0 6h1V5H0Zm13-1h1V4h-1zm-2 0h1V4h-1ZM9 5h1V4H9ZM7 5h1V4H7ZM5 5h1V4H5ZM3 5h1V4H3ZM1 5h1V4H1Z"/></symbol><symbol xml:space="preserve" viewBox="0 0 32 32" id="f-i-info-circle" xmlns="http://www.w3.org/2000/svg"><path d="m17.962 24.725 1.806.096v2.531h-7.534v-2.406l1.045-.094c.568-.063.916-.254.916-1.014v-8.801c0-.699-.188-.92-.791-.92l-1.106-.062v-2.626h5.666zM15.747 4.648c1.394 0 2.405 1.047 2.405 2.374 0 1.331-1.014 2.313-2.438 2.313-1.454 0-2.404-.982-2.404-2.313 0-1.327.95-2.374 2.437-2.374M16 32C7.178 32 0 24.822 0 16S7.178 0 16 0c8.82 0 16 7.178 16 16s-7.18 16-16 16m0-29C8.832 3 3 8.832 3 16s5.832 13 13 13 13-5.832 13-13S23.168 3 16 3"/></symbol><symbol viewBox="0 0 384 512" id="f-i-menu" xmlns="http://www.w3.org/2000/svg"><g id="avprefix__icomoon-ignore"/><path d="M0 96v64h384v-64h-384zM0 288h384v-64h-384v64zM0 416h384v-64h-384v64z"/></symbol><symbol viewBox="0 0 24 24" fill="none" id="f-i-minus" xmlns="http://www.w3.org/2000/svg"><path d="M6 12L18 12" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></symbol><symbol viewBox="0 0 512 512" id="f-i-move" xmlns="http://www.w3.org/2000/svg"><path d="M287.744 94.736v129.008h128v-64l96.256 96.256-96.256 96.24v-65.488h-128v129.008h64.496l-96.24 96.24-96.256-96.24h64v-129.008h-128v64.992l-95.744-95.744 95.744-95.744v63.488h128v-129.008h-62.496l94.752-94.736 94.752 94.736h-63.008z"/></symbol><symbol viewBox="0 0 512 512" id="f-i-move-vertical" xmlns="http://www.w3.org/2000/svg"><metadata id="axprefix__metadata10"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="3440" inkscape:window-height="1416" id="axprefix__namedview6" showgrid="false" inkscape:zoom="1.84375" inkscape:cx="421.4312" inkscape:cy="218.56484" inkscape:window-x="0" inkscape:window-y="24" inkscape:window-maximized="1" inkscape:current-layer="svg2" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"/><path d="m 287.744,94.736 0,321.024 64.496,0 L 256,512 l -96.256,-96.24 64,0 0,-321.024 -62.496,0 L 256,0 350.752,94.736 Z" id="axprefix__path4" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" inkscape:connector-curvature="0" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" sodipodi:nodetypes="ccccccccccc"/></symbol><symbol viewBox="0 0 20 28" id="f-i-paragraph" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M19.969 2.953v1.141q0 0.453-0.289 0.953t-0.664 0.5q-0.781 0-0.844 0.016-0.406 0.094-0.5 0.484-0.047 0.172-0.047 1v18q0 0.391-0.281 0.672t-0.672 0.281h-1.687q-0.391 0-0.672-0.281t-0.281-0.672v-19.031h-2.234v19.031q0 0.391-0.273 0.672t-0.68 0.281h-1.687q-0.406 0-0.68-0.281t-0.273-0.672v-7.75q-2.297-0.187-3.828-0.922-1.969-0.906-3-2.797-1-1.828-1-4.047 0-2.594 1.375-4.469 1.375-1.844 3.266-2.484 1.734-0.578 6.516-0.578h7.484q0.391 0 0.672 0.281t0.281 0.672z"/></symbol><symbol id="f-i-phone-receiver" viewBox="0 0 578.106 578.106" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><g><g><path d="M577.83,456.128c1.225,9.385-1.635,17.545-8.568,24.48l-81.396,80.781 c-3.672,4.08-8.465,7.551-14.381,10.404c-5.916,2.857-11.729,4.693-17.439,5.508c-0.408,0-1.635,0.105-3.676,0.309 c-2.037,0.203-4.689,0.307-7.953,0.307c-7.754,0-20.301-1.326-37.641-3.979s-38.555-9.182-63.645-19.584 c-25.096-10.404-53.553-26.012-85.376-46.818c-31.823-20.805-65.688-49.367-101.592-85.68 c-28.56-28.152-52.224-55.08-70.992-80.783c-18.768-25.705-33.864-49.471-45.288-71.299 c-11.425-21.828-19.993-41.616-25.705-59.364S4.59,177.362,2.55,164.51s-2.856-22.95-2.448-30.294 c0.408-7.344,0.612-11.424,0.612-12.24c0.816-5.712,2.652-11.526,5.508-17.442s6.324-10.71,10.404-14.382L98.022,8.756 c5.712-5.712,12.24-8.568,19.584-8.568c5.304,0,9.996,1.53,14.076,4.59s7.548,6.834,10.404,11.322l65.484,124.236 c3.672,6.528,4.692,13.668,3.06,21.42c-1.632,7.752-5.1,14.28-10.404,19.584l-29.988,29.988c-0.816,0.816-1.53,2.142-2.142,3.978 s-0.918,3.366-0.918,4.59c1.632,8.568,5.304,18.36,11.016,29.376c4.896,9.792,12.444,21.726,22.644,35.802 s24.684,30.293,43.452,48.653c18.36,18.77,34.68,33.354,48.96,43.76c14.277,10.4,26.215,18.053,35.803,22.949 c9.588,4.896,16.932,7.854,22.031,8.871l7.648,1.531c0.816,0,2.145-0.307,3.979-0.918c1.836-0.613,3.162-1.326,3.979-2.143 l34.883-35.496c7.348-6.527,15.912-9.791,25.705-9.791c6.938,0,12.443,1.223,16.523,3.672h0.611l118.115,69.768 C571.098,441.238,576.197,447.968,577.83,456.128z"/></g></g><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/></symbol><symbol viewBox="0 0 24 24" fill="none" id="f-i-plus" xmlns="http://www.w3.org/2000/svg"><path d="M6 12H18M12 6V18" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></symbol><symbol id="f-i-radio-group" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M0,1h16V0H0V1z M0,3h16V2H0V3z M5,6h10V5H5V6z M15,9H5v1h10V9z M15,14v-1H5v1H15z M1.5,7C0.7,7,0,6.3,0,5.5S0.7,4,1.5,4 S3,4.7,3,5.5S2.3,7,1.5,7z M1.5,5C1.2,5,1,5.2,1,5.5S1.2,6,1.5,6S2,5.8,2,5.5S1.8,5,1.5,5z M1.5,11.1C0.7,11.1,0,10.4,0,9.6 s0.7-1.5,1.5-1.5S3,8.7,3,9.6S2.3,11.1,1.5,11.1z M1.5,9.1C1.2,9.1,1,9.3,1,9.6s0.2,0.5,0.5,0.5S2,9.8,2,9.6S1.8,9.1,1.5,9.1z M1.5,15C0.7,15,0,14.3,0,13.5S0.7,12,1.5,12S3,12.7,3,13.5S2.3,15,1.5,15z M1.5,13C1.2,13,1,13.2,1,13.5S1.2,14,1.5,14 S2,13.8,2,13.5S1.8,13,1.5,13z"/></symbol><symbol viewBox="0 0 512 512" id="f-i-remove" xmlns="http://www.w3.org/2000/svg"><path d="M193.694-139.2h87.322v510.916h-87.322zM-18.103 159.92V72.597h510.915v87.322z" transform="rotate(45 77.994 208.636)"/></symbol><symbol id="f-i-rich-text" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M15,1H1C0.4,1,0,1.4,0,2v12c0,0.6,0.4,1,1,1h14c0.6,0,1-0.4,1-1V2C16,1.4,15.6,1,15,1z M1,3.1h0.8v0.3H1V3.1z M1,3.6h0.8 v0.3H1V3.6z M15,14H1V5.1h14V14z M15,4.9H1V4.6h14V4.9z M15,4.4H1V4.1h0.8v0.2h1.5V4.1h1.3v0.2H6V4.1h1.3v0.2h1.5V4.1H10v0.2h1.5 V4.1h1.3v0.2h1.5V4.1H15V4.4z M4.5,3.6v0.3H3.3V3.6H4.5z M3.3,3.4V3.1h1.3v0.3H3.3z M7.3,3.6v0.3H6V3.6H7.3z M6,3.4V3.1h1.3v0.3H6z M10,3.6v0.3H8.8V3.6H10z M8.8,3.4V3.1H10v0.3H8.8z M12.8,3.6v0.3h-1.3V3.6H12.8z M11.5,3.4V3.1h1.3v0.3H11.5z M15,3.9h-0.8V3.6H15 V3.9z M15,3.4h-0.8V3.1H15V3.4z M15,2.9h-0.8V2.8h-1.5v0.2h-1.3V2.8H10v0.2H8.8V2.8H7.3v0.2H6V2.8H4.5v0.2H3.3V2.8H1.8v0.2H1V2.6h14 V2.9z M15,2.4H1V2.1h14V2.4z M3,12v-1h10v1H3z M13,10H3V9h10V10z M11,8H3V7h8V8z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-rows" xmlns="http://www.w3.org/2000/svg"><metadata id="bfprefix__metadata4318"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><g transform="matrix(0,1,-1,0,3.0984025,11.835155)" id="bfprefix__g7209"><path id="bfprefix__rect4860-3-5" d="m 4.1640625,-12.402344 a 0.50004997,0.50004997 0 0 0 -0.5,-0.5 l -5,0 -5,0 -5.0000005,0 a 0.50004997,0.50004997 0 0 0 -0.5,0.5 l 0,15.0000002 a 0.50004997,0.50004997 0 0 0 0.5,0.5 l 4.9648442,0 a 0.50004997,0.50004997 0 0 0 0.035156,0 l 4.9648437,0 a 0.50004997,0.50004997 0 0 0 0.035156,0 l 5,0 a 0.50004997,0.50004997 0 0 0 0.5,-0.5 l 0,-15.0000002 z m -1,0.5 0,14.0000002 -4,0 0,-14.0000002 4,0 z m -5,0 0,14.0000002 -4,0 0,-14.0000002 4,0 z m -5,0 0,14.0000002 -4.0000005,0 0,-14.0000002 4.0000005,0 z"/></g></symbol><symbol id="f-i-select" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path id="bgprefix__XMLID_1_" d="M0,0v14h0c0,0.6,0.4,1,1,1h10c0.6,0,1-0.4,1-1h0V5h4V0H0z M1,1h10v3H1V1z M1,7h10v3H1V7z M1,14v-3h10v3H1z M15,4h-3V1h3V4z M2,2h1v1H2V2z M2,12h1v1H2V12z M4,12h1v1H4V12z M6,12h1v1H6V12z M9,12v1H8v-1H9z M2,8h1v1H2V8z M4,8h1v1H4V8z M6,8 h1v1H6V8z M13.5,3.1l-1-1.1h1.9L13.5,3.1z M2,6V5h1v1H2L2,6z M4,6V5h1v1H4L4,6z"/></symbol><symbol viewBox="0 0 448 512" id="f-i-settings" xmlns="http://www.w3.org/2000/svg"><g id="bhprefix__icomoon-ignore"/><path d="M223.969 175c-44.703 0-80.969 36.266-80.969 81 0 44.688 36.266 81.031 80.969 81.031 44.719 0 80.719-36.344 80.719-81.031-0-44.734-36-81-80.719-81zM386.313 302.531l-14.594 35.156 29.469 57.875-36.094 36.094-59.218-27.969-35.156 14.438-17.844 54.625-2.281 7.25h-51.016l-22.078-61.656-35.156-14.5-57.952 29.344-36.078-36.063 27.938-59.25-14.484-35.125-61.767-20.156v-50.984l61.703-22.109 14.485-35.094-25.953-51.234-3.422-6.719 36.031-36.031 59.297 27.922 35.109-14.516 17.828-54.594 2.297-7.234h51l22.094 61.734 35.063 14.516 58.031-29.406 36.063 36.031-27.938 59.203 14.438 35.172 61.875 20.125v50.969l-61.688 22.187z"/></symbol><symbol id="f-i-text-input" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path id="biprefix__XMLID_10_" d="M15,4H4.5V3H6V2H4.5h-1H2v1h1.5v1H1C0.4,4,0,4.5,0,5v6c0,0.6,0.4,1,1,1h2.5v1H2v1h4v-1H4.5v-1H15 c0.6,0,1-0.4,1-1V5C16,4.5,15.6,4,15,4z M1,11V5h2.5v6H1z M15,11H4.5V5H15V11z"/></symbol><symbol id="f-i-textarea" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path id="bjprefix__XMLID_1_" d="M3,11v-1h8v1H3L3,11z M3,7h10V6H3V7L3,7z M3,8v1h10V8H3L3,8z M13,4H3v1h10V4L13,4z M16,14V2c0-0.6-0.4-1-1-1 H1C0.4,1,0,1.4,0,2v12c0,0.6,0.4,1,1,1h14C15.6,15,16,14.6,16,14z M15,2v12H1V2H15z"/></symbol><symbol viewBox="0 0 24 32" id="f-i-triangle-down" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M0 12l11.992 11.992 11.992-11.992h-23.984z"/></symbol><symbol viewBox="0 0 12 32" id="f-i-triangle-left" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M0 15.996l11.992 11.992v-23.984l-11.992 11.992z"/></symbol><symbol viewBox="0 0 12 32" id="f-i-triangle-right" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M0.002 4.008l11.992 11.992-11.992 11.992v-23.984z"/></symbol><symbol viewBox="0 0 24 32" id="f-i-triangle-up" xmlns="http://www.w3.org/2000/svg"><path fill="#444" d="M11.992 8l-11.992 11.992h23.984l-11.992-11.992z"/></symbol><symbol viewBox="0 0 512 512" id="f-i-upload" xmlns="http://www.w3.org/2000/svg"><g id="boprefix__icomoon-ignore"/><path d="M240 352h-240v128h480v-128h-240zM448 416h-64v-32h64v32zM112 160l128-128 128 128h-80v160h-96v-160z"/></symbol></svg>';
2174
2175
  const name = pkg.name;
2175
2176
  const version$1 = pkg.version;
2176
2177
  const PACKAGE_NAME = name;
@@ -2354,8 +2355,11 @@ Author: Draggable https://draggable.io
2354
2355
  });
2355
2356
  const CHECKED_TYPES = ["selected", "checked"];
2356
2357
  const REVERSED_CHECKED_TYPES = CHECKED_TYPES.toReversed();
2357
- const toTitleCaseLowers = "a an and as at but by for for from in into near nor of on onto or the to with".split(" ").map((lower) => `\\s${lower}\\s`);
2358
- const toTitleCaseRegex = new RegExp(`(?!${toTitleCaseLowers.join("|")})\\w\\S*`, "g");
2358
+ const FILTERED_PANEL_DATA_KEYS = /* @__PURE__ */ new Map([
2359
+ ["config", /* @__PURE__ */ new Set(["label", "helpText", "hideLabel", "labelAfter", "disableHtmlLabel", "tooltip"])]
2360
+ ]);
2361
+ const toTitleCaseLowers = "a an and as at but by for for from in into near nor of on onto or the to with".split(" ").map((lower) => String.raw`\s${lower}\s`);
2362
+ const toTitleCaseRegex = new RegExp(String.raw`(?!${toTitleCaseLowers.join("|")})\w\S*`, "g");
2359
2363
  const regexSpace = /\s+/g;
2360
2364
  function toTitleCase(str) {
2361
2365
  if (typeof str !== "string") {
@@ -2407,6 +2411,10 @@ Author: Draggable https://draggable.io
2407
2411
  }
2408
2412
  return truncatedWord;
2409
2413
  };
2414
+ const keyPrefixRegex = /^attrs\.|^meta\.|^options\.|^config\./g;
2415
+ function trimKeyPrefix(key) {
2416
+ return key.replaceAll(keyPrefixRegex, "");
2417
+ }
2410
2418
  var isSymbol_1;
2411
2419
  var hasRequiredIsSymbol;
2412
2420
  function requireIsSymbol() {
@@ -3977,14 +3985,14 @@ Author: Draggable https://draggable.io
3977
3985
  return Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) / Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2)) * options.animation;
3978
3986
  }
3979
3987
  var plugins = [];
3980
- var defaults$3 = {
3988
+ var defaults$4 = {
3981
3989
  initializeByDefault: true
3982
3990
  };
3983
3991
  var PluginManager = {
3984
3992
  mount: function mount(plugin) {
3985
- for (var option in defaults$3) {
3986
- if (defaults$3.hasOwnProperty(option) && !(option in plugin)) {
3987
- plugin[option] = defaults$3[option];
3993
+ for (var option in defaults$4) {
3994
+ if (defaults$4.hasOwnProperty(option) && !(option in plugin)) {
3995
+ plugin[option] = defaults$4[option];
3988
3996
  }
3989
3997
  }
3990
3998
  plugins.forEach(function(p) {
@@ -5784,7 +5792,7 @@ Author: Draggable https://draggable.io
5784
5792
  },
5785
5793
  action: {
5786
5794
  load: () => onLoadStylesheet(styleLink, resolve),
5787
- error: () => reject(new Error(`${(void 0).src} failed to load.`))
5795
+ error: () => reject(new Error(`${src} failed to load.`))
5788
5796
  }
5789
5797
  });
5790
5798
  document.head.appendChild(styleLink);
@@ -5829,9 +5837,9 @@ Author: Draggable https://draggable.io
5829
5837
  return Promise.all(promises);
5830
5838
  };
5831
5839
  const fetchFormeoStyle = async (cssUrl) => {
5832
- if (!loaded.css.has(cssUrl)) {
5840
+ if (cssUrl && !loaded.css.has(cssUrl)) {
5833
5841
  await insertStyle(cssUrl);
5834
- if (!loaded.css.has(FALLBACK_CSS_URL)) {
5842
+ if (!loaded.css.has(cssUrl) && !loaded.css.has(FALLBACK_CSS_URL)) {
5835
5843
  return await insertStyle(FALLBACK_CSS_URL);
5836
5844
  }
5837
5845
  }
@@ -6141,7 +6149,11 @@ Author: Draggable https://draggable.io
6141
6149
  const safeAttrName2 = helpers.safeAttrName(attr);
6142
6150
  const value = this.processAttrValue(attrs[attr]);
6143
6151
  if (value !== false) {
6144
- element.setAttribute(safeAttrName2, value);
6152
+ try {
6153
+ element.setAttribute(safeAttrName2, value);
6154
+ } catch (e2) {
6155
+ console.warn(`Could not set attribute ${safeAttrName2} with value ${value}`, e2);
6156
+ }
6145
6157
  }
6146
6158
  }
6147
6159
  }
@@ -6301,7 +6313,7 @@ Author: Draggable https://draggable.io
6301
6313
  * @return {Boolean} holdsContent
6302
6314
  */
6303
6315
  holdsContent(element) {
6304
- return element.outerHTML.indexOf("/") !== -1;
6316
+ return element.outerHTML.includes("/");
6305
6317
  }
6306
6318
  /**
6307
6319
  * Is this a textarea, select or other block input
@@ -6343,13 +6355,26 @@ Author: Draggable https://draggable.io
6343
6355
  const type = helpers.get(elem, "attrs.type");
6344
6356
  const labelAfter = helpers.get(elem, "config.labelAfter");
6345
6357
  const isCB = type === "checkbox" || type === "radio";
6346
- return labelAfter !== void 0 ? labelAfter : isCB;
6358
+ return labelAfter === void 0 ? isCB : labelAfter;
6347
6359
  }
6348
6360
  requiredMark = () => ({
6349
6361
  tag: "span",
6350
6362
  className: "text-error",
6351
6363
  children: "*"
6352
6364
  });
6365
+ tooltip = (tooltip2) => ({
6366
+ tag: "span",
6367
+ className: "f-tooltip",
6368
+ dataset: {
6369
+ tooltip: tooltip2
6370
+ },
6371
+ content: dom.icon("info-circle")
6372
+ });
6373
+ helpText = (helpText) => ({
6374
+ tag: "small",
6375
+ className: "f-help-text",
6376
+ children: helpText
6377
+ });
6353
6378
  /**
6354
6379
  * Generate a label
6355
6380
  * @param {Object} elem config object
@@ -6359,7 +6384,7 @@ Author: Draggable https://draggable.io
6359
6384
  label(elem, fMap) {
6360
6385
  const required = helpers.get(elem, "attrs.required");
6361
6386
  let {
6362
- config: { label: labelText = "" }
6387
+ config: { label: labelText = "", helpText = "", tooltip: tooltip2 = null }
6363
6388
  } = elem;
6364
6389
  const { id: elemId, attrs } = elem;
6365
6390
  if (typeof labelText === "function") {
@@ -6371,7 +6396,12 @@ Author: Draggable https://draggable.io
6371
6396
  for: elemId || attrs?.id
6372
6397
  },
6373
6398
  className: [],
6374
- children: [labelText, required && this.requiredMark()],
6399
+ children: [
6400
+ labelText,
6401
+ required && this.requiredMark(),
6402
+ tooltip2 && this.tooltip(tooltip2),
6403
+ helpText && this.helpText(helpText)
6404
+ ],
6375
6405
  action: {}
6376
6406
  };
6377
6407
  if (fMap) {
@@ -7085,15 +7115,21 @@ Author: Draggable https://draggable.io
7085
7115
  this.onChange?.({ target: this.hiddenField });
7086
7116
  }
7087
7117
  }
7118
+ const keyToPlaceHolder = (key) => mi18n.get(`${key}.placeholder`) || toTitleCase(trimKeyPrefix(key));
7119
+ const keyToClassName = (key) => key.replaceAll(".", "-");
7120
+ const stringInputTypeMap = /* @__PURE__ */ new Map([
7121
+ ["config.helpText", (...args) => largeTextInputConfigBase(...args)],
7122
+ ["config.tooltip", (...args) => largeTextInputConfigBase(...args)]
7123
+ ]);
7088
7124
  function inputConfigBase({ key, value, type = "text", checked }) {
7089
7125
  const config = {
7090
7126
  tag: "input",
7091
7127
  attrs: {
7092
7128
  type,
7093
7129
  value,
7094
- placeholder: mi18n.get(`${key}.placeholder`) || toTitleCase(key)
7130
+ placeholder: keyToPlaceHolder(key)
7095
7131
  },
7096
- className: [key.replace(/\./g, "-")],
7132
+ className: [keyToClassName(key)],
7097
7133
  config: {}
7098
7134
  };
7099
7135
  if (checked) {
@@ -7101,17 +7137,33 @@ Author: Draggable https://draggable.io
7101
7137
  }
7102
7138
  return config;
7103
7139
  }
7140
+ function largeTextInputConfigBase({ key, value }) {
7141
+ return {
7142
+ tag: "textarea",
7143
+ attrs: {
7144
+ placeholder: keyToPlaceHolder(key)
7145
+ },
7146
+ className: [keyToClassName(key)],
7147
+ config: {},
7148
+ textContent: value
7149
+ };
7150
+ }
7104
7151
  function labelHelper(key) {
7105
7152
  const labelText = mi18n.get(key);
7106
7153
  if (labelText) {
7107
7154
  return labelText;
7108
7155
  }
7109
- const splitKey = key.split(".");
7110
- return mi18n.get(splitKey[splitKey.length - 1]);
7156
+ const trimmedKey = trimKeyPrefix(key);
7157
+ return mi18n.get(trimmedKey) || toTitleCase(trimmedKey);
7111
7158
  }
7112
7159
  const ITEM_INPUT_TYPE_MAP = {
7113
7160
  autocomplete: (...args) => new Autocomplete(...args).createProxy(),
7114
- string: ({ key, value }) => inputConfigBase({ key, value }),
7161
+ string: ({ key, value }) => {
7162
+ if (stringInputTypeMap.has(key)) {
7163
+ return stringInputTypeMap.get(key)({ key, value });
7164
+ }
7165
+ return inputConfigBase({ key, value });
7166
+ },
7115
7167
  boolean: ({ key, value }) => {
7116
7168
  const type = key === "selected" ? "radio" : "checkbox";
7117
7169
  return inputConfigBase({ key, value, type, checked: !!value });
@@ -7123,7 +7175,7 @@ Author: Draggable https://draggable.io
7123
7175
  attrs: {
7124
7176
  placeholder: labelHelper(`placeholder.${key}`)
7125
7177
  },
7126
- className: [key.replace(/\./g, "-")],
7178
+ className: [keyToClassName(key)],
7127
7179
  options: value
7128
7180
  };
7129
7181
  },
@@ -7164,6 +7216,265 @@ Author: Draggable https://draggable.io
7164
7216
  }),
7165
7217
  object: () => ({})
7166
7218
  };
7219
+ const defaults$3 = Object.freeze({
7220
+ title: "",
7221
+ content: null,
7222
+ confirmText: () => labelHelper("save"),
7223
+ cancelText: () => labelHelper("cancel"),
7224
+ onConfirm: () => {
7225
+ },
7226
+ onCancel: () => {
7227
+ },
7228
+ className: "",
7229
+ closeOnEscape: true,
7230
+ position: "top",
7231
+ // 'top' | 'center' | 'trigger'
7232
+ triggerElement: null,
7233
+ // Element that triggered the dialog (for position: 'trigger')
7234
+ triggerCoords: null
7235
+ // Or manual coords { x, y } (for position: 'trigger')
7236
+ });
7237
+ class Dialog {
7238
+ /**
7239
+ * Creates a new Dialog instance
7240
+ * @param {Object} options - Dialog configuration options
7241
+ * @param {string} [options.title] - Dialog title
7242
+ * @param {Object|Array} [options.content] - DOM config for dialog body content
7243
+ * @param {Function} [options.onConfirm] - Callback when form is submitted (receives FormData)
7244
+ * @param {Function} [options.onCancel] - Callback when dialog is cancelled
7245
+ * @param {string|Function} [options.confirmText] - Confirm button text
7246
+ * @param {string|Function} [options.cancelText] - Cancel button text
7247
+ * @param {string} [options.className] - Additional CSS class name(s)
7248
+ * @param {boolean} [options.closeOnEscape] - Whether Escape key closes dialog
7249
+ * @param {string} [options.position] - Positioning mode: 'top' (upper center), 'center', or 'trigger' (near trigger element)
7250
+ * @param {HTMLElement} [options.triggerElement] - Element that triggered dialog (for position: 'trigger')
7251
+ * @param {Object} [options.triggerCoords] - Manual coordinates {x, y} (for position: 'trigger')
7252
+ */
7253
+ constructor(options) {
7254
+ this.opts = merge(defaults$3, options);
7255
+ this.dialog = null;
7256
+ }
7257
+ /**
7258
+ * Creates the dialog DOM structure
7259
+ * @returns {HTMLDialogElement} The created dialog element
7260
+ */
7261
+ createDialog() {
7262
+ const { title, content, confirmText, cancelText, className, closeOnEscape, position } = this.opts;
7263
+ const positionClass = `dialog-position-${position}`;
7264
+ const formChildren = [];
7265
+ if (title) {
7266
+ formChildren.push({
7267
+ tag: "h3",
7268
+ className: "dialog-title",
7269
+ textContent: title
7270
+ });
7271
+ }
7272
+ if (content) {
7273
+ formChildren.push({
7274
+ tag: "div",
7275
+ className: "dialog-body",
7276
+ children: Array.isArray(content) ? content : [content]
7277
+ });
7278
+ }
7279
+ formChildren.push({
7280
+ tag: "div",
7281
+ className: "dialog-actions",
7282
+ children: [
7283
+ {
7284
+ tag: "button",
7285
+ type: "button",
7286
+ className: "btn btn-sm btn-secondary",
7287
+ textContent: typeof cancelText === "function" ? cancelText() : cancelText,
7288
+ action: {
7289
+ click: () => this.handleCancel()
7290
+ }
7291
+ },
7292
+ {
7293
+ tag: "button",
7294
+ type: "submit",
7295
+ className: "btn btn-sm btn-primary",
7296
+ textContent: typeof confirmText === "function" ? confirmText() : confirmText
7297
+ }
7298
+ ]
7299
+ });
7300
+ const dialogElement = dom.create({
7301
+ tag: "dialog",
7302
+ className: ["formeo-dialog", "formeo", positionClass, className],
7303
+ children: [
7304
+ {
7305
+ tag: "form",
7306
+ className: "dialog-form",
7307
+ method: "dialog",
7308
+ children: formChildren,
7309
+ action: {
7310
+ submit: (e2) => this.handleSubmit(e2)
7311
+ }
7312
+ }
7313
+ ],
7314
+ action: {
7315
+ cancel: (e2) => {
7316
+ if (closeOnEscape) {
7317
+ this.handleCancel();
7318
+ } else {
7319
+ e2.preventDefault();
7320
+ }
7321
+ }
7322
+ }
7323
+ });
7324
+ return dialogElement;
7325
+ }
7326
+ /**
7327
+ * Handles form submission
7328
+ * @param {Event} e - Submit event
7329
+ */
7330
+ handleSubmit(e2) {
7331
+ e2.preventDefault();
7332
+ const formData = new FormData(e2.target);
7333
+ this.opts.onConfirm(formData, this);
7334
+ this.close();
7335
+ }
7336
+ /**
7337
+ * Handles dialog cancellation
7338
+ */
7339
+ handleCancel() {
7340
+ this.opts.onCancel(this);
7341
+ this.close();
7342
+ }
7343
+ /**
7344
+ * Sets dialog position based on trigger element or coordinates
7345
+ */
7346
+ setPosition() {
7347
+ const { position, triggerElement, triggerCoords } = this.opts;
7348
+ if (position !== "trigger" || !this.dialog) return;
7349
+ let coords = triggerCoords;
7350
+ if (!coords && triggerElement) {
7351
+ const rect = triggerElement.getBoundingClientRect();
7352
+ coords = {
7353
+ x: rect.left + rect.width / 2,
7354
+ y: rect.bottom + 8
7355
+ // 8px gap below trigger
7356
+ };
7357
+ }
7358
+ if (coords) {
7359
+ const dialogRect = this.dialog.getBoundingClientRect();
7360
+ const viewportWidth = window.innerWidth;
7361
+ const viewportHeight = window.innerHeight;
7362
+ let left = coords.x - dialogRect.width / 2;
7363
+ let top = coords.y;
7364
+ const padding = 16;
7365
+ left = Math.max(padding, Math.min(left, viewportWidth - dialogRect.width - padding));
7366
+ top = Math.max(padding, Math.min(top, viewportHeight - dialogRect.height - padding));
7367
+ this.dialog.style.left = `${left}px`;
7368
+ this.dialog.style.top = `${top}px`;
7369
+ this.dialog.style.transform = "none";
7370
+ }
7371
+ }
7372
+ /**
7373
+ * Opens the dialog
7374
+ * @returns {Dialog} This dialog instance for chaining
7375
+ */
7376
+ open() {
7377
+ if (!this.dialog) {
7378
+ this.dialog = this.createDialog();
7379
+ }
7380
+ document.body.appendChild(this.dialog);
7381
+ this.dialog.showModal();
7382
+ if (this.opts.position === "trigger") {
7383
+ const setTimeoutId = setTimeout(() => {
7384
+ this.setPosition();
7385
+ clearTimeout(setTimeoutId);
7386
+ }, 0);
7387
+ }
7388
+ return this;
7389
+ }
7390
+ /**
7391
+ * Closes and removes the dialog
7392
+ */
7393
+ close() {
7394
+ if (this.dialog) {
7395
+ this.dialog.close();
7396
+ this.dialog.remove();
7397
+ this.dialog = null;
7398
+ }
7399
+ }
7400
+ /**
7401
+ * Static shorthand for simple alert dialog
7402
+ * @param {string} message - Alert message
7403
+ * @param {Function} [onConfirm] - Optional callback when confirmed
7404
+ * @returns {Dialog} Dialog instance
7405
+ */
7406
+ static alert(message, onConfirm = () => {
7407
+ }) {
7408
+ return new Dialog({
7409
+ content: {
7410
+ tag: "p",
7411
+ className: "dialog-message",
7412
+ textContent: message
7413
+ },
7414
+ confirmText: () => mi18n.get("ok") || "OK",
7415
+ cancelText: "",
7416
+ // Hide cancel button by returning empty string
7417
+ onConfirm: () => onConfirm()
7418
+ });
7419
+ }
7420
+ /**
7421
+ * Static shorthand for confirmation dialog
7422
+ * @param {string} message - Confirmation question
7423
+ * @param {Function} [onConfirm] - Callback when confirmed
7424
+ * @param {Function} [onCancel] - Callback when cancelled
7425
+ * @returns {Dialog} Dialog instance
7426
+ */
7427
+ static confirm(message, onConfirm = () => {
7428
+ }, onCancel = () => {
7429
+ }) {
7430
+ return new Dialog({
7431
+ content: {
7432
+ tag: "p",
7433
+ className: "dialog-message",
7434
+ textContent: message
7435
+ },
7436
+ confirmText: () => mi18n.get("confirm") || "Confirm",
7437
+ onConfirm: () => onConfirm(),
7438
+ onCancel: () => onCancel()
7439
+ });
7440
+ }
7441
+ /**
7442
+ * Static shorthand for prompt dialog
7443
+ * @param {string} message - Prompt message
7444
+ * @param {Function} onSubmit - Callback with user input value
7445
+ * @param {string} [defaultValue] - Default input value
7446
+ * @returns {Dialog} Dialog instance
7447
+ */
7448
+ static prompt(message, onSubmit = () => {
7449
+ }, defaultValue = "") {
7450
+ return new Dialog({
7451
+ content: [
7452
+ {
7453
+ tag: "label",
7454
+ className: "dialog-prompt-label",
7455
+ children: [
7456
+ {
7457
+ tag: "p",
7458
+ className: "dialog-message",
7459
+ textContent: message
7460
+ },
7461
+ {
7462
+ tag: "input",
7463
+ type: "text",
7464
+ name: "prompt-value",
7465
+ className: "dialog-prompt-input",
7466
+ value: defaultValue
7467
+ }
7468
+ ]
7469
+ }
7470
+ ],
7471
+ onConfirm: (formData) => {
7472
+ const value = formData.get("prompt-value");
7473
+ onSubmit(value);
7474
+ }
7475
+ });
7476
+ }
7477
+ }
7167
7478
  const hiddenPropertyClassname = "hidden-property";
7168
7479
  const hiddenOptionClassname = "hidden-option";
7169
7480
  const optionsAddressRegex = /\.options\[\d+\]$/;
@@ -7551,7 +7862,7 @@ Author: Draggable https://draggable.io
7551
7862
  const conditionTypeWrap = this.conditionTypeWrap.get(conditionType);
7552
7863
  const conditionField = conditionTypeWrap.children[index2];
7553
7864
  conditionField.destroy();
7554
- conditionTypeWrap.removeChild(conditionField.dom);
7865
+ conditionField.dom.remove();
7555
7866
  };
7556
7867
  generateConditionFields = (conditionType, conditionVals) => {
7557
7868
  this.conditions = /* @__PURE__ */ new Map();
@@ -7602,24 +7913,52 @@ Author: Draggable https://draggable.io
7602
7913
  };
7603
7914
  return controls;
7604
7915
  }
7916
+ /**
7917
+ * Get config-provided options for an attribute
7918
+ * @param {String} attrKey - The attribute key (e.g., 'attrs.type')
7919
+ * @returns {Array|null} Array of options if config provides them, null otherwise
7920
+ */
7921
+ getConfigAttrOptions(attrKey) {
7922
+ const attrName = attrKey.split(".").pop();
7923
+ const configValue = this.field.config?.attrs?.[attrName];
7924
+ if (Array.isArray(configValue)) {
7925
+ return configValue;
7926
+ }
7927
+ return null;
7928
+ }
7605
7929
  itemInput(key, value) {
7606
- const valType = dom.childType(value) || "string";
7930
+ if (this.isDisabled) {
7931
+ return null;
7932
+ }
7933
+ let valType = dom.childType(value) || "string";
7934
+ let effectiveValue = value;
7935
+ if (this.panelName === "attrs") {
7936
+ const configAttrOptions = this.getConfigAttrOptions(key);
7937
+ if (configAttrOptions) {
7938
+ effectiveValue = configAttrOptions.map((opt) => ({
7939
+ ...opt,
7940
+ selected: opt.value === value
7941
+ }));
7942
+ valType = "array";
7943
+ }
7944
+ }
7607
7945
  const dataKey = panelDataKeyMap.get(this.panelName)?.({ itemKey: this.itemKey, key }) || this.itemKey;
7608
7946
  const labelKey = dataKey.split(".").filter(Number.isNaN).join(".") || key;
7609
- const baseConfig = ITEM_INPUT_TYPE_MAP[valType]({ key, value });
7610
- const name2 = `${this.field.shortId}-${slugifyAddress(dataKey).replace(/-\d+-(selected)/g, "-$1")}`;
7947
+ const baseConfig = ITEM_INPUT_TYPE_MAP[valType]({ key, value: effectiveValue });
7948
+ const name2 = `${this.field.shortId}-${slugifyAddress(dataKey).replaceAll(/-\d+-(selected)/g, "-$1")}`;
7611
7949
  const config = {
7612
- label: this.panelName !== "options" && (labelHelper(labelKey) || toTitleCase(labelKey)),
7613
- labelAfter: false
7950
+ label: this.panelName !== "options" && labelHelper(labelKey),
7951
+ labelAfter: false,
7952
+ inputWrap: ["f-input-wrap", this.isLocked && "locked-prop", this.isDisabled && "disabled-prop"].filter(Boolean).join(" ")
7614
7953
  };
7615
7954
  const attrs = {
7616
7955
  name: baseConfig.attrs.type === "checkbox" ? `${name2}[]` : name2
7617
7956
  };
7618
7957
  attrs.disabled = this.isDisabled;
7619
- attrs.locked = this.isLocked;
7958
+ attrs.readonly = this.isLocked;
7620
7959
  const itemInputAction = itemInputActions.get(this.itemSlug)?.(this);
7621
7960
  const action = mergeActions(INPUT_TYPE_ACTION[valType](dataKey, this.field), itemInputAction || {});
7622
- const inputConfig = merge(ITEM_INPUT_TYPE_MAP[valType]({ key, value }), { action, attrs, config });
7961
+ const inputConfig = merge(ITEM_INPUT_TYPE_MAP[valType]({ key, value: effectiveValue }), { action, attrs, config });
7623
7962
  if (CHECKED_TYPES.includes(key)) {
7624
7963
  return {
7625
7964
  className: "f-addon",
@@ -7634,6 +7973,22 @@ Author: Draggable https://draggable.io
7634
7973
  toggleOptionMultiSelect(!!val, field2);
7635
7974
  }
7636
7975
  };
7976
+ const defaultConfigOptions = [
7977
+ { label: labelHelper("config.label"), value: "label" },
7978
+ { label: labelHelper("config.hideLabel"), value: "hideLabel" },
7979
+ { label: labelHelper("config.helpText"), value: "helpText" },
7980
+ { label: labelHelper("config.labelAfter"), value: "labelAfter" },
7981
+ { label: labelHelper("config.disableHtmlLabel"), value: "disableHtmlLabel" },
7982
+ { label: labelHelper("config.tooltip"), value: "tooltip" }
7983
+ ];
7984
+ const defaultConfigValues = {
7985
+ label: "New Field",
7986
+ hideLabel: false,
7987
+ helpText: "",
7988
+ labelAfter: false,
7989
+ disableHtmlLabel: false,
7990
+ tooltip: ""
7991
+ };
7637
7992
  class EditPanel {
7638
7993
  /**
7639
7994
  * Set defaults and load panelData
@@ -7674,16 +8029,23 @@ Author: Draggable https://draggable.io
7674
8029
  createProps(data = this.data) {
7675
8030
  this.editPanelItems = Array.from(data).map((dataVal, index2) => {
7676
8031
  const isArray = this.type === "array";
8032
+ const keyBase = dataVal[0];
7677
8033
  const key = isArray ? `[${index2}]` : `.${dataVal[0]}`;
7678
8034
  const val = isArray ? dataVal : { [dataVal[0]]: dataVal[1] };
8035
+ const itemKey = `${this.name}${key}`;
8036
+ const isDisabledProp = this.component.isDisabledProp(itemKey, this.name);
8037
+ const isEditableProp = FILTERED_PANEL_DATA_KEYS.get(this.name)?.has(keyBase) ?? true;
8038
+ if (isDisabledProp || !isEditableProp) {
8039
+ return null;
8040
+ }
7679
8041
  return new EditPanelItem({
7680
- key: `${this.name}${key}`,
8042
+ key: itemKey,
7681
8043
  data: val,
7682
8044
  field: this.component,
7683
8045
  index: index2,
7684
8046
  panel: this
7685
8047
  });
7686
- });
8048
+ }).filter(Boolean);
7687
8049
  const editGroupConfig = {
7688
8050
  tag: "ul",
7689
8051
  attrs: {
@@ -7706,11 +8068,11 @@ Author: Draggable https://draggable.io
7706
8068
  */
7707
8069
  createEditButtons() {
7708
8070
  const type = this.name;
7709
- const btnTitle = mi18n.get(`panelEditButtons.${type}`);
7710
8071
  const addActions = {
7711
8072
  attrs: this.addAttribute,
7712
8073
  options: this.addOption,
7713
- conditions: this.addCondition
8074
+ conditions: this.addCondition,
8075
+ config: this.addConfiguration
7714
8076
  };
7715
8077
  const editPanelButtons = [];
7716
8078
  if (type === "conditions") {
@@ -7731,8 +8093,9 @@ Author: Draggable https://draggable.io
7731
8093
  };
7732
8094
  editPanelButtons.push(clearAllBtn);
7733
8095
  }
8096
+ const addBtnTitle = mi18n.get(`panelEditButtons.${type}`) || `+ Add ${toTitleCase(type)}`;
7734
8097
  const addBtn = {
7735
- ...dom.btnTemplate({ content: btnTitle, title: btnTitle }),
8098
+ ...dom.btnTemplate({ content: addBtnTitle, title: addBtnTitle }),
7736
8099
  className: `add-${type}`,
7737
8100
  action: {
7738
8101
  click: (evt) => {
@@ -7749,7 +8112,7 @@ Author: Draggable https://draggable.io
7749
8112
  };
7750
8113
  }
7751
8114
  const eventType = toTitleCase(type);
7752
- const customEvt = new window.CustomEvent(`onAdd${eventType}`, {
8115
+ const customEvt = new globalThis.CustomEvent(`onAdd${eventType}`, {
7753
8116
  detail: addEvt
7754
8117
  });
7755
8118
  actions.add[type](addEvt);
@@ -7830,6 +8193,37 @@ Author: Draggable https://draggable.io
7830
8193
  this.component.set(itemKey, evt.template);
7831
8194
  this.component.resizePanelWrap();
7832
8195
  };
8196
+ addConfiguration = () => {
8197
+ const configData = this.component.get("config");
8198
+ const dialog = new Dialog({
8199
+ className: "config-item-dialog",
8200
+ content: [
8201
+ {
8202
+ tag: "select",
8203
+ config: { label: mi18n.get("selectConfigKey") || "Select Configuration Key" },
8204
+ attrs: { name: "selectConfigKey", required: true, className: "config-key-select" },
8205
+ options: defaultConfigOptions.filter((opt) => !(opt.value in configData))
8206
+ }
8207
+ ],
8208
+ onConfirm: (formData) => {
8209
+ const configKey = formData.get("selectConfigKey").trim();
8210
+ const itemKey = `config.${configKey}`;
8211
+ if (configKey) {
8212
+ const newConfig = new EditPanelItem({
8213
+ key: itemKey,
8214
+ data: defaultConfigValues[configKey],
8215
+ field: this.component,
8216
+ panel: this
8217
+ });
8218
+ this.editPanelItems.push(newConfig);
8219
+ this.props.appendChild(newConfig.dom);
8220
+ this.component.debouncedUpdatePreview();
8221
+ this.component.resizePanelWrap();
8222
+ }
8223
+ }
8224
+ });
8225
+ dialog.open();
8226
+ };
7833
8227
  /**
7834
8228
  * Clears all items from the component property based on its type.
7835
8229
  * Sets the property to an empty array for 'array' type or empty object for other types.
@@ -7850,7 +8244,7 @@ Author: Draggable https://draggable.io
7850
8244
  };
7851
8245
  actions.remove[this.name](removeEvt);
7852
8246
  const eventType = toTitleCase(this.name);
7853
- const customEvt = new window.CustomEvent(`onRemove${eventType}`, {
8247
+ const customEvt = new globalThis.CustomEvent(`onRemove${eventType}`, {
7854
8248
  detail: removeEvt
7855
8249
  });
7856
8250
  document.dispatchEvent(customEvt);
@@ -8005,10 +8399,6 @@ Author: Draggable https://draggable.io
8005
8399
  title: mi18n.get("controlGroups.nextGroup"),
8006
8400
  type: "button"
8007
8401
  },
8008
- dataset: {
8009
- toggle: "tooltip",
8010
- placement: "top"
8011
- },
8012
8402
  action: {
8013
8403
  click: (e2) => this.nav.nextGroup(e2)
8014
8404
  },
@@ -8021,10 +8411,6 @@ Author: Draggable https://draggable.io
8021
8411
  title: mi18n.get("controlGroups.prevGroup"),
8022
8412
  type: "button"
8023
8413
  },
8024
- dataset: {
8025
- toggle: "tooltip",
8026
- placement: "top"
8027
- },
8028
8414
  action: {
8029
8415
  click: (e2) => this.nav.prevGroup(e2)
8030
8416
  },
@@ -8155,8 +8541,7 @@ Author: Draggable https://draggable.io
8155
8541
  this.shortId = this.id.slice(0, this.id.indexOf("-"));
8156
8542
  this.name = name2;
8157
8543
  this.indexName = `${name2}s`;
8158
- this.config = components[`${this.name}s`].config;
8159
- merge(this.config, data.config);
8544
+ this.config = { ...data.config, ...components[`${this.name}s`].config };
8160
8545
  this.address = `${this.name}s.${this.id}`;
8161
8546
  this.dataPath = `${this.address}.`;
8162
8547
  this.editPanels = /* @__PURE__ */ new Map();
@@ -8286,7 +8671,7 @@ Author: Draggable https://draggable.io
8286
8671
  // copy array since children will be modified
8287
8672
  });
8288
8673
  forEach(children, (child) => child.remove());
8289
- this.dom.parentElement.removeChild(this.dom);
8674
+ this.dom.remove();
8290
8675
  remove(components.getAddress(`${parent.name}s.${parent.id}.children`), this.id);
8291
8676
  if (!parent.children.length) {
8292
8677
  parent.emptyClass();
@@ -8857,12 +9242,18 @@ Author: Draggable https://draggable.io
8857
9242
  * @return {Boolean}
8858
9243
  */
8859
9244
  isDisabledProp = (propName, kind = "attrs") => {
8860
- const propKind = this.config.panels[kind];
8861
- if (!propKind) {
9245
+ if (get(this.config, propName)) {
8862
9246
  return false;
8863
9247
  }
8864
- const disabledAttrs = propKind.disabled.concat(this.get("config.disabled"));
8865
- return disabledAttrs.includes(propName);
9248
+ const disabledConfigProps = this.config?.disabled || [];
9249
+ const isDisabledConfigProp = disabledConfigProps.includes(propName);
9250
+ if (isDisabledConfigProp) {
9251
+ return true;
9252
+ }
9253
+ const basePropName = trimKeyPrefix(propName);
9254
+ const disabledPanelProps = this.config?.panels[kind]?.disabled || [];
9255
+ const isDisabledPanelProp = disabledPanelProps.includes(basePropName);
9256
+ return isDisabledPanelProp;
8866
9257
  };
8867
9258
  /**
8868
9259
  * Checks if property can be removed
@@ -8870,12 +9261,18 @@ Author: Draggable https://draggable.io
8870
9261
  * @return {Boolean}
8871
9262
  */
8872
9263
  isLockedProp = (propName, kind = "attrs") => {
8873
- const propKind = this.config.panels[kind];
8874
- if (!propKind) {
8875
- return false;
9264
+ const lockedConfigProps = this.config?.locked || [];
9265
+ const isLockedConfigProp = lockedConfigProps.includes(propName);
9266
+ if (isLockedConfigProp) {
9267
+ return true;
8876
9268
  }
8877
- const lockedAttrs = propKind.locked.concat(this.get("config.locked"));
8878
- return lockedAttrs.includes(propName);
9269
+ const basePropName = trimKeyPrefix(propName);
9270
+ const lockedPanelProps = this.config?.panels[kind]?.locked || [];
9271
+ const isLockedPanelProp = lockedPanelProps.includes(basePropName);
9272
+ if (isLockedPanelProp) {
9273
+ return true;
9274
+ }
9275
+ return false;
8879
9276
  };
8880
9277
  /**
8881
9278
  * Generate the markup for field edit mode
@@ -8911,14 +9308,14 @@ Author: Draggable https://draggable.io
8911
9308
  if (!this.config) {
8912
9309
  return null;
8913
9310
  }
8914
- const editable = ["object", "array"];
9311
+ const editable = /* @__PURE__ */ new Set(["object", "array"]);
8915
9312
  const panelOrder = unique([...this.config.panels.order, ...Object.keys(this.data)]);
8916
- const noPanels = ["children", "config", "meta", "action", "events", ...this.config.panels.disabled];
8917
- const allowedPanels = panelOrder.filter((panelName) => !noPanels.includes(panelName));
9313
+ const noPanels = /* @__PURE__ */ new Set(["children", "meta", "action", "events", ...this.config.panels.disabled]);
9314
+ const allowedPanels = panelOrder.filter((panelName) => !noPanels.has(panelName));
8918
9315
  for (const panelName of allowedPanels) {
8919
9316
  const panelData = this.get(panelName);
8920
9317
  const propType = dom.childType(panelData);
8921
- if (editable.includes(propType)) {
9318
+ if (editable.has(propType)) {
8922
9319
  const editPanel = new EditPanel(panelData, panelName, this);
8923
9320
  this.editPanels.set(editPanel.name, editPanel);
8924
9321
  }
@@ -9100,7 +9497,7 @@ Author: Draggable https://draggable.io
9100
9497
  return value;
9101
9498
  }
9102
9499
  }
9103
- const DEFAULT_DATA$3 = () => Object.freeze({
9500
+ const DEFAULT_DATA$2 = () => Object.freeze({
9104
9501
  config: {
9105
9502
  width: "100%"
9106
9503
  },
@@ -9126,7 +9523,7 @@ Author: Draggable https://draggable.io
9126
9523
  * @return {Object} Column config object
9127
9524
  */
9128
9525
  constructor(columnData) {
9129
- super("column", { ...DEFAULT_DATA$3(), ...columnData });
9526
+ super("column", { ...DEFAULT_DATA$2(), ...columnData });
9130
9527
  const childWrap = this.createChildWrap();
9131
9528
  this.dom = dom.create({
9132
9529
  tag: "li",
@@ -9225,7 +9622,7 @@ Author: Draggable https://draggable.io
9225
9622
  }
9226
9623
  };
9227
9624
  const columns = new Columns$1();
9228
- const DEFAULT_DATA$2 = () => Object.freeze({
9625
+ const DEFAULT_DATA$1 = () => Object.freeze({
9229
9626
  config: {
9230
9627
  fieldset: false,
9231
9628
  // wrap contents of row in fieldset
@@ -9244,7 +9641,7 @@ Author: Draggable https://draggable.io
9244
9641
  * @return {Object}
9245
9642
  */
9246
9643
  constructor(rowData) {
9247
- super("row", { ...DEFAULT_DATA$2(), ...rowData });
9644
+ super("row", { ...DEFAULT_DATA$1(), ...rowData });
9248
9645
  const children = this.createChildWrap();
9249
9646
  this.dom = dom.create({
9250
9647
  tag: "li",
@@ -9507,7 +9904,7 @@ Author: Draggable https://draggable.io
9507
9904
  }
9508
9905
  };
9509
9906
  const rows = new Rows$1();
9510
- const DEFAULT_DATA$1 = () => ({ conditions: [CONDITION_TEMPLATE()], children: [] });
9907
+ const DEFAULT_DATA = () => ({ conditions: [CONDITION_TEMPLATE()], children: [] });
9511
9908
  class Stage extends Component {
9512
9909
  /**
9513
9910
  * Process options and load existing fields from data to the stage
@@ -9516,7 +9913,7 @@ Author: Draggable https://draggable.io
9516
9913
  * @return {Object} DOM element
9517
9914
  */
9518
9915
  constructor(stageData) {
9519
- super("stage", { ...DEFAULT_DATA$1(), ...stageData });
9916
+ super("stage", { ...DEFAULT_DATA(), ...stageData });
9520
9917
  this.updateEditPanels();
9521
9918
  this.debouncedUpdateEditPanels = debounce(this.updateEditPanels);
9522
9919
  ({
@@ -9699,9 +10096,9 @@ Author: Draggable https://draggable.io
9699
10096
  * @return {String} the translated label
9700
10097
  */
9701
10098
  i18n(lookup, args) {
9702
- const locale2 = mi18n.locale;
10099
+ const locale = mi18n.locale;
9703
10100
  const controlTranslations = this.definition?.i18n;
9704
- const localeTranslations = controlTranslations?.[locale2] || {};
10101
+ const localeTranslations = controlTranslations?.[locale] || {};
9705
10102
  return (localeTranslations[lookup]?.() ?? localeTranslations[lookup]) || mi18n.get(lookup, args);
9706
10103
  }
9707
10104
  }
@@ -10051,9 +10448,6 @@ Author: Draggable https://draggable.io
10051
10448
  Controls: Controls$1,
10052
10449
  default: Controls$2
10053
10450
  }, Symbol.toStringTag, { value: "Module" }));
10054
- const DEFAULT_DATA = () => ({
10055
- // conditions: [CONDITION_TEMPLATE()],
10056
- });
10057
10451
  const checkableTypes = /* @__PURE__ */ new Set(["checkbox", "radio"]);
10058
10452
  const isSelectableType = /* @__PURE__ */ new Set(["radio", "checkbox", "select-one", "select-multiple"]);
10059
10453
  class Field extends Component {
@@ -10063,7 +10457,7 @@ Author: Draggable https://draggable.io
10063
10457
  * @return {Object} field object
10064
10458
  */
10065
10459
  constructor(fieldData = /* @__PURE__ */ Object.create(null)) {
10066
- super("field", { ...DEFAULT_DATA(), ...fieldData });
10460
+ super("field", fieldData);
10067
10461
  this.debouncedUpdateEditPanels = debounce(this.updateEditPanels);
10068
10462
  this.debouncedUpdatePreview = debounce(this.updatePreview);
10069
10463
  this.label = dom.create(this.labelConfig);
@@ -10099,34 +10493,41 @@ Author: Draggable https://draggable.io
10099
10493
  if (hideLabel) {
10100
10494
  return null;
10101
10495
  }
10102
- const labelVal = this.get("config.editorLabel") || this.get("config.label");
10103
- const required = this.get("attrs.required");
10104
- const disableHTML = this.config.label.disableHTML;
10105
- const labelConfig = () => {
10106
- const config = {
10107
- tag: "label",
10108
- attrs: {}
10109
- };
10110
- if (disableHTML) {
10111
- config.tag = "input";
10112
- config.attrs.value = labelVal;
10113
- return config;
10114
- }
10115
- config.attrs.contenteditable = true;
10116
- config.children = labelVal;
10117
- return config;
10496
+ const { label, editorLabel, disableHtmlLabel, helpText, tooltip: tooltip2 } = this.get("config");
10497
+ const { required: isRequired } = this.get("attrs") || {};
10498
+ const labelVal = editorLabel || label;
10499
+ const labelBase = {
10500
+ tag: "label",
10501
+ attrs: {}
10118
10502
  };
10119
- const label = {
10120
- ...labelConfig(),
10503
+ if (disableHtmlLabel) {
10504
+ labelBase.tag = "input";
10505
+ labelBase.attrs.value = labelVal;
10506
+ } else {
10507
+ labelBase.attrs.contenteditable = true;
10508
+ labelBase.children = labelVal;
10509
+ }
10510
+ const labelObj = {
10511
+ ...labelBase,
10121
10512
  action: {
10122
- input: ({ target: { innerHTML, innerText } }) => {
10123
- super.set("config.label", disableHTML ? innerText : innerHTML);
10513
+ input: ({ target: { innerHTML, value } }) => {
10514
+ const labelVal2 = disableHtmlLabel ? value : innerHTML;
10515
+ super.set("config.label", labelVal2);
10516
+ const configPanelLabelInput = this.dom.querySelector(".config-label");
10517
+ if (configPanelLabelInput) {
10518
+ configPanelLabelInput.value = labelVal2;
10519
+ }
10124
10520
  }
10125
10521
  }
10126
10522
  };
10127
10523
  const labelWrap = {
10128
10524
  className: "prev-label",
10129
- children: [label, required && dom.requiredMark()]
10525
+ children: [
10526
+ labelObj,
10527
+ isRequired && dom.requiredMark(),
10528
+ tooltip2 && dom.tooltip(tooltip2),
10529
+ helpText && dom.helpText(helpText)
10530
+ ]
10130
10531
  };
10131
10532
  return labelWrap;
10132
10533
  }
@@ -10138,18 +10539,23 @@ Author: Draggable https://draggable.io
10138
10539
  */
10139
10540
  set(path, value) {
10140
10541
  const data = this.setData(path, value);
10141
- this.debouncedUpdatePreview();
10142
10542
  return data;
10143
10543
  }
10144
10544
  /**
10145
10545
  * Update the label dom when label data changes
10146
10546
  */
10147
10547
  updateLabel() {
10148
- if (!this.label) {
10149
- return null;
10150
- }
10151
10548
  const newLabel = dom.create(this.labelConfig);
10152
- this.label.replaceWith(newLabel);
10549
+ if (this.label || !newLabel) {
10550
+ this.label.remove();
10551
+ }
10552
+ if (newLabel) {
10553
+ if (this.data.config?.labelAfter) {
10554
+ this.dom.append(newLabel);
10555
+ } else {
10556
+ this.dom.prepend(newLabel);
10557
+ }
10558
+ }
10153
10559
  this.label = newLabel;
10154
10560
  }
10155
10561
  /**
@@ -10170,7 +10576,7 @@ Author: Draggable https://draggable.io
10170
10576
  if (isSelectableType.has(type)) {
10171
10577
  const selectedOptions = this.preview.querySelectorAll(":checked");
10172
10578
  const optionsData = this.get("options");
10173
- const checkedType = optionsData?.[0]?.selected !== void 0 ? "selected" : "checked";
10579
+ const checkedType = optionsData?.[0]?.selected === void 0 ? "checked" : "selected";
10174
10580
  const optionsDataMap = optionsData.reduce((acc, option) => {
10175
10581
  acc[option.value] = option;
10176
10582
  acc[option.value][checkedType] = false;
@@ -10312,11 +10718,25 @@ Author: Draggable https://draggable.io
10312
10718
  const Fields = fields;
10313
10719
  const Controls = Controls$2;
10314
10720
  const getFormData = (formData, useSessionStorage = false) => {
10315
- if (formData) {
10316
- return clone$1(parseData(formData));
10721
+ if (formData !== void 0 && formData !== null) {
10722
+ const parsed = parseData(formData);
10723
+ if (parsed && typeof parsed === "object") {
10724
+ const cloned = clone$1(parsed);
10725
+ return {
10726
+ id: cloned.id || DEFAULT_FORMDATA().id,
10727
+ stages: cloned.stages || DEFAULT_FORMDATA().stages,
10728
+ rows: cloned.rows || {},
10729
+ columns: cloned.columns || {},
10730
+ fields: cloned.fields || {}
10731
+ };
10732
+ }
10733
+ console.warn("Formeo: Invalid formData provided, using default");
10317
10734
  }
10318
10735
  if (useSessionStorage) {
10319
- return sessionStorage.get(SESSION_FORMDATA_KEY) || DEFAULT_FORMDATA();
10736
+ const sessionData = sessionStorage.get(SESSION_FORMDATA_KEY);
10737
+ if (sessionData) {
10738
+ return sessionData;
10739
+ }
10320
10740
  }
10321
10741
  return DEFAULT_FORMDATA();
10322
10742
  };
@@ -10421,6 +10841,7 @@ Author: Draggable https://draggable.io
10421
10841
  Columns,
10422
10842
  Components,
10423
10843
  Controls,
10844
+ Dialog,
10424
10845
  Fields,
10425
10846
  Rows,
10426
10847
  Stages,
@@ -10452,19 +10873,19 @@ Author: Draggable https://draggable.io
10452
10873
  onSave: (_evt) => {
10453
10874
  },
10454
10875
  confirmClearAll: (evt) => {
10455
- if (window.confirm(evt.confirmationMessage)) {
10876
+ if (globalThis.confirm(evt.confirmationMessage)) {
10456
10877
  evt.clearAllAction(evt);
10457
10878
  }
10458
10879
  }
10459
10880
  };
10460
10881
  const defaultCustomEvent = ({ src, ...evtData }, type = EVENT_FORMEO_UPDATED) => {
10461
- const evt = new window.CustomEvent(type, {
10882
+ const evt = new globalThis.CustomEvent(type, {
10462
10883
  detail: evtData,
10463
10884
  bubbles: events.opts?.debug || events.opts?.bubbles
10464
10885
  });
10465
10886
  evt.data = (src || document).dispatchEvent(evt);
10466
10887
  if (type === EVENT_FORMEO_UPDATED) {
10467
- const changedEvt = new window.CustomEvent(EVENT_FORMEO_CHANGED, {
10888
+ const changedEvt = new globalThis.CustomEvent(EVENT_FORMEO_CHANGED, {
10468
10889
  detail: evtData,
10469
10890
  bubbles: events.opts?.debug || events.opts?.bubbles
10470
10891
  });
@@ -10491,7 +10912,7 @@ Author: Draggable https://draggable.io
10491
10912
  };
10492
10913
  const formeoUpdatedThrottled = throttle$1(() => {
10493
10914
  const eventData = {
10494
- timeStamp: window.performance.now(),
10915
+ timeStamp: globalThis.performance.now(),
10495
10916
  type: EVENT_FORMEO_UPDATED,
10496
10917
  detail: components.formData
10497
10918
  };
@@ -10600,14 +11021,14 @@ Author: Draggable https://draggable.io
10600
11021
  const defaultActions = {
10601
11022
  add: {
10602
11023
  attr: (evt) => {
10603
- const attr = window.prompt(evt.message.attr);
11024
+ const attr = globalThis.prompt(evt.message.attr);
10604
11025
  if (attr && evt.isDisabled(attr)) {
10605
- window.alert(mi18n.get("attributeNotPermitted", attr || ""));
11026
+ globalThis.alert(mi18n.get("attributeNotPermitted", attr));
10606
11027
  return actions.add.attrs(evt);
10607
11028
  }
10608
11029
  let val;
10609
11030
  if (attr) {
10610
- val = String(window.prompt(evt.message.value, ""));
11031
+ val = String(globalThis.prompt(evt.message.value, ""));
10611
11032
  evt.addAction(attr, val);
10612
11033
  }
10613
11034
  },
@@ -10616,6 +11037,9 @@ Author: Draggable https://draggable.io
10616
11037
  },
10617
11038
  condition: (evt) => {
10618
11039
  evt.addAction(evt);
11040
+ },
11041
+ config: (evt) => {
11042
+ evt.addAction(evt);
10619
11043
  }
10620
11044
  },
10621
11045
  remove: {
@@ -10657,6 +11081,9 @@ Author: Draggable https://draggable.io
10657
11081
  conditions: (evt) => {
10658
11082
  evt.template = evt.template || CONDITION_TEMPLATE();
10659
11083
  return actions.opts.add.condition(evt);
11084
+ },
11085
+ config: (evt) => {
11086
+ return actions.opts.add.config(evt);
10660
11087
  }
10661
11088
  },
10662
11089
  remove: {
@@ -10685,10 +11112,6 @@ Author: Draggable https://draggable.io
10685
11112
  }
10686
11113
  }
10687
11114
  };
10688
- const e = { "en-US": { "en-US": "English", dir: "ltr", "af-ZA": "Afrikaans (South Africa)", "ar-TN": "Arabic (Tunisia)", "cs-CZ": "Czech (Czechia)", "de-DE": "German (Germany)", "es-ES": "European Spanish", "fa-IR": "Persian (Iran)", "fi-FI": "Finnish (Finland)", "fr-FR": "French (France)", "hu-HU": "Hungarian (Hungary)", "it-IT": "Italian (Italy)", "ja-JP": "Japanese (Japan)", "nb-NO": "Norwegian Bokmål (Norway)", "pl-PL": "Polish (Poland)", "pt-BR": "Brazilian Portuguese", "pt-PT": "European Portuguese", "ro-RO": "Romanian (Romania)", "ru-RU": "Russian (Russia)", "th-TH": "Thai (Thailand)", "tr-TR": "Turkish (Türkiye)", "zh-CN": "Chinese (China)", "zh-HK": "Chinese (Hong Kong SAR China)", "action.add.attrs.attr": "What attribute would you like to add?", "action.add.attrs.value": "Default Value", addOption: "Add Option", allFieldsRemoved: "All fields were removed.", allowSelect: "Allow Select", and: "and", attribute: "Attribute", attributeNotPermitted: 'Attribute "{attribute}" is not permitted, please choose another.', attributes: "Attributes", "attrs.class": "Class", "attrs.className": "Class", "attrs.dir": "Direction", "attrs.id": "Id", "attrs.required": "Required", "attrs.style": "Style", "attrs.title": "Title", "attrs.type": "Type", "attrs.value": "Value", autocomplete: "Autocomplete", button: "Button", cannotBeEmpty: "This field cannot be empty", cannotClearFields: "There are no fields to clear", checkbox: "Checkbox", checkboxes: "Checkboxes", class: "Class", clear: "Clear", clearAllMessage: "Are you sure you want to clear all fields?", close: "Close", column: "Column", "condition.target.placeholder": "target", "condition.type.and": "And", "condition.type.if": "If", "condition.type.or": "Or", "condition.type.then": "Then", "condition.value.placeholder": "value", confirmClearAll: "Are you sure you want to remove all fields?", content: "Content", control: "Control", "controlGroups.nextGroup": "Next Group", "controlGroups.prevGroup": "Previous Group", "controls.filteringTerm": 'Filtering "{term}"', "controls.form.button": "Button", "controls.form.checkbox-group": "Checkbox Group", "controls.form.input.date": "Date", "controls.form.input.email": "Email", "controls.form.input.file": "File Upload", "controls.form.input.hidden": "Hidden Input", "controls.form.input.number": "Number", "controls.form.input.text": "Text Input", "controls.form.radio-group": "Radio Group", "controls.form.select": "Select", "controls.form.textarea": "TextArea", "controls.groups.form": "Form Fields", "controls.groups.html": "HTML Elements", "controls.groups.layout": "Layout", "controls.html.divider": "Divider", "controls.html.header": "Header", "controls.html.paragraph": "Paragraph", "controls.layout.column": "Column", "controls.layout.row": "Row", copy: "Copy To Clipboard", danger: "Danger", defineColumnLayout: "Define a column layout", defineColumnWidths: "Define column widths", description: "Help Text", descriptionField: "Description", "editing.row": "Editing Row", editorTitle: "Form Elements", field: "Field", "field.property.invalid": "not valid", "field.property.isChecked": "is checked", "field.property.isNotVisible": "is not visible", "field.property.isVisible": "is visible", "field.property.label": "label", "field.property.valid": "valid", "field.property.value": "value", fieldNonEditable: "This field cannot be edited.", fieldRemoveWarning: "Are you sure you want to remove this field?", fileUpload: "File Upload", formUpdated: "Form Updated", getStarted: "Drag a field from the right to get started.", group: "Group", grouped: "Grouped", hidden: "Hidden Input", hide: "Edit", htmlElements: "HTML Elements", if: "If", "if.condition.source.placeholder": "source", "if.condition.target.placeholder": "target / value", info: "Info", "input.date": "Date", "input.text": "Text", label: "Label", labelCount: "{label} {count}", labelEmpty: "Field Label cannot be empty", "lang.af": "Afrikaans", "lang.ar": "Arabic", "lang.cs": "Czech", "lang.de": "German", "lang.en": "English", "lang.es": "Spanish", "lang.fa": "Persian", "lang.fi": "Finnish", "lang.fr": "French", "lang.hu": "Hungarian", "lang.it": "Italian", "lang.ja": "Japanese", "lang.nb": "Norwegian Bokmål", "lang.pl": "Polish", "lang.pt": "Portuguese", "lang.ro": "Romanian", "lang.ru": "Russian", "lang.th": "Thai", "lang.tr": "Turkish", "lang.zh": "Chinese", layout: "Layout", limitRole: "Limit access to one or more of the following roles:", mandatory: "Mandatory", maxlength: "Max Length", "meta.group": "Group", "meta.icon": "Ico", "meta.label": "Label", minOptionMessage: "This field requires a minimum of 2 options", name: "Name", newOptionLabel: "New {type}", no: "No", number: "Number", off: "Off", on: "On", "operator.contains": "contains", "operator.equals": "equals", "operator.notContains": "not contains", "operator.notEquals": "not equal", "operator.notVisible": "not visible", "operator.visible": "visible", option: "Option", optional: "optional", optionEmpty: "Option value required", optionLabel: "Option {count}", options: "Options", or: "or", order: "Order", "panel.label.attrs": "Attributes", "panel.label.conditions": "Conditions", "panel.label.config": "Configuration", "panel.label.meta": "Meta", "panel.label.options": "Options", "panelEditButtons.attrs": "+ Attribute", "panelEditButtons.conditions": "+ Condition", "panelEditButtons.options": "+ Option", placeholder: "Placeholder", "placeholder.className": "space separated classes", "placeholder.email": "Enter you email", "placeholder.label": "Label", "placeholder.password": "Enter your password", "placeholder.placeholder": "Placeholder", "placeholder.text": "Enter some Text", "placeholder.textarea": "Enter a lot of text", "placeholder.value": "Value", preview: "Preview", primary: "Primary", remove: "Remove", removeMessage: "Remove Element", removeType: "Remove {type}", required: "Required", reset: "Reset", richText: "Rich Text Editor", roles: "Access", row: "Row", "row.makeInputGroup": "Make this row an input group.", "row.makeInputGroupDesc": "Input Groups enable users to add sets of inputs at a time.", "row.settings.fieldsetWrap": "Wrap row in a &lt;fieldset&gt; tag", "row.settings.fieldsetWrap.aria": "Wrap Row in Fieldset", save: "Save", secondary: "Secondary", select: "Select", selectColor: "Select Color", selectionsMessage: "Allow Multiple Selections", selectOptions: "Options", separator: "Separator", settings: "Settings", size: "Size", sizes: "Sizes", "sizes.lg": "Large", "sizes.m": "Default", "sizes.sm": "Small", "sizes.xs": "Extra Small", style: "Style", styles: "Styles", "styles.btn": "Button Style", "styles.btn.danger": "Danger", "styles.btn.default": "Default", "styles.btn.info": "Info", "styles.btn.primary": "Primary", "styles.btn.success": "Success", "styles.btn.warning": "Warning", subtype: "Type", success: "Success", text: "Text Field", then: "Then", "then.condition.target.placeholder": "target", toggle: "Toggle", ungrouped: "Un-Grouped", warning: "Warning", yes: "Yes" } }, i = e["en-US"];
10689
- const locale = "en-US";
10690
- mi18n.addLanguage(locale, i);
10691
- mi18n.setCurrent(locale);
10692
11115
  const defaults = {
10693
11116
  get editor() {
10694
11117
  return {
@@ -10702,7 +11125,6 @@ Author: Draggable https://draggable.io
10702
11125
  svgSprite: null,
10703
11126
  // null = use bundled sprite, or provide custom URL
10704
11127
  style: CSS_URL,
10705
- // change to null
10706
11128
  iconFont: null,
10707
11129
  // 'glyphicons' || 'font-awesome' || 'fontello'
10708
11130
  config: {},
@@ -10718,8 +11140,18 @@ Author: Draggable https://draggable.io
10718
11140
  };
10719
11141
  }
10720
11142
  };
10721
- new SmartTooltip();
11143
+ const INIT_STATES = {
11144
+ CREATED: "created",
11145
+ LOADING_RESOURCES: "loading",
11146
+ INITIALIZING: "initializing",
11147
+ READY: "ready",
11148
+ ERROR: "error"
11149
+ };
10722
11150
  let FormeoEditor$1 = class FormeoEditor {
11151
+ #initState = INIT_STATES.CREATED;
11152
+ #initPromise = null;
11153
+ #lockedFormData = null;
11154
+ #dataLoadedOnce = false;
10723
11155
  /**
10724
11156
  * @param {Object} options formeo options
10725
11157
  * @param {String|Object} userFormData loaded formData
@@ -10734,7 +11166,9 @@ Author: Draggable https://draggable.io
10734
11166
  this.opts = opts;
10735
11167
  dom.setOptions = opts;
10736
11168
  components.config = config;
10737
- this.userFormData = userFormData || formData;
11169
+ const providedData = userFormData || formData;
11170
+ this.#lockedFormData = providedData ? cleanFormData(providedData) : null;
11171
+ this.userFormData = this.#lockedFormData;
10738
11172
  this.Components = components;
10739
11173
  this.dom = dom;
10740
11174
  events.init({ debug, ...events$1 });
@@ -10749,7 +11183,9 @@ Author: Draggable https://draggable.io
10749
11183
  return this.Components.formData;
10750
11184
  }
10751
11185
  set formData(data = {}) {
10752
- this.userFormData = cleanFormData(data);
11186
+ const cleaned = cleanFormData(data);
11187
+ this.#lockedFormData = cleaned;
11188
+ this.userFormData = cleaned;
10753
11189
  this.load(this.userFormData, this.opts);
10754
11190
  }
10755
11191
  loadData(data = {}) {
@@ -10763,7 +11199,9 @@ Author: Draggable https://draggable.io
10763
11199
  * @return {void}
10764
11200
  */
10765
11201
  clear() {
10766
- this.userFormData = DEFAULT_FORMDATA();
11202
+ const defaultData = DEFAULT_FORMDATA();
11203
+ this.#lockedFormData = defaultData;
11204
+ this.userFormData = defaultData;
10767
11205
  this.Components.load(this.userFormData, this.opts);
10768
11206
  this.render();
10769
11207
  }
@@ -10773,50 +11211,159 @@ Author: Draggable https://draggable.io
10773
11211
  */
10774
11212
  async loadResources() {
10775
11213
  document.removeEventListener("DOMContentLoaded", this.loadResources);
10776
- const promises = [];
10777
- promises.push(
11214
+ this.#initState = INIT_STATES.LOADING_RESOURCES;
11215
+ const promises = [
10778
11216
  fetchIcons(this.opts.svgSprite),
10779
11217
  fetchFormeoStyle(this.opts.style),
10780
- mi18n.init({ ...this.opts.i18n, locale: globalThis.sessionStorage?.getItem(SESSION_LOCALE_KEY) })
10781
- );
10782
- await Promise.all(promises);
10783
- if (this.opts.allowEdit) {
10784
- this.init();
11218
+ mi18n.init({
11219
+ preloaded: { "en-US": i },
11220
+ ...this.opts.i18n,
11221
+ locale: globalThis.sessionStorage?.getItem(SESSION_LOCALE_KEY)
11222
+ })
11223
+ ].filter(Boolean);
11224
+ try {
11225
+ await Promise.all(promises);
11226
+ if (this.opts.allowEdit) {
11227
+ this.init();
11228
+ }
11229
+ } catch (error) {
11230
+ this.#initState = INIT_STATES.ERROR;
11231
+ console.error("Failed to load resources:", error);
11232
+ throw error;
10785
11233
  }
10786
11234
  }
10787
11235
  /**
10788
11236
  * Formeo initializer
10789
- * @return {Object} References to formeo instance,
11237
+ * @return {Promise} References to formeo instance,
10790
11238
  * dom elements, actions events and more.
10791
11239
  */
10792
11240
  init() {
10793
- return Controls$2.init(this.opts.controls, this.opts.stickyControls).then((controls) => {
11241
+ if (this.#initState === INIT_STATES.INITIALIZING) {
11242
+ return this.#initPromise;
11243
+ }
11244
+ if (this.#initState === INIT_STATES.READY) {
11245
+ return this.#refreshUI();
11246
+ }
11247
+ this.#initState = INIT_STATES.INITIALIZING;
11248
+ this.#initPromise = Controls$2.init(this.opts.controls, this.opts.stickyControls).then((controls) => {
10794
11249
  this.controls = controls;
10795
- this.load(this.userFormData, this.opts);
11250
+ if (!this.#dataLoadedOnce) {
11251
+ this.#loadInitialData();
11252
+ this.#dataLoadedOnce = true;
11253
+ }
10796
11254
  this.formId = components.get("id");
10797
11255
  this.i18n = {
10798
- setLang: (formeoLocale) => {
10799
- window.sessionStorage?.setItem(SESSION_LOCALE_KEY, formeoLocale);
10800
- const loadLang = mi18n.setCurrent(formeoLocale);
10801
- loadLang.then(() => {
10802
- this.init();
10803
- }, console.error);
10804
- }
11256
+ setLang: this.#setLanguage.bind(this)
10805
11257
  };
11258
+ this.render();
11259
+ this.#initState = INIT_STATES.READY;
10806
11260
  this.opts.onLoad?.(this);
11261
+ this.tooltipInstance = new SmartTooltip();
11262
+ return this;
11263
+ }).catch((error) => {
11264
+ this.#initState = INIT_STATES.ERROR;
11265
+ console.error("Failed to initialize editor:", error);
11266
+ throw error;
10807
11267
  });
11268
+ return this.#initPromise;
11269
+ }
11270
+ /**
11271
+ * Set language without reloading form data (fixes race condition)
11272
+ * @param {string} formeoLocale - locale code
11273
+ * @return {Promise}
11274
+ */
11275
+ async #setLanguage(formeoLocale) {
11276
+ globalThis.sessionStorage?.setItem(SESSION_LOCALE_KEY, formeoLocale);
11277
+ await mi18n.setCurrent(formeoLocale);
11278
+ await this.#refreshUI();
11279
+ }
11280
+ /**
11281
+ * Refresh UI without reloading data (used for language changes)
11282
+ * @return {Promise}
11283
+ */
11284
+ async #refreshUI() {
11285
+ this.controls = await Controls$2.init(this.opts.controls, this.opts.stickyControls);
11286
+ this.render();
11287
+ return this;
11288
+ }
11289
+ /**
11290
+ * Load initial data with proper priority
11291
+ */
11292
+ #loadInitialData() {
11293
+ const dataToLoad = this.#getDataWithPriority();
11294
+ this.Components.load(dataToLoad, this.opts);
11295
+ }
11296
+ /**
11297
+ * Get form data with proper priority:
11298
+ * 1. User-provided data (locked at construction)
11299
+ * 2. SessionStorage (if enabled)
11300
+ * 3. Default empty form
11301
+ * @return {Object} form data to load
11302
+ */
11303
+ #getDataWithPriority() {
11304
+ if (this.#lockedFormData) {
11305
+ return clone$1(this.#lockedFormData);
11306
+ }
11307
+ if (this.opts.sessionStorage) {
11308
+ const sessionData = sessionStorage.get(SESSION_FORMDATA_KEY);
11309
+ if (sessionData) {
11310
+ return sessionData;
11311
+ }
11312
+ }
11313
+ return DEFAULT_FORMDATA();
10808
11314
  }
10809
11315
  load(formData = this.userFormData, opts = this.opts) {
10810
11316
  this.Components.load(formData, opts);
10811
11317
  this.render();
10812
11318
  }
11319
+ /**
11320
+ * Get current initialization state
11321
+ * @return {string} current state
11322
+ */
11323
+ get initState() {
11324
+ return this.#initState;
11325
+ }
11326
+ /**
11327
+ * Check if the editor is ready
11328
+ * @return {boolean}
11329
+ */
11330
+ get isReady() {
11331
+ return this.#initState === INIT_STATES.READY;
11332
+ }
11333
+ /**
11334
+ * Wait for the editor to be ready
11335
+ * @return {Promise} resolves when editor is ready
11336
+ */
11337
+ async whenReady() {
11338
+ if (this.#initState === INIT_STATES.READY) {
11339
+ return this;
11340
+ }
11341
+ if (this.#initState === INIT_STATES.ERROR) {
11342
+ return Promise.reject(new Error("Editor initialization failed"));
11343
+ }
11344
+ if (this.#initPromise) {
11345
+ return this.#initPromise;
11346
+ }
11347
+ return new Promise((resolve, reject) => {
11348
+ const checkReady = () => {
11349
+ if (this.#initState === INIT_STATES.READY) {
11350
+ resolve(this);
11351
+ } else if (this.#initState === INIT_STATES.ERROR) {
11352
+ reject(new Error("Editor initialization failed"));
11353
+ } else {
11354
+ globalThis.requestAnimationFrame(checkReady);
11355
+ }
11356
+ };
11357
+ checkReady();
11358
+ });
11359
+ }
10813
11360
  /**
10814
11361
  * Render the formeo sections
10815
11362
  * @return {void}
10816
11363
  */
10817
11364
  render() {
10818
11365
  if (!this.controls) {
10819
- return window.requestAnimationFrame(() => this.render());
11366
+ return globalThis.requestAnimationFrame(() => this.render());
10820
11367
  }
10821
11368
  this.stages = Object.values(components.get("stages"));
10822
11369
  if (this.opts.controlOnLeft) {
@@ -11505,7 +12052,8 @@ Author: Draggable https://draggable.io
11505
12052
  className: ""
11506
12053
  },
11507
12054
  config: {
11508
- label: mi18n.get("controls.form.input.text")
12055
+ label: mi18n.get("controls.form.input.text"),
12056
+ hideLabel: false
11509
12057
  },
11510
12058
  meta: {
11511
12059
  group: "common",