@formio/js 5.0.0-rc.28 → 5.0.0-rc.30

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.
Files changed (53) hide show
  1. package/dist/formio.embed.js +1 -1
  2. package/dist/formio.embed.min.js +1 -1
  3. package/dist/formio.embed.min.js.LICENSE.txt +1 -1
  4. package/dist/formio.form.js +214 -1599
  5. package/dist/formio.form.min.js +1 -1
  6. package/dist/formio.form.min.js.LICENSE.txt +1 -1
  7. package/dist/formio.full.js +226 -1535
  8. package/dist/formio.full.min.js +1 -1
  9. package/dist/formio.full.min.js.LICENSE.txt +1 -1
  10. package/dist/formio.js +83 -2353
  11. package/dist/formio.min.js +1 -1
  12. package/dist/formio.min.js.LICENSE.txt +1 -3
  13. package/dist/formio.utils.min.js +1 -1
  14. package/dist/formio.utils.min.js.LICENSE.txt +1 -1
  15. package/lib/cjs/CDN.d.ts +1 -1
  16. package/lib/cjs/CDN.js +2 -2
  17. package/lib/cjs/Embed.d.ts +17 -8
  18. package/lib/cjs/Embed.js +65 -21
  19. package/lib/cjs/Formio.d.ts +0 -1
  20. package/lib/cjs/Formio.js +27 -19
  21. package/lib/cjs/Webform.d.ts +3 -4
  22. package/lib/cjs/WebformBuilder.js +6 -6
  23. package/lib/cjs/Wizard.d.ts +3 -4
  24. package/lib/cjs/components/_classes/component/Component.d.ts +1 -1
  25. package/lib/cjs/components/_classes/component/Component.js +6 -6
  26. package/lib/cjs/components/_classes/nested/NestedComponent.js +2 -2
  27. package/lib/cjs/components/editgrid/EditGrid.js +2 -2
  28. package/lib/cjs/formio.form.js +1 -0
  29. package/lib/cjs/index.js +1 -0
  30. package/lib/cjs/templates/Templates.d.ts +1 -11
  31. package/lib/cjs/templates/Templates.js +4 -41
  32. package/lib/cjs/utils/index.d.ts +1 -0
  33. package/lib/cjs/utils/index.js +2 -0
  34. package/lib/mjs/CDN.d.ts +1 -1
  35. package/lib/mjs/CDN.js +2 -2
  36. package/lib/mjs/Embed.d.ts +17 -8
  37. package/lib/mjs/Embed.js +64 -15
  38. package/lib/mjs/Formio.d.ts +0 -1
  39. package/lib/mjs/Formio.js +11 -3
  40. package/lib/mjs/Webform.d.ts +3 -4
  41. package/lib/mjs/WebformBuilder.js +3 -3
  42. package/lib/mjs/Wizard.d.ts +3 -4
  43. package/lib/mjs/components/_classes/component/Component.d.ts +1 -1
  44. package/lib/mjs/components/_classes/component/Component.js +1 -1
  45. package/lib/mjs/components/_classes/nested/NestedComponent.js +1 -1
  46. package/lib/mjs/components/editgrid/EditGrid.js +1 -1
  47. package/lib/mjs/formio.form.js +1 -0
  48. package/lib/mjs/index.js +1 -0
  49. package/lib/mjs/templates/Templates.d.ts +1 -11
  50. package/lib/mjs/templates/Templates.js +4 -40
  51. package/lib/mjs/utils/index.d.ts +1 -0
  52. package/lib/mjs/utils/index.js +1 -0
  53. package/package.json +11 -11
@@ -29,203 +29,6 @@ eval("/*! @formio/choices.js v10.2.0 | © 2023 Josh Johnson | https://github.com
29
29
 
30
30
  /***/ }),
31
31
 
32
- /***/ "./node_modules/@formio/core/lib/base/Components.js":
33
- /*!**********************************************************!*\
34
- !*** ./node_modules/@formio/core/lib/base/Components.js ***!
35
- \**********************************************************/
36
- /***/ (function(__unused_webpack_module, exports) {
37
-
38
- "use strict";
39
- eval("\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.render = exports.Components = void 0;\n/**\n * Manages all of the components within the Form.io renderer.\n */\nclass Components {\n /**\n * Gets a specific component type.\n *\n * @param type\n * @param from\n * @returns\n */\n static component(type, from = 'components') {\n if (Components[from][type]) {\n return Components[from][type];\n }\n else {\n return Components[from].component;\n }\n }\n /**\n * Create a new component.\n *\n * ```ts\n * const htmlComp = Components.createComponent({\n * type: 'html',\n * tag: 'p',\n * content: 'This is a test.'\n * })\n * ```\n *\n * @param comp The component JSON you wish to create.\n * @param options The options to pass to this component.\n * @param data The data you wish to provide to this component.\n */\n static create(comp, options, data) {\n return new (Components.component(comp.type))(comp, options, data);\n }\n /**\n * Adds a base decorator type component.\n *\n * @param baseComponent\n * @param type\n */\n static addDecorator(decorator, type) {\n Components.decorators[type] = decorator;\n }\n /**\n * Adds a new component to the renderer. Can either be a component class or a component JSON\n * to be imported.\n *\n * @param component\n */\n static addComponent(component, type) {\n if (!component) {\n return;\n }\n if (typeof component !== 'function') {\n return Components.importComponent(component);\n }\n Components.components[type] = component;\n return component;\n }\n /**\n * Imports a new component based on the JSON decorator of that component.\n * @param component\n */\n static importComponent(props = {}) {\n const Decorator = Components.component(props.extends, 'decorators');\n let ExtendedComponent = class ExtendedComponent {\n };\n ExtendedComponent = __decorate([\n Decorator(props)\n ], ExtendedComponent);\n Components.addComponent(ExtendedComponent, props.type);\n }\n /**\n * Sets the components used within this renderer.\n * @param components\n */\n static setComponents(components) {\n Object.assign(Components.components, components);\n }\n}\nexports.Components = Components;\n/**\n * An array of Components available to be rendered.\n */\nComponents.components = {};\nComponents.decorators = {};\n/**\n * Render a component attached to an html component.\n *\n * @param element\n * @param component\n * @param options\n * @param data\n */\nfunction render(element, component, options = {}, data = {}) {\n return Components.create(component, options, data).attach(element);\n}\nexports.render = render;\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/base/Components.js?");
40
-
41
- /***/ }),
42
-
43
- /***/ "./node_modules/@formio/core/lib/base/Template.js":
44
- /*!********************************************************!*\
45
- !*** ./node_modules/@formio/core/lib/base/Template.js ***!
46
- \********************************************************/
47
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
48
-
49
- "use strict";
50
- eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Template = void 0;\nconst _ = __importStar(__webpack_require__(/*! @formio/lodash */ \"./node_modules/@formio/lodash/lib/index.js\"));\n/**\n * Manages all the available templates which can be rendered.\n */\nclass Template {\n /**\n * Adds a collection of template frameworks to the renderer.\n * @param templates\n */\n static addTemplates(templates) {\n var framework = Template.framework;\n Template.templates = _.merge(Template.templates, templates);\n Template.framework = framework;\n }\n /**\n * Adds some templates to the existing template.\n * @param name\n * @param template\n */\n static addTemplate(name, template) {\n Template.templates[name] = _.merge(Template.current, template);\n }\n /**\n * Extend an existing template.\n * @param name\n * @param template\n */\n static extendTemplate(name, template) {\n Template.templates[name] = _.merge(Template.templates[name], template);\n }\n /**\n * Sets a template.\n * @param name\n * @param template\n */\n static setTemplate(name, template) {\n Template.addTemplate(name, template);\n }\n /**\n * Set the current template.\n */\n static set current(templates) {\n const defaultTemplates = Template.current;\n Template._current = _.merge(defaultTemplates, templates);\n }\n /**\n * Get the current template.\n */\n static get current() {\n return Template._current;\n }\n /**\n * Sets the current framework.\n */\n static set framework(framework) {\n if (Template.templates.hasOwnProperty(framework)) {\n Template._framework = framework;\n Template._current = Template.templates[framework];\n }\n }\n /**\n * Gets the current framework.\n */\n static get framework() {\n return Template._framework;\n }\n /**\n * Render a partial within the current template.\n * @param name\n * @param ctx\n * @param mode\n * @returns\n */\n static render(name, ctx, mode = 'html', defaultTemplate = null) {\n if (typeof name === 'function') {\n return name(ctx);\n }\n if (this.current[name] && this.current[name][mode]) {\n return this.current[name][mode](ctx);\n }\n if (defaultTemplate) {\n return defaultTemplate(ctx);\n }\n return 'Unknown template';\n }\n}\nexports.Template = Template;\nTemplate.templates = [];\nTemplate._current = {};\nTemplate._framework = 'bootstrap';\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/base/Template.js?");
51
-
52
- /***/ }),
53
-
54
- /***/ "./node_modules/@formio/core/lib/base/array/ArrayComponent.js":
55
- /*!********************************************************************!*\
56
- !*** ./node_modules/@formio/core/lib/base/array/ArrayComponent.js ***!
57
- \********************************************************************/
58
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
59
-
60
- "use strict";
61
- eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.ArrayComponent = void 0;\nconst Components_1 = __webpack_require__(/*! ../Components */ \"./node_modules/@formio/core/lib/base/Components.js\");\nconst model_1 = __webpack_require__(/*! ../../model */ \"./node_modules/@formio/core/lib/model/index.js\");\nconst NestedComponent_1 = __webpack_require__(/*! ../nested/NestedComponent */ \"./node_modules/@formio/core/lib/base/nested/NestedComponent.js\");\n/**\n * An array data type component. This provides a nested component that creates \"rows\" of data\n * where each row creates new instances of the JSON components and sets the data context for\n * each row according to the row it is within.\n *\n * For example, if you have the following JSON schema.\n *\n * ```\n * {\n * type: 'array',\n * key: 'customers',\n * components: [\n * {\n * type: 'datavalue',\n * key: 'firstName'\n * },\n * {\n * type: 'datavalue',\n * key: 'lastName'\n * }\n * ]\n * }\n * ```\n *\n * You can now create multiple rows using the following data.\n *\n * ```\n * {\n * customers: [\n * {firstName: 'Joe', lastName: 'Smith'},\n * {firstName: 'Sally', lastName: 'Thompson'},\n * {firstName: 'Sue', lastName: 'Warner'}\n * ]\n * }\n * ```\n */\nfunction ArrayComponent(props = {}) {\n if (!props.type) {\n props.type = 'array';\n }\n if (!props.model) {\n props.model = model_1.NestedArrayModel;\n }\n return function (BaseClass) {\n return class ExtendedArrayComponent extends (0, NestedComponent_1.NestedComponent)(props)(BaseClass) {\n };\n };\n}\nexports.ArrayComponent = ArrayComponent;\nComponents_1.Components.addDecorator(ArrayComponent, 'array');\nComponents_1.Components.addComponent(ArrayComponent()(), 'array');\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/base/array/ArrayComponent.js?");
62
-
63
- /***/ }),
64
-
65
- /***/ "./node_modules/@formio/core/lib/base/component/Component.js":
66
- /*!*******************************************************************!*\
67
- !*** ./node_modules/@formio/core/lib/base/component/Component.js ***!
68
- \*******************************************************************/
69
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
70
-
71
- "use strict";
72
- eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Component = void 0;\nconst lodash_1 = __webpack_require__(/*! @formio/lodash */ \"./node_modules/@formio/lodash/lib/index.js\");\nconst Components_1 = __webpack_require__(/*! ../Components */ \"./node_modules/@formio/core/lib/base/Components.js\");\nconst Template_1 = __webpack_require__(/*! ../Template */ \"./node_modules/@formio/core/lib/base/Template.js\");\nconst utils_1 = __webpack_require__(/*! ../../utils */ \"./node_modules/@formio/core/lib/utils/index.js\");\nconst dom = __importStar(__webpack_require__(/*! ../../utils/dom */ \"./node_modules/@formio/core/lib/utils/dom.js\"));\nconst sanitize_1 = __webpack_require__(/*! ../../utils/sanitize */ \"./node_modules/@formio/core/lib/utils/sanitize.js\");\nconst model_1 = __webpack_require__(/*! ../../model */ \"./node_modules/@formio/core/lib/model/index.js\");\nfunction Component(props = {}) {\n props = (0, lodash_1.merge)({\n type: 'component',\n template: false,\n schema: {\n persistent: true,\n protected: false,\n }\n }, props);\n props.schema.type = props.type;\n const ModelClass = props.model || model_1.Model;\n return function (BaseClass) {\n return class ExtendedComponent extends ModelClass(props)(BaseClass) {\n constructor() {\n super(...arguments);\n /**\n * Boolean to let us know if this component is attached to the DOM or not.\n */\n this.attached = false;\n /**\n * The DOM element references used for component logic.\n */\n this.refs = {};\n /**\n * The template to render for this component.\n */\n this.template = props.template;\n /**\n * An array of attached listeners.\n */\n this.attachedListeners = [];\n }\n get defaultOptions() {\n return {\n language: 'en',\n namespace: 'formio'\n };\n }\n get defaultTemplate() {\n return (ctx) => `<span>${ctx.t('Unknown Component')}</span>`;\n }\n /**\n * Interpolate a template string.\n * @param template - The template string to interpolate.\n * @param context - The context variables to pass to the interpolation.\n */\n interpolate(template, context) {\n return utils_1.Evaluator.interpolate(template, context);\n }\n /**\n * The rendering context.\n * @param context - The existing contexts from parent classes.\n */\n renderContext(context = {}) {\n if (super.renderContext) {\n return super.renderContext(context);\n }\n return context;\n }\n /**\n * Performs an evaluation using the evaluation context of this component.\n *\n * @param func\n * @param args\n * @param ret\n * @param tokenize\n * @return {*}\n */\n evaluate(func, args = {}, ret = '', tokenize = false) {\n return utils_1.Evaluator.evaluate(func, this.evalContext(args), ret, tokenize);\n }\n /**\n * Renders this component as an HTML string.\n */\n render(context = {}) {\n if (super.render) {\n return super.render(context);\n }\n return this.renderTemplate((this.template || this.component.type), this.renderContext(context));\n }\n /**\n * Returns the template references.\n */\n getRefs() {\n if (super.getRefs) {\n return super.getRefs();\n }\n return {};\n }\n /**\n * Loads the elemement references.\n * @param element\n */\n loadRefs(element) {\n const refs = this.getRefs();\n for (const ref in refs) {\n if (refs[ref] === 'single') {\n this.refs[ref] = element.querySelector(`[ref=\"${ref}\"]`);\n }\n else {\n this.refs[ref] = element.querySelectorAll(`[ref=\"${ref}\"]`);\n }\n }\n }\n /**\n * Renders the component and then attaches this component to the HTMLElement.\n * @param element\n */\n attach(element) {\n const _super = Object.create(null, {\n attach: { get: () => super.attach }\n });\n return __awaiter(this, void 0, void 0, function* () {\n if (this.element && !element) {\n element = this.element;\n }\n if (!element) {\n return this;\n }\n const parent = element.parentNode;\n if (!parent) {\n return this;\n }\n const index = Array.prototype.indexOf.call(parent.children, element);\n element.outerHTML = String(this.sanitize(this.render()));\n element = parent.children[index];\n this.element = element;\n this.loadRefs(this.element);\n if (_super.attach) {\n yield _super.attach.call(this, element);\n }\n this.attached = true;\n return this;\n });\n }\n /**\n * Redraw this component.\n * @returns\n */\n redraw() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.element) {\n this.clear();\n return this.attach();\n }\n });\n }\n /**\n * Sanitize an html string.\n *\n * @param string\n * @returns {*}\n */\n sanitize(dirty) {\n return (0, sanitize_1.sanitize)(dirty, this.options);\n }\n /**\n * Get all available translations.\n */\n get translations() {\n if (this.options.language &&\n this.options.i18n &&\n this.options.i18n[this.options.language]) {\n return this.options.i18n[this.options.language];\n }\n return {};\n }\n /**\n * Tranlation method to translate a string being rendered.\n * @param str\n */\n t(str) {\n if (this.translations[str]) {\n return this.translations[str];\n }\n return str;\n }\n /**\n * The evaluation context for interpolations.\n * @param extend\n */\n evalContext(extend = {}) {\n return Object.assign({\n instance: this,\n component: this.component,\n options: this.options,\n row: this.data,\n data: this.root ? this.root.data : this.data,\n rowIndex: this.rowIndex,\n value: () => this.dataValue,\n t: (str) => this.t(str)\n }, extend);\n }\n /**\n * Render a template with provided context.\n * @param name\n * @param ctx\n */\n renderTemplate(name, ctx = {}) {\n return Template_1.Template.render(name, this.evalContext(ctx), 'html', this.defaultTemplate);\n }\n /**\n * Determines if the value of this component is redacted from the user as if it is coming from the server, but is protected.\n *\n * @return {boolean|*}\n */\n isValueRedacted() {\n return (this.component.protected ||\n !this.component.persistent ||\n (this.component.persistent === 'client-only'));\n }\n /**\n * Sets the data value and updates the view representation.\n * @param value\n */\n setValue(value) {\n let changed = false;\n if (super.setValue) {\n changed = super.setValue(value);\n }\n return this.updateValue(value) || changed;\n }\n /**\n * Returns the main HTML Element for this component.\n */\n getElement() {\n return this.element;\n }\n /**\n * Remove all event handlers.\n */\n detach() {\n this.refs = {};\n this.attached = false;\n this.removeAttachedListeners();\n if (super.detach) {\n super.detach();\n }\n }\n /**\n * Clear an element.\n */\n clear() {\n this.detach();\n dom.empty(this.getElement());\n if (super.clear) {\n super.clear();\n }\n }\n /**\n * Appends an element to this component.\n * @param element\n */\n append(element) {\n dom.appendTo(element, this.element);\n }\n /**\n * Prepends an element to this component.\n * @param element\n */\n prepend(element) {\n dom.prependTo(element, this.element);\n }\n /**\n * Removes an element from this component.\n * @param element\n */\n removeChild(element) {\n dom.removeChildFrom(element, this.element);\n }\n /**\n * Wrapper method to add an event listener to an HTML element.\n *\n * @param obj\n * The DOM element to add the event to.\n * @param type\n * The event name to add.\n * @param func\n * The callback function to be executed when the listener is triggered.\n * @param persistent\n * If this listener should persist beyond \"destroy\" commands.\n */\n addEventListener(obj, type, func) {\n if (!obj) {\n return;\n }\n if ('addEventListener' in obj) {\n obj.addEventListener(type, func, false);\n }\n else if ('attachEvent' in obj) {\n obj.attachEvent(`on${type}`, func);\n }\n this.attachedListeners.push({ obj, type, func });\n return this;\n }\n /**\n * Remove all the attached listeners.\n */\n removeAttachedListeners() {\n this.attachedListeners.forEach((item) => this.removeEventListener(item.obj, item.type, item.func));\n this.attachedListeners = [];\n }\n /**\n * Remove an event listener from the object.\n *\n * @param obj\n * @param type\n */\n removeEventListener(obj, type, func) {\n if (obj) {\n obj.removeEventListener(type, func);\n }\n return this;\n }\n };\n };\n}\nexports.Component = Component;\n// Add the default component.\nComponents_1.Components.addDecorator(Component, 'component');\nComponents_1.Components.addComponent(Component()(), 'component');\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/base/component/Component.js?");
73
-
74
- /***/ }),
75
-
76
- /***/ "./node_modules/@formio/core/lib/base/data/DataComponent.js":
77
- /*!******************************************************************!*\
78
- !*** ./node_modules/@formio/core/lib/base/data/DataComponent.js ***!
79
- \******************************************************************/
80
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
81
-
82
- "use strict";
83
- eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.DataComponent = void 0;\nconst Components_1 = __webpack_require__(/*! ../Components */ \"./node_modules/@formio/core/lib/base/Components.js\");\nconst model_1 = __webpack_require__(/*! ../../model */ \"./node_modules/@formio/core/lib/model/index.js\");\nconst NestedComponent_1 = __webpack_require__(/*! ../nested/NestedComponent */ \"./node_modules/@formio/core/lib/base/nested/NestedComponent.js\");\n/**\n * A DataComponent is one that establishes a new data context for all of its\n * children at the specified \"key\" of this comopnent. For example, if this data\n * component has a key of \"employee\", and then some components within the data\n * component of \"firstName\" and \"lastName\", the data structure provided by this\n * component would resemble the following.\n *\n * {\n * \"employee\": {\n * \"firstName\": \"Bob\",\n * \"lastName\": \"Smith\"\n * }\n * }\n */\nfunction DataComponent(props = {}) {\n if (!props.type) {\n props.type = 'data';\n }\n if (!props.model) {\n props.model = model_1.NestedDataModel;\n }\n return function (BaseClass) {\n return class ExtendedDataComponent extends (0, NestedComponent_1.NestedComponent)(props)(BaseClass) {\n };\n };\n}\nexports.DataComponent = DataComponent;\nComponents_1.Components.addDecorator(DataComponent, 'data');\nComponents_1.Components.addComponent(DataComponent()(), 'data');\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/base/data/DataComponent.js?");
84
-
85
- /***/ }),
86
-
87
- /***/ "./node_modules/@formio/core/lib/base/index.js":
88
- /*!*****************************************************!*\
89
- !*** ./node_modules/@formio/core/lib/base/index.js ***!
90
- \*****************************************************/
91
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
92
-
93
- "use strict";
94
- eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Template = exports.ArrayComponent = exports.DataComponent = exports.NestedComponent = exports.Component = exports.render = exports.Components = void 0;\nvar Components_1 = __webpack_require__(/*! ./Components */ \"./node_modules/@formio/core/lib/base/Components.js\");\nObject.defineProperty(exports, \"Components\", ({ enumerable: true, get: function () { return Components_1.Components; } }));\nObject.defineProperty(exports, \"render\", ({ enumerable: true, get: function () { return Components_1.render; } }));\nvar Component_1 = __webpack_require__(/*! ./component/Component */ \"./node_modules/@formio/core/lib/base/component/Component.js\");\nObject.defineProperty(exports, \"Component\", ({ enumerable: true, get: function () { return Component_1.Component; } }));\nvar NestedComponent_1 = __webpack_require__(/*! ./nested/NestedComponent */ \"./node_modules/@formio/core/lib/base/nested/NestedComponent.js\");\nObject.defineProperty(exports, \"NestedComponent\", ({ enumerable: true, get: function () { return NestedComponent_1.NestedComponent; } }));\nvar DataComponent_1 = __webpack_require__(/*! ./data/DataComponent */ \"./node_modules/@formio/core/lib/base/data/DataComponent.js\");\nObject.defineProperty(exports, \"DataComponent\", ({ enumerable: true, get: function () { return DataComponent_1.DataComponent; } }));\nvar ArrayComponent_1 = __webpack_require__(/*! ./array/ArrayComponent */ \"./node_modules/@formio/core/lib/base/array/ArrayComponent.js\");\nObject.defineProperty(exports, \"ArrayComponent\", ({ enumerable: true, get: function () { return ArrayComponent_1.ArrayComponent; } }));\nvar Template_1 = __webpack_require__(/*! ./Template */ \"./node_modules/@formio/core/lib/base/Template.js\");\nObject.defineProperty(exports, \"Template\", ({ enumerable: true, get: function () { return Template_1.Template; } }));\n__exportStar(__webpack_require__(/*! ../model */ \"./node_modules/@formio/core/lib/model/index.js\"), exports);\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/base/index.js?");
95
-
96
- /***/ }),
97
-
98
- /***/ "./node_modules/@formio/core/lib/base/nested/NestedComponent.js":
99
- /*!**********************************************************************!*\
100
- !*** ./node_modules/@formio/core/lib/base/nested/NestedComponent.js ***!
101
- \**********************************************************************/
102
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
103
-
104
- "use strict";
105
- eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.NestedComponent = void 0;\nconst Components_1 = __webpack_require__(/*! ../Components */ \"./node_modules/@formio/core/lib/base/Components.js\");\nconst Component_1 = __webpack_require__(/*! ../component/Component */ \"./node_modules/@formio/core/lib/base/component/Component.js\");\nconst model_1 = __webpack_require__(/*! ../../model */ \"./node_modules/@formio/core/lib/model/index.js\");\nfunction NestedComponent(props = {}) {\n if (!props.type) {\n props.type = 'nested';\n }\n if (!props.model) {\n props.model = model_1.NestedModel;\n }\n if (!props.factory) {\n props.factory = Components_1.Components;\n }\n return function (BaseClass) {\n return class ExtendedNestedComponent extends (0, Component_1.Component)(props)(BaseClass) {\n get defaultTemplate() {\n return (ctx) => `<div ref=\"nested\">${ctx.instance.renderComponents()}</div>`;\n }\n /**\n * Attach a html element to this nestd component.\n * @param element\n */\n attach(element) {\n const _super = Object.create(null, {\n attach: { get: () => super.attach }\n });\n return __awaiter(this, void 0, void 0, function* () {\n yield _super.attach.call(this, element);\n if (this.element) {\n const promises = [];\n const children = this.element.querySelectorAll(`[data-within=\"${this.id}\"]`);\n Array.prototype.slice.call(children).forEach((child, index) => {\n promises.push(this.components[index].attach(child));\n });\n yield Promise.all(promises);\n }\n return this;\n });\n }\n /**\n * Detach components.\n */\n detach() {\n super.detach();\n this.eachComponent((comp) => comp.detach());\n }\n renderComponents() {\n return this.components.reduce((tpl, comp) => {\n return tpl + comp.render().replace(/(<[^\\>]+)/, `$1 data-within=\"${this.id}\"`);\n }, '');\n }\n };\n };\n}\nexports.NestedComponent = NestedComponent;\nComponents_1.Components.addDecorator(NestedComponent, 'nested');\nComponents_1.Components.addComponent(NestedComponent()(), 'nested');\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/base/nested/NestedComponent.js?");
106
-
107
- /***/ }),
108
-
109
- /***/ "./node_modules/@formio/core/lib/components/datatable.js":
110
- /*!***************************************************************!*\
111
- !*** ./node_modules/@formio/core/lib/components/datatable.js ***!
112
- \***************************************************************/
113
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
114
-
115
- "use strict";
116
- eval("\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.DataTableComponent = exports.DataTable = void 0;\nconst base_1 = __webpack_require__(/*! ../base */ \"./node_modules/@formio/core/lib/base/index.js\");\n/**\n * A base class for a data table.\n */\nclass DataTable {\n constructor(component, options, data) {\n this.component = component;\n this.options = options;\n this.data = data;\n }\n renderClasses() {\n let classes = '';\n if (this.component.bordered) {\n classes += ' table-bordered';\n }\n if (this.component.striped) {\n classes += ' table-striped';\n }\n if (this.component.hover) {\n classes += ' table-hover';\n }\n if (this.component.condensed) {\n classes += ' table-condensed';\n }\n return classes;\n }\n renderContext(extend = {}) {\n return Object.assign({\n classes: this.renderClasses()\n }, extend);\n }\n}\nexports.DataTable = DataTable;\nlet DataTableComponent = exports.DataTableComponent = class DataTableComponent extends DataTable {\n};\nexports.DataTableComponent = DataTableComponent = __decorate([\n (0, base_1.ArrayComponent)({\n type: 'datatable',\n schema: {\n bordered: true,\n striped: false,\n hover: true,\n condensed: true\n },\n template: 'datatable',\n })\n], DataTableComponent);\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/components/datatable.js?");
117
-
118
- /***/ }),
119
-
120
- /***/ "./node_modules/@formio/core/lib/components/datavalue.js":
121
- /*!***************************************************************!*\
122
- !*** ./node_modules/@formio/core/lib/components/datavalue.js ***!
123
- \***************************************************************/
124
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
125
-
126
- "use strict";
127
- eval("\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.DataValueComponent = void 0;\nconst base_1 = __webpack_require__(/*! ../base */ \"./node_modules/@formio/core/lib/base/index.js\");\nconst html_1 = __webpack_require__(/*! ./html */ \"./node_modules/@formio/core/lib/components/html.js\");\nlet DataValueComponent = exports.DataValueComponent = class DataValueComponent extends html_1.HTML {\n};\nexports.DataValueComponent = DataValueComponent = __decorate([\n (0, base_1.Component)({\n type: 'datavalue',\n schema: {\n tag: 'span',\n attrs: [],\n className: ''\n },\n template: (ctx) => {\n return `<${ctx.tag} ref=\"val\"${ctx.attrs}>${ctx.value()}</${ctx.tag}>`;\n }\n })\n], DataValueComponent);\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/components/datavalue.js?");
128
-
129
- /***/ }),
130
-
131
- /***/ "./node_modules/@formio/core/lib/components/html.js":
132
- /*!**********************************************************!*\
133
- !*** ./node_modules/@formio/core/lib/components/html.js ***!
134
- \**********************************************************/
135
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
136
-
137
- "use strict";
138
- eval("\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.HTMLComponent = exports.HTML = exports.HTMLProperties = void 0;\nconst base_1 = __webpack_require__(/*! ../base */ \"./node_modules/@formio/core/lib/base/index.js\");\nexports.HTMLProperties = {\n type: 'html',\n schema: {\n tag: 'span',\n content: '',\n attrs: [],\n className: ''\n },\n template: (ctx) => {\n return `<${ctx.tag} ref=\"${ctx.ref}\"${ctx.attrs}>${ctx.t(ctx.content)}</${ctx.tag}>`;\n }\n};\n/**\n * Base class for HTML based components.\n */\nclass HTML {\n constructor(component, options, data) {\n this.component = component;\n this.options = options;\n this.data = data;\n }\n getAttributes() {\n let hasClass = false;\n let attrs = '';\n for (let i in this.component.attrs) {\n if (this.component.attrs.hasOwnProperty(i)) {\n const attrValue = this.component.attrs[i];\n const isString = Number.isNaN(parseInt(i));\n let attr = isString ? i : attrValue.attr;\n const value = isString ? attrValue : attrValue.value;\n if (attr === 'class' && this.component.className) {\n hasClass = true;\n attr += ` ${this.component.className}`;\n }\n attrs += ` ${attr}=\"${this.interpolate(value, this.evalContext())}\"`;\n }\n }\n if (!hasClass && this.component.className) {\n attrs += ` class=\"${this.interpolate(this.component.className, this.evalContext())}\"`;\n }\n return attrs;\n }\n renderContext(extend = {}) {\n return Object.assign({\n tag: this.component.tag,\n ref: this.component.type,\n content: this.component.content ? this.interpolate(this.component.content, this.evalContext()) : '',\n attrs: this.getAttributes()\n }, extend);\n }\n}\nexports.HTML = HTML;\nlet HTMLComponent = exports.HTMLComponent = class HTMLComponent extends HTML {\n};\nexports.HTMLComponent = HTMLComponent = __decorate([\n (0, base_1.Component)(exports.HTMLProperties)\n], HTMLComponent);\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/components/html.js?");
139
-
140
- /***/ }),
141
-
142
- /***/ "./node_modules/@formio/core/lib/components/htmlcontainer.js":
143
- /*!*******************************************************************!*\
144
- !*** ./node_modules/@formio/core/lib/components/htmlcontainer.js ***!
145
- \*******************************************************************/
146
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
147
-
148
- "use strict";
149
- eval("\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.HTMLContainerComponent = exports.HTMLContainer = void 0;\nconst base_1 = __webpack_require__(/*! ../base */ \"./node_modules/@formio/core/lib/base/index.js\");\nconst html_1 = __webpack_require__(/*! ./html */ \"./node_modules/@formio/core/lib/components/html.js\");\n/**\n * Base HTMLContainer component.\n */\nclass HTMLContainer extends html_1.HTML {\n renderContext(extend = {}) {\n return super.renderContext(Object.assign({\n content: this.renderComponents()\n }, extend));\n }\n}\nexports.HTMLContainer = HTMLContainer;\nlet HTMLContainerComponent = exports.HTMLContainerComponent = class HTMLContainerComponent extends HTMLContainer {\n};\nexports.HTMLContainerComponent = HTMLContainerComponent = __decorate([\n (0, base_1.NestedComponent)({\n type: 'htmlcontainer',\n schema: html_1.HTMLProperties.schema,\n template: html_1.HTMLProperties.template\n })\n], HTMLContainerComponent);\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/components/htmlcontainer.js?");
150
-
151
- /***/ }),
152
-
153
- /***/ "./node_modules/@formio/core/lib/components/index.js":
154
- /*!***********************************************************!*\
155
- !*** ./node_modules/@formio/core/lib/components/index.js ***!
156
- \***********************************************************/
157
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
158
-
159
- "use strict";
160
- eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.InputComponent = exports.Input = exports.DataValueComponent = exports.DataTableComponent = exports.DataTable = exports.HTMLContainerComponent = exports.HTMLContainer = exports.HTMLComponent = exports.HTML = void 0;\nconst templates_1 = __importDefault(__webpack_require__(/*! ./templates */ \"./node_modules/@formio/core/lib/components/templates/index.js\"));\nconst html_1 = __webpack_require__(/*! ./html */ \"./node_modules/@formio/core/lib/components/html.js\");\nconst htmlcontainer_1 = __webpack_require__(/*! ./htmlcontainer */ \"./node_modules/@formio/core/lib/components/htmlcontainer.js\");\nconst datatable_1 = __webpack_require__(/*! ./datatable */ \"./node_modules/@formio/core/lib/components/datatable.js\");\nconst datavalue_1 = __webpack_require__(/*! ./datavalue */ \"./node_modules/@formio/core/lib/components/datavalue.js\");\nconst input_1 = __webpack_require__(/*! ./input/input */ \"./node_modules/@formio/core/lib/components/input/input.js\");\nvar html_2 = __webpack_require__(/*! ./html */ \"./node_modules/@formio/core/lib/components/html.js\");\nObject.defineProperty(exports, \"HTML\", ({ enumerable: true, get: function () { return html_2.HTML; } }));\nObject.defineProperty(exports, \"HTMLComponent\", ({ enumerable: true, get: function () { return html_2.HTMLComponent; } }));\nvar htmlcontainer_2 = __webpack_require__(/*! ./htmlcontainer */ \"./node_modules/@formio/core/lib/components/htmlcontainer.js\");\nObject.defineProperty(exports, \"HTMLContainer\", ({ enumerable: true, get: function () { return htmlcontainer_2.HTMLContainer; } }));\nObject.defineProperty(exports, \"HTMLContainerComponent\", ({ enumerable: true, get: function () { return htmlcontainer_2.HTMLContainerComponent; } }));\nvar datatable_2 = __webpack_require__(/*! ./datatable */ \"./node_modules/@formio/core/lib/components/datatable.js\");\nObject.defineProperty(exports, \"DataTable\", ({ enumerable: true, get: function () { return datatable_2.DataTable; } }));\nObject.defineProperty(exports, \"DataTableComponent\", ({ enumerable: true, get: function () { return datatable_2.DataTableComponent; } }));\nvar datavalue_2 = __webpack_require__(/*! ./datavalue */ \"./node_modules/@formio/core/lib/components/datavalue.js\");\nObject.defineProperty(exports, \"DataValueComponent\", ({ enumerable: true, get: function () { return datavalue_2.DataValueComponent; } }));\nvar input_2 = __webpack_require__(/*! ./input/input */ \"./node_modules/@formio/core/lib/components/input/input.js\");\nObject.defineProperty(exports, \"Input\", ({ enumerable: true, get: function () { return input_2.Input; } }));\nObject.defineProperty(exports, \"InputComponent\", ({ enumerable: true, get: function () { return input_2.InputComponent; } }));\nexports[\"default\"] = {\n components: {\n html: html_1.HTMLComponent,\n htmlcontainer: htmlcontainer_1.HTMLContainerComponent,\n datatable: datatable_1.DataTableComponent,\n datavalue: datavalue_1.DataValueComponent,\n input: input_1.InputComponent\n },\n templates: templates_1.default\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/components/index.js?");
161
-
162
- /***/ }),
163
-
164
- /***/ "./node_modules/@formio/core/lib/components/input/input.js":
165
- /*!*****************************************************************!*\
166
- !*** ./node_modules/@formio/core/lib/components/input/input.js ***!
167
- \*****************************************************************/
168
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
169
-
170
- "use strict";
171
- eval("\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.InputComponent = exports.Input = void 0;\nconst base_1 = __webpack_require__(/*! ../../base */ \"./node_modules/@formio/core/lib/base/index.js\");\nconst html_1 = __webpack_require__(/*! ../html */ \"./node_modules/@formio/core/lib/components/html.js\");\n/**\n * Base Input component for extending purposes.\n */\nclass Input extends html_1.HTML {\n getAttributes() {\n const attributes = super.getAttributes();\n const inputName = `${this.component.type}-${this.component.key}`.toLowerCase().replace(/[^a-z0-9\\-]+/g, '_');\n return ` type=\"${this.component.inputType}\" id=\"${inputName}\" name=\"${inputName}\"${attributes}`;\n }\n onInput() {\n this.updateValue(this.element.value);\n }\n attach(element) {\n return __awaiter(this, void 0, void 0, function* () {\n this.addEventListener(this.element, this.component.changeEvent, this.onInput.bind(this));\n return this;\n });\n }\n detach() {\n this.removeEventListener(this.element, this.component.changeEvent, this.onInput.bind(this));\n }\n setValue(value) {\n if (this.element) {\n this.element.value = value;\n }\n }\n}\nexports.Input = Input;\nlet InputComponent = exports.InputComponent = class InputComponent extends Input {\n};\nexports.InputComponent = InputComponent = __decorate([\n (0, base_1.Component)({\n type: 'input',\n template: html_1.HTMLProperties.template,\n schema: Object.assign(Object.assign({}, html_1.HTMLProperties.schema), {\n tag: 'input',\n ref: 'input',\n changeEvent: 'input',\n inputType: 'text'\n })\n })\n], InputComponent);\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/components/input/input.js?");
172
-
173
- /***/ }),
174
-
175
- /***/ "./node_modules/@formio/core/lib/components/templates/bootstrap/datatable/html.ejs.js":
176
- /*!********************************************************************************************!*\
177
- !*** ./node_modules/@formio/core/lib/components/templates/bootstrap/datatable/html.ejs.js ***!
178
- \********************************************************************************************/
179
- /***/ (function(__unused_webpack_module, exports) {
180
-
181
- eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '<table class=\"table' +\n((__t = ( ctx.classes )) == null ? '' : __t) +\n'\">\\n <thead>\\n <tr>\\n ';\n ctx.component.components.forEach(function(comp) { ;\n__p += '\\n <th>' +\n((__t = ( comp.label || comp.key )) == null ? '' : __t) +\n'</th>\\n ';\n }); ;\n__p += '\\n </tr>\\n </thead>\\n <tbody>\\n ';\n ctx.instance.rows.forEach(function(row) { ;\n__p += '\\n <tr>\\n ';\n row.forEach(function(rowComp) { ;\n__p += '\\n <td>' +\n((__t = ( rowComp.dataValue )) == null ? '' : __t) +\n'</td>\\n ';\n }); ;\n__p += '\\n </tr>\\n ';\n }); ;\n__p += '\\n </tbody>\\n</table>';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/components/templates/bootstrap/datatable/html.ejs.js?");
182
-
183
- /***/ }),
184
-
185
- /***/ "./node_modules/@formio/core/lib/components/templates/bootstrap/datatable/index.js":
186
- /*!*****************************************************************************************!*\
187
- !*** ./node_modules/@formio/core/lib/components/templates/bootstrap/datatable/index.js ***!
188
- \*****************************************************************************************/
189
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
190
-
191
- "use strict";
192
- eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.html = void 0;\nconst html = (__webpack_require__(/*! ./html.ejs.js */ \"./node_modules/@formio/core/lib/components/templates/bootstrap/datatable/html.ejs.js\")[\"default\"]);\nexports.html = html;\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/components/templates/bootstrap/datatable/index.js?");
193
-
194
- /***/ }),
195
-
196
- /***/ "./node_modules/@formio/core/lib/components/templates/bootstrap/index.js":
197
- /*!*******************************************************************************!*\
198
- !*** ./node_modules/@formio/core/lib/components/templates/bootstrap/index.js ***!
199
- \*******************************************************************************/
200
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
201
-
202
- "use strict";
203
- eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.datatable = void 0;\nexports.datatable = __importStar(__webpack_require__(/*! ./datatable */ \"./node_modules/@formio/core/lib/components/templates/bootstrap/datatable/index.js\"));\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/components/templates/bootstrap/index.js?");
204
-
205
- /***/ }),
206
-
207
- /***/ "./node_modules/@formio/core/lib/components/templates/index.js":
208
- /*!*********************************************************************!*\
209
- !*** ./node_modules/@formio/core/lib/components/templates/index.js ***!
210
- \*********************************************************************/
211
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
212
-
213
- "use strict";
214
- eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst bootstrap = __importStar(__webpack_require__(/*! ./bootstrap */ \"./node_modules/@formio/core/lib/components/templates/bootstrap/index.js\"));\nexports[\"default\"] = { bootstrap };\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/components/templates/index.js?");
215
-
216
- /***/ }),
217
-
218
- /***/ "./node_modules/@formio/core/lib/core.js":
219
- /*!***********************************************!*\
220
- !*** ./node_modules/@formio/core/lib/core.js ***!
221
- \***********************************************/
222
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
223
-
224
- "use strict";
225
- eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Formio = exports.use = exports.useModule = exports.usePlugin = void 0;\n__webpack_require__(/*! core-js/features/object/from-entries */ \"./node_modules/core-js/features/object/from-entries.js\");\nconst sdk_1 = __webpack_require__(/*! ./sdk */ \"./node_modules/@formio/core/lib/sdk/index.js\");\nObject.defineProperty(exports, \"Formio\", ({ enumerable: true, get: function () { return sdk_1.Formio; } }));\nconst utils_1 = __webpack_require__(/*! ./utils */ \"./node_modules/@formio/core/lib/utils/index.js\");\nconst base_1 = __webpack_require__(/*! ./base */ \"./node_modules/@formio/core/lib/base/index.js\");\nsdk_1.Formio.render = base_1.render;\nsdk_1.Formio.Components = base_1.Components;\nsdk_1.Formio.Evaluator = utils_1.Evaluator;\nsdk_1.Formio.Utils = utils_1.Utils;\nsdk_1.Formio.Templates = base_1.Template;\nconst lodash_1 = __webpack_require__(/*! @formio/lodash */ \"./node_modules/@formio/lodash/lib/index.js\");\n/**\n * Register a specific plugin.\n *\n * @param key\n * @param plugin\n * @returns\n */\nfunction usePlugin(key, plugin) {\n switch (key) {\n case 'options':\n if (!sdk_1.Formio.options) {\n return;\n }\n sdk_1.Formio.options = (0, lodash_1.merge)(sdk_1.Formio.options, plugin);\n break;\n case 'templates':\n if (!sdk_1.Formio.Templates) {\n return;\n }\n const current = sdk_1.Formio.Templates.framework || 'bootstrap';\n for (const framework of Object.keys(plugin)) {\n sdk_1.Formio.Templates.extendTemplate(framework, plugin[framework]);\n }\n if (plugin[current]) {\n sdk_1.Formio.Templates.current = plugin[current];\n }\n break;\n case 'components':\n if (!sdk_1.Formio.Components) {\n return;\n }\n sdk_1.Formio.Components.setComponents(plugin);\n break;\n case 'framework':\n if (!sdk_1.Formio.Templates) {\n return;\n }\n sdk_1.Formio.Templates.framework = plugin;\n break;\n case 'fetch':\n for (const name of Object.keys(plugin)) {\n sdk_1.Formio.registerPlugin(plugin[name], name);\n }\n break;\n case 'rules':\n if (!sdk_1.Formio.Rules) {\n return;\n }\n sdk_1.Formio.Rules.addRules(plugin);\n break;\n case 'evaluator':\n if (!sdk_1.Formio.Evaluator) {\n return;\n }\n sdk_1.Formio.Evaluator.registerEvaluator(plugin);\n break;\n default:\n console.log('Unknown plugin option', key);\n }\n}\nexports.usePlugin = usePlugin;\n;\n/**\n * Register a new module.\n *\n * @param module\n * @returns\n */\nfunction useModule(module) {\n // Sanity check.\n if (typeof module !== 'object') {\n return;\n }\n for (const key of Object.keys(module)) {\n usePlugin(key, module[key]);\n }\n}\nexports.useModule = useModule;\n;\n/**\n* Allows passing in plugins as multiple arguments or an array of plugins.\n*\n* Formio.plugins(plugin1, plugin2, etc);\n* Formio.plugins([plugin1, plugin2, etc]);\n*/\nfunction use(...mods) {\n mods.forEach((mod) => {\n if (Array.isArray(mod)) {\n mod.forEach(p => useModule(p));\n }\n else {\n useModule(mod);\n }\n });\n}\nexports.use = use;\n;\nsdk_1.Formio.useModule = useModule;\nsdk_1.Formio.usePlugin = usePlugin;\nsdk_1.Formio.use = use;\nconst components_1 = __importDefault(__webpack_require__(/*! ./components */ \"./node_modules/@formio/core/lib/components/index.js\"));\nsdk_1.Formio.use(components_1.default);\nconst modules_1 = __importDefault(__webpack_require__(/*! ./modules */ \"./node_modules/@formio/core/lib/modules/index.js\"));\nsdk_1.Formio.use(modules_1.default);\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/core.js?");
226
-
227
- /***/ }),
228
-
229
32
  /***/ "./node_modules/@formio/core/lib/error/FieldError.js":
230
33
  /*!***********************************************************!*\
231
34
  !*** ./node_modules/@formio/core/lib/error/FieldError.js ***!
@@ -259,94 +62,6 @@ eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ?
259
62
 
260
63
  /***/ }),
261
64
 
262
- /***/ "./node_modules/@formio/core/lib/index.js":
263
- /*!************************************************!*\
264
- !*** ./node_modules/@formio/core/lib/index.js ***!
265
- \************************************************/
266
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
267
-
268
- "use strict";
269
- eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n__exportStar(__webpack_require__(/*! ./core */ \"./node_modules/@formio/core/lib/core.js\"), exports);\n__exportStar(__webpack_require__(/*! ./base */ \"./node_modules/@formio/core/lib/base/index.js\"), exports);\n__exportStar(__webpack_require__(/*! ./model */ \"./node_modules/@formio/core/lib/model/index.js\"), exports);\n__exportStar(__webpack_require__(/*! ./modules */ \"./node_modules/@formio/core/lib/modules/index.js\"), exports);\n__exportStar(__webpack_require__(/*! ./utils */ \"./node_modules/@formio/core/lib/utils/index.js\"), exports);\n__exportStar(__webpack_require__(/*! ./components */ \"./node_modules/@formio/core/lib/components/index.js\"), exports);\n__exportStar(__webpack_require__(/*! ./process/validation */ \"./node_modules/@formio/core/lib/process/validation/index.js\"), exports);\n__exportStar(__webpack_require__(/*! ./process */ \"./node_modules/@formio/core/lib/process/index.js\"), exports);\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/index.js?");
270
-
271
- /***/ }),
272
-
273
- /***/ "./node_modules/@formio/core/lib/model/EventEmitter.js":
274
- /*!*************************************************************!*\
275
- !*** ./node_modules/@formio/core/lib/model/EventEmitter.js ***!
276
- \*************************************************************/
277
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
278
-
279
- "use strict";
280
- eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.EventEmitterBase = exports.EventEmitter = void 0;\nconst eventemitter3_1 = __importDefault(__webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\"));\nexports.EventEmitterBase = eventemitter3_1.default;\nfunction EventEmitter(BaseClass) {\n if (!BaseClass) {\n BaseClass = class _BaseClass {\n };\n }\n return class EventEmitter extends BaseClass {\n constructor() {\n super(...arguments);\n /**\n * The parent entity.\n */\n this.parent = null;\n /**\n * The events to fire for this model.\n */\n this.events = new eventemitter3_1.default();\n }\n /**\n * Bubble an event up to the parent.\n *\n * @param event\n * @param args\n * @returns\n */\n bubble(event, ...args) {\n if (this.parent) {\n return this.parent.bubble(event, ...args);\n }\n return this.emit(event, ...args);\n }\n /**\n * Emit an event on this component.\n * @param event\n * @param args\n * @returns\n */\n emit(event, ...args) {\n return this.events.emit(event, ...args);\n }\n /**\n * Register an event subscriber.\n * @param event\n * @param fn\n * @param args\n * @returns\n */\n on(event, fn, ...args) {\n return this.events.on(event, fn, ...args);\n }\n /**\n * Register an event subscriber that will only be called once.\n * @param event\n * @param fn\n * @param args\n * @returns\n */\n once(event, fn, ...args) {\n return this.events.once(event, fn, ...args);\n }\n /**\n * Turn off the event registrations.\n * @param event\n * @param args\n * @returns\n */\n off(event, ...args) {\n return this.events.off(event, ...args);\n }\n };\n}\nexports.EventEmitter = EventEmitter;\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/model/EventEmitter.js?");
281
-
282
- /***/ }),
283
-
284
- /***/ "./node_modules/@formio/core/lib/model/Model.js":
285
- /*!******************************************************!*\
286
- !*** ./node_modules/@formio/core/lib/model/Model.js ***!
287
- \******************************************************/
288
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
289
-
290
- "use strict";
291
- eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Model = void 0;\nconst _ = __importStar(__webpack_require__(/*! @formio/lodash */ \"./node_modules/@formio/lodash/lib/index.js\"));\nconst EventEmitter_1 = __webpack_require__(/*! ./EventEmitter */ \"./node_modules/@formio/core/lib/model/EventEmitter.js\");\nfunction Model(props = {}) {\n if (!props.schema) {\n props.schema = {};\n }\n if (!props.schema.key) {\n props.schema.key = '';\n }\n return function (BaseClass) {\n return class BaseModel extends (0, EventEmitter_1.EventEmitter)(BaseClass) {\n /**\n * The default JSON schema\n * @param extend\n */\n static schema() {\n return props.schema;\n }\n /**\n * @constructor\n * @param component\n * @param options\n * @param data\n */\n constructor(component = {}, options = {}, data = {}) {\n super(component, options, data);\n this.component = component;\n this.options = options;\n this.data = data;\n /**\n * The root entity.\n */\n this.root = null;\n this.id = `e${Math.random().toString(36).substring(7)}`;\n this.component = _.merge({}, this.defaultSchema, this.component);\n this.options = Object.assign(Object.assign({}, this.defaultOptions), this.options);\n if (!this.options.noInit) {\n this.init();\n }\n }\n get defaultOptions() {\n return {};\n }\n get defaultSchema() {\n return BaseModel.schema();\n }\n /**\n * Initializes the entity.\n */\n init() {\n this.hook('init');\n }\n /**\n * Return the errors from validation for this component.\n */\n get errors() {\n return this.validator.errors;\n }\n /**\n * The empty value for this component.\n *\n * @return {null}\n */\n get emptyValue() {\n return null;\n }\n /**\n * Checks to see if this components value is empty.\n *\n * @param value\n * @returns\n */\n isEmpty(value = this.dataValue) {\n const isEmptyArray = (_.isArray(value) && value.length === 1) ? _.isEqual(value[0], this.emptyValue) : false;\n return value == null || value.length === 0 || _.isEqual(value, this.emptyValue) || isEmptyArray;\n }\n /**\n * Returns the data value for this component.\n */\n get dataValue() {\n return _.get(this.data, this.component.key);\n }\n /**\n * Sets the datavalue for this component.\n */\n set dataValue(value) {\n if (this.component.key) {\n _.set(this.data, this.component.key, value);\n }\n }\n /**\n * Determine if this component has changed values.\n *\n * @param value - The value to compare against the current value.\n */\n hasChanged(value) {\n return String(value) !== String(this.dataValue);\n }\n /**\n * Updates the data model value\n * @param value The value to update within this component.\n * @return boolean true if the value has changed.\n */\n updateValue(value) {\n const changed = this.hasChanged(value);\n this.dataValue = value;\n if (changed) {\n // Bubble a change event.\n this.bubble('change', value);\n }\n return changed;\n }\n /**\n * Get the model value.\n * @returns\n */\n getValue() {\n return this.dataValue;\n }\n /**\n * Allow for options to hook into the functionality of this entity.\n * @return {*}\n */\n hook(name, ...args) {\n if (this.options &&\n this.options.hooks &&\n this.options.hooks[name]) {\n return this.options.hooks[name].apply(this, args);\n }\n else {\n // If this is an async hook instead of a sync.\n const fn = (typeof args[args.length - 1] === 'function') ? args[args.length - 1] : null;\n if (fn) {\n return fn(null, args[1]);\n }\n else {\n return args[1];\n }\n }\n }\n };\n };\n}\nexports.Model = Model;\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/model/Model.js?");
292
-
293
- /***/ }),
294
-
295
- /***/ "./node_modules/@formio/core/lib/model/NestedArrayModel.js":
296
- /*!*****************************************************************!*\
297
- !*** ./node_modules/@formio/core/lib/model/NestedArrayModel.js ***!
298
- \*****************************************************************/
299
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
300
-
301
- "use strict";
302
- eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.NestedArrayModel = void 0;\nconst _ = __importStar(__webpack_require__(/*! @formio/lodash */ \"./node_modules/@formio/lodash/lib/index.js\"));\nconst NestedDataModel_1 = __webpack_require__(/*! ./NestedDataModel */ \"./node_modules/@formio/core/lib/model/NestedDataModel.js\");\nfunction NestedArrayModel(props = {}) {\n return function (BaseClass) {\n return class BaseNestedArrayModel extends (0, NestedDataModel_1.NestedDataModel)(props)(BaseClass) {\n get defaultValue() {\n return [];\n }\n /**\n * Returns a row of componments at the provided index.\n * @param index The index of the row to return\n */\n row(index) {\n return (index < this.rows.length) ? this.rows[index] : [];\n }\n /**\n * Removes a row and detatches all components within that row.\n *\n * @param index The index of the row to remove.\n */\n removeRow(index) {\n this.row(index).forEach((comp) => this.removeComponent(comp));\n this.dataValue.splice(index, 1);\n this.rows.splice(index, 1);\n }\n /**\n * Adds a new row of components.\n *\n * @param data The data context to pass to this row of components.\n */\n addRow(data = {}, index = 0) {\n const rowData = data;\n this.dataValue[index] = rowData;\n this.createRowComponents(rowData, index);\n }\n /**\n * Sets the data for a specific row of components.\n * @param rowData The data to set\n * @param index The index of the rows to set the data within.\n */\n setRowData(rowData, index) {\n var _a;\n this.dataValue[index] = rowData;\n (_a = this.row(index)) === null || _a === void 0 ? void 0 : _a.forEach((comp) => (comp.data = rowData));\n }\n /**\n * Determines if the data within a row has changed.\n *\n * @param rowData\n * @param index\n */\n rowChanged(rowData, index) {\n var _a;\n let changed = false;\n (_a = this.row(index)) === null || _a === void 0 ? void 0 : _a.forEach((comp) => {\n const hasChanged = comp.hasChanged(_.get(rowData, comp.component.key));\n changed = hasChanged || changed;\n if (hasChanged) {\n comp.bubble('change', comp);\n }\n });\n return changed;\n }\n /**\n * Creates all components for each row.\n * @param data\n * @returns\n */\n createComponents(data) {\n this.rows = [];\n let added = [];\n this.eachRowValue(data, (row, index) => {\n added = added.concat(this.createRowComponents(row, index));\n });\n return added;\n }\n /**\n * Creates a new row of components.\n *\n * @param data The data context to pass along to this row of components.\n */\n createRowComponents(data, index = 0) {\n const comps = super.createComponents(data, (comp) => {\n comp.rowIndex = index;\n });\n this.rows[index] = comps;\n return comps;\n }\n getIndexes(value) {\n if (super.getIndexes) {\n return super.getIndexes(value);\n }\n return {\n min: 0,\n max: (value.length - 1)\n };\n }\n eachRowValue(value, fn) {\n if (!value || !value.length) {\n return;\n }\n const indexes = this.getIndexes(value);\n for (let i = indexes.min; i <= indexes.max; i++) {\n fn(value[i], i);\n }\n }\n /**\n * The empty value for this component.\n *\n * @return {array}\n */\n get emptyValue() {\n return [];\n }\n /**\n * Returns the dataValue for this component.\n */\n get dataValue() {\n return _.get(this.data, this.component.key);\n }\n /**\n * Set the datavalue of an array component.\n *\n * @param value The value to set this component to.\n */\n set dataValue(value) {\n // Only set the value if it is an array.\n if (Array.isArray(value)) {\n // Get the current data value.\n const dataValue = this.dataValue;\n this.eachRowValue(value, (row, index) => {\n if (index >= dataValue.length) {\n this.addRow(row, index);\n }\n this.setRowData(row, index);\n });\n // Remove superfluous rows.\n if (dataValue.length > value.length) {\n for (let i = value.length; i < dataValue.length; i++) {\n this.removeRow(i);\n }\n }\n }\n }\n /**\n * Determine if this array component has changed.\n *\n * @param value\n */\n hasChanged(value) {\n const dataValue = this.dataValue;\n // If the length changes, then this compnent has changed.\n if (value.length !== dataValue.length) {\n this.emit('changed', this);\n return true;\n }\n let changed = false;\n this.eachRowValue(value, (rowData, index) => {\n changed = this.rowChanged(rowData, index) || changed;\n });\n return changed;\n }\n /**\n * Sets the value of an array component.\n *\n * @param value\n */\n setValue(value) {\n var changed = false;\n this.eachComponentValue(value, (comp, val) => {\n changed = comp.setValue(val) || changed;\n });\n return changed;\n }\n };\n };\n}\nexports.NestedArrayModel = NestedArrayModel;\n;\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/model/NestedArrayModel.js?");
303
-
304
- /***/ }),
305
-
306
- /***/ "./node_modules/@formio/core/lib/model/NestedDataModel.js":
307
- /*!****************************************************************!*\
308
- !*** ./node_modules/@formio/core/lib/model/NestedDataModel.js ***!
309
- \****************************************************************/
310
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
311
-
312
- "use strict";
313
- eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.NestedDataModel = void 0;\nconst _ = __importStar(__webpack_require__(/*! @formio/lodash */ \"./node_modules/@formio/lodash/lib/index.js\"));\nconst NestedModel_1 = __webpack_require__(/*! ./NestedModel */ \"./node_modules/@formio/core/lib/model/NestedModel.js\");\nfunction NestedDataModel(props = {}) {\n return function (BaseClass) {\n return class BaseNestedDataModel extends (0, NestedModel_1.NestedModel)(props)(BaseClass) {\n get emptyValue() {\n return {};\n }\n get defaultValue() {\n return {};\n }\n /**\n * Get the component data.\n */\n componentData() {\n const compData = _.get(this.data, this.component.key, this.defaultValue);\n if (!Object.keys(compData).length) {\n _.set(this.data, this.component.key, compData);\n }\n return compData;\n }\n get dataValue() {\n return _.get(this.data, this.component.key);\n }\n set dataValue(value) {\n this.eachComponentValue(value, (comp, val) => (comp.dataValue = val));\n }\n };\n };\n}\nexports.NestedDataModel = NestedDataModel;\n;\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/model/NestedDataModel.js?");
314
-
315
- /***/ }),
316
-
317
- /***/ "./node_modules/@formio/core/lib/model/NestedModel.js":
318
- /*!************************************************************!*\
319
- !*** ./node_modules/@formio/core/lib/model/NestedModel.js ***!
320
- \************************************************************/
321
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
322
-
323
- "use strict";
324
- eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.NestedModel = void 0;\nconst _ = __importStar(__webpack_require__(/*! @formio/lodash */ \"./node_modules/@formio/lodash/lib/index.js\"));\nconst Model_1 = __webpack_require__(/*! ./Model */ \"./node_modules/@formio/core/lib/model/Model.js\");\nfunction NestedModel(props = {}) {\n if (!props.schema) {\n props.schema = {};\n }\n if (!props.schema.components) {\n props.schema.components = [];\n }\n return function (BaseClass) {\n return class BaseNestedModel extends (0, Model_1.Model)(props)(BaseClass) {\n /**\n * Initialize the nested entity by creating the children.\n */\n init() {\n super.init();\n this.components = [];\n this.createComponents(this.componentData());\n }\n /**\n * Get the component data.\n * @returns\n */\n componentData() {\n return this.data;\n }\n /**\n * Creates a new component entity.\n * @param component\n * @param options\n * @param data\n * @returns\n */\n createComponent(component, options, data) {\n if (!props.factory) {\n console.log('Cannot create components. No \"factory\" provided.');\n return null;\n }\n const comp = props.factory.create(component, Object.assign({ noInit: true }, options), data);\n comp.parent = this;\n comp.root = this.root || this;\n comp.init();\n return comp;\n }\n /**\n * Creates the components.\n * @param data\n * @returns\n */\n createComponents(data, eachComp) {\n const added = [];\n (this.component.components || []).forEach((comp) => {\n const newComp = this.createComponent(comp, this.options, data);\n if (newComp) {\n this.components.push(newComp);\n added.push(newComp);\n if (eachComp) {\n eachComp(newComp);\n }\n }\n });\n return added;\n }\n /**\n * Removes a child comopnent.\n * @param component\n */\n removeComponent(component) {\n (this.components || []).forEach((comp, index) => {\n if (comp === component) {\n if (comp.detach) {\n comp.detach();\n }\n this.components.splice(index, 1);\n }\n });\n }\n /**\n * Checks for the validity of this component and all components within this component.\n * @returns\n */\n checkValidity() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.components.reduce((valid, comp) => {\n return valid && comp.checkValidity();\n }, this.checkComponentValidity());\n });\n }\n /**\n * Get the default value for this nested entity.\n */\n get defaultValue() {\n return {};\n }\n /**\n * The empty value for this component.\n *\n * @return {null}\n */\n get emptyValue() {\n return {};\n }\n /**\n * Get the datavalue of this component.\n */\n get dataValue() {\n return this.data;\n }\n /**\n * Perform an iteration over each component within this container component.\n *\n * @param {function} fn - Called for each component\n */\n eachComponent(fn) {\n _.each(this.components, (component, index) => {\n if (fn(component, index) === false) {\n return false;\n }\n });\n }\n /**\n * Iterate through each component value.\n *\n * @param value The context data value.\n * @param fn Callback to be called with the component and the value for that component.\n */\n eachComponentValue(value, fn) {\n if (Object.keys(value).length) {\n this.eachComponent((comp) => {\n fn(comp, _.get(value, comp.component.key));\n });\n }\n }\n /**\n * Set the data value for this nested entity.\n */\n set dataValue(value) {\n this.eachComponentValue(value, (comp, val) => (comp.dataValue = val));\n }\n /**\n * Sets the value for a data component.\n *\n * @param value\n */\n setValue(value) {\n var changed = false;\n this.eachComponentValue(value, (comp, val) => {\n changed = comp.setValue(val) || changed;\n });\n return changed;\n }\n };\n };\n}\nexports.NestedModel = NestedModel;\n;\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/model/NestedModel.js?");
325
-
326
- /***/ }),
327
-
328
- /***/ "./node_modules/@formio/core/lib/model/index.js":
329
- /*!******************************************************!*\
330
- !*** ./node_modules/@formio/core/lib/model/index.js ***!
331
- \******************************************************/
332
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
333
-
334
- "use strict";
335
- eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.NestedArrayModel = exports.NestedDataModel = exports.NestedModel = exports.Model = exports.EventEmitter = void 0;\nvar EventEmitter_1 = __webpack_require__(/*! ./EventEmitter */ \"./node_modules/@formio/core/lib/model/EventEmitter.js\");\nObject.defineProperty(exports, \"EventEmitter\", ({ enumerable: true, get: function () { return EventEmitter_1.EventEmitter; } }));\nvar Model_1 = __webpack_require__(/*! ./Model */ \"./node_modules/@formio/core/lib/model/Model.js\");\nObject.defineProperty(exports, \"Model\", ({ enumerable: true, get: function () { return Model_1.Model; } }));\nvar NestedModel_1 = __webpack_require__(/*! ./NestedModel */ \"./node_modules/@formio/core/lib/model/NestedModel.js\");\nObject.defineProperty(exports, \"NestedModel\", ({ enumerable: true, get: function () { return NestedModel_1.NestedModel; } }));\nvar NestedDataModel_1 = __webpack_require__(/*! ./NestedDataModel */ \"./node_modules/@formio/core/lib/model/NestedDataModel.js\");\nObject.defineProperty(exports, \"NestedDataModel\", ({ enumerable: true, get: function () { return NestedDataModel_1.NestedDataModel; } }));\nvar NestedArrayModel_1 = __webpack_require__(/*! ./NestedArrayModel */ \"./node_modules/@formio/core/lib/model/NestedArrayModel.js\");\nObject.defineProperty(exports, \"NestedArrayModel\", ({ enumerable: true, get: function () { return NestedArrayModel_1.NestedArrayModel; } }));\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/model/index.js?");
336
-
337
- /***/ }),
338
-
339
- /***/ "./node_modules/@formio/core/lib/modules/index.js":
340
- /*!********************************************************!*\
341
- !*** ./node_modules/@formio/core/lib/modules/index.js ***!
342
- \********************************************************/
343
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
344
-
345
- "use strict";
346
- eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst jsonlogic_1 = __importDefault(__webpack_require__(/*! ./jsonlogic */ \"./node_modules/@formio/core/lib/modules/jsonlogic/index.js\"));\nexports[\"default\"] = [\n jsonlogic_1.default\n];\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/modules/index.js?");
347
-
348
- /***/ }),
349
-
350
65
  /***/ "./node_modules/@formio/core/lib/modules/jsonlogic/index.js":
351
66
  /*!******************************************************************!*\
352
67
  !*** ./node_modules/@formio/core/lib/modules/jsonlogic/index.js ***!
@@ -673,7 +388,7 @@ eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _argument
673
388
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
674
389
 
675
390
  "use strict";
676
- eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.validateRemoteSelectValue = exports.generateUrl = void 0;\nconst error_1 = __webpack_require__(/*! ../../../error */ \"./node_modules/@formio/core/lib/error/index.js\");\nconst utils_1 = __webpack_require__(/*! ../../../utils */ \"./node_modules/@formio/core/lib/utils/index.js\");\nconst util_1 = __webpack_require__(/*! ../util */ \"./node_modules/@formio/core/lib/process/validation/util.js\");\nconst error_2 = __webpack_require__(/*! ../../../utils/error */ \"./node_modules/@formio/core/lib/utils/error.js\");\nconst isValidatableSelectComponent = (component) => {\n var _a;\n return (component &&\n component.type === 'select' &&\n (0, util_1.toBoolean)(component.dataSrc === 'url') &&\n (0, util_1.toBoolean)((_a = component.validate) === null || _a === void 0 ? void 0 : _a.select));\n};\nconst generateUrl = (baseUrl, component, value) => {\n const url = baseUrl;\n const query = url.searchParams;\n if (component.searchField) {\n if (component.valueProperty) {\n query.set(component.searchField, JSON.stringify(value[component.valueProperty]));\n }\n else {\n query.set(component.searchField, JSON.stringify(value));\n }\n }\n if (component.selectFields) {\n query.set('select', component.selectFields);\n }\n if (component.sort) {\n query.set('sort', component.sort);\n }\n if (component.filter) {\n const filterQueryStrings = new URLSearchParams(component.filter);\n filterQueryStrings.forEach((value, key) => query.set(key, value));\n }\n return url;\n};\nexports.generateUrl = generateUrl;\nconst validateRemoteSelectValue = (context) => __awaiter(void 0, void 0, void 0, function* () {\n var _a;\n const { component, value, data, config, test } = context;\n // Only run this validation if server-side\n if (typeof window !== 'undefined' && !test) {\n return null;\n }\n try {\n if (!isValidatableSelectComponent(component)) {\n return null;\n }\n if (!value ||\n (0, util_1.isEmptyObject)(value) ||\n (Array.isArray(value) && value.length === 0)) {\n return null;\n }\n // If given an invalid configuration, do not validate the remote value\n if (component.dataSrc !== 'url' || !((_a = component.data) === null || _a === void 0 ? void 0 : _a.url) || !component.searchField) {\n return null;\n }\n const baseUrl = new URL(utils_1.Evaluator ? utils_1.Evaluator.interpolate(component.data.url, data, {}) : component.data.url);\n const url = (0, exports.generateUrl)(baseUrl, component, value);\n const headers = component.data.headers\n ? component.data.headers.reduce((acc, header) => (Object.assign(Object.assign({}, acc), { [header.key]: header.value })), {})\n : {};\n // Set form.io authentication\n if (component.authenticate && config && config.token) {\n headers['x-jwt-token'] = config.token;\n }\n try {\n const response = yield fetch(url.toString(), { method: 'GET', headers });\n // TODO: should we always expect JSON here?\n if (response.ok) {\n const data = yield response.json();\n const error = new error_1.FieldError('select', context);\n if (Array.isArray(data)) {\n return data && data.length ? null : error;\n }\n return data ? ((0, util_1.isEmptyObject)(data) ? error : null) : error;\n }\n const data = yield response.text();\n throw new error_1.ValidatorError(`Component with path ${component.key} returned an error while validating remote value: ${data}`);\n }\n catch (err) {\n throw new error_1.ValidatorError(`Component with path ${component.key} returned an error while validating remote value: ${err}`);\n }\n }\n catch (err) {\n console.error((0, error_2.getErrorMessage)(err));\n return null;\n }\n});\nexports.validateRemoteSelectValue = validateRemoteSelectValue;\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/process/validation/rules/validateRemoteSelectValue.js?");
391
+ eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.validateRemoteSelectValue = exports.generateUrl = void 0;\nconst error_1 = __webpack_require__(/*! ../../../error */ \"./node_modules/@formio/core/lib/error/index.js\");\nconst utils_1 = __webpack_require__(/*! ../../../utils */ \"./node_modules/@formio/core/lib/utils/index.js\");\nconst util_1 = __webpack_require__(/*! ../util */ \"./node_modules/@formio/core/lib/process/validation/util.js\");\nconst error_2 = __webpack_require__(/*! ../../../utils/error */ \"./node_modules/@formio/core/lib/utils/error.js\");\nconst isValidatableSelectComponent = (component) => {\n var _a;\n return (component &&\n component.type === 'select' &&\n (0, util_1.toBoolean)(component.dataSrc === 'url') &&\n (0, util_1.toBoolean)((_a = component.validate) === null || _a === void 0 ? void 0 : _a.select));\n};\nconst generateUrl = (baseUrl, component, value) => {\n const url = baseUrl;\n const query = url.searchParams;\n if (component.searchField) {\n if (component.valueProperty) {\n query.set(component.searchField, JSON.stringify(value[component.valueProperty]));\n }\n else {\n query.set(component.searchField, JSON.stringify(value));\n }\n }\n if (component.selectFields) {\n query.set('select', component.selectFields);\n }\n if (component.sort) {\n query.set('sort', component.sort);\n }\n if (component.filter) {\n const filterQueryStrings = new URLSearchParams(component.filter);\n filterQueryStrings.forEach((value, key) => query.set(key, value));\n }\n return url;\n};\nexports.generateUrl = generateUrl;\nconst validateRemoteSelectValue = (context) => __awaiter(void 0, void 0, void 0, function* () {\n var _a, _b;\n const { component, value, data, config } = context;\n // Only run this validation if server-side\n if (!((_a = process === null || process === void 0 ? void 0 : process.env) === null || _a === void 0 ? void 0 : _a.TEST) && typeof window !== 'undefined') {\n return null;\n }\n try {\n if (!isValidatableSelectComponent(component)) {\n return null;\n }\n if (!value ||\n (0, util_1.isEmptyObject)(value) ||\n (Array.isArray(value) && value.length === 0)) {\n return null;\n }\n // If given an invalid configuration, do not validate the remote value\n if (component.dataSrc !== 'url' || !((_b = component.data) === null || _b === void 0 ? void 0 : _b.url) || !component.searchField) {\n return null;\n }\n const baseUrl = new URL(utils_1.Evaluator ? utils_1.Evaluator.interpolate(component.data.url, data, {}) : component.data.url);\n const url = (0, exports.generateUrl)(baseUrl, component, value);\n const headers = component.data.headers\n ? component.data.headers.reduce((acc, header) => (Object.assign(Object.assign({}, acc), { [header.key]: header.value })), {})\n : {};\n // Set form.io authentication\n if (component.authenticate && config && config.token) {\n headers['x-jwt-token'] = config.token;\n }\n try {\n const response = yield fetch(url.toString(), { method: 'GET', headers });\n // TODO: should we always expect JSON here?\n if (response.ok) {\n const data = yield response.json();\n const error = new error_1.FieldError('select', context);\n if (Array.isArray(data)) {\n return data && data.length ? null : error;\n }\n return data ? ((0, util_1.isEmptyObject)(data) ? error : null) : error;\n }\n const data = yield response.text();\n throw new error_1.ValidatorError(`Component with path ${component.key} returned an error while validating remote value: ${data}`);\n }\n catch (err) {\n throw new error_1.ValidatorError(`Component with path ${component.key} returned an error while validating remote value: ${err}`);\n }\n }\n catch (err) {\n console.error((0, error_2.getErrorMessage)(err));\n return null;\n }\n});\nexports.validateRemoteSelectValue = validateRemoteSelectValue;\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/process/validation/rules/validateRemoteSelectValue.js?");
677
392
 
678
393
  /***/ }),
679
394
 
@@ -787,6 +502,28 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
787
502
 
788
503
  /***/ }),
789
504
 
505
+ /***/ "./node_modules/@formio/core/lib/template/Template.js":
506
+ /*!************************************************************!*\
507
+ !*** ./node_modules/@formio/core/lib/template/Template.js ***!
508
+ \************************************************************/
509
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
510
+
511
+ "use strict";
512
+ eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Template = void 0;\nconst _ = __importStar(__webpack_require__(/*! @formio/lodash */ \"./node_modules/@formio/lodash/lib/index.js\"));\n/**\n * Manages all the available templates which can be rendered.\n */\nclass Template {\n /**\n * Adds a collection of template frameworks to the renderer.\n * @param templates\n */\n static addTemplates(templates) {\n var framework = Template.framework;\n Template.templates = _.merge(Template.templates, templates);\n Template.framework = framework;\n }\n /**\n * Adds some templates to the existing template.\n * @param name\n * @param template\n */\n static addTemplate(name, template) {\n Template.templates[name] = _.merge(Template.current, template);\n if (Template.templates.hasOwnProperty(Template._framework)) {\n Template._current = Template.templates[Template._framework];\n }\n }\n /**\n * Extend an existing template.\n * @param name\n * @param template\n */\n static extendTemplate(name, template) {\n Template.templates[name] = _.merge(Template.templates[name], template);\n if (Template.templates.hasOwnProperty(Template._framework)) {\n Template._current = Template.templates[Template._framework];\n }\n }\n /**\n * Sets a template.\n * @param name\n * @param template\n */\n static setTemplate(name, template) {\n Template.addTemplate(name, template);\n }\n /**\n * Set the current template.\n */\n static set current(templates) {\n const defaultTemplates = Template.current;\n Template._current = _.merge(defaultTemplates, templates);\n }\n /**\n * Get the current template.\n */\n static get current() {\n return Template._current;\n }\n /**\n * Sets the current framework.\n */\n static set framework(framework) {\n Template._framework = framework;\n if (Template.templates.hasOwnProperty(framework)) {\n Template._current = Template.templates[framework];\n }\n }\n /**\n * Gets the current framework.\n */\n static get framework() {\n return Template._framework;\n }\n /**\n * Render a partial within the current template.\n * @param name\n * @param ctx\n * @param mode\n * @returns\n */\n static render(name, ctx, mode = 'html', defaultTemplate = null) {\n if (typeof name === 'function') {\n return name(ctx);\n }\n if (this.current[name] && this.current[name][mode]) {\n return this.current[name][mode](ctx);\n }\n if (defaultTemplate) {\n return defaultTemplate(ctx);\n }\n return 'Unknown template';\n }\n}\nexports.Template = Template;\nTemplate.templates = [];\nTemplate._current = {};\nTemplate._framework = 'bootstrap';\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/template/Template.js?");
513
+
514
+ /***/ }),
515
+
516
+ /***/ "./node_modules/@formio/core/lib/template/index.js":
517
+ /*!*********************************************************!*\
518
+ !*** ./node_modules/@formio/core/lib/template/index.js ***!
519
+ \*********************************************************/
520
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
521
+
522
+ "use strict";
523
+ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Template = void 0;\nvar Template_1 = __webpack_require__(/*! ./Template */ \"./node_modules/@formio/core/lib/template/Template.js\");\nObject.defineProperty(exports, \"Template\", ({ enumerable: true, get: function () { return Template_1.Template; } }));\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/template/index.js?");
524
+
525
+ /***/ }),
526
+
790
527
  /***/ "./node_modules/@formio/core/lib/types/Access.js":
791
528
  /*!*******************************************************!*\
792
529
  !*** ./node_modules/@formio/core/lib/types/Access.js ***!
@@ -1790,1369 +1527,300 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
1790
1527
  /*!********************************************************************************!*\
1791
1528
  !*** ./node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js ***!
1792
1529
  \********************************************************************************/
1793
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1794
-
1795
- "use strict";
1796
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ getOppositeVariationPlacement; }\n/* harmony export */ });\nvar hash = {\n start: 'end',\n end: 'start'\n};\nfunction getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}\n\n//# sourceURL=webpack://Formio/./node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js?");
1797
-
1798
- /***/ }),
1799
-
1800
- /***/ "./node_modules/@popperjs/core/lib/utils/getVariation.js":
1801
- /*!***************************************************************!*\
1802
- !*** ./node_modules/@popperjs/core/lib/utils/getVariation.js ***!
1803
- \***************************************************************/
1804
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1805
-
1806
- "use strict";
1807
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ getVariation; }\n/* harmony export */ });\nfunction getVariation(placement) {\n return placement.split('-')[1];\n}\n\n//# sourceURL=webpack://Formio/./node_modules/@popperjs/core/lib/utils/getVariation.js?");
1808
-
1809
- /***/ }),
1810
-
1811
- /***/ "./node_modules/@popperjs/core/lib/utils/math.js":
1812
- /*!*******************************************************!*\
1813
- !*** ./node_modules/@popperjs/core/lib/utils/math.js ***!
1814
- \*******************************************************/
1815
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1816
-
1817
- "use strict";
1818
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ max: function() { return /* binding */ max; },\n/* harmony export */ min: function() { return /* binding */ min; },\n/* harmony export */ round: function() { return /* binding */ round; }\n/* harmony export */ });\nvar max = Math.max;\nvar min = Math.min;\nvar round = Math.round;\n\n//# sourceURL=webpack://Formio/./node_modules/@popperjs/core/lib/utils/math.js?");
1819
-
1820
- /***/ }),
1821
-
1822
- /***/ "./node_modules/@popperjs/core/lib/utils/mergeByName.js":
1823
- /*!**************************************************************!*\
1824
- !*** ./node_modules/@popperjs/core/lib/utils/mergeByName.js ***!
1825
- \**************************************************************/
1826
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1827
-
1828
- "use strict";
1829
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ mergeByName; }\n/* harmony export */ });\nfunction mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}\n\n//# sourceURL=webpack://Formio/./node_modules/@popperjs/core/lib/utils/mergeByName.js?");
1830
-
1831
- /***/ }),
1832
-
1833
- /***/ "./node_modules/@popperjs/core/lib/utils/mergePaddingObject.js":
1834
- /*!*********************************************************************!*\
1835
- !*** ./node_modules/@popperjs/core/lib/utils/mergePaddingObject.js ***!
1836
- \*********************************************************************/
1837
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1838
-
1839
- "use strict";
1840
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ mergePaddingObject; }\n/* harmony export */ });\n/* harmony import */ var _getFreshSideObject_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getFreshSideObject.js */ \"./node_modules/@popperjs/core/lib/utils/getFreshSideObject.js\");\n\nfunction mergePaddingObject(paddingObject) {\n return Object.assign({}, (0,_getFreshSideObject_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(), paddingObject);\n}\n\n//# sourceURL=webpack://Formio/./node_modules/@popperjs/core/lib/utils/mergePaddingObject.js?");
1841
-
1842
- /***/ }),
1843
-
1844
- /***/ "./node_modules/@popperjs/core/lib/utils/orderModifiers.js":
1845
- /*!*****************************************************************!*\
1846
- !*** ./node_modules/@popperjs/core/lib/utils/orderModifiers.js ***!
1847
- \*****************************************************************/
1848
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1849
-
1850
- "use strict";
1851
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ orderModifiers; }\n/* harmony export */ });\n/* harmony import */ var _enums_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../enums.js */ \"./node_modules/@popperjs/core/lib/enums.js\");\n // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nfunction orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return _enums_js__WEBPACK_IMPORTED_MODULE_0__.modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}\n\n//# sourceURL=webpack://Formio/./node_modules/@popperjs/core/lib/utils/orderModifiers.js?");
1852
-
1853
- /***/ }),
1854
-
1855
- /***/ "./node_modules/@popperjs/core/lib/utils/rectToClientRect.js":
1856
- /*!*******************************************************************!*\
1857
- !*** ./node_modules/@popperjs/core/lib/utils/rectToClientRect.js ***!
1858
- \*******************************************************************/
1859
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1860
-
1861
- "use strict";
1862
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ rectToClientRect; }\n/* harmony export */ });\nfunction rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}\n\n//# sourceURL=webpack://Formio/./node_modules/@popperjs/core/lib/utils/rectToClientRect.js?");
1863
-
1864
- /***/ }),
1865
-
1866
- /***/ "./node_modules/@popperjs/core/lib/utils/userAgent.js":
1867
- /*!************************************************************!*\
1868
- !*** ./node_modules/@popperjs/core/lib/utils/userAgent.js ***!
1869
- \************************************************************/
1870
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1871
-
1872
- "use strict";
1873
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ getUAString; }\n/* harmony export */ });\nfunction getUAString() {\n var uaData = navigator.userAgentData;\n\n if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {\n return uaData.brands.map(function (item) {\n return item.brand + \"/\" + item.version;\n }).join(' ');\n }\n\n return navigator.userAgent;\n}\n\n//# sourceURL=webpack://Formio/./node_modules/@popperjs/core/lib/utils/userAgent.js?");
1874
-
1875
- /***/ }),
1876
-
1877
- /***/ "./node_modules/@popperjs/core/lib/utils/within.js":
1878
- /*!*********************************************************!*\
1879
- !*** ./node_modules/@popperjs/core/lib/utils/within.js ***!
1880
- \*********************************************************/
1881
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1882
-
1883
- "use strict";
1884
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ within: function() { return /* binding */ within; },\n/* harmony export */ withinMaxClamp: function() { return /* binding */ withinMaxClamp; }\n/* harmony export */ });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ \"./node_modules/@popperjs/core/lib/utils/math.js\");\n\nfunction within(min, value, max) {\n return (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.max)(min, (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.min)(value, max));\n}\nfunction withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n}\n\n//# sourceURL=webpack://Formio/./node_modules/@popperjs/core/lib/utils/within.js?");
1885
-
1886
- /***/ }),
1887
-
1888
- /***/ "./node_modules/animation-frame-polyfill/lib/animation-frame-polyfill.module.js":
1889
- /*!**************************************************************************************!*\
1890
- !*** ./node_modules/animation-frame-polyfill/lib/animation-frame-polyfill.module.js ***!
1891
- \**************************************************************************************/
1892
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1893
-
1894
- "use strict";
1895
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ cancelAnimationFrame: function() { return /* binding */ cancelAnimationFrame; },\n/* harmony export */ requestAnimationFrame: function() { return /* binding */ requestAnimationFrame; }\n/* harmony export */ });\nvar prefix = ['webkit', 'moz', 'ms', 'o'];\nvar requestAnimationFrame = function () {\n for (var i = 0, limit = prefix.length; i < limit && !window.requestAnimationFrame; ++i) {\n window.requestAnimationFrame = window[prefix[i] + 'RequestAnimationFrame'];\n }\n\n if (!window.requestAnimationFrame) {\n var lastTime = 0;\n\n window.requestAnimationFrame = function (callback) {\n var now = new Date().getTime();\n var ttc = Math.max(0, 16 - now - lastTime);\n var timer = window.setTimeout(function () {\n return callback(now + ttc);\n }, ttc);\n lastTime = now + ttc;\n return timer;\n };\n }\n\n return window.requestAnimationFrame.bind(window);\n}();\nvar cancelAnimationFrame = function () {\n for (var i = 0, limit = prefix.length; i < limit && !window.cancelAnimationFrame; ++i) {\n window.cancelAnimationFrame = window[prefix[i] + 'CancelAnimationFrame'] || window[prefix[i] + 'CancelRequestAnimationFrame'];\n }\n\n if (!window.cancelAnimationFrame) {\n window.cancelAnimationFrame = function (timer) {\n window.clearTimeout(timer);\n };\n }\n\n return window.cancelAnimationFrame.bind(window);\n}();\n\n\n//# sourceURL=webpack://Formio/./node_modules/animation-frame-polyfill/lib/animation-frame-polyfill.module.js?");
1896
-
1897
- /***/ }),
1898
-
1899
- /***/ "./node_modules/array-from/index.js":
1900
- /*!******************************************!*\
1901
- !*** ./node_modules/array-from/index.js ***!
1902
- \******************************************/
1903
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1904
-
1905
- eval("module.exports = (typeof Array.from === 'function' ?\n Array.from :\n __webpack_require__(/*! ./polyfill */ \"./node_modules/array-from/polyfill.js\")\n);\n\n\n//# sourceURL=webpack://Formio/./node_modules/array-from/index.js?");
1906
-
1907
- /***/ }),
1908
-
1909
- /***/ "./node_modules/array-from/polyfill.js":
1910
- /*!*********************************************!*\
1911
- !*** ./node_modules/array-from/polyfill.js ***!
1912
- \*********************************************/
1913
- /***/ (function(module) {
1914
-
1915
- eval("// Production steps of ECMA-262, Edition 6, 22.1.2.1\n// Reference: http://www.ecma-international.org/ecma-262/6.0/#sec-array.from\nmodule.exports = (function() {\n var isCallable = function(fn) {\n return typeof fn === 'function';\n };\n var toInteger = function (value) {\n var number = Number(value);\n if (isNaN(number)) { return 0; }\n if (number === 0 || !isFinite(number)) { return number; }\n return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number));\n };\n var maxSafeInteger = Math.pow(2, 53) - 1;\n var toLength = function (value) {\n var len = toInteger(value);\n return Math.min(Math.max(len, 0), maxSafeInteger);\n };\n var iteratorProp = function(value) {\n if(value != null) {\n if(['string','number','boolean','symbol'].indexOf(typeof value) > -1){\n return Symbol.iterator;\n } else if (\n (typeof Symbol !== 'undefined') &&\n ('iterator' in Symbol) &&\n (Symbol.iterator in value)\n ) {\n return Symbol.iterator;\n }\n // Support \"@@iterator\" placeholder, Gecko 27 to Gecko 35\n else if ('@@iterator' in value) {\n return '@@iterator';\n }\n }\n };\n var getMethod = function(O, P) {\n // Assert: IsPropertyKey(P) is true.\n if (O != null && P != null) {\n // Let func be GetV(O, P).\n var func = O[P];\n // ReturnIfAbrupt(func).\n // If func is either undefined or null, return undefined.\n if(func == null) {\n return void 0;\n }\n // If IsCallable(func) is false, throw a TypeError exception.\n if (!isCallable(func)) {\n throw new TypeError(func + ' is not a function');\n }\n return func;\n }\n };\n var iteratorStep = function(iterator) {\n // Let result be IteratorNext(iterator).\n // ReturnIfAbrupt(result).\n var result = iterator.next();\n // Let done be IteratorComplete(result).\n // ReturnIfAbrupt(done).\n var done = Boolean(result.done);\n // If done is true, return false.\n if(done) {\n return false;\n }\n // Return result.\n return result;\n };\n\n // The length property of the from method is 1.\n return function from(items /*, mapFn, thisArg */ ) {\n 'use strict';\n\n // 1. Let C be the this value.\n var C = this;\n\n // 2. If mapfn is undefined, let mapping be false.\n var mapFn = arguments.length > 1 ? arguments[1] : void 0;\n\n var T;\n if (typeof mapFn !== 'undefined') {\n // 3. else\n // a. If IsCallable(mapfn) is false, throw a TypeError exception.\n if (!isCallable(mapFn)) {\n throw new TypeError(\n 'Array.from: when provided, the second argument must be a function'\n );\n }\n\n // b. If thisArg was supplied, let T be thisArg; else let T\n // be undefined.\n if (arguments.length > 2) {\n T = arguments[2];\n }\n // c. Let mapping be true (implied by mapFn)\n }\n\n var A, k;\n\n // 4. Let usingIterator be GetMethod(items, @@iterator).\n // 5. ReturnIfAbrupt(usingIterator).\n var usingIterator = getMethod(items, iteratorProp(items));\n\n // 6. If usingIterator is not undefined, then\n if (usingIterator !== void 0) {\n // a. If IsConstructor(C) is true, then\n // i. Let A be the result of calling the [[Construct]]\n // internal method of C with an empty argument list.\n // b. Else,\n // i. Let A be the result of the abstract operation ArrayCreate\n // with argument 0.\n // c. ReturnIfAbrupt(A).\n A = isCallable(C) ? Object(new C()) : [];\n\n // d. Let iterator be GetIterator(items, usingIterator).\n var iterator = usingIterator.call(items);\n\n // e. ReturnIfAbrupt(iterator).\n if (iterator == null) {\n throw new TypeError(\n 'Array.from requires an array-like or iterable object'\n );\n }\n\n // f. Let k be 0.\n k = 0;\n\n // g. Repeat\n var next, nextValue;\n while (true) {\n // i. Let Pk be ToString(k).\n // ii. Let next be IteratorStep(iterator).\n // iii. ReturnIfAbrupt(next).\n next = iteratorStep(iterator);\n\n // iv. If next is false, then\n if (!next) {\n\n // 1. Let setStatus be Set(A, \"length\", k, true).\n // 2. ReturnIfAbrupt(setStatus).\n A.length = k;\n\n // 3. Return A.\n return A;\n }\n // v. Let nextValue be IteratorValue(next).\n // vi. ReturnIfAbrupt(nextValue)\n nextValue = next.value;\n\n // vii. If mapping is true, then\n // 1. Let mappedValue be Call(mapfn, T, «nextValue, k»).\n // 2. If mappedValue is an abrupt completion, return\n // IteratorClose(iterator, mappedValue).\n // 3. Let mappedValue be mappedValue.[[value]].\n // viii. Else, let mappedValue be nextValue.\n // ix. Let defineStatus be the result of\n // CreateDataPropertyOrThrow(A, Pk, mappedValue).\n // x. [TODO] If defineStatus is an abrupt completion, return\n // IteratorClose(iterator, defineStatus).\n if (mapFn) {\n A[k] = mapFn.call(T, nextValue, k);\n }\n else {\n A[k] = nextValue;\n }\n // xi. Increase k by 1.\n k++;\n }\n // 7. Assert: items is not an Iterable so assume it is\n // an array-like object.\n } else {\n\n // 8. Let arrayLike be ToObject(items).\n var arrayLike = Object(items);\n\n // 9. ReturnIfAbrupt(items).\n if (items == null) {\n throw new TypeError(\n 'Array.from requires an array-like object - not null or undefined'\n );\n }\n\n // 10. Let len be ToLength(Get(arrayLike, \"length\")).\n // 11. ReturnIfAbrupt(len).\n var len = toLength(arrayLike.length);\n\n // 12. If IsConstructor(C) is true, then\n // a. Let A be Construct(C, «len»).\n // 13. Else\n // a. Let A be ArrayCreate(len).\n // 14. ReturnIfAbrupt(A).\n A = isCallable(C) ? Object(new C(len)) : new Array(len);\n\n // 15. Let k be 0.\n k = 0;\n // 16. Repeat, while k < len… (also steps a - h)\n var kValue;\n while (k < len) {\n kValue = arrayLike[k];\n if (mapFn) {\n A[k] = mapFn.call(T, kValue, k);\n }\n else {\n A[k] = kValue;\n }\n k++;\n }\n // 17. Let setStatus be Set(A, \"length\", len, true).\n // 18. ReturnIfAbrupt(setStatus).\n A.length = len;\n // 19. Return A.\n }\n return A;\n };\n})();\n\n\n//# sourceURL=webpack://Formio/./node_modules/array-from/polyfill.js?");
1916
-
1917
- /***/ }),
1918
-
1919
- /***/ "./node_modules/autocompleter/autocomplete.js":
1920
- /*!****************************************************!*\
1921
- !*** ./node_modules/autocompleter/autocomplete.js ***!
1922
- \****************************************************/
1923
- /***/ (function(module) {
1924
-
1925
- eval("(function (global, factory) {\n true ? module.exports = factory() :\n 0;\n}(this, (function () { 'use strict';\n\n /**\r\n * Copyright (c) 2016 Denys Krasnoshchok\r\n *\r\n * Homepage: https://smartscheduling.com/en/documentation/autocomplete\r\n * Source: https://github.com/kraaden/autocomplete\r\n *\r\n * MIT License\r\n */\r\n function autocomplete(settings) {\r\n // just an alias to minimize JS file size\r\n var doc = document;\r\n var container = settings.container || doc.createElement('div');\r\n container.id = container.id || 'autocomplete-' + uid();\r\n var containerStyle = container.style;\r\n var debounceWaitMs = settings.debounceWaitMs || 0;\r\n var preventSubmit = settings.preventSubmit || false;\r\n var disableAutoSelect = settings.disableAutoSelect || false;\r\n var customContainerParent = container.parentElement;\r\n var items = [];\r\n var inputValue = '';\r\n var minLen = 2;\r\n var showOnFocus = settings.showOnFocus;\r\n var selected;\r\n var fetchCounter = 0;\r\n var debounceTimer;\r\n var destroyed = false;\r\n var suppressAutocomplete = false;\r\n if (settings.minLength !== undefined) {\r\n minLen = settings.minLength;\r\n }\r\n if (!settings.input) {\r\n throw new Error('input undefined');\r\n }\r\n var input = settings.input;\r\n container.className = 'autocomplete ' + (settings.className || '');\r\n container.setAttribute('role', 'listbox');\r\n input.setAttribute('role', 'combobox');\r\n input.setAttribute('aria-expanded', 'false');\r\n input.setAttribute('aria-autocomplete', 'list');\r\n input.setAttribute('aria-controls', container.id);\r\n input.setAttribute('aria-owns', container.id);\r\n input.setAttribute('aria-activedescendant', '');\r\n input.setAttribute('aria-haspopup', 'listbox');\r\n // IOS implementation for fixed positioning has many bugs, so we will use absolute positioning\r\n containerStyle.position = 'absolute';\r\n /**\r\n * Generate a very complex textual ID that greatly reduces the chance of a collision with another ID or text.\r\n */\r\n function uid() {\r\n return Date.now().toString(36) + Math.random().toString(36).substring(2);\r\n }\r\n /**\r\n * Detach the container from DOM\r\n */\r\n function detach() {\r\n var parent = container.parentNode;\r\n if (parent) {\r\n parent.removeChild(container);\r\n }\r\n }\r\n /**\r\n * Clear debouncing timer if assigned\r\n */\r\n function clearDebounceTimer() {\r\n if (debounceTimer) {\r\n window.clearTimeout(debounceTimer);\r\n }\r\n }\r\n /**\r\n * Attach the container to DOM\r\n */\r\n function attach() {\r\n if (!container.parentNode) {\r\n (customContainerParent || doc.body).appendChild(container);\r\n }\r\n }\r\n /**\r\n * Check if container for autocomplete is displayed\r\n */\r\n function containerDisplayed() {\r\n return !!container.parentNode;\r\n }\r\n /**\r\n * Clear autocomplete state and hide container\r\n */\r\n function clear() {\r\n // prevent the update call if there are pending AJAX requests\r\n fetchCounter++;\r\n items = [];\r\n inputValue = '';\r\n selected = undefined;\r\n input.setAttribute('aria-activedescendant', '');\r\n input.setAttribute('aria-expanded', 'false');\r\n detach();\r\n }\r\n /**\r\n * Update autocomplete position\r\n */\r\n function updatePosition() {\r\n if (!containerDisplayed()) {\r\n return;\r\n }\r\n input.setAttribute('aria-expanded', 'true');\r\n containerStyle.height = 'auto';\r\n containerStyle.width = input.offsetWidth + 'px';\r\n var maxHeight = 0;\r\n var inputRect;\r\n function calc() {\r\n var docEl = doc.documentElement;\r\n var clientTop = docEl.clientTop || doc.body.clientTop || 0;\r\n var clientLeft = docEl.clientLeft || doc.body.clientLeft || 0;\r\n var scrollTop = window.pageYOffset || docEl.scrollTop;\r\n var scrollLeft = window.pageXOffset || docEl.scrollLeft;\r\n inputRect = input.getBoundingClientRect();\r\n var top = inputRect.top + input.offsetHeight + scrollTop - clientTop;\r\n var left = inputRect.left + scrollLeft - clientLeft;\r\n containerStyle.top = top + 'px';\r\n containerStyle.left = left + 'px';\r\n maxHeight = window.innerHeight - (inputRect.top + input.offsetHeight);\r\n if (maxHeight < 0) {\r\n maxHeight = 0;\r\n }\r\n containerStyle.top = top + 'px';\r\n containerStyle.bottom = '';\r\n containerStyle.left = left + 'px';\r\n containerStyle.maxHeight = maxHeight + 'px';\r\n }\r\n // the calc method must be called twice, otherwise the calculation may be wrong on resize event (chrome browser)\r\n calc();\r\n calc();\r\n if (settings.customize && inputRect) {\r\n settings.customize(input, inputRect, container, maxHeight);\r\n }\r\n }\r\n /**\r\n * Redraw the autocomplete div element with suggestions\r\n */\r\n function update() {\r\n container.innerHTML = '';\r\n input.setAttribute('aria-activedescendant', '');\r\n // function for rendering autocomplete suggestions\r\n var render = function (item, _, __) {\r\n var itemElement = doc.createElement('div');\r\n itemElement.textContent = item.label || '';\r\n return itemElement;\r\n };\r\n if (settings.render) {\r\n render = settings.render;\r\n }\r\n // function to render autocomplete groups\r\n var renderGroup = function (groupName, _) {\r\n var groupDiv = doc.createElement('div');\r\n groupDiv.textContent = groupName;\r\n return groupDiv;\r\n };\r\n if (settings.renderGroup) {\r\n renderGroup = settings.renderGroup;\r\n }\r\n var fragment = doc.createDocumentFragment();\r\n var prevGroup = uid();\r\n items.forEach(function (item, index) {\r\n if (item.group && item.group !== prevGroup) {\r\n prevGroup = item.group;\r\n var groupDiv = renderGroup(item.group, inputValue);\r\n if (groupDiv) {\r\n groupDiv.className += ' group';\r\n fragment.appendChild(groupDiv);\r\n }\r\n }\r\n var div = render(item, inputValue, index);\r\n if (div) {\r\n div.id = container.id + \"_\" + index;\r\n div.setAttribute('role', 'option');\r\n div.addEventListener('click', function (ev) {\r\n suppressAutocomplete = true;\r\n try {\r\n settings.onSelect(item, input);\r\n }\r\n finally {\r\n suppressAutocomplete = false;\r\n }\r\n clear();\r\n ev.preventDefault();\r\n ev.stopPropagation();\r\n });\r\n if (item === selected) {\r\n div.className += ' selected';\r\n div.setAttribute('aria-selected', 'true');\r\n input.setAttribute('aria-activedescendant', div.id);\r\n }\r\n fragment.appendChild(div);\r\n }\r\n });\r\n container.appendChild(fragment);\r\n if (items.length < 1) {\r\n if (settings.emptyMsg) {\r\n var empty = doc.createElement('div');\r\n empty.id = container.id + \"_\" + uid();\r\n empty.className = 'empty';\r\n empty.textContent = settings.emptyMsg;\r\n container.appendChild(empty);\r\n input.setAttribute('aria-activedescendant', empty.id);\r\n }\r\n else {\r\n clear();\r\n return;\r\n }\r\n }\r\n attach();\r\n updatePosition();\r\n updateScroll();\r\n }\r\n function updateIfDisplayed() {\r\n if (containerDisplayed()) {\r\n update();\r\n }\r\n }\r\n function resizeEventHandler() {\r\n updateIfDisplayed();\r\n }\r\n function scrollEventHandler(e) {\r\n if (e.target !== container) {\r\n updateIfDisplayed();\r\n }\r\n else {\r\n e.preventDefault();\r\n }\r\n }\r\n function inputEventHandler() {\r\n if (!suppressAutocomplete) {\r\n fetch(0 /* Keyboard */);\r\n }\r\n }\r\n /**\r\n * Automatically move scroll bar if selected item is not visible\r\n */\r\n function updateScroll() {\r\n var elements = container.getElementsByClassName('selected');\r\n if (elements.length > 0) {\r\n var element = elements[0];\r\n // make group visible\r\n var previous = element.previousElementSibling;\r\n if (previous && previous.className.indexOf('group') !== -1 && !previous.previousElementSibling) {\r\n element = previous;\r\n }\r\n if (element.offsetTop < container.scrollTop) {\r\n container.scrollTop = element.offsetTop;\r\n }\r\n else {\r\n var selectBottom = element.offsetTop + element.offsetHeight;\r\n var containerBottom = container.scrollTop + container.offsetHeight;\r\n if (selectBottom > containerBottom) {\r\n container.scrollTop += selectBottom - containerBottom;\r\n }\r\n }\r\n }\r\n }\r\n function selectPreviousSuggestion() {\r\n var index = items.indexOf(selected);\r\n selected = index === -1\r\n ? undefined\r\n : items[(index + items.length - 1) % items.length];\r\n }\r\n function selectNextSuggestion() {\r\n var index = items.indexOf(selected);\r\n selected = items.length < 1\r\n ? undefined\r\n : index === -1\r\n ? items[0]\r\n : items[(index + 1) % items.length];\r\n }\r\n function handleArrowAndEscapeKeys(ev, key) {\r\n var containerIsDisplayed = containerDisplayed();\r\n if (key === 'Escape') {\r\n clear();\r\n }\r\n else {\r\n if (!containerIsDisplayed || items.length < 1) {\r\n return;\r\n }\r\n key === 'ArrowUp'\r\n ? selectPreviousSuggestion()\r\n : selectNextSuggestion();\r\n update();\r\n }\r\n ev.preventDefault();\r\n if (containerIsDisplayed) {\r\n ev.stopPropagation();\r\n }\r\n }\r\n function handleEnterKey(ev) {\r\n if (selected) {\r\n suppressAutocomplete = true;\r\n try {\r\n settings.onSelect(selected, input);\r\n }\r\n finally {\r\n suppressAutocomplete = false;\r\n }\r\n clear();\r\n }\r\n if (preventSubmit) {\r\n ev.preventDefault();\r\n }\r\n }\r\n function keydownEventHandler(ev) {\r\n var key = ev.key;\r\n switch (key) {\r\n case 'ArrowUp':\r\n case 'ArrowDown':\r\n case 'Escape':\r\n handleArrowAndEscapeKeys(ev, key);\r\n break;\r\n case 'Enter':\r\n handleEnterKey(ev);\r\n break;\r\n }\r\n }\r\n function focusEventHandler() {\r\n if (showOnFocus) {\r\n fetch(1 /* Focus */);\r\n }\r\n }\r\n function fetch(trigger) {\r\n if (input.value.length >= minLen || trigger === 1 /* Focus */) {\r\n clearDebounceTimer();\r\n debounceTimer = window.setTimeout(function () { return startFetch(input.value, trigger, input.selectionStart || 0); }, trigger === 0 /* Keyboard */ || trigger === 2 /* Mouse */ ? debounceWaitMs : 0);\r\n }\r\n else {\r\n clear();\r\n }\r\n }\r\n function startFetch(inputText, trigger, cursorPos) {\r\n if (destroyed)\r\n return;\r\n var savedFetchCounter = ++fetchCounter;\r\n settings.fetch(inputText, function (elements) {\r\n if (fetchCounter === savedFetchCounter && elements) {\r\n items = elements;\r\n inputValue = inputText;\r\n selected = (items.length < 1 || disableAutoSelect) ? undefined : items[0];\r\n update();\r\n }\r\n }, trigger, cursorPos);\r\n }\r\n function keyupEventHandler(e) {\r\n if (settings.keyup) {\r\n settings.keyup({\r\n event: e,\r\n fetch: function () { return fetch(0 /* Keyboard */); }\r\n });\r\n return;\r\n }\r\n if (!containerDisplayed() && e.key === 'ArrowDown') {\r\n fetch(0 /* Keyboard */);\r\n }\r\n }\r\n function clickEventHandler(e) {\r\n settings.click && settings.click({\r\n event: e,\r\n fetch: function () { return fetch(2 /* Mouse */); }\r\n });\r\n }\r\n function blurEventHandler() {\r\n // when an item is selected by mouse click, the blur event will be initiated before the click event and remove DOM elements,\r\n // so that the click event will never be triggered. In order to avoid this issue, DOM removal should be delayed.\r\n setTimeout(function () {\r\n if (doc.activeElement !== input) {\r\n clear();\r\n }\r\n }, 200);\r\n }\r\n function manualFetch() {\r\n startFetch(input.value, 3 /* Manual */, input.selectionStart || 0);\r\n }\r\n /**\r\n * Fixes #26: on long clicks focus will be lost and onSelect method will not be called\r\n */\r\n container.addEventListener('mousedown', function (evt) {\r\n evt.stopPropagation();\r\n evt.preventDefault();\r\n });\r\n /**\r\n * Fixes #30: autocomplete closes when scrollbar is clicked in IE\r\n * See: https://stackoverflow.com/a/9210267/13172349\r\n */\r\n container.addEventListener('focus', function () { return input.focus(); });\r\n /**\r\n * This function will remove DOM elements and clear event handlers\r\n */\r\n function destroy() {\r\n input.removeEventListener('focus', focusEventHandler);\r\n input.removeEventListener('keyup', keyupEventHandler);\r\n input.removeEventListener('click', clickEventHandler);\r\n input.removeEventListener('keydown', keydownEventHandler);\r\n input.removeEventListener('input', inputEventHandler);\r\n input.removeEventListener('blur', blurEventHandler);\r\n window.removeEventListener('resize', resizeEventHandler);\r\n doc.removeEventListener('scroll', scrollEventHandler, true);\r\n input.removeAttribute('role');\r\n input.removeAttribute('aria-expanded');\r\n input.removeAttribute('aria-autocomplete');\r\n input.removeAttribute('aria-controls');\r\n input.removeAttribute('aria-activedescendant');\r\n input.removeAttribute('aria-owns');\r\n input.removeAttribute('aria-haspopup');\r\n clearDebounceTimer();\r\n clear();\r\n destroyed = true;\r\n }\r\n // setup event handlers\r\n input.addEventListener('keyup', keyupEventHandler);\r\n input.addEventListener('click', clickEventHandler);\r\n input.addEventListener('keydown', keydownEventHandler);\r\n input.addEventListener('input', inputEventHandler);\r\n input.addEventListener('blur', blurEventHandler);\r\n input.addEventListener('focus', focusEventHandler);\r\n window.addEventListener('resize', resizeEventHandler);\r\n doc.addEventListener('scroll', scrollEventHandler, true);\r\n return {\r\n destroy: destroy,\r\n fetch: manualFetch\r\n };\r\n }\n\n return autocomplete;\n\n})));\n//# sourceMappingURL=autocomplete.js.map\n\n\n//# sourceURL=webpack://Formio/./node_modules/autocompleter/autocomplete.js?");
1926
-
1927
- /***/ }),
1928
-
1929
- /***/ "./node_modules/browser-cookies/src/browser-cookies.js":
1930
- /*!*************************************************************!*\
1931
- !*** ./node_modules/browser-cookies/src/browser-cookies.js ***!
1932
- \*************************************************************/
1933
- /***/ (function(__unused_webpack_module, exports) {
1934
-
1935
- eval("exports.defaults = {};\r\n\r\nexports.set = function(name, value, options) {\r\n // Retrieve options and defaults\r\n var opts = options || {};\r\n var defaults = exports.defaults;\r\n\r\n // Apply default value for unspecified options\r\n var expires = opts.expires || defaults.expires;\r\n var domain = opts.domain || defaults.domain;\r\n var path = opts.path !== undefined ? opts.path : (defaults.path !== undefined ? defaults.path : '/');\r\n var secure = opts.secure !== undefined ? opts.secure : defaults.secure;\r\n var httponly = opts.httponly !== undefined ? opts.httponly : defaults.httponly;\r\n var samesite = opts.samesite !== undefined ? opts.samesite : defaults.samesite;\r\n\r\n // Determine cookie expiration date\r\n // If succesful the result will be a valid Date, otherwise it will be an invalid Date or false(ish)\r\n var expDate = expires ? new Date(\r\n // in case expires is an integer, it should specify the number of days till the cookie expires\r\n typeof expires === 'number' ? new Date().getTime() + (expires * 864e5) :\r\n // else expires should be either a Date object or in a format recognized by Date.parse()\r\n expires\r\n ) : 0;\r\n\r\n // Set cookie\r\n document.cookie = name.replace(/[^+#$&^`|]/g, encodeURIComponent) // Encode cookie name\r\n .replace('(', '%28')\r\n .replace(')', '%29') +\r\n '=' + value.replace(/[^+#$&/:<-\\[\\]-}]/g, encodeURIComponent) + // Encode cookie value (RFC6265)\r\n (expDate && expDate.getTime() >= 0 ? ';expires=' + expDate.toUTCString() : '') + // Add expiration date\r\n (domain ? ';domain=' + domain : '') + // Add domain\r\n (path ? ';path=' + path : '') + // Add path\r\n (secure ? ';secure' : '') + // Add secure option\r\n (httponly ? ';httponly' : '') + // Add httponly option\r\n (samesite ? ';samesite=' + samesite : ''); // Add samesite option\r\n};\r\n\r\nexports.get = function(name) {\r\n var cookies = document.cookie.split(';');\r\n \r\n // Iterate all cookies\r\n while(cookies.length) {\r\n var cookie = cookies.pop();\r\n\r\n // Determine separator index (\"name=value\")\r\n var separatorIndex = cookie.indexOf('=');\r\n\r\n // IE<11 emits the equal sign when the cookie value is empty\r\n separatorIndex = separatorIndex < 0 ? cookie.length : separatorIndex;\r\n\r\n var cookie_name = decodeURIComponent(cookie.slice(0, separatorIndex).replace(/^\\s+/, ''));\r\n\r\n // Return cookie value if the name matches\r\n if (cookie_name === name) {\r\n return decodeURIComponent(cookie.slice(separatorIndex + 1));\r\n }\r\n }\r\n\r\n // Return `null` as the cookie was not found\r\n return null;\r\n};\r\n\r\nexports.erase = function(name, options) {\r\n exports.set(name, '', {\r\n expires: -1,\r\n domain: options && options.domain,\r\n path: options && options.path,\r\n secure: 0,\r\n httponly: 0}\r\n );\r\n};\r\n\r\nexports.all = function() {\r\n var all = {};\r\n var cookies = document.cookie.split(';');\r\n\r\n // Iterate all cookies\r\n while(cookies.length) {\r\n var cookie = cookies.pop();\r\n\r\n // Determine separator index (\"name=value\")\r\n var separatorIndex = cookie.indexOf('=');\r\n\r\n // IE<11 emits the equal sign when the cookie value is empty\r\n separatorIndex = separatorIndex < 0 ? cookie.length : separatorIndex;\r\n\r\n // add the cookie name and value to the `all` object\r\n var cookie_name = decodeURIComponent(cookie.slice(0, separatorIndex).replace(/^\\s+/, ''));\r\n all[cookie_name] = decodeURIComponent(cookie.slice(separatorIndex + 1));\r\n }\r\n\r\n return all;\r\n};\r\n\n\n//# sourceURL=webpack://Formio/./node_modules/browser-cookies/src/browser-cookies.js?");
1936
-
1937
- /***/ }),
1938
-
1939
- /***/ "./node_modules/browser-md5-file/dist/index.umd.js":
1940
- /*!*********************************************************!*\
1941
- !*** ./node_modules/browser-md5-file/dist/index.umd.js ***!
1942
- \*********************************************************/
1943
- /***/ (function(module) {
1944
-
1945
- eval("(function (global, factory) {\n\t true ? module.exports = factory() :\n\t0;\n}(this, (function () { 'use strict';\n\n\tfunction createCommonjsModule(fn, module) {\n\t\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n\t}\n\n\tvar sparkMd5 = createCommonjsModule(function (module, exports) {\n\t(function (factory) {\n\t {\n\t // Node/CommonJS\n\t module.exports = factory();\n\t }\n\t}(function (undefined) {\n\n\t /*\n\t * Fastest md5 implementation around (JKM md5).\n\t * Credits: Joseph Myers\n\t *\n\t * @see http://www.myersdaily.org/joseph/javascript/md5-text.html\n\t * @see http://jsperf.com/md5-shootout/7\n\t */\n\n\t /* this function is much faster,\n\t so if possible we use it. Some IEs\n\t are the only ones I know of that\n\t need the idiotic second function,\n\t generated by an if clause. */\n\t var add32 = function (a, b) {\n\t return (a + b) & 0xFFFFFFFF;\n\t },\n\t hex_chr = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'];\n\n\n\t function cmn(q, a, b, x, s, t) {\n\t a = add32(add32(a, q), add32(x, t));\n\t return add32((a << s) | (a >>> (32 - s)), b);\n\t }\n\n\t function ff(a, b, c, d, x, s, t) {\n\t return cmn((b & c) | ((~b) & d), a, b, x, s, t);\n\t }\n\n\t function gg(a, b, c, d, x, s, t) {\n\t return cmn((b & d) | (c & (~d)), a, b, x, s, t);\n\t }\n\n\t function hh(a, b, c, d, x, s, t) {\n\t return cmn(b ^ c ^ d, a, b, x, s, t);\n\t }\n\n\t function ii(a, b, c, d, x, s, t) {\n\t return cmn(c ^ (b | (~d)), a, b, x, s, t);\n\t }\n\n\t function md5cycle(x, k) {\n\t var a = x[0],\n\t b = x[1],\n\t c = x[2],\n\t d = x[3];\n\n\t a = ff(a, b, c, d, k[0], 7, -680876936);\n\t d = ff(d, a, b, c, k[1], 12, -389564586);\n\t c = ff(c, d, a, b, k[2], 17, 606105819);\n\t b = ff(b, c, d, a, k[3], 22, -1044525330);\n\t a = ff(a, b, c, d, k[4], 7, -176418897);\n\t d = ff(d, a, b, c, k[5], 12, 1200080426);\n\t c = ff(c, d, a, b, k[6], 17, -1473231341);\n\t b = ff(b, c, d, a, k[7], 22, -45705983);\n\t a = ff(a, b, c, d, k[8], 7, 1770035416);\n\t d = ff(d, a, b, c, k[9], 12, -1958414417);\n\t c = ff(c, d, a, b, k[10], 17, -42063);\n\t b = ff(b, c, d, a, k[11], 22, -1990404162);\n\t a = ff(a, b, c, d, k[12], 7, 1804603682);\n\t d = ff(d, a, b, c, k[13], 12, -40341101);\n\t c = ff(c, d, a, b, k[14], 17, -1502002290);\n\t b = ff(b, c, d, a, k[15], 22, 1236535329);\n\n\t a = gg(a, b, c, d, k[1], 5, -165796510);\n\t d = gg(d, a, b, c, k[6], 9, -1069501632);\n\t c = gg(c, d, a, b, k[11], 14, 643717713);\n\t b = gg(b, c, d, a, k[0], 20, -373897302);\n\t a = gg(a, b, c, d, k[5], 5, -701558691);\n\t d = gg(d, a, b, c, k[10], 9, 38016083);\n\t c = gg(c, d, a, b, k[15], 14, -660478335);\n\t b = gg(b, c, d, a, k[4], 20, -405537848);\n\t a = gg(a, b, c, d, k[9], 5, 568446438);\n\t d = gg(d, a, b, c, k[14], 9, -1019803690);\n\t c = gg(c, d, a, b, k[3], 14, -187363961);\n\t b = gg(b, c, d, a, k[8], 20, 1163531501);\n\t a = gg(a, b, c, d, k[13], 5, -1444681467);\n\t d = gg(d, a, b, c, k[2], 9, -51403784);\n\t c = gg(c, d, a, b, k[7], 14, 1735328473);\n\t b = gg(b, c, d, a, k[12], 20, -1926607734);\n\n\t a = hh(a, b, c, d, k[5], 4, -378558);\n\t d = hh(d, a, b, c, k[8], 11, -2022574463);\n\t c = hh(c, d, a, b, k[11], 16, 1839030562);\n\t b = hh(b, c, d, a, k[14], 23, -35309556);\n\t a = hh(a, b, c, d, k[1], 4, -1530992060);\n\t d = hh(d, a, b, c, k[4], 11, 1272893353);\n\t c = hh(c, d, a, b, k[7], 16, -155497632);\n\t b = hh(b, c, d, a, k[10], 23, -1094730640);\n\t a = hh(a, b, c, d, k[13], 4, 681279174);\n\t d = hh(d, a, b, c, k[0], 11, -358537222);\n\t c = hh(c, d, a, b, k[3], 16, -722521979);\n\t b = hh(b, c, d, a, k[6], 23, 76029189);\n\t a = hh(a, b, c, d, k[9], 4, -640364487);\n\t d = hh(d, a, b, c, k[12], 11, -421815835);\n\t c = hh(c, d, a, b, k[15], 16, 530742520);\n\t b = hh(b, c, d, a, k[2], 23, -995338651);\n\n\t a = ii(a, b, c, d, k[0], 6, -198630844);\n\t d = ii(d, a, b, c, k[7], 10, 1126891415);\n\t c = ii(c, d, a, b, k[14], 15, -1416354905);\n\t b = ii(b, c, d, a, k[5], 21, -57434055);\n\t a = ii(a, b, c, d, k[12], 6, 1700485571);\n\t d = ii(d, a, b, c, k[3], 10, -1894986606);\n\t c = ii(c, d, a, b, k[10], 15, -1051523);\n\t b = ii(b, c, d, a, k[1], 21, -2054922799);\n\t a = ii(a, b, c, d, k[8], 6, 1873313359);\n\t d = ii(d, a, b, c, k[15], 10, -30611744);\n\t c = ii(c, d, a, b, k[6], 15, -1560198380);\n\t b = ii(b, c, d, a, k[13], 21, 1309151649);\n\t a = ii(a, b, c, d, k[4], 6, -145523070);\n\t d = ii(d, a, b, c, k[11], 10, -1120210379);\n\t c = ii(c, d, a, b, k[2], 15, 718787259);\n\t b = ii(b, c, d, a, k[9], 21, -343485551);\n\n\t x[0] = add32(a, x[0]);\n\t x[1] = add32(b, x[1]);\n\t x[2] = add32(c, x[2]);\n\t x[3] = add32(d, x[3]);\n\t }\n\n\t function md5blk(s) {\n\t var md5blks = [],\n\t i; /* Andy King said do it this way. */\n\n\t for (i = 0; i < 64; i += 4) {\n\t md5blks[i >> 2] = s.charCodeAt(i) + (s.charCodeAt(i + 1) << 8) + (s.charCodeAt(i + 2) << 16) + (s.charCodeAt(i + 3) << 24);\n\t }\n\t return md5blks;\n\t }\n\n\t function md5blk_array(a) {\n\t var md5blks = [],\n\t i; /* Andy King said do it this way. */\n\n\t for (i = 0; i < 64; i += 4) {\n\t md5blks[i >> 2] = a[i] + (a[i + 1] << 8) + (a[i + 2] << 16) + (a[i + 3] << 24);\n\t }\n\t return md5blks;\n\t }\n\n\t function md51(s) {\n\t var n = s.length,\n\t state = [1732584193, -271733879, -1732584194, 271733878],\n\t i,\n\t length,\n\t tail,\n\t tmp,\n\t lo,\n\t hi;\n\n\t for (i = 64; i <= n; i += 64) {\n\t md5cycle(state, md5blk(s.substring(i - 64, i)));\n\t }\n\t s = s.substring(i - 64);\n\t length = s.length;\n\t tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n\t for (i = 0; i < length; i += 1) {\n\t tail[i >> 2] |= s.charCodeAt(i) << ((i % 4) << 3);\n\t }\n\t tail[i >> 2] |= 0x80 << ((i % 4) << 3);\n\t if (i > 55) {\n\t md5cycle(state, tail);\n\t for (i = 0; i < 16; i += 1) {\n\t tail[i] = 0;\n\t }\n\t }\n\n\t // Beware that the final length might not fit in 32 bits so we take care of that\n\t tmp = n * 8;\n\t tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n\t lo = parseInt(tmp[2], 16);\n\t hi = parseInt(tmp[1], 16) || 0;\n\n\t tail[14] = lo;\n\t tail[15] = hi;\n\n\t md5cycle(state, tail);\n\t return state;\n\t }\n\n\t function md51_array(a) {\n\t var n = a.length,\n\t state = [1732584193, -271733879, -1732584194, 271733878],\n\t i,\n\t length,\n\t tail,\n\t tmp,\n\t lo,\n\t hi;\n\n\t for (i = 64; i <= n; i += 64) {\n\t md5cycle(state, md5blk_array(a.subarray(i - 64, i)));\n\t }\n\n\t // Not sure if it is a bug, however IE10 will always produce a sub array of length 1\n\t // containing the last element of the parent array if the sub array specified starts\n\t // beyond the length of the parent array - weird.\n\t // https://connect.microsoft.com/IE/feedback/details/771452/typed-array-subarray-issue\n\t a = (i - 64) < n ? a.subarray(i - 64) : new Uint8Array(0);\n\n\t length = a.length;\n\t tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n\t for (i = 0; i < length; i += 1) {\n\t tail[i >> 2] |= a[i] << ((i % 4) << 3);\n\t }\n\n\t tail[i >> 2] |= 0x80 << ((i % 4) << 3);\n\t if (i > 55) {\n\t md5cycle(state, tail);\n\t for (i = 0; i < 16; i += 1) {\n\t tail[i] = 0;\n\t }\n\t }\n\n\t // Beware that the final length might not fit in 32 bits so we take care of that\n\t tmp = n * 8;\n\t tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n\t lo = parseInt(tmp[2], 16);\n\t hi = parseInt(tmp[1], 16) || 0;\n\n\t tail[14] = lo;\n\t tail[15] = hi;\n\n\t md5cycle(state, tail);\n\n\t return state;\n\t }\n\n\t function rhex(n) {\n\t var s = '',\n\t j;\n\t for (j = 0; j < 4; j += 1) {\n\t s += hex_chr[(n >> (j * 8 + 4)) & 0x0F] + hex_chr[(n >> (j * 8)) & 0x0F];\n\t }\n\t return s;\n\t }\n\n\t function hex(x) {\n\t var i;\n\t for (i = 0; i < x.length; i += 1) {\n\t x[i] = rhex(x[i]);\n\t }\n\t return x.join('');\n\t }\n\n\t // In some cases the fast add32 function cannot be used..\n\t if (hex(md51('hello')) !== '5d41402abc4b2a76b9719d911017c592') {\n\t add32 = function (x, y) {\n\t var lsw = (x & 0xFFFF) + (y & 0xFFFF),\n\t msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n\t return (msw << 16) | (lsw & 0xFFFF);\n\t };\n\t }\n\n\t // ---------------------------------------------------\n\n\t /**\n\t * ArrayBuffer slice polyfill.\n\t *\n\t * @see https://github.com/ttaubert/node-arraybuffer-slice\n\t */\n\n\t if (typeof ArrayBuffer !== 'undefined' && !ArrayBuffer.prototype.slice) {\n\t (function () {\n\t function clamp(val, length) {\n\t val = (val | 0) || 0;\n\n\t if (val < 0) {\n\t return Math.max(val + length, 0);\n\t }\n\n\t return Math.min(val, length);\n\t }\n\n\t ArrayBuffer.prototype.slice = function (from, to) {\n\t var length = this.byteLength,\n\t begin = clamp(from, length),\n\t end = length,\n\t num,\n\t target,\n\t targetArray,\n\t sourceArray;\n\n\t if (to !== undefined) {\n\t end = clamp(to, length);\n\t }\n\n\t if (begin > end) {\n\t return new ArrayBuffer(0);\n\t }\n\n\t num = end - begin;\n\t target = new ArrayBuffer(num);\n\t targetArray = new Uint8Array(target);\n\n\t sourceArray = new Uint8Array(this, begin, num);\n\t targetArray.set(sourceArray);\n\n\t return target;\n\t };\n\t })();\n\t }\n\n\t // ---------------------------------------------------\n\n\t /**\n\t * Helpers.\n\t */\n\n\t function toUtf8(str) {\n\t if (/[\\u0080-\\uFFFF]/.test(str)) {\n\t str = unescape(encodeURIComponent(str));\n\t }\n\n\t return str;\n\t }\n\n\t function utf8Str2ArrayBuffer(str, returnUInt8Array) {\n\t var length = str.length,\n\t buff = new ArrayBuffer(length),\n\t arr = new Uint8Array(buff),\n\t i;\n\n\t for (i = 0; i < length; i += 1) {\n\t arr[i] = str.charCodeAt(i);\n\t }\n\n\t return returnUInt8Array ? arr : buff;\n\t }\n\n\t function arrayBuffer2Utf8Str(buff) {\n\t return String.fromCharCode.apply(null, new Uint8Array(buff));\n\t }\n\n\t function concatenateArrayBuffers(first, second, returnUInt8Array) {\n\t var result = new Uint8Array(first.byteLength + second.byteLength);\n\n\t result.set(new Uint8Array(first));\n\t result.set(new Uint8Array(second), first.byteLength);\n\n\t return returnUInt8Array ? result : result.buffer;\n\t }\n\n\t function hexToBinaryString(hex) {\n\t var bytes = [],\n\t length = hex.length,\n\t x;\n\n\t for (x = 0; x < length - 1; x += 2) {\n\t bytes.push(parseInt(hex.substr(x, 2), 16));\n\t }\n\n\t return String.fromCharCode.apply(String, bytes);\n\t }\n\n\t // ---------------------------------------------------\n\n\t /**\n\t * SparkMD5 OOP implementation.\n\t *\n\t * Use this class to perform an incremental md5, otherwise use the\n\t * static methods instead.\n\t */\n\n\t function SparkMD5() {\n\t // call reset to init the instance\n\t this.reset();\n\t }\n\n\t /**\n\t * Appends a string.\n\t * A conversion will be applied if an utf8 string is detected.\n\t *\n\t * @param {String} str The string to be appended\n\t *\n\t * @return {SparkMD5} The instance itself\n\t */\n\t SparkMD5.prototype.append = function (str) {\n\t // Converts the string to utf8 bytes if necessary\n\t // Then append as binary\n\t this.appendBinary(toUtf8(str));\n\n\t return this;\n\t };\n\n\t /**\n\t * Appends a binary string.\n\t *\n\t * @param {String} contents The binary string to be appended\n\t *\n\t * @return {SparkMD5} The instance itself\n\t */\n\t SparkMD5.prototype.appendBinary = function (contents) {\n\t this._buff += contents;\n\t this._length += contents.length;\n\n\t var length = this._buff.length,\n\t i;\n\n\t for (i = 64; i <= length; i += 64) {\n\t md5cycle(this._hash, md5blk(this._buff.substring(i - 64, i)));\n\t }\n\n\t this._buff = this._buff.substring(i - 64);\n\n\t return this;\n\t };\n\n\t /**\n\t * Finishes the incremental computation, reseting the internal state and\n\t * returning the result.\n\t *\n\t * @param {Boolean} raw True to get the raw string, false to get the hex string\n\t *\n\t * @return {String} The result\n\t */\n\t SparkMD5.prototype.end = function (raw) {\n\t var buff = this._buff,\n\t length = buff.length,\n\t i,\n\t tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n\t ret;\n\n\t for (i = 0; i < length; i += 1) {\n\t tail[i >> 2] |= buff.charCodeAt(i) << ((i % 4) << 3);\n\t }\n\n\t this._finish(tail, length);\n\t ret = hex(this._hash);\n\n\t if (raw) {\n\t ret = hexToBinaryString(ret);\n\t }\n\n\t this.reset();\n\n\t return ret;\n\t };\n\n\t /**\n\t * Resets the internal state of the computation.\n\t *\n\t * @return {SparkMD5} The instance itself\n\t */\n\t SparkMD5.prototype.reset = function () {\n\t this._buff = '';\n\t this._length = 0;\n\t this._hash = [1732584193, -271733879, -1732584194, 271733878];\n\n\t return this;\n\t };\n\n\t /**\n\t * Gets the internal state of the computation.\n\t *\n\t * @return {Object} The state\n\t */\n\t SparkMD5.prototype.getState = function () {\n\t return {\n\t buff: this._buff,\n\t length: this._length,\n\t hash: this._hash\n\t };\n\t };\n\n\t /**\n\t * Gets the internal state of the computation.\n\t *\n\t * @param {Object} state The state\n\t *\n\t * @return {SparkMD5} The instance itself\n\t */\n\t SparkMD5.prototype.setState = function (state) {\n\t this._buff = state.buff;\n\t this._length = state.length;\n\t this._hash = state.hash;\n\n\t return this;\n\t };\n\n\t /**\n\t * Releases memory used by the incremental buffer and other additional\n\t * resources. If you plan to use the instance again, use reset instead.\n\t */\n\t SparkMD5.prototype.destroy = function () {\n\t delete this._hash;\n\t delete this._buff;\n\t delete this._length;\n\t };\n\n\t /**\n\t * Finish the final calculation based on the tail.\n\t *\n\t * @param {Array} tail The tail (will be modified)\n\t * @param {Number} length The length of the remaining buffer\n\t */\n\t SparkMD5.prototype._finish = function (tail, length) {\n\t var i = length,\n\t tmp,\n\t lo,\n\t hi;\n\n\t tail[i >> 2] |= 0x80 << ((i % 4) << 3);\n\t if (i > 55) {\n\t md5cycle(this._hash, tail);\n\t for (i = 0; i < 16; i += 1) {\n\t tail[i] = 0;\n\t }\n\t }\n\n\t // Do the final computation based on the tail and length\n\t // Beware that the final length may not fit in 32 bits so we take care of that\n\t tmp = this._length * 8;\n\t tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n\t lo = parseInt(tmp[2], 16);\n\t hi = parseInt(tmp[1], 16) || 0;\n\n\t tail[14] = lo;\n\t tail[15] = hi;\n\t md5cycle(this._hash, tail);\n\t };\n\n\t /**\n\t * Performs the md5 hash on a string.\n\t * A conversion will be applied if utf8 string is detected.\n\t *\n\t * @param {String} str The string\n\t * @param {Boolean} raw True to get the raw string, false to get the hex string\n\t *\n\t * @return {String} The result\n\t */\n\t SparkMD5.hash = function (str, raw) {\n\t // Converts the string to utf8 bytes if necessary\n\t // Then compute it using the binary function\n\t return SparkMD5.hashBinary(toUtf8(str), raw);\n\t };\n\n\t /**\n\t * Performs the md5 hash on a binary string.\n\t *\n\t * @param {String} content The binary string\n\t * @param {Boolean} raw True to get the raw string, false to get the hex string\n\t *\n\t * @return {String} The result\n\t */\n\t SparkMD5.hashBinary = function (content, raw) {\n\t var hash = md51(content),\n\t ret = hex(hash);\n\n\t return raw ? hexToBinaryString(ret) : ret;\n\t };\n\n\t // ---------------------------------------------------\n\n\t /**\n\t * SparkMD5 OOP implementation for array buffers.\n\t *\n\t * Use this class to perform an incremental md5 ONLY for array buffers.\n\t */\n\t SparkMD5.ArrayBuffer = function () {\n\t // call reset to init the instance\n\t this.reset();\n\t };\n\n\t /**\n\t * Appends an array buffer.\n\t *\n\t * @param {ArrayBuffer} arr The array to be appended\n\t *\n\t * @return {SparkMD5.ArrayBuffer} The instance itself\n\t */\n\t SparkMD5.ArrayBuffer.prototype.append = function (arr) {\n\t var buff = concatenateArrayBuffers(this._buff.buffer, arr, true),\n\t length = buff.length,\n\t i;\n\n\t this._length += arr.byteLength;\n\n\t for (i = 64; i <= length; i += 64) {\n\t md5cycle(this._hash, md5blk_array(buff.subarray(i - 64, i)));\n\t }\n\n\t this._buff = (i - 64) < length ? new Uint8Array(buff.buffer.slice(i - 64)) : new Uint8Array(0);\n\n\t return this;\n\t };\n\n\t /**\n\t * Finishes the incremental computation, reseting the internal state and\n\t * returning the result.\n\t *\n\t * @param {Boolean} raw True to get the raw string, false to get the hex string\n\t *\n\t * @return {String} The result\n\t */\n\t SparkMD5.ArrayBuffer.prototype.end = function (raw) {\n\t var buff = this._buff,\n\t length = buff.length,\n\t tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n\t i,\n\t ret;\n\n\t for (i = 0; i < length; i += 1) {\n\t tail[i >> 2] |= buff[i] << ((i % 4) << 3);\n\t }\n\n\t this._finish(tail, length);\n\t ret = hex(this._hash);\n\n\t if (raw) {\n\t ret = hexToBinaryString(ret);\n\t }\n\n\t this.reset();\n\n\t return ret;\n\t };\n\n\t /**\n\t * Resets the internal state of the computation.\n\t *\n\t * @return {SparkMD5.ArrayBuffer} The instance itself\n\t */\n\t SparkMD5.ArrayBuffer.prototype.reset = function () {\n\t this._buff = new Uint8Array(0);\n\t this._length = 0;\n\t this._hash = [1732584193, -271733879, -1732584194, 271733878];\n\n\t return this;\n\t };\n\n\t /**\n\t * Gets the internal state of the computation.\n\t *\n\t * @return {Object} The state\n\t */\n\t SparkMD5.ArrayBuffer.prototype.getState = function () {\n\t var state = SparkMD5.prototype.getState.call(this);\n\n\t // Convert buffer to a string\n\t state.buff = arrayBuffer2Utf8Str(state.buff);\n\n\t return state;\n\t };\n\n\t /**\n\t * Gets the internal state of the computation.\n\t *\n\t * @param {Object} state The state\n\t *\n\t * @return {SparkMD5.ArrayBuffer} The instance itself\n\t */\n\t SparkMD5.ArrayBuffer.prototype.setState = function (state) {\n\t // Convert string to buffer\n\t state.buff = utf8Str2ArrayBuffer(state.buff, true);\n\n\t return SparkMD5.prototype.setState.call(this, state);\n\t };\n\n\t SparkMD5.ArrayBuffer.prototype.destroy = SparkMD5.prototype.destroy;\n\n\t SparkMD5.ArrayBuffer.prototype._finish = SparkMD5.prototype._finish;\n\n\t /**\n\t * Performs the md5 hash on an array buffer.\n\t *\n\t * @param {ArrayBuffer} arr The array buffer\n\t * @param {Boolean} raw True to get the raw string, false to get the hex one\n\t *\n\t * @return {String} The result\n\t */\n\t SparkMD5.ArrayBuffer.hash = function (arr, raw) {\n\t var hash = md51_array(new Uint8Array(arr)),\n\t ret = hex(hash);\n\n\t return raw ? hexToBinaryString(ret) : ret;\n\t };\n\n\t return SparkMD5;\n\t}));\n\t});\n\n\tclass BMF {\n\t md5(file, md5Fn, progressFn) {\n\t this.aborted = false;\n\t this.progress = 0;\n\t let currentChunk = 0;\n\t const blobSlice =\n\t File.prototype.slice ||\n\t File.prototype.mozSlice ||\n\t File.prototype.webkitSlice;\n\t const chunkSize = 2097152;\n\t const chunks = Math.ceil(file.size / chunkSize);\n\t const spark = new sparkMd5.ArrayBuffer();\n\t const reader = new FileReader();\n\n\t loadNext();\n\n\t reader.onloadend = e => {\n\t spark.append(e.target.result); // Append array buffer\n\t currentChunk++;\n\t this.progress = currentChunk / chunks;\n\n\t if (progressFn && typeof progressFn === 'function') {\n\t progressFn(this.progress);\n\t }\n\n\t if (this.aborted) {\n\t md5Fn('aborted');\n\t return\n\t }\n\n\t if (currentChunk < chunks) {\n\t loadNext();\n\t } else {\n\t md5Fn(null, spark.end());\n\t }\n\t };\n\n\t /////////////////////////\n\t function loadNext() {\n\t const start = currentChunk * chunkSize;\n\t const end = start + chunkSize >= file.size ? file.size : start + chunkSize;\n\t reader.readAsArrayBuffer(blobSlice.call(file, start, end));\n\t }\n\t }\n\n\t abort() {\n\t this.aborted = true;\n\t }\n\t}\n\n\treturn BMF;\n\n})));\n\n\n//# sourceURL=webpack://Formio/./node_modules/browser-md5-file/dist/index.umd.js?");
1946
-
1947
- /***/ }),
1948
-
1949
- /***/ "./node_modules/compare-versions/lib/esm/compare.js":
1950
- /*!**********************************************************!*\
1951
- !*** ./node_modules/compare-versions/lib/esm/compare.js ***!
1952
- \**********************************************************/
1953
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1954
-
1955
- "use strict";
1956
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ compare: function() { return /* binding */ compare; }\n/* harmony export */ });\n/* harmony import */ var _compareVersions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./compareVersions */ \"./node_modules/compare-versions/lib/esm/compareVersions.js\");\n\n/**\n * Compare [semver](https://semver.org/) version strings using the specified operator.\n *\n * @param v1 First version to compare\n * @param v2 Second version to compare\n * @param operator Allowed arithmetic operator to use\n * @returns `true` if the comparison between the firstVersion and the secondVersion satisfies the operator, `false` otherwise.\n *\n * @example\n * ```\n * compare('10.1.8', '10.0.4', '>'); // return true\n * compare('10.0.1', '10.0.1', '='); // return true\n * compare('10.1.1', '10.2.2', '<'); // return true\n * compare('10.1.1', '10.2.2', '<='); // return true\n * compare('10.1.1', '10.2.2', '>='); // return false\n * ```\n */\nconst compare = (v1, v2, operator) => {\n // validate input operator\n assertValidOperator(operator);\n // since result of compareVersions can only be -1 or 0 or 1\n // a simple map can be used to replace switch\n const res = (0,_compareVersions__WEBPACK_IMPORTED_MODULE_0__.compareVersions)(v1, v2);\n return operatorResMap[operator].includes(res);\n};\nconst operatorResMap = {\n '>': [1],\n '>=': [0, 1],\n '=': [0],\n '<=': [-1, 0],\n '<': [-1],\n '!=': [-1, 1],\n};\nconst allowedOperators = Object.keys(operatorResMap);\nconst assertValidOperator = (op) => {\n if (typeof op !== 'string') {\n throw new TypeError(`Invalid operator type, expected string but got ${typeof op}`);\n }\n if (allowedOperators.indexOf(op) === -1) {\n throw new Error(`Invalid operator, expected one of ${allowedOperators.join('|')}`);\n }\n};\n//# sourceMappingURL=compare.js.map\n\n//# sourceURL=webpack://Formio/./node_modules/compare-versions/lib/esm/compare.js?");
1957
-
1958
- /***/ }),
1959
-
1960
- /***/ "./node_modules/compare-versions/lib/esm/compareVersions.js":
1961
- /*!******************************************************************!*\
1962
- !*** ./node_modules/compare-versions/lib/esm/compareVersions.js ***!
1963
- \******************************************************************/
1964
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1965
-
1966
- "use strict";
1967
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ compareVersions: function() { return /* binding */ compareVersions; }\n/* harmony export */ });\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils */ \"./node_modules/compare-versions/lib/esm/utils.js\");\n\n/**\n * Compare [semver](https://semver.org/) version strings to find greater, equal or lesser.\n * This library supports the full semver specification, including comparing versions with different number of digits like `1.0.0`, `1.0`, `1`, and pre-release versions like `1.0.0-alpha`.\n * @param v1 - First version to compare\n * @param v2 - Second version to compare\n * @returns Numeric value compatible with the [Array.sort(fn) interface](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Parameters).\n */\nconst compareVersions = (v1, v2) => {\n // validate input and split into segments\n const n1 = (0,_utils__WEBPACK_IMPORTED_MODULE_0__.validateAndParse)(v1);\n const n2 = (0,_utils__WEBPACK_IMPORTED_MODULE_0__.validateAndParse)(v2);\n // pop off the patch\n const p1 = n1.pop();\n const p2 = n2.pop();\n // validate numbers\n const r = (0,_utils__WEBPACK_IMPORTED_MODULE_0__.compareSegments)(n1, n2);\n if (r !== 0)\n return r;\n // validate pre-release\n if (p1 && p2) {\n return (0,_utils__WEBPACK_IMPORTED_MODULE_0__.compareSegments)(p1.split('.'), p2.split('.'));\n }\n else if (p1 || p2) {\n return p1 ? -1 : 1;\n }\n return 0;\n};\n//# sourceMappingURL=compareVersions.js.map\n\n//# sourceURL=webpack://Formio/./node_modules/compare-versions/lib/esm/compareVersions.js?");
1968
-
1969
- /***/ }),
1970
-
1971
- /***/ "./node_modules/compare-versions/lib/esm/index.js":
1972
- /*!********************************************************!*\
1973
- !*** ./node_modules/compare-versions/lib/esm/index.js ***!
1974
- \********************************************************/
1975
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1976
-
1977
- "use strict";
1978
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ compare: function() { return /* reexport safe */ _compare__WEBPACK_IMPORTED_MODULE_0__.compare; },\n/* harmony export */ compareVersions: function() { return /* reexport safe */ _compareVersions__WEBPACK_IMPORTED_MODULE_1__.compareVersions; },\n/* harmony export */ satisfies: function() { return /* reexport safe */ _satisfies__WEBPACK_IMPORTED_MODULE_2__.satisfies; },\n/* harmony export */ validate: function() { return /* reexport safe */ _validate__WEBPACK_IMPORTED_MODULE_3__.validate; },\n/* harmony export */ validateStrict: function() { return /* reexport safe */ _validate__WEBPACK_IMPORTED_MODULE_3__.validateStrict; }\n/* harmony export */ });\n/* harmony import */ var _compare__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./compare */ \"./node_modules/compare-versions/lib/esm/compare.js\");\n/* harmony import */ var _compareVersions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./compareVersions */ \"./node_modules/compare-versions/lib/esm/compareVersions.js\");\n/* harmony import */ var _satisfies__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./satisfies */ \"./node_modules/compare-versions/lib/esm/satisfies.js\");\n/* harmony import */ var _validate__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./validate */ \"./node_modules/compare-versions/lib/esm/validate.js\");\n\n\n\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://Formio/./node_modules/compare-versions/lib/esm/index.js?");
1979
-
1980
- /***/ }),
1981
-
1982
- /***/ "./node_modules/compare-versions/lib/esm/satisfies.js":
1983
- /*!************************************************************!*\
1984
- !*** ./node_modules/compare-versions/lib/esm/satisfies.js ***!
1985
- \************************************************************/
1986
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1987
-
1988
- "use strict";
1989
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ satisfies: function() { return /* binding */ satisfies; }\n/* harmony export */ });\n/* harmony import */ var _compare__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./compare */ \"./node_modules/compare-versions/lib/esm/compare.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils */ \"./node_modules/compare-versions/lib/esm/utils.js\");\n\n\n/**\n * Match [npm semver](https://docs.npmjs.com/cli/v6/using-npm/semver) version range.\n *\n * @param version Version number to match\n * @param range Range pattern for version\n * @returns `true` if the version number is within the range, `false` otherwise.\n *\n * @example\n * ```\n * satisfies('1.1.0', '^1.0.0'); // return true\n * satisfies('1.1.0', '~1.0.0'); // return false\n * ```\n */\nconst satisfies = (version, range) => {\n // clean input\n range = range.replace(/([><=]+)\\s+/g, '$1');\n // handle multiple comparators\n if (range.includes('||')) {\n return range.split('||').some((r) => satisfies(version, r));\n }\n else if (range.includes(' - ')) {\n const [a, b] = range.split(' - ', 2);\n return satisfies(version, `>=${a} <=${b}`);\n }\n else if (range.includes(' ')) {\n return range\n .trim()\n .replace(/\\s{2,}/g, ' ')\n .split(' ')\n .every((r) => satisfies(version, r));\n }\n // if no range operator then \"=\"\n const m = range.match(/^([<>=~^]+)/);\n const op = m ? m[1] : '=';\n // if gt/lt/eq then operator compare\n if (op !== '^' && op !== '~')\n return (0,_compare__WEBPACK_IMPORTED_MODULE_0__.compare)(version, range, op);\n // else range of either \"~\" or \"^\" is assumed\n const [v1, v2, v3, , vp] = (0,_utils__WEBPACK_IMPORTED_MODULE_1__.validateAndParse)(version);\n const [r1, r2, r3, , rp] = (0,_utils__WEBPACK_IMPORTED_MODULE_1__.validateAndParse)(range);\n const v = [v1, v2, v3];\n const r = [r1, r2 !== null && r2 !== void 0 ? r2 : 'x', r3 !== null && r3 !== void 0 ? r3 : 'x'];\n // validate pre-release\n if (rp) {\n if (!vp)\n return false;\n if ((0,_utils__WEBPACK_IMPORTED_MODULE_1__.compareSegments)(v, r) !== 0)\n return false;\n if ((0,_utils__WEBPACK_IMPORTED_MODULE_1__.compareSegments)(vp.split('.'), rp.split('.')) === -1)\n return false;\n }\n // first non-zero number\n const nonZero = r.findIndex((v) => v !== '0') + 1;\n // pointer to where segments can be >=\n const i = op === '~' ? 2 : nonZero > 1 ? nonZero : 1;\n // before pointer must be equal\n if ((0,_utils__WEBPACK_IMPORTED_MODULE_1__.compareSegments)(v.slice(0, i), r.slice(0, i)) !== 0)\n return false;\n // after pointer must be >=\n if ((0,_utils__WEBPACK_IMPORTED_MODULE_1__.compareSegments)(v.slice(i), r.slice(i)) === -1)\n return false;\n return true;\n};\n//# sourceMappingURL=satisfies.js.map\n\n//# sourceURL=webpack://Formio/./node_modules/compare-versions/lib/esm/satisfies.js?");
1990
-
1991
- /***/ }),
1992
-
1993
- /***/ "./node_modules/compare-versions/lib/esm/utils.js":
1994
- /*!********************************************************!*\
1995
- !*** ./node_modules/compare-versions/lib/esm/utils.js ***!
1996
- \********************************************************/
1997
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1998
-
1999
- "use strict";
2000
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ compareSegments: function() { return /* binding */ compareSegments; },\n/* harmony export */ semver: function() { return /* binding */ semver; },\n/* harmony export */ validateAndParse: function() { return /* binding */ validateAndParse; }\n/* harmony export */ });\nconst semver = /^[v^~<>=]*?(\\d+)(?:\\.([x*]|\\d+)(?:\\.([x*]|\\d+)(?:\\.([x*]|\\d+))?(?:-([\\da-z\\-]+(?:\\.[\\da-z\\-]+)*))?(?:\\+[\\da-z\\-]+(?:\\.[\\da-z\\-]+)*)?)?)?$/i;\nconst validateAndParse = (version) => {\n if (typeof version !== 'string') {\n throw new TypeError('Invalid argument expected string');\n }\n const match = version.match(semver);\n if (!match) {\n throw new Error(`Invalid argument not valid semver ('${version}' received)`);\n }\n match.shift();\n return match;\n};\nconst isWildcard = (s) => s === '*' || s === 'x' || s === 'X';\nconst tryParse = (v) => {\n const n = parseInt(v, 10);\n return isNaN(n) ? v : n;\n};\nconst forceType = (a, b) => typeof a !== typeof b ? [String(a), String(b)] : [a, b];\nconst compareStrings = (a, b) => {\n if (isWildcard(a) || isWildcard(b))\n return 0;\n const [ap, bp] = forceType(tryParse(a), tryParse(b));\n if (ap > bp)\n return 1;\n if (ap < bp)\n return -1;\n return 0;\n};\nconst compareSegments = (a, b) => {\n for (let i = 0; i < Math.max(a.length, b.length); i++) {\n const r = compareStrings(a[i] || '0', b[i] || '0');\n if (r !== 0)\n return r;\n }\n return 0;\n};\n//# sourceMappingURL=utils.js.map\n\n//# sourceURL=webpack://Formio/./node_modules/compare-versions/lib/esm/utils.js?");
2001
-
2002
- /***/ }),
2003
-
2004
- /***/ "./node_modules/compare-versions/lib/esm/validate.js":
2005
- /*!***********************************************************!*\
2006
- !*** ./node_modules/compare-versions/lib/esm/validate.js ***!
2007
- \***********************************************************/
2008
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2009
-
2010
- "use strict";
2011
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ validate: function() { return /* binding */ validate; },\n/* harmony export */ validateStrict: function() { return /* binding */ validateStrict; }\n/* harmony export */ });\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils */ \"./node_modules/compare-versions/lib/esm/utils.js\");\n\n/**\n * Validate [semver](https://semver.org/) version strings.\n *\n * @param version Version number to validate\n * @returns `true` if the version number is a valid semver version number, `false` otherwise.\n *\n * @example\n * ```\n * validate('1.0.0-rc.1'); // return true\n * validate('1.0-rc.1'); // return false\n * validate('foo'); // return false\n * ```\n */\nconst validate = (version) => typeof version === 'string' && /^[v\\d]/.test(version) && _utils__WEBPACK_IMPORTED_MODULE_0__.semver.test(version);\n/**\n * Validate [semver](https://semver.org/) version strings strictly. Will not accept wildcards and version ranges.\n *\n * @param version Version number to validate\n * @returns `true` if the version number is a valid semver version number `false` otherwise\n *\n * @example\n * ```\n * validate('1.0.0-rc.1'); // return true\n * validate('1.0-rc.1'); // return false\n * validate('foo'); // return false\n * ```\n */\nconst validateStrict = (version) => typeof version === 'string' &&\n /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/.test(version);\n//# sourceMappingURL=validate.js.map\n\n//# sourceURL=webpack://Formio/./node_modules/compare-versions/lib/esm/validate.js?");
2012
-
2013
- /***/ }),
2014
-
2015
- /***/ "./node_modules/core-js/actual/object/from-entries.js":
2016
- /*!************************************************************!*\
2017
- !*** ./node_modules/core-js/actual/object/from-entries.js ***!
2018
- \************************************************************/
2019
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2020
-
2021
- "use strict";
2022
- eval("\nvar parent = __webpack_require__(/*! ../../stable/object/from-entries */ \"./node_modules/core-js/stable/object/from-entries.js\");\n\nmodule.exports = parent;\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/actual/object/from-entries.js?");
2023
-
2024
- /***/ }),
2025
-
2026
- /***/ "./node_modules/core-js/es/object/from-entries.js":
2027
- /*!********************************************************!*\
2028
- !*** ./node_modules/core-js/es/object/from-entries.js ***!
2029
- \********************************************************/
2030
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2031
-
2032
- "use strict";
2033
- eval("\n__webpack_require__(/*! ../../modules/es.array.iterator */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! ../../modules/es.object.from-entries */ \"./node_modules/core-js/modules/es.object.from-entries.js\");\nvar path = __webpack_require__(/*! ../../internals/path */ \"./node_modules/core-js/internals/path.js\");\n\nmodule.exports = path.Object.fromEntries;\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/es/object/from-entries.js?");
2034
-
2035
- /***/ }),
2036
-
2037
- /***/ "./node_modules/core-js/features/object/from-entries.js":
2038
- /*!**************************************************************!*\
2039
- !*** ./node_modules/core-js/features/object/from-entries.js ***!
2040
- \**************************************************************/
2041
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2042
-
2043
- "use strict";
2044
- eval("\nmodule.exports = __webpack_require__(/*! ../../full/object/from-entries */ \"./node_modules/core-js/full/object/from-entries.js\");\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/features/object/from-entries.js?");
2045
-
2046
- /***/ }),
2047
-
2048
- /***/ "./node_modules/core-js/full/object/from-entries.js":
2049
- /*!**********************************************************!*\
2050
- !*** ./node_modules/core-js/full/object/from-entries.js ***!
2051
- \**********************************************************/
2052
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2053
-
2054
- "use strict";
2055
- eval("\nvar parent = __webpack_require__(/*! ../../actual/object/from-entries */ \"./node_modules/core-js/actual/object/from-entries.js\");\n\nmodule.exports = parent;\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/full/object/from-entries.js?");
2056
-
2057
- /***/ }),
2058
-
2059
- /***/ "./node_modules/core-js/internals/a-callable.js":
2060
- /*!******************************************************!*\
2061
- !*** ./node_modules/core-js/internals/a-callable.js ***!
2062
- \******************************************************/
2063
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2064
-
2065
- "use strict";
2066
- eval("\nvar isCallable = __webpack_require__(/*! ../internals/is-callable */ \"./node_modules/core-js/internals/is-callable.js\");\nvar tryToString = __webpack_require__(/*! ../internals/try-to-string */ \"./node_modules/core-js/internals/try-to-string.js\");\n\nvar $TypeError = TypeError;\n\n// `Assert: IsCallable(argument) is true`\nmodule.exports = function (argument) {\n if (isCallable(argument)) return argument;\n throw new $TypeError(tryToString(argument) + ' is not a function');\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/a-callable.js?");
2067
-
2068
- /***/ }),
2069
-
2070
- /***/ "./node_modules/core-js/internals/a-possible-prototype.js":
2071
- /*!****************************************************************!*\
2072
- !*** ./node_modules/core-js/internals/a-possible-prototype.js ***!
2073
- \****************************************************************/
2074
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2075
-
2076
- "use strict";
2077
- eval("\nvar isCallable = __webpack_require__(/*! ../internals/is-callable */ \"./node_modules/core-js/internals/is-callable.js\");\n\nvar $String = String;\nvar $TypeError = TypeError;\n\nmodule.exports = function (argument) {\n if (typeof argument == 'object' || isCallable(argument)) return argument;\n throw new $TypeError(\"Can't set \" + $String(argument) + ' as a prototype');\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/a-possible-prototype.js?");
2078
-
2079
- /***/ }),
2080
-
2081
- /***/ "./node_modules/core-js/internals/add-to-unscopables.js":
2082
- /*!**************************************************************!*\
2083
- !*** ./node_modules/core-js/internals/add-to-unscopables.js ***!
2084
- \**************************************************************/
2085
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2086
-
2087
- "use strict";
2088
- eval("\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\nvar create = __webpack_require__(/*! ../internals/object-create */ \"./node_modules/core-js/internals/object-create.js\");\nvar defineProperty = (__webpack_require__(/*! ../internals/object-define-property */ \"./node_modules/core-js/internals/object-define-property.js\").f);\n\nvar UNSCOPABLES = wellKnownSymbol('unscopables');\nvar ArrayPrototype = Array.prototype;\n\n// Array.prototype[@@unscopables]\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\nif (ArrayPrototype[UNSCOPABLES] === undefined) {\n defineProperty(ArrayPrototype, UNSCOPABLES, {\n configurable: true,\n value: create(null)\n });\n}\n\n// add a key to Array.prototype[@@unscopables]\nmodule.exports = function (key) {\n ArrayPrototype[UNSCOPABLES][key] = true;\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/add-to-unscopables.js?");
2089
-
2090
- /***/ }),
2091
-
2092
- /***/ "./node_modules/core-js/internals/an-object.js":
2093
- /*!*****************************************************!*\
2094
- !*** ./node_modules/core-js/internals/an-object.js ***!
2095
- \*****************************************************/
2096
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2097
-
2098
- "use strict";
2099
- eval("\nvar isObject = __webpack_require__(/*! ../internals/is-object */ \"./node_modules/core-js/internals/is-object.js\");\n\nvar $String = String;\nvar $TypeError = TypeError;\n\n// `Assert: Type(argument) is Object`\nmodule.exports = function (argument) {\n if (isObject(argument)) return argument;\n throw new $TypeError($String(argument) + ' is not an object');\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/an-object.js?");
2100
-
2101
- /***/ }),
2102
-
2103
- /***/ "./node_modules/core-js/internals/array-includes.js":
2104
- /*!**********************************************************!*\
2105
- !*** ./node_modules/core-js/internals/array-includes.js ***!
2106
- \**********************************************************/
2107
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2108
-
2109
- "use strict";
2110
- eval("\nvar toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ \"./node_modules/core-js/internals/to-indexed-object.js\");\nvar toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ \"./node_modules/core-js/internals/to-absolute-index.js\");\nvar lengthOfArrayLike = __webpack_require__(/*! ../internals/length-of-array-like */ \"./node_modules/core-js/internals/length-of-array-like.js\");\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = lengthOfArrayLike(O);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare -- NaN check\n if (IS_INCLUDES && el !== el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare -- NaN check\n if (value !== value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.includes` method\n // https://tc39.es/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.es/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/array-includes.js?");
2111
-
2112
- /***/ }),
2113
-
2114
- /***/ "./node_modules/core-js/internals/classof-raw.js":
2115
- /*!*******************************************************!*\
2116
- !*** ./node_modules/core-js/internals/classof-raw.js ***!
2117
- \*******************************************************/
2118
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2119
-
2120
- "use strict";
2121
- eval("\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js/internals/function-uncurry-this.js\");\n\nvar toString = uncurryThis({}.toString);\nvar stringSlice = uncurryThis(''.slice);\n\nmodule.exports = function (it) {\n return stringSlice(toString(it), 8, -1);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/classof-raw.js?");
2122
-
2123
- /***/ }),
2124
-
2125
- /***/ "./node_modules/core-js/internals/classof.js":
2126
- /*!***************************************************!*\
2127
- !*** ./node_modules/core-js/internals/classof.js ***!
2128
- \***************************************************/
2129
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2130
-
2131
- "use strict";
2132
- eval("\nvar TO_STRING_TAG_SUPPORT = __webpack_require__(/*! ../internals/to-string-tag-support */ \"./node_modules/core-js/internals/to-string-tag-support.js\");\nvar isCallable = __webpack_require__(/*! ../internals/is-callable */ \"./node_modules/core-js/internals/is-callable.js\");\nvar classofRaw = __webpack_require__(/*! ../internals/classof-raw */ \"./node_modules/core-js/internals/classof-raw.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar $Object = Object;\n\n// ES3 wrong here\nvar CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) === 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (error) { /* empty */ }\n};\n\n// getting tag from ES6+ `Object.prototype.toString`\nmodule.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {\n var O, tag, result;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag\n // builtinTag case\n : CORRECT_ARGUMENTS ? classofRaw(O)\n // ES3 arguments fallback\n : (result = classofRaw(O)) === 'Object' && isCallable(O.callee) ? 'Arguments' : result;\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/classof.js?");
2133
-
2134
- /***/ }),
2135
-
2136
- /***/ "./node_modules/core-js/internals/copy-constructor-properties.js":
2137
- /*!***********************************************************************!*\
2138
- !*** ./node_modules/core-js/internals/copy-constructor-properties.js ***!
2139
- \***********************************************************************/
2140
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2141
-
2142
- "use strict";
2143
- eval("\nvar hasOwn = __webpack_require__(/*! ../internals/has-own-property */ \"./node_modules/core-js/internals/has-own-property.js\");\nvar ownKeys = __webpack_require__(/*! ../internals/own-keys */ \"./node_modules/core-js/internals/own-keys.js\");\nvar getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ \"./node_modules/core-js/internals/object-get-own-property-descriptor.js\");\nvar definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ \"./node_modules/core-js/internals/object-define-property.js\");\n\nmodule.exports = function (target, source, exceptions) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {\n defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n }\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/copy-constructor-properties.js?");
2144
-
2145
- /***/ }),
2146
-
2147
- /***/ "./node_modules/core-js/internals/correct-prototype-getter.js":
2148
- /*!********************************************************************!*\
2149
- !*** ./node_modules/core-js/internals/correct-prototype-getter.js ***!
2150
- \********************************************************************/
2151
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2152
-
2153
- "use strict";
2154
- eval("\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\n\nmodule.exports = !fails(function () {\n function F() { /* empty */ }\n F.prototype.constructor = null;\n // eslint-disable-next-line es/no-object-getprototypeof -- required for testing\n return Object.getPrototypeOf(new F()) !== F.prototype;\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/correct-prototype-getter.js?");
2155
-
2156
- /***/ }),
2157
-
2158
- /***/ "./node_modules/core-js/internals/create-iter-result-object.js":
2159
- /*!*********************************************************************!*\
2160
- !*** ./node_modules/core-js/internals/create-iter-result-object.js ***!
2161
- \*********************************************************************/
2162
- /***/ (function(module) {
2163
-
2164
- "use strict";
2165
- eval("\n// `CreateIterResultObject` abstract operation\n// https://tc39.es/ecma262/#sec-createiterresultobject\nmodule.exports = function (value, done) {\n return { value: value, done: done };\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/create-iter-result-object.js?");
2166
-
2167
- /***/ }),
2168
-
2169
- /***/ "./node_modules/core-js/internals/create-non-enumerable-property.js":
2170
- /*!**************************************************************************!*\
2171
- !*** ./node_modules/core-js/internals/create-non-enumerable-property.js ***!
2172
- \**************************************************************************/
2173
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2174
-
2175
- "use strict";
2176
- eval("\nvar DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\nvar definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ \"./node_modules/core-js/internals/object-define-property.js\");\nvar createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ \"./node_modules/core-js/internals/create-property-descriptor.js\");\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/create-non-enumerable-property.js?");
2177
-
2178
- /***/ }),
2179
-
2180
- /***/ "./node_modules/core-js/internals/create-property-descriptor.js":
2181
- /*!**********************************************************************!*\
2182
- !*** ./node_modules/core-js/internals/create-property-descriptor.js ***!
2183
- \**********************************************************************/
2184
- /***/ (function(module) {
2185
-
2186
- "use strict";
2187
- eval("\nmodule.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/create-property-descriptor.js?");
2188
-
2189
- /***/ }),
2190
-
2191
- /***/ "./node_modules/core-js/internals/create-property.js":
2192
- /*!***********************************************************!*\
2193
- !*** ./node_modules/core-js/internals/create-property.js ***!
2194
- \***********************************************************/
2195
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2196
-
2197
- "use strict";
2198
- eval("\nvar toPropertyKey = __webpack_require__(/*! ../internals/to-property-key */ \"./node_modules/core-js/internals/to-property-key.js\");\nvar definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ \"./node_modules/core-js/internals/object-define-property.js\");\nvar createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ \"./node_modules/core-js/internals/create-property-descriptor.js\");\n\nmodule.exports = function (object, key, value) {\n var propertyKey = toPropertyKey(key);\n if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));\n else object[propertyKey] = value;\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/create-property.js?");
2199
-
2200
- /***/ }),
2201
-
2202
- /***/ "./node_modules/core-js/internals/define-built-in.js":
2203
- /*!***********************************************************!*\
2204
- !*** ./node_modules/core-js/internals/define-built-in.js ***!
2205
- \***********************************************************/
2206
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2207
-
2208
- "use strict";
2209
- eval("\nvar isCallable = __webpack_require__(/*! ../internals/is-callable */ \"./node_modules/core-js/internals/is-callable.js\");\nvar definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ \"./node_modules/core-js/internals/object-define-property.js\");\nvar makeBuiltIn = __webpack_require__(/*! ../internals/make-built-in */ \"./node_modules/core-js/internals/make-built-in.js\");\nvar defineGlobalProperty = __webpack_require__(/*! ../internals/define-global-property */ \"./node_modules/core-js/internals/define-global-property.js\");\n\nmodule.exports = function (O, key, value, options) {\n if (!options) options = {};\n var simple = options.enumerable;\n var name = options.name !== undefined ? options.name : key;\n if (isCallable(value)) makeBuiltIn(value, name, options);\n if (options.global) {\n if (simple) O[key] = value;\n else defineGlobalProperty(key, value);\n } else {\n try {\n if (!options.unsafe) delete O[key];\n else if (O[key]) simple = true;\n } catch (error) { /* empty */ }\n if (simple) O[key] = value;\n else definePropertyModule.f(O, key, {\n value: value,\n enumerable: false,\n configurable: !options.nonConfigurable,\n writable: !options.nonWritable\n });\n } return O;\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/define-built-in.js?");
2210
-
2211
- /***/ }),
2212
-
2213
- /***/ "./node_modules/core-js/internals/define-global-property.js":
2214
- /*!******************************************************************!*\
2215
- !*** ./node_modules/core-js/internals/define-global-property.js ***!
2216
- \******************************************************************/
2217
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2218
-
2219
- "use strict";
2220
- eval("\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\n\n// eslint-disable-next-line es/no-object-defineproperty -- safe\nvar defineProperty = Object.defineProperty;\n\nmodule.exports = function (key, value) {\n try {\n defineProperty(global, key, { value: value, configurable: true, writable: true });\n } catch (error) {\n global[key] = value;\n } return value;\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/define-global-property.js?");
2221
-
2222
- /***/ }),
2223
-
2224
- /***/ "./node_modules/core-js/internals/descriptors.js":
2225
- /*!*******************************************************!*\
2226
- !*** ./node_modules/core-js/internals/descriptors.js ***!
2227
- \*******************************************************/
2228
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2229
-
2230
- "use strict";
2231
- eval("\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\n\n// Detect IE8's incomplete defineProperty implementation\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/descriptors.js?");
2232
-
2233
- /***/ }),
2234
-
2235
- /***/ "./node_modules/core-js/internals/document-all.js":
2236
- /*!********************************************************!*\
2237
- !*** ./node_modules/core-js/internals/document-all.js ***!
2238
- \********************************************************/
2239
- /***/ (function(module) {
2240
-
2241
- "use strict";
2242
- eval("\nvar documentAll = typeof document == 'object' && document.all;\n\n// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot\n// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing\nvar IS_HTMLDDA = typeof documentAll == 'undefined' && documentAll !== undefined;\n\nmodule.exports = {\n all: documentAll,\n IS_HTMLDDA: IS_HTMLDDA\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/document-all.js?");
2243
-
2244
- /***/ }),
2245
-
2246
- /***/ "./node_modules/core-js/internals/document-create-element.js":
2247
- /*!*******************************************************************!*\
2248
- !*** ./node_modules/core-js/internals/document-create-element.js ***!
2249
- \*******************************************************************/
2250
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2251
-
2252
- "use strict";
2253
- eval("\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar isObject = __webpack_require__(/*! ../internals/is-object */ \"./node_modules/core-js/internals/is-object.js\");\n\nvar document = global.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n return EXISTS ? document.createElement(it) : {};\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/document-create-element.js?");
2254
-
2255
- /***/ }),
2256
-
2257
- /***/ "./node_modules/core-js/internals/dom-iterables.js":
2258
- /*!*********************************************************!*\
2259
- !*** ./node_modules/core-js/internals/dom-iterables.js ***!
2260
- \*********************************************************/
2261
- /***/ (function(module) {
2262
-
2263
- "use strict";
2264
- eval("\n// iterable DOM collections\n// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods\nmodule.exports = {\n CSSRuleList: 0,\n CSSStyleDeclaration: 0,\n CSSValueList: 0,\n ClientRectList: 0,\n DOMRectList: 0,\n DOMStringList: 0,\n DOMTokenList: 1,\n DataTransferItemList: 0,\n FileList: 0,\n HTMLAllCollection: 0,\n HTMLCollection: 0,\n HTMLFormElement: 0,\n HTMLSelectElement: 0,\n MediaList: 0,\n MimeTypeArray: 0,\n NamedNodeMap: 0,\n NodeList: 1,\n PaintRequestList: 0,\n Plugin: 0,\n PluginArray: 0,\n SVGLengthList: 0,\n SVGNumberList: 0,\n SVGPathSegList: 0,\n SVGPointList: 0,\n SVGStringList: 0,\n SVGTransformList: 0,\n SourceBufferList: 0,\n StyleSheetList: 0,\n TextTrackCueList: 0,\n TextTrackList: 0,\n TouchList: 0\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/dom-iterables.js?");
2265
-
2266
- /***/ }),
2267
-
2268
- /***/ "./node_modules/core-js/internals/dom-token-list-prototype.js":
2269
- /*!********************************************************************!*\
2270
- !*** ./node_modules/core-js/internals/dom-token-list-prototype.js ***!
2271
- \********************************************************************/
2272
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2273
-
2274
- "use strict";
2275
- eval("\n// in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`\nvar documentCreateElement = __webpack_require__(/*! ../internals/document-create-element */ \"./node_modules/core-js/internals/document-create-element.js\");\n\nvar classList = documentCreateElement('span').classList;\nvar DOMTokenListPrototype = classList && classList.constructor && classList.constructor.prototype;\n\nmodule.exports = DOMTokenListPrototype === Object.prototype ? undefined : DOMTokenListPrototype;\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/dom-token-list-prototype.js?");
2276
-
2277
- /***/ }),
2278
-
2279
- /***/ "./node_modules/core-js/internals/engine-user-agent.js":
2280
- /*!*************************************************************!*\
2281
- !*** ./node_modules/core-js/internals/engine-user-agent.js ***!
2282
- \*************************************************************/
2283
- /***/ (function(module) {
2284
-
2285
- "use strict";
2286
- eval("\nmodule.exports = typeof navigator != 'undefined' && String(navigator.userAgent) || '';\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/engine-user-agent.js?");
2287
-
2288
- /***/ }),
2289
-
2290
- /***/ "./node_modules/core-js/internals/engine-v8-version.js":
2291
- /*!*************************************************************!*\
2292
- !*** ./node_modules/core-js/internals/engine-v8-version.js ***!
2293
- \*************************************************************/
2294
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2295
-
2296
- "use strict";
2297
- eval("\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar userAgent = __webpack_require__(/*! ../internals/engine-user-agent */ \"./node_modules/core-js/internals/engine-user-agent.js\");\n\nvar process = global.process;\nvar Deno = global.Deno;\nvar versions = process && process.versions || Deno && Deno.version;\nvar v8 = versions && versions.v8;\nvar match, version;\n\nif (v8) {\n match = v8.split('.');\n // in old Chrome, versions of V8 isn't V8 = Chrome / 10\n // but their correct versions are not interesting for us\n version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);\n}\n\n// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`\n// so check `userAgent` even if `.v8` exists, but 0\nif (!version && userAgent) {\n match = userAgent.match(/Edge\\/(\\d+)/);\n if (!match || match[1] >= 74) {\n match = userAgent.match(/Chrome\\/(\\d+)/);\n if (match) version = +match[1];\n }\n}\n\nmodule.exports = version;\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/engine-v8-version.js?");
2298
-
2299
- /***/ }),
2300
-
2301
- /***/ "./node_modules/core-js/internals/enum-bug-keys.js":
2302
- /*!*********************************************************!*\
2303
- !*** ./node_modules/core-js/internals/enum-bug-keys.js ***!
2304
- \*********************************************************/
2305
- /***/ (function(module) {
2306
-
2307
- "use strict";
2308
- eval("\n// IE8- don't enum bug keys\nmodule.exports = [\n 'constructor',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toLocaleString',\n 'toString',\n 'valueOf'\n];\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/enum-bug-keys.js?");
2309
-
2310
- /***/ }),
2311
-
2312
- /***/ "./node_modules/core-js/internals/export.js":
2313
- /*!**************************************************!*\
2314
- !*** ./node_modules/core-js/internals/export.js ***!
2315
- \**************************************************/
2316
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2317
-
2318
- "use strict";
2319
- eval("\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar getOwnPropertyDescriptor = (__webpack_require__(/*! ../internals/object-get-own-property-descriptor */ \"./node_modules/core-js/internals/object-get-own-property-descriptor.js\").f);\nvar createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ \"./node_modules/core-js/internals/create-non-enumerable-property.js\");\nvar defineBuiltIn = __webpack_require__(/*! ../internals/define-built-in */ \"./node_modules/core-js/internals/define-built-in.js\");\nvar defineGlobalProperty = __webpack_require__(/*! ../internals/define-global-property */ \"./node_modules/core-js/internals/define-global-property.js\");\nvar copyConstructorProperties = __webpack_require__(/*! ../internals/copy-constructor-properties */ \"./node_modules/core-js/internals/copy-constructor-properties.js\");\nvar isForced = __webpack_require__(/*! ../internals/is-forced */ \"./node_modules/core-js/internals/is-forced.js\");\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.dontCallGetSet - prevent calling a getter on target\n options.name - the .name of the function if it does not match the key\n*/\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n if (GLOBAL) {\n target = global;\n } else if (STATIC) {\n target = global[TARGET] || defineGlobalProperty(TARGET, {});\n } else {\n target = (global[TARGET] || {}).prototype;\n }\n if (target) for (key in source) {\n sourceProperty = source[key];\n if (options.dontCallGetSet) {\n descriptor = getOwnPropertyDescriptor(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contained in target\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty == typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n }\n // add a flag to not completely full polyfills\n if (options.sham || (targetProperty && targetProperty.sham)) {\n createNonEnumerableProperty(sourceProperty, 'sham', true);\n }\n defineBuiltIn(target, key, sourceProperty, options);\n }\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/export.js?");
2320
-
2321
- /***/ }),
2322
-
2323
- /***/ "./node_modules/core-js/internals/fails.js":
2324
- /*!*************************************************!*\
2325
- !*** ./node_modules/core-js/internals/fails.js ***!
2326
- \*************************************************/
2327
- /***/ (function(module) {
2328
-
2329
- "use strict";
2330
- eval("\nmodule.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/fails.js?");
2331
-
2332
- /***/ }),
2333
-
2334
- /***/ "./node_modules/core-js/internals/function-bind-context.js":
2335
- /*!*****************************************************************!*\
2336
- !*** ./node_modules/core-js/internals/function-bind-context.js ***!
2337
- \*****************************************************************/
2338
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2339
-
2340
- "use strict";
2341
- eval("\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this-clause */ \"./node_modules/core-js/internals/function-uncurry-this-clause.js\");\nvar aCallable = __webpack_require__(/*! ../internals/a-callable */ \"./node_modules/core-js/internals/a-callable.js\");\nvar NATIVE_BIND = __webpack_require__(/*! ../internals/function-bind-native */ \"./node_modules/core-js/internals/function-bind-native.js\");\n\nvar bind = uncurryThis(uncurryThis.bind);\n\n// optional / simple context binding\nmodule.exports = function (fn, that) {\n aCallable(fn);\n return that === undefined ? fn : NATIVE_BIND ? bind(fn, that) : function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/function-bind-context.js?");
2342
-
2343
- /***/ }),
2344
-
2345
- /***/ "./node_modules/core-js/internals/function-bind-native.js":
2346
- /*!****************************************************************!*\
2347
- !*** ./node_modules/core-js/internals/function-bind-native.js ***!
2348
- \****************************************************************/
2349
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2350
-
2351
- "use strict";
2352
- eval("\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\n\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es/no-function-prototype-bind -- safe\n var test = (function () { /* empty */ }).bind();\n // eslint-disable-next-line no-prototype-builtins -- safe\n return typeof test != 'function' || test.hasOwnProperty('prototype');\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/function-bind-native.js?");
2353
-
2354
- /***/ }),
2355
-
2356
- /***/ "./node_modules/core-js/internals/function-call.js":
2357
- /*!*********************************************************!*\
2358
- !*** ./node_modules/core-js/internals/function-call.js ***!
2359
- \*********************************************************/
2360
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2361
-
2362
- "use strict";
2363
- eval("\nvar NATIVE_BIND = __webpack_require__(/*! ../internals/function-bind-native */ \"./node_modules/core-js/internals/function-bind-native.js\");\n\nvar call = Function.prototype.call;\n\nmodule.exports = NATIVE_BIND ? call.bind(call) : function () {\n return call.apply(call, arguments);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/function-call.js?");
2364
-
2365
- /***/ }),
2366
-
2367
- /***/ "./node_modules/core-js/internals/function-name.js":
2368
- /*!*********************************************************!*\
2369
- !*** ./node_modules/core-js/internals/function-name.js ***!
2370
- \*********************************************************/
2371
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2372
-
2373
- "use strict";
2374
- eval("\nvar DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\nvar hasOwn = __webpack_require__(/*! ../internals/has-own-property */ \"./node_modules/core-js/internals/has-own-property.js\");\n\nvar FunctionPrototype = Function.prototype;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;\n\nvar EXISTS = hasOwn(FunctionPrototype, 'name');\n// additional protection from minified / mangled / dropped function names\nvar PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';\nvar CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));\n\nmodule.exports = {\n EXISTS: EXISTS,\n PROPER: PROPER,\n CONFIGURABLE: CONFIGURABLE\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/function-name.js?");
2375
-
2376
- /***/ }),
2377
-
2378
- /***/ "./node_modules/core-js/internals/function-uncurry-this-accessor.js":
2379
- /*!**************************************************************************!*\
2380
- !*** ./node_modules/core-js/internals/function-uncurry-this-accessor.js ***!
2381
- \**************************************************************************/
2382
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2383
-
2384
- "use strict";
2385
- eval("\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js/internals/function-uncurry-this.js\");\nvar aCallable = __webpack_require__(/*! ../internals/a-callable */ \"./node_modules/core-js/internals/a-callable.js\");\n\nmodule.exports = function (object, key, method) {\n try {\n // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\n return uncurryThis(aCallable(Object.getOwnPropertyDescriptor(object, key)[method]));\n } catch (error) { /* empty */ }\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/function-uncurry-this-accessor.js?");
2386
-
2387
- /***/ }),
2388
-
2389
- /***/ "./node_modules/core-js/internals/function-uncurry-this-clause.js":
2390
- /*!************************************************************************!*\
2391
- !*** ./node_modules/core-js/internals/function-uncurry-this-clause.js ***!
2392
- \************************************************************************/
2393
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2394
-
2395
- "use strict";
2396
- eval("\nvar classofRaw = __webpack_require__(/*! ../internals/classof-raw */ \"./node_modules/core-js/internals/classof-raw.js\");\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js/internals/function-uncurry-this.js\");\n\nmodule.exports = function (fn) {\n // Nashorn bug:\n // https://github.com/zloirock/core-js/issues/1128\n // https://github.com/zloirock/core-js/issues/1130\n if (classofRaw(fn) === 'Function') return uncurryThis(fn);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/function-uncurry-this-clause.js?");
2397
-
2398
- /***/ }),
2399
-
2400
- /***/ "./node_modules/core-js/internals/function-uncurry-this.js":
2401
- /*!*****************************************************************!*\
2402
- !*** ./node_modules/core-js/internals/function-uncurry-this.js ***!
2403
- \*****************************************************************/
2404
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2405
-
2406
- "use strict";
2407
- eval("\nvar NATIVE_BIND = __webpack_require__(/*! ../internals/function-bind-native */ \"./node_modules/core-js/internals/function-bind-native.js\");\n\nvar FunctionPrototype = Function.prototype;\nvar call = FunctionPrototype.call;\nvar uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call);\n\nmodule.exports = NATIVE_BIND ? uncurryThisWithBind : function (fn) {\n return function () {\n return call.apply(fn, arguments);\n };\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/function-uncurry-this.js?");
2408
-
2409
- /***/ }),
2410
-
2411
- /***/ "./node_modules/core-js/internals/get-built-in.js":
2412
- /*!********************************************************!*\
2413
- !*** ./node_modules/core-js/internals/get-built-in.js ***!
2414
- \********************************************************/
2415
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2416
-
2417
- "use strict";
2418
- eval("\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar isCallable = __webpack_require__(/*! ../internals/is-callable */ \"./node_modules/core-js/internals/is-callable.js\");\n\nvar aFunction = function (argument) {\n return isCallable(argument) ? argument : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(global[namespace]) : global[namespace] && global[namespace][method];\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/get-built-in.js?");
2419
-
2420
- /***/ }),
2421
-
2422
- /***/ "./node_modules/core-js/internals/get-iterator-method.js":
2423
- /*!***************************************************************!*\
2424
- !*** ./node_modules/core-js/internals/get-iterator-method.js ***!
2425
- \***************************************************************/
2426
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2427
-
2428
- "use strict";
2429
- eval("\nvar classof = __webpack_require__(/*! ../internals/classof */ \"./node_modules/core-js/internals/classof.js\");\nvar getMethod = __webpack_require__(/*! ../internals/get-method */ \"./node_modules/core-js/internals/get-method.js\");\nvar isNullOrUndefined = __webpack_require__(/*! ../internals/is-null-or-undefined */ \"./node_modules/core-js/internals/is-null-or-undefined.js\");\nvar Iterators = __webpack_require__(/*! ../internals/iterators */ \"./node_modules/core-js/internals/iterators.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\n\nvar ITERATOR = wellKnownSymbol('iterator');\n\nmodule.exports = function (it) {\n if (!isNullOrUndefined(it)) return getMethod(it, ITERATOR)\n || getMethod(it, '@@iterator')\n || Iterators[classof(it)];\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/get-iterator-method.js?");
2430
-
2431
- /***/ }),
2432
-
2433
- /***/ "./node_modules/core-js/internals/get-iterator.js":
2434
- /*!********************************************************!*\
2435
- !*** ./node_modules/core-js/internals/get-iterator.js ***!
2436
- \********************************************************/
2437
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2438
-
2439
- "use strict";
2440
- eval("\nvar call = __webpack_require__(/*! ../internals/function-call */ \"./node_modules/core-js/internals/function-call.js\");\nvar aCallable = __webpack_require__(/*! ../internals/a-callable */ \"./node_modules/core-js/internals/a-callable.js\");\nvar anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js/internals/an-object.js\");\nvar tryToString = __webpack_require__(/*! ../internals/try-to-string */ \"./node_modules/core-js/internals/try-to-string.js\");\nvar getIteratorMethod = __webpack_require__(/*! ../internals/get-iterator-method */ \"./node_modules/core-js/internals/get-iterator-method.js\");\n\nvar $TypeError = TypeError;\n\nmodule.exports = function (argument, usingIterator) {\n var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;\n if (aCallable(iteratorMethod)) return anObject(call(iteratorMethod, argument));\n throw new $TypeError(tryToString(argument) + ' is not iterable');\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/get-iterator.js?");
2441
-
2442
- /***/ }),
2443
-
2444
- /***/ "./node_modules/core-js/internals/get-method.js":
2445
- /*!******************************************************!*\
2446
- !*** ./node_modules/core-js/internals/get-method.js ***!
2447
- \******************************************************/
2448
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2449
-
2450
- "use strict";
2451
- eval("\nvar aCallable = __webpack_require__(/*! ../internals/a-callable */ \"./node_modules/core-js/internals/a-callable.js\");\nvar isNullOrUndefined = __webpack_require__(/*! ../internals/is-null-or-undefined */ \"./node_modules/core-js/internals/is-null-or-undefined.js\");\n\n// `GetMethod` abstract operation\n// https://tc39.es/ecma262/#sec-getmethod\nmodule.exports = function (V, P) {\n var func = V[P];\n return isNullOrUndefined(func) ? undefined : aCallable(func);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/get-method.js?");
2452
-
2453
- /***/ }),
2454
-
2455
- /***/ "./node_modules/core-js/internals/global.js":
2456
- /*!**************************************************!*\
2457
- !*** ./node_modules/core-js/internals/global.js ***!
2458
- \**************************************************/
2459
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2460
-
2461
- "use strict";
2462
- eval("\nvar check = function (it) {\n return it && it.Math === Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n // eslint-disable-next-line es/no-global-this -- safe\n check(typeof globalThis == 'object' && globalThis) ||\n check(typeof window == 'object' && window) ||\n // eslint-disable-next-line no-restricted-globals -- safe\n check(typeof self == 'object' && self) ||\n check(typeof __webpack_require__.g == 'object' && __webpack_require__.g) ||\n // eslint-disable-next-line no-new-func -- fallback\n (function () { return this; })() || this || Function('return this')();\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/global.js?");
2463
-
2464
- /***/ }),
2465
-
2466
- /***/ "./node_modules/core-js/internals/has-own-property.js":
2467
- /*!************************************************************!*\
2468
- !*** ./node_modules/core-js/internals/has-own-property.js ***!
2469
- \************************************************************/
2470
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2471
-
2472
- "use strict";
2473
- eval("\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js/internals/function-uncurry-this.js\");\nvar toObject = __webpack_require__(/*! ../internals/to-object */ \"./node_modules/core-js/internals/to-object.js\");\n\nvar hasOwnProperty = uncurryThis({}.hasOwnProperty);\n\n// `HasOwnProperty` abstract operation\n// https://tc39.es/ecma262/#sec-hasownproperty\n// eslint-disable-next-line es/no-object-hasown -- safe\nmodule.exports = Object.hasOwn || function hasOwn(it, key) {\n return hasOwnProperty(toObject(it), key);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/has-own-property.js?");
2474
-
2475
- /***/ }),
2476
-
2477
- /***/ "./node_modules/core-js/internals/hidden-keys.js":
2478
- /*!*******************************************************!*\
2479
- !*** ./node_modules/core-js/internals/hidden-keys.js ***!
2480
- \*******************************************************/
2481
- /***/ (function(module) {
2482
-
2483
- "use strict";
2484
- eval("\nmodule.exports = {};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/hidden-keys.js?");
2485
-
2486
- /***/ }),
2487
-
2488
- /***/ "./node_modules/core-js/internals/html.js":
2489
- /*!************************************************!*\
2490
- !*** ./node_modules/core-js/internals/html.js ***!
2491
- \************************************************/
2492
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2493
-
2494
- "use strict";
2495
- eval("\nvar getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ \"./node_modules/core-js/internals/get-built-in.js\");\n\nmodule.exports = getBuiltIn('document', 'documentElement');\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/html.js?");
2496
-
2497
- /***/ }),
2498
-
2499
- /***/ "./node_modules/core-js/internals/ie8-dom-define.js":
2500
- /*!**********************************************************!*\
2501
- !*** ./node_modules/core-js/internals/ie8-dom-define.js ***!
2502
- \**********************************************************/
2503
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2504
-
2505
- "use strict";
2506
- eval("\nvar DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar createElement = __webpack_require__(/*! ../internals/document-create-element */ \"./node_modules/core-js/internals/document-create-element.js\");\n\n// Thanks to IE8 for its funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n return Object.defineProperty(createElement('div'), 'a', {\n get: function () { return 7; }\n }).a !== 7;\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/ie8-dom-define.js?");
2507
-
2508
- /***/ }),
2509
-
2510
- /***/ "./node_modules/core-js/internals/indexed-object.js":
2511
- /*!**********************************************************!*\
2512
- !*** ./node_modules/core-js/internals/indexed-object.js ***!
2513
- \**********************************************************/
2514
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2515
-
2516
- "use strict";
2517
- eval("\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js/internals/function-uncurry-this.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar classof = __webpack_require__(/*! ../internals/classof-raw */ \"./node_modules/core-js/internals/classof-raw.js\");\n\nvar $Object = Object;\nvar split = uncurryThis(''.split);\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins -- safe\n return !$Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) === 'String' ? split(it, '') : $Object(it);\n} : $Object;\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/indexed-object.js?");
2518
-
2519
- /***/ }),
2520
-
2521
- /***/ "./node_modules/core-js/internals/inspect-source.js":
2522
- /*!**********************************************************!*\
2523
- !*** ./node_modules/core-js/internals/inspect-source.js ***!
2524
- \**********************************************************/
2525
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2526
-
2527
- "use strict";
2528
- eval("\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js/internals/function-uncurry-this.js\");\nvar isCallable = __webpack_require__(/*! ../internals/is-callable */ \"./node_modules/core-js/internals/is-callable.js\");\nvar store = __webpack_require__(/*! ../internals/shared-store */ \"./node_modules/core-js/internals/shared-store.js\");\n\nvar functionToString = uncurryThis(Function.toString);\n\n// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper\nif (!isCallable(store.inspectSource)) {\n store.inspectSource = function (it) {\n return functionToString(it);\n };\n}\n\nmodule.exports = store.inspectSource;\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/inspect-source.js?");
2529
-
2530
- /***/ }),
2531
-
2532
- /***/ "./node_modules/core-js/internals/internal-state.js":
2533
- /*!**********************************************************!*\
2534
- !*** ./node_modules/core-js/internals/internal-state.js ***!
2535
- \**********************************************************/
2536
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2537
-
2538
- "use strict";
2539
- eval("\nvar NATIVE_WEAK_MAP = __webpack_require__(/*! ../internals/weak-map-basic-detection */ \"./node_modules/core-js/internals/weak-map-basic-detection.js\");\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar isObject = __webpack_require__(/*! ../internals/is-object */ \"./node_modules/core-js/internals/is-object.js\");\nvar createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ \"./node_modules/core-js/internals/create-non-enumerable-property.js\");\nvar hasOwn = __webpack_require__(/*! ../internals/has-own-property */ \"./node_modules/core-js/internals/has-own-property.js\");\nvar shared = __webpack_require__(/*! ../internals/shared-store */ \"./node_modules/core-js/internals/shared-store.js\");\nvar sharedKey = __webpack_require__(/*! ../internals/shared-key */ \"./node_modules/core-js/internals/shared-key.js\");\nvar hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ \"./node_modules/core-js/internals/hidden-keys.js\");\n\nvar OBJECT_ALREADY_INITIALIZED = 'Object already initialized';\nvar TypeError = global.TypeError;\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw new TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n};\n\nif (NATIVE_WEAK_MAP || shared.state) {\n var store = shared.state || (shared.state = new WeakMap());\n /* eslint-disable no-self-assign -- prototype methods protection */\n store.get = store.get;\n store.has = store.has;\n store.set = store.set;\n /* eslint-enable no-self-assign -- prototype methods protection */\n set = function (it, metadata) {\n if (store.has(it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n store.set(it, metadata);\n return metadata;\n };\n get = function (it) {\n return store.get(it) || {};\n };\n has = function (it) {\n return store.has(it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n createNonEnumerableProperty(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return hasOwn(it, STATE) ? it[STATE] : {};\n };\n has = function (it) {\n return hasOwn(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/internal-state.js?");
2540
-
2541
- /***/ }),
2542
-
2543
- /***/ "./node_modules/core-js/internals/is-array-iterator-method.js":
2544
- /*!********************************************************************!*\
2545
- !*** ./node_modules/core-js/internals/is-array-iterator-method.js ***!
2546
- \********************************************************************/
2547
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2548
-
2549
- "use strict";
2550
- eval("\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\nvar Iterators = __webpack_require__(/*! ../internals/iterators */ \"./node_modules/core-js/internals/iterators.js\");\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar ArrayPrototype = Array.prototype;\n\n// check on default Array iterator\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/is-array-iterator-method.js?");
2551
-
2552
- /***/ }),
2553
-
2554
- /***/ "./node_modules/core-js/internals/is-callable.js":
2555
- /*!*******************************************************!*\
2556
- !*** ./node_modules/core-js/internals/is-callable.js ***!
2557
- \*******************************************************/
2558
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2559
-
2560
- "use strict";
2561
- eval("\nvar $documentAll = __webpack_require__(/*! ../internals/document-all */ \"./node_modules/core-js/internals/document-all.js\");\n\nvar documentAll = $documentAll.all;\n\n// `IsCallable` abstract operation\n// https://tc39.es/ecma262/#sec-iscallable\nmodule.exports = $documentAll.IS_HTMLDDA ? function (argument) {\n return typeof argument == 'function' || argument === documentAll;\n} : function (argument) {\n return typeof argument == 'function';\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/is-callable.js?");
2562
-
2563
- /***/ }),
2564
-
2565
- /***/ "./node_modules/core-js/internals/is-forced.js":
2566
- /*!*****************************************************!*\
2567
- !*** ./node_modules/core-js/internals/is-forced.js ***!
2568
- \*****************************************************/
2569
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2570
-
2571
- "use strict";
2572
- eval("\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar isCallable = __webpack_require__(/*! ../internals/is-callable */ \"./node_modules/core-js/internals/is-callable.js\");\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value === POLYFILL ? true\n : value === NATIVE ? false\n : isCallable(detection) ? fails(detection)\n : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/is-forced.js?");
2573
-
2574
- /***/ }),
2575
-
2576
- /***/ "./node_modules/core-js/internals/is-null-or-undefined.js":
2577
- /*!****************************************************************!*\
2578
- !*** ./node_modules/core-js/internals/is-null-or-undefined.js ***!
2579
- \****************************************************************/
2580
- /***/ (function(module) {
2581
-
2582
- "use strict";
2583
- eval("\n// we can't use just `it == null` since of `document.all` special case\n// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec\nmodule.exports = function (it) {\n return it === null || it === undefined;\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/is-null-or-undefined.js?");
2584
-
2585
- /***/ }),
2586
-
2587
- /***/ "./node_modules/core-js/internals/is-object.js":
2588
- /*!*****************************************************!*\
2589
- !*** ./node_modules/core-js/internals/is-object.js ***!
2590
- \*****************************************************/
2591
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2592
-
2593
- "use strict";
2594
- eval("\nvar isCallable = __webpack_require__(/*! ../internals/is-callable */ \"./node_modules/core-js/internals/is-callable.js\");\nvar $documentAll = __webpack_require__(/*! ../internals/document-all */ \"./node_modules/core-js/internals/document-all.js\");\n\nvar documentAll = $documentAll.all;\n\nmodule.exports = $documentAll.IS_HTMLDDA ? function (it) {\n return typeof it == 'object' ? it !== null : isCallable(it) || it === documentAll;\n} : function (it) {\n return typeof it == 'object' ? it !== null : isCallable(it);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/is-object.js?");
2595
-
2596
- /***/ }),
2597
-
2598
- /***/ "./node_modules/core-js/internals/is-pure.js":
2599
- /*!***************************************************!*\
2600
- !*** ./node_modules/core-js/internals/is-pure.js ***!
2601
- \***************************************************/
2602
- /***/ (function(module) {
2603
-
2604
- "use strict";
2605
- eval("\nmodule.exports = false;\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/is-pure.js?");
2606
-
2607
- /***/ }),
2608
-
2609
- /***/ "./node_modules/core-js/internals/is-symbol.js":
2610
- /*!*****************************************************!*\
2611
- !*** ./node_modules/core-js/internals/is-symbol.js ***!
2612
- \*****************************************************/
2613
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2614
-
2615
- "use strict";
2616
- eval("\nvar getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ \"./node_modules/core-js/internals/get-built-in.js\");\nvar isCallable = __webpack_require__(/*! ../internals/is-callable */ \"./node_modules/core-js/internals/is-callable.js\");\nvar isPrototypeOf = __webpack_require__(/*! ../internals/object-is-prototype-of */ \"./node_modules/core-js/internals/object-is-prototype-of.js\");\nvar USE_SYMBOL_AS_UID = __webpack_require__(/*! ../internals/use-symbol-as-uid */ \"./node_modules/core-js/internals/use-symbol-as-uid.js\");\n\nvar $Object = Object;\n\nmodule.exports = USE_SYMBOL_AS_UID ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n var $Symbol = getBuiltIn('Symbol');\n return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/is-symbol.js?");
2617
-
2618
- /***/ }),
2619
-
2620
- /***/ "./node_modules/core-js/internals/iterate.js":
2621
- /*!***************************************************!*\
2622
- !*** ./node_modules/core-js/internals/iterate.js ***!
2623
- \***************************************************/
2624
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2625
-
2626
- "use strict";
2627
- eval("\nvar bind = __webpack_require__(/*! ../internals/function-bind-context */ \"./node_modules/core-js/internals/function-bind-context.js\");\nvar call = __webpack_require__(/*! ../internals/function-call */ \"./node_modules/core-js/internals/function-call.js\");\nvar anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js/internals/an-object.js\");\nvar tryToString = __webpack_require__(/*! ../internals/try-to-string */ \"./node_modules/core-js/internals/try-to-string.js\");\nvar isArrayIteratorMethod = __webpack_require__(/*! ../internals/is-array-iterator-method */ \"./node_modules/core-js/internals/is-array-iterator-method.js\");\nvar lengthOfArrayLike = __webpack_require__(/*! ../internals/length-of-array-like */ \"./node_modules/core-js/internals/length-of-array-like.js\");\nvar isPrototypeOf = __webpack_require__(/*! ../internals/object-is-prototype-of */ \"./node_modules/core-js/internals/object-is-prototype-of.js\");\nvar getIterator = __webpack_require__(/*! ../internals/get-iterator */ \"./node_modules/core-js/internals/get-iterator.js\");\nvar getIteratorMethod = __webpack_require__(/*! ../internals/get-iterator-method */ \"./node_modules/core-js/internals/get-iterator-method.js\");\nvar iteratorClose = __webpack_require__(/*! ../internals/iterator-close */ \"./node_modules/core-js/internals/iterator-close.js\");\n\nvar $TypeError = TypeError;\n\nvar Result = function (stopped, result) {\n this.stopped = stopped;\n this.result = result;\n};\n\nvar ResultPrototype = Result.prototype;\n\nmodule.exports = function (iterable, unboundFunction, options) {\n var that = options && options.that;\n var AS_ENTRIES = !!(options && options.AS_ENTRIES);\n var IS_RECORD = !!(options && options.IS_RECORD);\n var IS_ITERATOR = !!(options && options.IS_ITERATOR);\n var INTERRUPTED = !!(options && options.INTERRUPTED);\n var fn = bind(unboundFunction, that);\n var iterator, iterFn, index, length, result, next, step;\n\n var stop = function (condition) {\n if (iterator) iteratorClose(iterator, 'normal', condition);\n return new Result(true, condition);\n };\n\n var callFn = function (value) {\n if (AS_ENTRIES) {\n anObject(value);\n return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);\n } return INTERRUPTED ? fn(value, stop) : fn(value);\n };\n\n if (IS_RECORD) {\n iterator = iterable.iterator;\n } else if (IS_ITERATOR) {\n iterator = iterable;\n } else {\n iterFn = getIteratorMethod(iterable);\n if (!iterFn) throw new $TypeError(tryToString(iterable) + ' is not iterable');\n // optimisation for array iterators\n if (isArrayIteratorMethod(iterFn)) {\n for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {\n result = callFn(iterable[index]);\n if (result && isPrototypeOf(ResultPrototype, result)) return result;\n } return new Result(false);\n }\n iterator = getIterator(iterable, iterFn);\n }\n\n next = IS_RECORD ? iterable.next : iterator.next;\n while (!(step = call(next, iterator)).done) {\n try {\n result = callFn(step.value);\n } catch (error) {\n iteratorClose(iterator, 'throw', error);\n }\n if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;\n } return new Result(false);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/iterate.js?");
2628
-
2629
- /***/ }),
2630
-
2631
- /***/ "./node_modules/core-js/internals/iterator-close.js":
2632
- /*!**********************************************************!*\
2633
- !*** ./node_modules/core-js/internals/iterator-close.js ***!
2634
- \**********************************************************/
2635
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2636
-
2637
- "use strict";
2638
- eval("\nvar call = __webpack_require__(/*! ../internals/function-call */ \"./node_modules/core-js/internals/function-call.js\");\nvar anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js/internals/an-object.js\");\nvar getMethod = __webpack_require__(/*! ../internals/get-method */ \"./node_modules/core-js/internals/get-method.js\");\n\nmodule.exports = function (iterator, kind, value) {\n var innerResult, innerError;\n anObject(iterator);\n try {\n innerResult = getMethod(iterator, 'return');\n if (!innerResult) {\n if (kind === 'throw') throw value;\n return value;\n }\n innerResult = call(innerResult, iterator);\n } catch (error) {\n innerError = true;\n innerResult = error;\n }\n if (kind === 'throw') throw value;\n if (innerError) throw innerResult;\n anObject(innerResult);\n return value;\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/iterator-close.js?");
2639
-
2640
- /***/ }),
2641
-
2642
- /***/ "./node_modules/core-js/internals/iterator-create-constructor.js":
2643
- /*!***********************************************************************!*\
2644
- !*** ./node_modules/core-js/internals/iterator-create-constructor.js ***!
2645
- \***********************************************************************/
2646
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2647
-
2648
- "use strict";
2649
- eval("\nvar IteratorPrototype = (__webpack_require__(/*! ../internals/iterators-core */ \"./node_modules/core-js/internals/iterators-core.js\").IteratorPrototype);\nvar create = __webpack_require__(/*! ../internals/object-create */ \"./node_modules/core-js/internals/object-create.js\");\nvar createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ \"./node_modules/core-js/internals/create-property-descriptor.js\");\nvar setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ \"./node_modules/core-js/internals/set-to-string-tag.js\");\nvar Iterators = __webpack_require__(/*! ../internals/iterators */ \"./node_modules/core-js/internals/iterators.js\");\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {\n var TO_STRING_TAG = NAME + ' Iterator';\n IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });\n setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);\n Iterators[TO_STRING_TAG] = returnThis;\n return IteratorConstructor;\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/iterator-create-constructor.js?");
2650
-
2651
- /***/ }),
2652
-
2653
- /***/ "./node_modules/core-js/internals/iterator-define.js":
2654
- /*!***********************************************************!*\
2655
- !*** ./node_modules/core-js/internals/iterator-define.js ***!
2656
- \***********************************************************/
2657
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2658
-
2659
- "use strict";
2660
- eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar call = __webpack_require__(/*! ../internals/function-call */ \"./node_modules/core-js/internals/function-call.js\");\nvar IS_PURE = __webpack_require__(/*! ../internals/is-pure */ \"./node_modules/core-js/internals/is-pure.js\");\nvar FunctionName = __webpack_require__(/*! ../internals/function-name */ \"./node_modules/core-js/internals/function-name.js\");\nvar isCallable = __webpack_require__(/*! ../internals/is-callable */ \"./node_modules/core-js/internals/is-callable.js\");\nvar createIteratorConstructor = __webpack_require__(/*! ../internals/iterator-create-constructor */ \"./node_modules/core-js/internals/iterator-create-constructor.js\");\nvar getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ \"./node_modules/core-js/internals/object-get-prototype-of.js\");\nvar setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ \"./node_modules/core-js/internals/object-set-prototype-of.js\");\nvar setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ \"./node_modules/core-js/internals/set-to-string-tag.js\");\nvar createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ \"./node_modules/core-js/internals/create-non-enumerable-property.js\");\nvar defineBuiltIn = __webpack_require__(/*! ../internals/define-built-in */ \"./node_modules/core-js/internals/define-built-in.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\nvar Iterators = __webpack_require__(/*! ../internals/iterators */ \"./node_modules/core-js/internals/iterators.js\");\nvar IteratorsCore = __webpack_require__(/*! ../internals/iterators-core */ \"./node_modules/core-js/internals/iterators-core.js\");\n\nvar PROPER_FUNCTION_NAME = FunctionName.PROPER;\nvar CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;\nvar IteratorPrototype = IteratorsCore.IteratorPrototype;\nvar BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;\nvar ITERATOR = wellKnownSymbol('iterator');\nvar KEYS = 'keys';\nvar VALUES = 'values';\nvar ENTRIES = 'entries';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {\n createIteratorConstructor(IteratorConstructor, NAME, next);\n\n var getIterationMethod = function (KIND) {\n if (KIND === DEFAULT && defaultIterator) return defaultIterator;\n if (!BUGGY_SAFARI_ITERATORS && KIND && KIND in IterablePrototype) return IterablePrototype[KIND];\n\n switch (KIND) {\n case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };\n case VALUES: return function values() { return new IteratorConstructor(this, KIND); };\n case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };\n }\n\n return function () { return new IteratorConstructor(this); };\n };\n\n var TO_STRING_TAG = NAME + ' Iterator';\n var INCORRECT_VALUES_NAME = false;\n var IterablePrototype = Iterable.prototype;\n var nativeIterator = IterablePrototype[ITERATOR]\n || IterablePrototype['@@iterator']\n || DEFAULT && IterablePrototype[DEFAULT];\n var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);\n var anyNativeIterator = NAME === 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;\n var CurrentIteratorPrototype, methods, KEY;\n\n // fix native\n if (anyNativeIterator) {\n CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));\n if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {\n if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {\n if (setPrototypeOf) {\n setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);\n } else if (!isCallable(CurrentIteratorPrototype[ITERATOR])) {\n defineBuiltIn(CurrentIteratorPrototype, ITERATOR, returnThis);\n }\n }\n // Set @@toStringTag to native iterators\n setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);\n if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;\n }\n }\n\n // fix Array.prototype.{ values, @@iterator }.name in V8 / FF\n if (PROPER_FUNCTION_NAME && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) {\n if (!IS_PURE && CONFIGURABLE_FUNCTION_NAME) {\n createNonEnumerableProperty(IterablePrototype, 'name', VALUES);\n } else {\n INCORRECT_VALUES_NAME = true;\n defaultIterator = function values() { return call(nativeIterator, this); };\n }\n }\n\n // export additional methods\n if (DEFAULT) {\n methods = {\n values: getIterationMethod(VALUES),\n keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),\n entries: getIterationMethod(ENTRIES)\n };\n if (FORCED) for (KEY in methods) {\n if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {\n defineBuiltIn(IterablePrototype, KEY, methods[KEY]);\n }\n } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);\n }\n\n // define iterator\n if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {\n defineBuiltIn(IterablePrototype, ITERATOR, defaultIterator, { name: DEFAULT });\n }\n Iterators[NAME] = defaultIterator;\n\n return methods;\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/iterator-define.js?");
2661
-
2662
- /***/ }),
2663
-
2664
- /***/ "./node_modules/core-js/internals/iterators-core.js":
2665
- /*!**********************************************************!*\
2666
- !*** ./node_modules/core-js/internals/iterators-core.js ***!
2667
- \**********************************************************/
2668
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2669
-
2670
- "use strict";
2671
- eval("\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar isCallable = __webpack_require__(/*! ../internals/is-callable */ \"./node_modules/core-js/internals/is-callable.js\");\nvar isObject = __webpack_require__(/*! ../internals/is-object */ \"./node_modules/core-js/internals/is-object.js\");\nvar create = __webpack_require__(/*! ../internals/object-create */ \"./node_modules/core-js/internals/object-create.js\");\nvar getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ \"./node_modules/core-js/internals/object-get-prototype-of.js\");\nvar defineBuiltIn = __webpack_require__(/*! ../internals/define-built-in */ \"./node_modules/core-js/internals/define-built-in.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\nvar IS_PURE = __webpack_require__(/*! ../internals/is-pure */ \"./node_modules/core-js/internals/is-pure.js\");\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar BUGGY_SAFARI_ITERATORS = false;\n\n// `%IteratorPrototype%` object\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-object\nvar IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;\n\n/* eslint-disable es/no-array-prototype-keys -- safe */\nif ([].keys) {\n arrayIterator = [].keys();\n // Safari 8 has buggy iterators w/o `next`\n if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;\n else {\n PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));\n if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;\n }\n}\n\nvar NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype) || fails(function () {\n var test = {};\n // FF44- legacy iterators case\n return IteratorPrototype[ITERATOR].call(test) !== test;\n});\n\nif (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};\nelse if (IS_PURE) IteratorPrototype = create(IteratorPrototype);\n\n// `%IteratorPrototype%[@@iterator]()` method\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator\nif (!isCallable(IteratorPrototype[ITERATOR])) {\n defineBuiltIn(IteratorPrototype, ITERATOR, function () {\n return this;\n });\n}\n\nmodule.exports = {\n IteratorPrototype: IteratorPrototype,\n BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/iterators-core.js?");
2672
-
2673
- /***/ }),
2674
-
2675
- /***/ "./node_modules/core-js/internals/iterators.js":
2676
- /*!*****************************************************!*\
2677
- !*** ./node_modules/core-js/internals/iterators.js ***!
2678
- \*****************************************************/
2679
- /***/ (function(module) {
2680
-
2681
- "use strict";
2682
- eval("\nmodule.exports = {};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/iterators.js?");
2683
-
2684
- /***/ }),
2685
-
2686
- /***/ "./node_modules/core-js/internals/length-of-array-like.js":
2687
- /*!****************************************************************!*\
2688
- !*** ./node_modules/core-js/internals/length-of-array-like.js ***!
2689
- \****************************************************************/
2690
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2691
-
2692
- "use strict";
2693
- eval("\nvar toLength = __webpack_require__(/*! ../internals/to-length */ \"./node_modules/core-js/internals/to-length.js\");\n\n// `LengthOfArrayLike` abstract operation\n// https://tc39.es/ecma262/#sec-lengthofarraylike\nmodule.exports = function (obj) {\n return toLength(obj.length);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/length-of-array-like.js?");
2694
-
2695
- /***/ }),
2696
-
2697
- /***/ "./node_modules/core-js/internals/make-built-in.js":
2698
- /*!*********************************************************!*\
2699
- !*** ./node_modules/core-js/internals/make-built-in.js ***!
2700
- \*********************************************************/
2701
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2702
-
2703
- "use strict";
2704
- eval("\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js/internals/function-uncurry-this.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar isCallable = __webpack_require__(/*! ../internals/is-callable */ \"./node_modules/core-js/internals/is-callable.js\");\nvar hasOwn = __webpack_require__(/*! ../internals/has-own-property */ \"./node_modules/core-js/internals/has-own-property.js\");\nvar DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\nvar CONFIGURABLE_FUNCTION_NAME = (__webpack_require__(/*! ../internals/function-name */ \"./node_modules/core-js/internals/function-name.js\").CONFIGURABLE);\nvar inspectSource = __webpack_require__(/*! ../internals/inspect-source */ \"./node_modules/core-js/internals/inspect-source.js\");\nvar InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ \"./node_modules/core-js/internals/internal-state.js\");\n\nvar enforceInternalState = InternalStateModule.enforce;\nvar getInternalState = InternalStateModule.get;\nvar $String = String;\n// eslint-disable-next-line es/no-object-defineproperty -- safe\nvar defineProperty = Object.defineProperty;\nvar stringSlice = uncurryThis(''.slice);\nvar replace = uncurryThis(''.replace);\nvar join = uncurryThis([].join);\n\nvar CONFIGURABLE_LENGTH = DESCRIPTORS && !fails(function () {\n return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;\n});\n\nvar TEMPLATE = String(String).split('String');\n\nvar makeBuiltIn = module.exports = function (value, name, options) {\n if (stringSlice($String(name), 0, 7) === 'Symbol(') {\n name = '[' + replace($String(name), /^Symbol\\(([^)]*)\\)/, '$1') + ']';\n }\n if (options && options.getter) name = 'get ' + name;\n if (options && options.setter) name = 'set ' + name;\n if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {\n if (DESCRIPTORS) defineProperty(value, 'name', { value: name, configurable: true });\n else value.name = name;\n }\n if (CONFIGURABLE_LENGTH && options && hasOwn(options, 'arity') && value.length !== options.arity) {\n defineProperty(value, 'length', { value: options.arity });\n }\n try {\n if (options && hasOwn(options, 'constructor') && options.constructor) {\n if (DESCRIPTORS) defineProperty(value, 'prototype', { writable: false });\n // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable\n } else if (value.prototype) value.prototype = undefined;\n } catch (error) { /* empty */ }\n var state = enforceInternalState(value);\n if (!hasOwn(state, 'source')) {\n state.source = join(TEMPLATE, typeof name == 'string' ? name : '');\n } return value;\n};\n\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n// eslint-disable-next-line no-extend-native -- required\nFunction.prototype.toString = makeBuiltIn(function toString() {\n return isCallable(this) && getInternalState(this).source || inspectSource(this);\n}, 'toString');\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/make-built-in.js?");
2705
-
2706
- /***/ }),
2707
-
2708
- /***/ "./node_modules/core-js/internals/math-trunc.js":
2709
- /*!******************************************************!*\
2710
- !*** ./node_modules/core-js/internals/math-trunc.js ***!
2711
- \******************************************************/
2712
- /***/ (function(module) {
2713
-
2714
- "use strict";
2715
- eval("\nvar ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `Math.trunc` method\n// https://tc39.es/ecma262/#sec-math.trunc\n// eslint-disable-next-line es/no-math-trunc -- safe\nmodule.exports = Math.trunc || function trunc(x) {\n var n = +x;\n return (n > 0 ? floor : ceil)(n);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/math-trunc.js?");
2716
-
2717
- /***/ }),
2718
-
2719
- /***/ "./node_modules/core-js/internals/object-create.js":
2720
- /*!*********************************************************!*\
2721
- !*** ./node_modules/core-js/internals/object-create.js ***!
2722
- \*********************************************************/
2723
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2724
-
2725
- "use strict";
2726
- eval("\n/* global ActiveXObject -- old IE, WSH */\nvar anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js/internals/an-object.js\");\nvar definePropertiesModule = __webpack_require__(/*! ../internals/object-define-properties */ \"./node_modules/core-js/internals/object-define-properties.js\");\nvar enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ \"./node_modules/core-js/internals/enum-bug-keys.js\");\nvar hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ \"./node_modules/core-js/internals/hidden-keys.js\");\nvar html = __webpack_require__(/*! ../internals/html */ \"./node_modules/core-js/internals/html.js\");\nvar documentCreateElement = __webpack_require__(/*! ../internals/document-create-element */ \"./node_modules/core-js/internals/document-create-element.js\");\nvar sharedKey = __webpack_require__(/*! ../internals/shared-key */ \"./node_modules/core-js/internals/shared-key.js\");\n\nvar GT = '>';\nvar LT = '<';\nvar PROTOTYPE = 'prototype';\nvar SCRIPT = 'script';\nvar IE_PROTO = sharedKey('IE_PROTO');\n\nvar EmptyConstructor = function () { /* empty */ };\n\nvar scriptTag = function (content) {\n return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;\n};\n\n// Create object with fake `null` prototype: use ActiveX Object with cleared prototype\nvar NullProtoObjectViaActiveX = function (activeXDocument) {\n activeXDocument.write(scriptTag(''));\n activeXDocument.close();\n var temp = activeXDocument.parentWindow.Object;\n activeXDocument = null; // avoid memory leak\n return temp;\n};\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar NullProtoObjectViaIFrame = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = documentCreateElement('iframe');\n var JS = 'java' + SCRIPT + ':';\n var iframeDocument;\n iframe.style.display = 'none';\n html.appendChild(iframe);\n // https://github.com/zloirock/core-js/issues/475\n iframe.src = String(JS);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(scriptTag('document.F=Object'));\n iframeDocument.close();\n return iframeDocument.F;\n};\n\n// Check for document.domain and active x support\n// No need to use active x approach when document.domain is not set\n// see https://github.com/es-shims/es5-shim/issues/150\n// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346\n// avoid IE GC bug\nvar activeXDocument;\nvar NullProtoObject = function () {\n try {\n activeXDocument = new ActiveXObject('htmlfile');\n } catch (error) { /* ignore */ }\n NullProtoObject = typeof document != 'undefined'\n ? document.domain && activeXDocument\n ? NullProtoObjectViaActiveX(activeXDocument) // old IE\n : NullProtoObjectViaIFrame()\n : NullProtoObjectViaActiveX(activeXDocument); // WSH\n var length = enumBugKeys.length;\n while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n return NullProtoObject();\n};\n\nhiddenKeys[IE_PROTO] = true;\n\n// `Object.create` method\n// https://tc39.es/ecma262/#sec-object.create\n// eslint-disable-next-line es/no-object-create -- safe\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n EmptyConstructor[PROTOTYPE] = anObject(O);\n result = new EmptyConstructor();\n EmptyConstructor[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = NullProtoObject();\n return Properties === undefined ? result : definePropertiesModule.f(result, Properties);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/object-create.js?");
2727
-
2728
- /***/ }),
2729
-
2730
- /***/ "./node_modules/core-js/internals/object-define-properties.js":
2731
- /*!********************************************************************!*\
2732
- !*** ./node_modules/core-js/internals/object-define-properties.js ***!
2733
- \********************************************************************/
2734
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
2735
-
2736
- "use strict";
2737
- eval("\nvar DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\nvar V8_PROTOTYPE_DEFINE_BUG = __webpack_require__(/*! ../internals/v8-prototype-define-bug */ \"./node_modules/core-js/internals/v8-prototype-define-bug.js\");\nvar definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ \"./node_modules/core-js/internals/object-define-property.js\");\nvar anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js/internals/an-object.js\");\nvar toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ \"./node_modules/core-js/internals/to-indexed-object.js\");\nvar objectKeys = __webpack_require__(/*! ../internals/object-keys */ \"./node_modules/core-js/internals/object-keys.js\");\n\n// `Object.defineProperties` method\n// https://tc39.es/ecma262/#sec-object.defineproperties\n// eslint-disable-next-line es/no-object-defineproperties -- safe\nexports.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var props = toIndexedObject(Properties);\n var keys = objectKeys(Properties);\n var length = keys.length;\n var index = 0;\n var key;\n while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);\n return O;\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/object-define-properties.js?");
2738
-
2739
- /***/ }),
2740
-
2741
- /***/ "./node_modules/core-js/internals/object-define-property.js":
2742
- /*!******************************************************************!*\
2743
- !*** ./node_modules/core-js/internals/object-define-property.js ***!
2744
- \******************************************************************/
2745
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
2746
-
2747
- "use strict";
2748
- eval("\nvar DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\nvar IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ \"./node_modules/core-js/internals/ie8-dom-define.js\");\nvar V8_PROTOTYPE_DEFINE_BUG = __webpack_require__(/*! ../internals/v8-prototype-define-bug */ \"./node_modules/core-js/internals/v8-prototype-define-bug.js\");\nvar anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js/internals/an-object.js\");\nvar toPropertyKey = __webpack_require__(/*! ../internals/to-property-key */ \"./node_modules/core-js/internals/to-property-key.js\");\n\nvar $TypeError = TypeError;\n// eslint-disable-next-line es/no-object-defineproperty -- safe\nvar $defineProperty = Object.defineProperty;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar ENUMERABLE = 'enumerable';\nvar CONFIGURABLE = 'configurable';\nvar WRITABLE = 'writable';\n\n// `Object.defineProperty` method\n// https://tc39.es/ecma262/#sec-object.defineproperty\nexports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPropertyKey(P);\n anObject(Attributes);\n if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {\n var current = $getOwnPropertyDescriptor(O, P);\n if (current && current[WRITABLE]) {\n O[P] = Attributes.value;\n Attributes = {\n configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],\n enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],\n writable: false\n };\n }\n } return $defineProperty(O, P, Attributes);\n} : $defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPropertyKey(P);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return $defineProperty(O, P, Attributes);\n } catch (error) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw new $TypeError('Accessors not supported');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/object-define-property.js?");
2749
-
2750
- /***/ }),
2751
-
2752
- /***/ "./node_modules/core-js/internals/object-get-own-property-descriptor.js":
2753
- /*!******************************************************************************!*\
2754
- !*** ./node_modules/core-js/internals/object-get-own-property-descriptor.js ***!
2755
- \******************************************************************************/
2756
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
2757
-
2758
- "use strict";
2759
- eval("\nvar DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\nvar call = __webpack_require__(/*! ../internals/function-call */ \"./node_modules/core-js/internals/function-call.js\");\nvar propertyIsEnumerableModule = __webpack_require__(/*! ../internals/object-property-is-enumerable */ \"./node_modules/core-js/internals/object-property-is-enumerable.js\");\nvar createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ \"./node_modules/core-js/internals/create-property-descriptor.js\");\nvar toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ \"./node_modules/core-js/internals/to-indexed-object.js\");\nvar toPropertyKey = __webpack_require__(/*! ../internals/to-property-key */ \"./node_modules/core-js/internals/to-property-key.js\");\nvar hasOwn = __webpack_require__(/*! ../internals/has-own-property */ \"./node_modules/core-js/internals/has-own-property.js\");\nvar IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ \"./node_modules/core-js/internals/ie8-dom-define.js\");\n\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor\nexports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPropertyKey(P);\n if (IE8_DOM_DEFINE) try {\n return $getOwnPropertyDescriptor(O, P);\n } catch (error) { /* empty */ }\n if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/object-get-own-property-descriptor.js?");
2760
-
2761
- /***/ }),
2762
-
2763
- /***/ "./node_modules/core-js/internals/object-get-own-property-names.js":
2764
- /*!*************************************************************************!*\
2765
- !*** ./node_modules/core-js/internals/object-get-own-property-names.js ***!
2766
- \*************************************************************************/
2767
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
2768
-
2769
- "use strict";
2770
- eval("\nvar internalObjectKeys = __webpack_require__(/*! ../internals/object-keys-internal */ \"./node_modules/core-js/internals/object-keys-internal.js\");\nvar enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ \"./node_modules/core-js/internals/enum-bug-keys.js\");\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.es/ecma262/#sec-object.getownpropertynames\n// eslint-disable-next-line es/no-object-getownpropertynames -- safe\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return internalObjectKeys(O, hiddenKeys);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/object-get-own-property-names.js?");
2771
-
2772
- /***/ }),
2773
-
2774
- /***/ "./node_modules/core-js/internals/object-get-own-property-symbols.js":
2775
- /*!***************************************************************************!*\
2776
- !*** ./node_modules/core-js/internals/object-get-own-property-symbols.js ***!
2777
- \***************************************************************************/
2778
- /***/ (function(__unused_webpack_module, exports) {
2779
-
2780
- "use strict";
2781
- eval("\n// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe\nexports.f = Object.getOwnPropertySymbols;\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/object-get-own-property-symbols.js?");
2782
-
2783
- /***/ }),
2784
-
2785
- /***/ "./node_modules/core-js/internals/object-get-prototype-of.js":
2786
- /*!*******************************************************************!*\
2787
- !*** ./node_modules/core-js/internals/object-get-prototype-of.js ***!
2788
- \*******************************************************************/
2789
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2790
-
2791
- "use strict";
2792
- eval("\nvar hasOwn = __webpack_require__(/*! ../internals/has-own-property */ \"./node_modules/core-js/internals/has-own-property.js\");\nvar isCallable = __webpack_require__(/*! ../internals/is-callable */ \"./node_modules/core-js/internals/is-callable.js\");\nvar toObject = __webpack_require__(/*! ../internals/to-object */ \"./node_modules/core-js/internals/to-object.js\");\nvar sharedKey = __webpack_require__(/*! ../internals/shared-key */ \"./node_modules/core-js/internals/shared-key.js\");\nvar CORRECT_PROTOTYPE_GETTER = __webpack_require__(/*! ../internals/correct-prototype-getter */ \"./node_modules/core-js/internals/correct-prototype-getter.js\");\n\nvar IE_PROTO = sharedKey('IE_PROTO');\nvar $Object = Object;\nvar ObjectPrototype = $Object.prototype;\n\n// `Object.getPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.getprototypeof\n// eslint-disable-next-line es/no-object-getprototypeof -- safe\nmodule.exports = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {\n var object = toObject(O);\n if (hasOwn(object, IE_PROTO)) return object[IE_PROTO];\n var constructor = object.constructor;\n if (isCallable(constructor) && object instanceof constructor) {\n return constructor.prototype;\n } return object instanceof $Object ? ObjectPrototype : null;\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/object-get-prototype-of.js?");
2793
-
2794
- /***/ }),
2795
-
2796
- /***/ "./node_modules/core-js/internals/object-is-prototype-of.js":
2797
- /*!******************************************************************!*\
2798
- !*** ./node_modules/core-js/internals/object-is-prototype-of.js ***!
2799
- \******************************************************************/
2800
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2801
-
2802
- "use strict";
2803
- eval("\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js/internals/function-uncurry-this.js\");\n\nmodule.exports = uncurryThis({}.isPrototypeOf);\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/object-is-prototype-of.js?");
2804
-
2805
- /***/ }),
2806
-
2807
- /***/ "./node_modules/core-js/internals/object-keys-internal.js":
2808
- /*!****************************************************************!*\
2809
- !*** ./node_modules/core-js/internals/object-keys-internal.js ***!
2810
- \****************************************************************/
2811
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2812
-
2813
- "use strict";
2814
- eval("\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js/internals/function-uncurry-this.js\");\nvar hasOwn = __webpack_require__(/*! ../internals/has-own-property */ \"./node_modules/core-js/internals/has-own-property.js\");\nvar toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ \"./node_modules/core-js/internals/to-indexed-object.js\");\nvar indexOf = (__webpack_require__(/*! ../internals/array-includes */ \"./node_modules/core-js/internals/array-includes.js\").indexOf);\nvar hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ \"./node_modules/core-js/internals/hidden-keys.js\");\n\nvar push = uncurryThis([].push);\n\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (hasOwn(O, key = names[i++])) {\n ~indexOf(result, key) || push(result, key);\n }\n return result;\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/object-keys-internal.js?");
2815
-
2816
- /***/ }),
2817
-
2818
- /***/ "./node_modules/core-js/internals/object-keys.js":
2819
- /*!*******************************************************!*\
2820
- !*** ./node_modules/core-js/internals/object-keys.js ***!
2821
- \*******************************************************/
2822
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2823
-
2824
- "use strict";
2825
- eval("\nvar internalObjectKeys = __webpack_require__(/*! ../internals/object-keys-internal */ \"./node_modules/core-js/internals/object-keys-internal.js\");\nvar enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ \"./node_modules/core-js/internals/enum-bug-keys.js\");\n\n// `Object.keys` method\n// https://tc39.es/ecma262/#sec-object.keys\n// eslint-disable-next-line es/no-object-keys -- safe\nmodule.exports = Object.keys || function keys(O) {\n return internalObjectKeys(O, enumBugKeys);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/object-keys.js?");
2826
-
2827
- /***/ }),
2828
-
2829
- /***/ "./node_modules/core-js/internals/object-property-is-enumerable.js":
2830
- /*!*************************************************************************!*\
2831
- !*** ./node_modules/core-js/internals/object-property-is-enumerable.js ***!
2832
- \*************************************************************************/
2833
- /***/ (function(__unused_webpack_module, exports) {
2834
-
2835
- "use strict";
2836
- eval("\nvar $propertyIsEnumerable = {}.propertyIsEnumerable;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : $propertyIsEnumerable;\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/object-property-is-enumerable.js?");
2837
-
2838
- /***/ }),
2839
-
2840
- /***/ "./node_modules/core-js/internals/object-set-prototype-of.js":
2841
- /*!*******************************************************************!*\
2842
- !*** ./node_modules/core-js/internals/object-set-prototype-of.js ***!
2843
- \*******************************************************************/
2844
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1530
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2845
1531
 
2846
1532
  "use strict";
2847
- eval("\n/* eslint-disable no-proto -- safe */\nvar uncurryThisAccessor = __webpack_require__(/*! ../internals/function-uncurry-this-accessor */ \"./node_modules/core-js/internals/function-uncurry-this-accessor.js\");\nvar anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js/internals/an-object.js\");\nvar aPossiblePrototype = __webpack_require__(/*! ../internals/a-possible-prototype */ \"./node_modules/core-js/internals/a-possible-prototype.js\");\n\n// `Object.setPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.setprototypeof\n// Works with __proto__ only. Old v8 can't work with null proto objects.\n// eslint-disable-next-line es/no-object-setprototypeof -- safe\nmodule.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {\n var CORRECT_SETTER = false;\n var test = {};\n var setter;\n try {\n setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set');\n setter(test, []);\n CORRECT_SETTER = test instanceof Array;\n } catch (error) { /* empty */ }\n return function setPrototypeOf(O, proto) {\n anObject(O);\n aPossiblePrototype(proto);\n if (CORRECT_SETTER) setter(O, proto);\n else O.__proto__ = proto;\n return O;\n };\n}() : undefined);\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/object-set-prototype-of.js?");
1533
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ getOppositeVariationPlacement; }\n/* harmony export */ });\nvar hash = {\n start: 'end',\n end: 'start'\n};\nfunction getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}\n\n//# sourceURL=webpack://Formio/./node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js?");
2848
1534
 
2849
1535
  /***/ }),
2850
1536
 
2851
- /***/ "./node_modules/core-js/internals/ordinary-to-primitive.js":
2852
- /*!*****************************************************************!*\
2853
- !*** ./node_modules/core-js/internals/ordinary-to-primitive.js ***!
2854
- \*****************************************************************/
2855
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1537
+ /***/ "./node_modules/@popperjs/core/lib/utils/getVariation.js":
1538
+ /*!***************************************************************!*\
1539
+ !*** ./node_modules/@popperjs/core/lib/utils/getVariation.js ***!
1540
+ \***************************************************************/
1541
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2856
1542
 
2857
1543
  "use strict";
2858
- eval("\nvar call = __webpack_require__(/*! ../internals/function-call */ \"./node_modules/core-js/internals/function-call.js\");\nvar isCallable = __webpack_require__(/*! ../internals/is-callable */ \"./node_modules/core-js/internals/is-callable.js\");\nvar isObject = __webpack_require__(/*! ../internals/is-object */ \"./node_modules/core-js/internals/is-object.js\");\n\nvar $TypeError = TypeError;\n\n// `OrdinaryToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-ordinarytoprimitive\nmodule.exports = function (input, pref) {\n var fn, val;\n if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;\n if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val;\n if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;\n throw new $TypeError(\"Can't convert object to primitive value\");\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/ordinary-to-primitive.js?");
1544
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ getVariation; }\n/* harmony export */ });\nfunction getVariation(placement) {\n return placement.split('-')[1];\n}\n\n//# sourceURL=webpack://Formio/./node_modules/@popperjs/core/lib/utils/getVariation.js?");
2859
1545
 
2860
1546
  /***/ }),
2861
1547
 
2862
- /***/ "./node_modules/core-js/internals/own-keys.js":
2863
- /*!****************************************************!*\
2864
- !*** ./node_modules/core-js/internals/own-keys.js ***!
2865
- \****************************************************/
2866
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1548
+ /***/ "./node_modules/@popperjs/core/lib/utils/math.js":
1549
+ /*!*******************************************************!*\
1550
+ !*** ./node_modules/@popperjs/core/lib/utils/math.js ***!
1551
+ \*******************************************************/
1552
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2867
1553
 
2868
1554
  "use strict";
2869
- eval("\nvar getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ \"./node_modules/core-js/internals/get-built-in.js\");\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js/internals/function-uncurry-this.js\");\nvar getOwnPropertyNamesModule = __webpack_require__(/*! ../internals/object-get-own-property-names */ \"./node_modules/core-js/internals/object-get-own-property-names.js\");\nvar getOwnPropertySymbolsModule = __webpack_require__(/*! ../internals/object-get-own-property-symbols */ \"./node_modules/core-js/internals/object-get-own-property-symbols.js\");\nvar anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js/internals/an-object.js\");\n\nvar concat = uncurryThis([].concat);\n\n// all object keys, includes non-enumerable and symbols\nmodule.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n var keys = getOwnPropertyNamesModule.f(anObject(it));\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/own-keys.js?");
1555
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ max: function() { return /* binding */ max; },\n/* harmony export */ min: function() { return /* binding */ min; },\n/* harmony export */ round: function() { return /* binding */ round; }\n/* harmony export */ });\nvar max = Math.max;\nvar min = Math.min;\nvar round = Math.round;\n\n//# sourceURL=webpack://Formio/./node_modules/@popperjs/core/lib/utils/math.js?");
2870
1556
 
2871
1557
  /***/ }),
2872
1558
 
2873
- /***/ "./node_modules/core-js/internals/path.js":
2874
- /*!************************************************!*\
2875
- !*** ./node_modules/core-js/internals/path.js ***!
2876
- \************************************************/
2877
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1559
+ /***/ "./node_modules/@popperjs/core/lib/utils/mergeByName.js":
1560
+ /*!**************************************************************!*\
1561
+ !*** ./node_modules/@popperjs/core/lib/utils/mergeByName.js ***!
1562
+ \**************************************************************/
1563
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2878
1564
 
2879
1565
  "use strict";
2880
- eval("\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\n\nmodule.exports = global;\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/path.js?");
1566
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ mergeByName; }\n/* harmony export */ });\nfunction mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}\n\n//# sourceURL=webpack://Formio/./node_modules/@popperjs/core/lib/utils/mergeByName.js?");
2881
1567
 
2882
1568
  /***/ }),
2883
1569
 
2884
- /***/ "./node_modules/core-js/internals/require-object-coercible.js":
2885
- /*!********************************************************************!*\
2886
- !*** ./node_modules/core-js/internals/require-object-coercible.js ***!
2887
- \********************************************************************/
2888
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1570
+ /***/ "./node_modules/@popperjs/core/lib/utils/mergePaddingObject.js":
1571
+ /*!*********************************************************************!*\
1572
+ !*** ./node_modules/@popperjs/core/lib/utils/mergePaddingObject.js ***!
1573
+ \*********************************************************************/
1574
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2889
1575
 
2890
1576
  "use strict";
2891
- eval("\nvar isNullOrUndefined = __webpack_require__(/*! ../internals/is-null-or-undefined */ \"./node_modules/core-js/internals/is-null-or-undefined.js\");\n\nvar $TypeError = TypeError;\n\n// `RequireObjectCoercible` abstract operation\n// https://tc39.es/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n if (isNullOrUndefined(it)) throw new $TypeError(\"Can't call method on \" + it);\n return it;\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/require-object-coercible.js?");
1577
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ mergePaddingObject; }\n/* harmony export */ });\n/* harmony import */ var _getFreshSideObject_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getFreshSideObject.js */ \"./node_modules/@popperjs/core/lib/utils/getFreshSideObject.js\");\n\nfunction mergePaddingObject(paddingObject) {\n return Object.assign({}, (0,_getFreshSideObject_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(), paddingObject);\n}\n\n//# sourceURL=webpack://Formio/./node_modules/@popperjs/core/lib/utils/mergePaddingObject.js?");
2892
1578
 
2893
1579
  /***/ }),
2894
1580
 
2895
- /***/ "./node_modules/core-js/internals/set-to-string-tag.js":
2896
- /*!*************************************************************!*\
2897
- !*** ./node_modules/core-js/internals/set-to-string-tag.js ***!
2898
- \*************************************************************/
2899
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1581
+ /***/ "./node_modules/@popperjs/core/lib/utils/orderModifiers.js":
1582
+ /*!*****************************************************************!*\
1583
+ !*** ./node_modules/@popperjs/core/lib/utils/orderModifiers.js ***!
1584
+ \*****************************************************************/
1585
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2900
1586
 
2901
1587
  "use strict";
2902
- eval("\nvar defineProperty = (__webpack_require__(/*! ../internals/object-define-property */ \"./node_modules/core-js/internals/object-define-property.js\").f);\nvar hasOwn = __webpack_require__(/*! ../internals/has-own-property */ \"./node_modules/core-js/internals/has-own-property.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\nmodule.exports = function (target, TAG, STATIC) {\n if (target && !STATIC) target = target.prototype;\n if (target && !hasOwn(target, TO_STRING_TAG)) {\n defineProperty(target, TO_STRING_TAG, { configurable: true, value: TAG });\n }\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/set-to-string-tag.js?");
1588
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ orderModifiers; }\n/* harmony export */ });\n/* harmony import */ var _enums_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../enums.js */ \"./node_modules/@popperjs/core/lib/enums.js\");\n // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nfunction orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return _enums_js__WEBPACK_IMPORTED_MODULE_0__.modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}\n\n//# sourceURL=webpack://Formio/./node_modules/@popperjs/core/lib/utils/orderModifiers.js?");
2903
1589
 
2904
1590
  /***/ }),
2905
1591
 
2906
- /***/ "./node_modules/core-js/internals/shared-key.js":
2907
- /*!******************************************************!*\
2908
- !*** ./node_modules/core-js/internals/shared-key.js ***!
2909
- \******************************************************/
2910
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1592
+ /***/ "./node_modules/@popperjs/core/lib/utils/rectToClientRect.js":
1593
+ /*!*******************************************************************!*\
1594
+ !*** ./node_modules/@popperjs/core/lib/utils/rectToClientRect.js ***!
1595
+ \*******************************************************************/
1596
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2911
1597
 
2912
1598
  "use strict";
2913
- eval("\nvar shared = __webpack_require__(/*! ../internals/shared */ \"./node_modules/core-js/internals/shared.js\");\nvar uid = __webpack_require__(/*! ../internals/uid */ \"./node_modules/core-js/internals/uid.js\");\n\nvar keys = shared('keys');\n\nmodule.exports = function (key) {\n return keys[key] || (keys[key] = uid(key));\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/shared-key.js?");
1599
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ rectToClientRect; }\n/* harmony export */ });\nfunction rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}\n\n//# sourceURL=webpack://Formio/./node_modules/@popperjs/core/lib/utils/rectToClientRect.js?");
2914
1600
 
2915
1601
  /***/ }),
2916
1602
 
2917
- /***/ "./node_modules/core-js/internals/shared-store.js":
2918
- /*!********************************************************!*\
2919
- !*** ./node_modules/core-js/internals/shared-store.js ***!
2920
- \********************************************************/
2921
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1603
+ /***/ "./node_modules/@popperjs/core/lib/utils/userAgent.js":
1604
+ /*!************************************************************!*\
1605
+ !*** ./node_modules/@popperjs/core/lib/utils/userAgent.js ***!
1606
+ \************************************************************/
1607
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2922
1608
 
2923
1609
  "use strict";
2924
- eval("\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar defineGlobalProperty = __webpack_require__(/*! ../internals/define-global-property */ \"./node_modules/core-js/internals/define-global-property.js\");\n\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || defineGlobalProperty(SHARED, {});\n\nmodule.exports = store;\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/shared-store.js?");
1610
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ getUAString; }\n/* harmony export */ });\nfunction getUAString() {\n var uaData = navigator.userAgentData;\n\n if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {\n return uaData.brands.map(function (item) {\n return item.brand + \"/\" + item.version;\n }).join(' ');\n }\n\n return navigator.userAgent;\n}\n\n//# sourceURL=webpack://Formio/./node_modules/@popperjs/core/lib/utils/userAgent.js?");
2925
1611
 
2926
1612
  /***/ }),
2927
1613
 
2928
- /***/ "./node_modules/core-js/internals/shared.js":
2929
- /*!**************************************************!*\
2930
- !*** ./node_modules/core-js/internals/shared.js ***!
2931
- \**************************************************/
2932
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1614
+ /***/ "./node_modules/@popperjs/core/lib/utils/within.js":
1615
+ /*!*********************************************************!*\
1616
+ !*** ./node_modules/@popperjs/core/lib/utils/within.js ***!
1617
+ \*********************************************************/
1618
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2933
1619
 
2934
1620
  "use strict";
2935
- eval("\nvar IS_PURE = __webpack_require__(/*! ../internals/is-pure */ \"./node_modules/core-js/internals/is-pure.js\");\nvar store = __webpack_require__(/*! ../internals/shared-store */ \"./node_modules/core-js/internals/shared-store.js\");\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: '3.33.0',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: 2014-2023 Denis Pushkarev (zloirock.ru)',\n license: 'https://github.com/zloirock/core-js/blob/v3.33.0/LICENSE',\n source: 'https://github.com/zloirock/core-js'\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/shared.js?");
1621
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ within: function() { return /* binding */ within; },\n/* harmony export */ withinMaxClamp: function() { return /* binding */ withinMaxClamp; }\n/* harmony export */ });\n/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ \"./node_modules/@popperjs/core/lib/utils/math.js\");\n\nfunction within(min, value, max) {\n return (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.max)(min, (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.min)(value, max));\n}\nfunction withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n}\n\n//# sourceURL=webpack://Formio/./node_modules/@popperjs/core/lib/utils/within.js?");
2936
1622
 
2937
1623
  /***/ }),
2938
1624
 
2939
- /***/ "./node_modules/core-js/internals/symbol-constructor-detection.js":
2940
- /*!************************************************************************!*\
2941
- !*** ./node_modules/core-js/internals/symbol-constructor-detection.js ***!
2942
- \************************************************************************/
2943
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1625
+ /***/ "./node_modules/animation-frame-polyfill/lib/animation-frame-polyfill.module.js":
1626
+ /*!**************************************************************************************!*\
1627
+ !*** ./node_modules/animation-frame-polyfill/lib/animation-frame-polyfill.module.js ***!
1628
+ \**************************************************************************************/
1629
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2944
1630
 
2945
1631
  "use strict";
2946
- eval("\n/* eslint-disable es/no-symbol -- required for testing */\nvar V8_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ \"./node_modules/core-js/internals/engine-v8-version.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\n\nvar $String = global.String;\n\n// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n var symbol = Symbol('symbol detection');\n // Chrome 38 Symbol has incorrect toString conversion\n // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances\n // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,\n // of course, fail.\n return !$String(symbol) || !(Object(symbol) instanceof Symbol) ||\n // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances\n !Symbol.sham && V8_VERSION && V8_VERSION < 41;\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/symbol-constructor-detection.js?");
1632
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ cancelAnimationFrame: function() { return /* binding */ cancelAnimationFrame; },\n/* harmony export */ requestAnimationFrame: function() { return /* binding */ requestAnimationFrame; }\n/* harmony export */ });\nvar prefix = ['webkit', 'moz', 'ms', 'o'];\nvar requestAnimationFrame = function () {\n for (var i = 0, limit = prefix.length; i < limit && !window.requestAnimationFrame; ++i) {\n window.requestAnimationFrame = window[prefix[i] + 'RequestAnimationFrame'];\n }\n\n if (!window.requestAnimationFrame) {\n var lastTime = 0;\n\n window.requestAnimationFrame = function (callback) {\n var now = new Date().getTime();\n var ttc = Math.max(0, 16 - now - lastTime);\n var timer = window.setTimeout(function () {\n return callback(now + ttc);\n }, ttc);\n lastTime = now + ttc;\n return timer;\n };\n }\n\n return window.requestAnimationFrame.bind(window);\n}();\nvar cancelAnimationFrame = function () {\n for (var i = 0, limit = prefix.length; i < limit && !window.cancelAnimationFrame; ++i) {\n window.cancelAnimationFrame = window[prefix[i] + 'CancelAnimationFrame'] || window[prefix[i] + 'CancelRequestAnimationFrame'];\n }\n\n if (!window.cancelAnimationFrame) {\n window.cancelAnimationFrame = function (timer) {\n window.clearTimeout(timer);\n };\n }\n\n return window.cancelAnimationFrame.bind(window);\n}();\n\n\n//# sourceURL=webpack://Formio/./node_modules/animation-frame-polyfill/lib/animation-frame-polyfill.module.js?");
2947
1633
 
2948
1634
  /***/ }),
2949
1635
 
2950
- /***/ "./node_modules/core-js/internals/to-absolute-index.js":
2951
- /*!*************************************************************!*\
2952
- !*** ./node_modules/core-js/internals/to-absolute-index.js ***!
2953
- \*************************************************************/
1636
+ /***/ "./node_modules/array-from/index.js":
1637
+ /*!******************************************!*\
1638
+ !*** ./node_modules/array-from/index.js ***!
1639
+ \******************************************/
2954
1640
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2955
1641
 
2956
- "use strict";
2957
- eval("\nvar toIntegerOrInfinity = __webpack_require__(/*! ../internals/to-integer-or-infinity */ \"./node_modules/core-js/internals/to-integer-or-infinity.js\");\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n var integer = toIntegerOrInfinity(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/to-absolute-index.js?");
1642
+ eval("module.exports = (typeof Array.from === 'function' ?\n Array.from :\n __webpack_require__(/*! ./polyfill */ \"./node_modules/array-from/polyfill.js\")\n);\n\n\n//# sourceURL=webpack://Formio/./node_modules/array-from/index.js?");
2958
1643
 
2959
1644
  /***/ }),
2960
1645
 
2961
- /***/ "./node_modules/core-js/internals/to-indexed-object.js":
2962
- /*!*************************************************************!*\
2963
- !*** ./node_modules/core-js/internals/to-indexed-object.js ***!
2964
- \*************************************************************/
2965
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1646
+ /***/ "./node_modules/array-from/polyfill.js":
1647
+ /*!*********************************************!*\
1648
+ !*** ./node_modules/array-from/polyfill.js ***!
1649
+ \*********************************************/
1650
+ /***/ (function(module) {
2966
1651
 
2967
- "use strict";
2968
- eval("\n// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ \"./node_modules/core-js/internals/indexed-object.js\");\nvar requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ \"./node_modules/core-js/internals/require-object-coercible.js\");\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/to-indexed-object.js?");
1652
+ eval("// Production steps of ECMA-262, Edition 6, 22.1.2.1\n// Reference: http://www.ecma-international.org/ecma-262/6.0/#sec-array.from\nmodule.exports = (function() {\n var isCallable = function(fn) {\n return typeof fn === 'function';\n };\n var toInteger = function (value) {\n var number = Number(value);\n if (isNaN(number)) { return 0; }\n if (number === 0 || !isFinite(number)) { return number; }\n return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number));\n };\n var maxSafeInteger = Math.pow(2, 53) - 1;\n var toLength = function (value) {\n var len = toInteger(value);\n return Math.min(Math.max(len, 0), maxSafeInteger);\n };\n var iteratorProp = function(value) {\n if(value != null) {\n if(['string','number','boolean','symbol'].indexOf(typeof value) > -1){\n return Symbol.iterator;\n } else if (\n (typeof Symbol !== 'undefined') &&\n ('iterator' in Symbol) &&\n (Symbol.iterator in value)\n ) {\n return Symbol.iterator;\n }\n // Support \"@@iterator\" placeholder, Gecko 27 to Gecko 35\n else if ('@@iterator' in value) {\n return '@@iterator';\n }\n }\n };\n var getMethod = function(O, P) {\n // Assert: IsPropertyKey(P) is true.\n if (O != null && P != null) {\n // Let func be GetV(O, P).\n var func = O[P];\n // ReturnIfAbrupt(func).\n // If func is either undefined or null, return undefined.\n if(func == null) {\n return void 0;\n }\n // If IsCallable(func) is false, throw a TypeError exception.\n if (!isCallable(func)) {\n throw new TypeError(func + ' is not a function');\n }\n return func;\n }\n };\n var iteratorStep = function(iterator) {\n // Let result be IteratorNext(iterator).\n // ReturnIfAbrupt(result).\n var result = iterator.next();\n // Let done be IteratorComplete(result).\n // ReturnIfAbrupt(done).\n var done = Boolean(result.done);\n // If done is true, return false.\n if(done) {\n return false;\n }\n // Return result.\n return result;\n };\n\n // The length property of the from method is 1.\n return function from(items /*, mapFn, thisArg */ ) {\n 'use strict';\n\n // 1. Let C be the this value.\n var C = this;\n\n // 2. If mapfn is undefined, let mapping be false.\n var mapFn = arguments.length > 1 ? arguments[1] : void 0;\n\n var T;\n if (typeof mapFn !== 'undefined') {\n // 3. else\n // a. If IsCallable(mapfn) is false, throw a TypeError exception.\n if (!isCallable(mapFn)) {\n throw new TypeError(\n 'Array.from: when provided, the second argument must be a function'\n );\n }\n\n // b. If thisArg was supplied, let T be thisArg; else let T\n // be undefined.\n if (arguments.length > 2) {\n T = arguments[2];\n }\n // c. Let mapping be true (implied by mapFn)\n }\n\n var A, k;\n\n // 4. Let usingIterator be GetMethod(items, @@iterator).\n // 5. ReturnIfAbrupt(usingIterator).\n var usingIterator = getMethod(items, iteratorProp(items));\n\n // 6. If usingIterator is not undefined, then\n if (usingIterator !== void 0) {\n // a. If IsConstructor(C) is true, then\n // i. Let A be the result of calling the [[Construct]]\n // internal method of C with an empty argument list.\n // b. Else,\n // i. Let A be the result of the abstract operation ArrayCreate\n // with argument 0.\n // c. ReturnIfAbrupt(A).\n A = isCallable(C) ? Object(new C()) : [];\n\n // d. Let iterator be GetIterator(items, usingIterator).\n var iterator = usingIterator.call(items);\n\n // e. ReturnIfAbrupt(iterator).\n if (iterator == null) {\n throw new TypeError(\n 'Array.from requires an array-like or iterable object'\n );\n }\n\n // f. Let k be 0.\n k = 0;\n\n // g. Repeat\n var next, nextValue;\n while (true) {\n // i. Let Pk be ToString(k).\n // ii. Let next be IteratorStep(iterator).\n // iii. ReturnIfAbrupt(next).\n next = iteratorStep(iterator);\n\n // iv. If next is false, then\n if (!next) {\n\n // 1. Let setStatus be Set(A, \"length\", k, true).\n // 2. ReturnIfAbrupt(setStatus).\n A.length = k;\n\n // 3. Return A.\n return A;\n }\n // v. Let nextValue be IteratorValue(next).\n // vi. ReturnIfAbrupt(nextValue)\n nextValue = next.value;\n\n // vii. If mapping is true, then\n // 1. Let mappedValue be Call(mapfn, T, «nextValue, k»).\n // 2. If mappedValue is an abrupt completion, return\n // IteratorClose(iterator, mappedValue).\n // 3. Let mappedValue be mappedValue.[[value]].\n // viii. Else, let mappedValue be nextValue.\n // ix. Let defineStatus be the result of\n // CreateDataPropertyOrThrow(A, Pk, mappedValue).\n // x. [TODO] If defineStatus is an abrupt completion, return\n // IteratorClose(iterator, defineStatus).\n if (mapFn) {\n A[k] = mapFn.call(T, nextValue, k);\n }\n else {\n A[k] = nextValue;\n }\n // xi. Increase k by 1.\n k++;\n }\n // 7. Assert: items is not an Iterable so assume it is\n // an array-like object.\n } else {\n\n // 8. Let arrayLike be ToObject(items).\n var arrayLike = Object(items);\n\n // 9. ReturnIfAbrupt(items).\n if (items == null) {\n throw new TypeError(\n 'Array.from requires an array-like object - not null or undefined'\n );\n }\n\n // 10. Let len be ToLength(Get(arrayLike, \"length\")).\n // 11. ReturnIfAbrupt(len).\n var len = toLength(arrayLike.length);\n\n // 12. If IsConstructor(C) is true, then\n // a. Let A be Construct(C, «len»).\n // 13. Else\n // a. Let A be ArrayCreate(len).\n // 14. ReturnIfAbrupt(A).\n A = isCallable(C) ? Object(new C(len)) : new Array(len);\n\n // 15. Let k be 0.\n k = 0;\n // 16. Repeat, while k < len… (also steps a - h)\n var kValue;\n while (k < len) {\n kValue = arrayLike[k];\n if (mapFn) {\n A[k] = mapFn.call(T, kValue, k);\n }\n else {\n A[k] = kValue;\n }\n k++;\n }\n // 17. Let setStatus be Set(A, \"length\", len, true).\n // 18. ReturnIfAbrupt(setStatus).\n A.length = len;\n // 19. Return A.\n }\n return A;\n };\n})();\n\n\n//# sourceURL=webpack://Formio/./node_modules/array-from/polyfill.js?");
2969
1653
 
2970
1654
  /***/ }),
2971
1655
 
2972
- /***/ "./node_modules/core-js/internals/to-integer-or-infinity.js":
2973
- /*!******************************************************************!*\
2974
- !*** ./node_modules/core-js/internals/to-integer-or-infinity.js ***!
2975
- \******************************************************************/
2976
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1656
+ /***/ "./node_modules/atoa/atoa.js":
1657
+ /*!***********************************!*\
1658
+ !*** ./node_modules/atoa/atoa.js ***!
1659
+ \***********************************/
1660
+ /***/ (function(module) {
2977
1661
 
2978
- "use strict";
2979
- eval("\nvar trunc = __webpack_require__(/*! ../internals/math-trunc */ \"./node_modules/core-js/internals/math-trunc.js\");\n\n// `ToIntegerOrInfinity` abstract operation\n// https://tc39.es/ecma262/#sec-tointegerorinfinity\nmodule.exports = function (argument) {\n var number = +argument;\n // eslint-disable-next-line no-self-compare -- NaN check\n return number !== number || number === 0 ? 0 : trunc(number);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/to-integer-or-infinity.js?");
1662
+ eval("module.exports = function atoa (a, n) { return Array.prototype.slice.call(a, n); }\n\n\n//# sourceURL=webpack://Formio/./node_modules/atoa/atoa.js?");
2980
1663
 
2981
1664
  /***/ }),
2982
1665
 
2983
- /***/ "./node_modules/core-js/internals/to-length.js":
2984
- /*!*****************************************************!*\
2985
- !*** ./node_modules/core-js/internals/to-length.js ***!
2986
- \*****************************************************/
2987
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1666
+ /***/ "./node_modules/autocompleter/autocomplete.js":
1667
+ /*!****************************************************!*\
1668
+ !*** ./node_modules/autocompleter/autocomplete.js ***!
1669
+ \****************************************************/
1670
+ /***/ (function(module) {
2988
1671
 
2989
- "use strict";
2990
- eval("\nvar toIntegerOrInfinity = __webpack_require__(/*! ../internals/to-integer-or-infinity */ \"./node_modules/core-js/internals/to-integer-or-infinity.js\");\n\nvar min = Math.min;\n\n// `ToLength` abstract operation\n// https://tc39.es/ecma262/#sec-tolength\nmodule.exports = function (argument) {\n return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/to-length.js?");
1672
+ eval("(function (global, factory) {\n true ? module.exports = factory() :\n 0;\n}(this, (function () { 'use strict';\n\n /**\r\n * Copyright (c) 2016 Denys Krasnoshchok\r\n *\r\n * Homepage: https://smartscheduling.com/en/documentation/autocomplete\r\n * Source: https://github.com/kraaden/autocomplete\r\n *\r\n * MIT License\r\n */\r\n function autocomplete(settings) {\r\n // just an alias to minimize JS file size\r\n var doc = document;\r\n var container = settings.container || doc.createElement('div');\r\n container.id = container.id || 'autocomplete-' + uid();\r\n var containerStyle = container.style;\r\n var debounceWaitMs = settings.debounceWaitMs || 0;\r\n var preventSubmit = settings.preventSubmit || false;\r\n var disableAutoSelect = settings.disableAutoSelect || false;\r\n var customContainerParent = container.parentElement;\r\n var items = [];\r\n var inputValue = '';\r\n var minLen = 2;\r\n var showOnFocus = settings.showOnFocus;\r\n var selected;\r\n var fetchCounter = 0;\r\n var debounceTimer;\r\n var destroyed = false;\r\n var suppressAutocomplete = false;\r\n if (settings.minLength !== undefined) {\r\n minLen = settings.minLength;\r\n }\r\n if (!settings.input) {\r\n throw new Error('input undefined');\r\n }\r\n var input = settings.input;\r\n container.className = 'autocomplete ' + (settings.className || '');\r\n container.setAttribute('role', 'listbox');\r\n input.setAttribute('role', 'combobox');\r\n input.setAttribute('aria-expanded', 'false');\r\n input.setAttribute('aria-autocomplete', 'list');\r\n input.setAttribute('aria-controls', container.id);\r\n input.setAttribute('aria-owns', container.id);\r\n input.setAttribute('aria-activedescendant', '');\r\n input.setAttribute('aria-haspopup', 'listbox');\r\n // IOS implementation for fixed positioning has many bugs, so we will use absolute positioning\r\n containerStyle.position = 'absolute';\r\n /**\r\n * Generate a very complex textual ID that greatly reduces the chance of a collision with another ID or text.\r\n */\r\n function uid() {\r\n return Date.now().toString(36) + Math.random().toString(36).substring(2);\r\n }\r\n /**\r\n * Detach the container from DOM\r\n */\r\n function detach() {\r\n var parent = container.parentNode;\r\n if (parent) {\r\n parent.removeChild(container);\r\n }\r\n }\r\n /**\r\n * Clear debouncing timer if assigned\r\n */\r\n function clearDebounceTimer() {\r\n if (debounceTimer) {\r\n window.clearTimeout(debounceTimer);\r\n }\r\n }\r\n /**\r\n * Attach the container to DOM\r\n */\r\n function attach() {\r\n if (!container.parentNode) {\r\n (customContainerParent || doc.body).appendChild(container);\r\n }\r\n }\r\n /**\r\n * Check if container for autocomplete is displayed\r\n */\r\n function containerDisplayed() {\r\n return !!container.parentNode;\r\n }\r\n /**\r\n * Clear autocomplete state and hide container\r\n */\r\n function clear() {\r\n // prevent the update call if there are pending AJAX requests\r\n fetchCounter++;\r\n items = [];\r\n inputValue = '';\r\n selected = undefined;\r\n input.setAttribute('aria-activedescendant', '');\r\n input.setAttribute('aria-expanded', 'false');\r\n detach();\r\n }\r\n /**\r\n * Update autocomplete position\r\n */\r\n function updatePosition() {\r\n if (!containerDisplayed()) {\r\n return;\r\n }\r\n input.setAttribute('aria-expanded', 'true');\r\n containerStyle.height = 'auto';\r\n containerStyle.width = input.offsetWidth + 'px';\r\n var maxHeight = 0;\r\n var inputRect;\r\n function calc() {\r\n var docEl = doc.documentElement;\r\n var clientTop = docEl.clientTop || doc.body.clientTop || 0;\r\n var clientLeft = docEl.clientLeft || doc.body.clientLeft || 0;\r\n var scrollTop = window.pageYOffset || docEl.scrollTop;\r\n var scrollLeft = window.pageXOffset || docEl.scrollLeft;\r\n inputRect = input.getBoundingClientRect();\r\n var top = inputRect.top + input.offsetHeight + scrollTop - clientTop;\r\n var left = inputRect.left + scrollLeft - clientLeft;\r\n containerStyle.top = top + 'px';\r\n containerStyle.left = left + 'px';\r\n maxHeight = window.innerHeight - (inputRect.top + input.offsetHeight);\r\n if (maxHeight < 0) {\r\n maxHeight = 0;\r\n }\r\n containerStyle.top = top + 'px';\r\n containerStyle.bottom = '';\r\n containerStyle.left = left + 'px';\r\n containerStyle.maxHeight = maxHeight + 'px';\r\n }\r\n // the calc method must be called twice, otherwise the calculation may be wrong on resize event (chrome browser)\r\n calc();\r\n calc();\r\n if (settings.customize && inputRect) {\r\n settings.customize(input, inputRect, container, maxHeight);\r\n }\r\n }\r\n /**\r\n * Redraw the autocomplete div element with suggestions\r\n */\r\n function update() {\r\n container.innerHTML = '';\r\n input.setAttribute('aria-activedescendant', '');\r\n // function for rendering autocomplete suggestions\r\n var render = function (item, _, __) {\r\n var itemElement = doc.createElement('div');\r\n itemElement.textContent = item.label || '';\r\n return itemElement;\r\n };\r\n if (settings.render) {\r\n render = settings.render;\r\n }\r\n // function to render autocomplete groups\r\n var renderGroup = function (groupName, _) {\r\n var groupDiv = doc.createElement('div');\r\n groupDiv.textContent = groupName;\r\n return groupDiv;\r\n };\r\n if (settings.renderGroup) {\r\n renderGroup = settings.renderGroup;\r\n }\r\n var fragment = doc.createDocumentFragment();\r\n var prevGroup = uid();\r\n items.forEach(function (item, index) {\r\n if (item.group && item.group !== prevGroup) {\r\n prevGroup = item.group;\r\n var groupDiv = renderGroup(item.group, inputValue);\r\n if (groupDiv) {\r\n groupDiv.className += ' group';\r\n fragment.appendChild(groupDiv);\r\n }\r\n }\r\n var div = render(item, inputValue, index);\r\n if (div) {\r\n div.id = container.id + \"_\" + index;\r\n div.setAttribute('role', 'option');\r\n div.addEventListener('click', function (ev) {\r\n suppressAutocomplete = true;\r\n try {\r\n settings.onSelect(item, input);\r\n }\r\n finally {\r\n suppressAutocomplete = false;\r\n }\r\n clear();\r\n ev.preventDefault();\r\n ev.stopPropagation();\r\n });\r\n if (item === selected) {\r\n div.className += ' selected';\r\n div.setAttribute('aria-selected', 'true');\r\n input.setAttribute('aria-activedescendant', div.id);\r\n }\r\n fragment.appendChild(div);\r\n }\r\n });\r\n container.appendChild(fragment);\r\n if (items.length < 1) {\r\n if (settings.emptyMsg) {\r\n var empty = doc.createElement('div');\r\n empty.id = container.id + \"_\" + uid();\r\n empty.className = 'empty';\r\n empty.textContent = settings.emptyMsg;\r\n container.appendChild(empty);\r\n input.setAttribute('aria-activedescendant', empty.id);\r\n }\r\n else {\r\n clear();\r\n return;\r\n }\r\n }\r\n attach();\r\n updatePosition();\r\n updateScroll();\r\n }\r\n function updateIfDisplayed() {\r\n if (containerDisplayed()) {\r\n update();\r\n }\r\n }\r\n function resizeEventHandler() {\r\n updateIfDisplayed();\r\n }\r\n function scrollEventHandler(e) {\r\n if (e.target !== container) {\r\n updateIfDisplayed();\r\n }\r\n else {\r\n e.preventDefault();\r\n }\r\n }\r\n function inputEventHandler() {\r\n if (!suppressAutocomplete) {\r\n fetch(0 /* Keyboard */);\r\n }\r\n }\r\n /**\r\n * Automatically move scroll bar if selected item is not visible\r\n */\r\n function updateScroll() {\r\n var elements = container.getElementsByClassName('selected');\r\n if (elements.length > 0) {\r\n var element = elements[0];\r\n // make group visible\r\n var previous = element.previousElementSibling;\r\n if (previous && previous.className.indexOf('group') !== -1 && !previous.previousElementSibling) {\r\n element = previous;\r\n }\r\n if (element.offsetTop < container.scrollTop) {\r\n container.scrollTop = element.offsetTop;\r\n }\r\n else {\r\n var selectBottom = element.offsetTop + element.offsetHeight;\r\n var containerBottom = container.scrollTop + container.offsetHeight;\r\n if (selectBottom > containerBottom) {\r\n container.scrollTop += selectBottom - containerBottom;\r\n }\r\n }\r\n }\r\n }\r\n function selectPreviousSuggestion() {\r\n var index = items.indexOf(selected);\r\n selected = index === -1\r\n ? undefined\r\n : items[(index + items.length - 1) % items.length];\r\n }\r\n function selectNextSuggestion() {\r\n var index = items.indexOf(selected);\r\n selected = items.length < 1\r\n ? undefined\r\n : index === -1\r\n ? items[0]\r\n : items[(index + 1) % items.length];\r\n }\r\n function handleArrowAndEscapeKeys(ev, key) {\r\n var containerIsDisplayed = containerDisplayed();\r\n if (key === 'Escape') {\r\n clear();\r\n }\r\n else {\r\n if (!containerIsDisplayed || items.length < 1) {\r\n return;\r\n }\r\n key === 'ArrowUp'\r\n ? selectPreviousSuggestion()\r\n : selectNextSuggestion();\r\n update();\r\n }\r\n ev.preventDefault();\r\n if (containerIsDisplayed) {\r\n ev.stopPropagation();\r\n }\r\n }\r\n function handleEnterKey(ev) {\r\n if (selected) {\r\n suppressAutocomplete = true;\r\n try {\r\n settings.onSelect(selected, input);\r\n }\r\n finally {\r\n suppressAutocomplete = false;\r\n }\r\n clear();\r\n }\r\n if (preventSubmit) {\r\n ev.preventDefault();\r\n }\r\n }\r\n function keydownEventHandler(ev) {\r\n var key = ev.key;\r\n switch (key) {\r\n case 'ArrowUp':\r\n case 'ArrowDown':\r\n case 'Escape':\r\n handleArrowAndEscapeKeys(ev, key);\r\n break;\r\n case 'Enter':\r\n handleEnterKey(ev);\r\n break;\r\n }\r\n }\r\n function focusEventHandler() {\r\n if (showOnFocus) {\r\n fetch(1 /* Focus */);\r\n }\r\n }\r\n function fetch(trigger) {\r\n if (input.value.length >= minLen || trigger === 1 /* Focus */) {\r\n clearDebounceTimer();\r\n debounceTimer = window.setTimeout(function () { return startFetch(input.value, trigger, input.selectionStart || 0); }, trigger === 0 /* Keyboard */ || trigger === 2 /* Mouse */ ? debounceWaitMs : 0);\r\n }\r\n else {\r\n clear();\r\n }\r\n }\r\n function startFetch(inputText, trigger, cursorPos) {\r\n if (destroyed)\r\n return;\r\n var savedFetchCounter = ++fetchCounter;\r\n settings.fetch(inputText, function (elements) {\r\n if (fetchCounter === savedFetchCounter && elements) {\r\n items = elements;\r\n inputValue = inputText;\r\n selected = (items.length < 1 || disableAutoSelect) ? undefined : items[0];\r\n update();\r\n }\r\n }, trigger, cursorPos);\r\n }\r\n function keyupEventHandler(e) {\r\n if (settings.keyup) {\r\n settings.keyup({\r\n event: e,\r\n fetch: function () { return fetch(0 /* Keyboard */); }\r\n });\r\n return;\r\n }\r\n if (!containerDisplayed() && e.key === 'ArrowDown') {\r\n fetch(0 /* Keyboard */);\r\n }\r\n }\r\n function clickEventHandler(e) {\r\n settings.click && settings.click({\r\n event: e,\r\n fetch: function () { return fetch(2 /* Mouse */); }\r\n });\r\n }\r\n function blurEventHandler() {\r\n // when an item is selected by mouse click, the blur event will be initiated before the click event and remove DOM elements,\r\n // so that the click event will never be triggered. In order to avoid this issue, DOM removal should be delayed.\r\n setTimeout(function () {\r\n if (doc.activeElement !== input) {\r\n clear();\r\n }\r\n }, 200);\r\n }\r\n function manualFetch() {\r\n startFetch(input.value, 3 /* Manual */, input.selectionStart || 0);\r\n }\r\n /**\r\n * Fixes #26: on long clicks focus will be lost and onSelect method will not be called\r\n */\r\n container.addEventListener('mousedown', function (evt) {\r\n evt.stopPropagation();\r\n evt.preventDefault();\r\n });\r\n /**\r\n * Fixes #30: autocomplete closes when scrollbar is clicked in IE\r\n * See: https://stackoverflow.com/a/9210267/13172349\r\n */\r\n container.addEventListener('focus', function () { return input.focus(); });\r\n /**\r\n * This function will remove DOM elements and clear event handlers\r\n */\r\n function destroy() {\r\n input.removeEventListener('focus', focusEventHandler);\r\n input.removeEventListener('keyup', keyupEventHandler);\r\n input.removeEventListener('click', clickEventHandler);\r\n input.removeEventListener('keydown', keydownEventHandler);\r\n input.removeEventListener('input', inputEventHandler);\r\n input.removeEventListener('blur', blurEventHandler);\r\n window.removeEventListener('resize', resizeEventHandler);\r\n doc.removeEventListener('scroll', scrollEventHandler, true);\r\n input.removeAttribute('role');\r\n input.removeAttribute('aria-expanded');\r\n input.removeAttribute('aria-autocomplete');\r\n input.removeAttribute('aria-controls');\r\n input.removeAttribute('aria-activedescendant');\r\n input.removeAttribute('aria-owns');\r\n input.removeAttribute('aria-haspopup');\r\n clearDebounceTimer();\r\n clear();\r\n destroyed = true;\r\n }\r\n // setup event handlers\r\n input.addEventListener('keyup', keyupEventHandler);\r\n input.addEventListener('click', clickEventHandler);\r\n input.addEventListener('keydown', keydownEventHandler);\r\n input.addEventListener('input', inputEventHandler);\r\n input.addEventListener('blur', blurEventHandler);\r\n input.addEventListener('focus', focusEventHandler);\r\n window.addEventListener('resize', resizeEventHandler);\r\n doc.addEventListener('scroll', scrollEventHandler, true);\r\n return {\r\n destroy: destroy,\r\n fetch: manualFetch\r\n };\r\n }\n\n return autocomplete;\n\n})));\n//# sourceMappingURL=autocomplete.js.map\n\n\n//# sourceURL=webpack://Formio/./node_modules/autocompleter/autocomplete.js?");
2991
1673
 
2992
1674
  /***/ }),
2993
1675
 
2994
- /***/ "./node_modules/core-js/internals/to-object.js":
2995
- /*!*****************************************************!*\
2996
- !*** ./node_modules/core-js/internals/to-object.js ***!
2997
- \*****************************************************/
2998
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1676
+ /***/ "./node_modules/browser-cookies/src/browser-cookies.js":
1677
+ /*!*************************************************************!*\
1678
+ !*** ./node_modules/browser-cookies/src/browser-cookies.js ***!
1679
+ \*************************************************************/
1680
+ /***/ (function(__unused_webpack_module, exports) {
2999
1681
 
3000
- "use strict";
3001
- eval("\nvar requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ \"./node_modules/core-js/internals/require-object-coercible.js\");\n\nvar $Object = Object;\n\n// `ToObject` abstract operation\n// https://tc39.es/ecma262/#sec-toobject\nmodule.exports = function (argument) {\n return $Object(requireObjectCoercible(argument));\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/to-object.js?");
1682
+ eval("exports.defaults = {};\r\n\r\nexports.set = function(name, value, options) {\r\n // Retrieve options and defaults\r\n var opts = options || {};\r\n var defaults = exports.defaults;\r\n\r\n // Apply default value for unspecified options\r\n var expires = opts.expires || defaults.expires;\r\n var domain = opts.domain || defaults.domain;\r\n var path = opts.path !== undefined ? opts.path : (defaults.path !== undefined ? defaults.path : '/');\r\n var secure = opts.secure !== undefined ? opts.secure : defaults.secure;\r\n var httponly = opts.httponly !== undefined ? opts.httponly : defaults.httponly;\r\n var samesite = opts.samesite !== undefined ? opts.samesite : defaults.samesite;\r\n\r\n // Determine cookie expiration date\r\n // If succesful the result will be a valid Date, otherwise it will be an invalid Date or false(ish)\r\n var expDate = expires ? new Date(\r\n // in case expires is an integer, it should specify the number of days till the cookie expires\r\n typeof expires === 'number' ? new Date().getTime() + (expires * 864e5) :\r\n // else expires should be either a Date object or in a format recognized by Date.parse()\r\n expires\r\n ) : 0;\r\n\r\n // Set cookie\r\n document.cookie = name.replace(/[^+#$&^`|]/g, encodeURIComponent) // Encode cookie name\r\n .replace('(', '%28')\r\n .replace(')', '%29') +\r\n '=' + value.replace(/[^+#$&/:<-\\[\\]-}]/g, encodeURIComponent) + // Encode cookie value (RFC6265)\r\n (expDate && expDate.getTime() >= 0 ? ';expires=' + expDate.toUTCString() : '') + // Add expiration date\r\n (domain ? ';domain=' + domain : '') + // Add domain\r\n (path ? ';path=' + path : '') + // Add path\r\n (secure ? ';secure' : '') + // Add secure option\r\n (httponly ? ';httponly' : '') + // Add httponly option\r\n (samesite ? ';samesite=' + samesite : ''); // Add samesite option\r\n};\r\n\r\nexports.get = function(name) {\r\n var cookies = document.cookie.split(';');\r\n \r\n // Iterate all cookies\r\n while(cookies.length) {\r\n var cookie = cookies.pop();\r\n\r\n // Determine separator index (\"name=value\")\r\n var separatorIndex = cookie.indexOf('=');\r\n\r\n // IE<11 emits the equal sign when the cookie value is empty\r\n separatorIndex = separatorIndex < 0 ? cookie.length : separatorIndex;\r\n\r\n var cookie_name = decodeURIComponent(cookie.slice(0, separatorIndex).replace(/^\\s+/, ''));\r\n\r\n // Return cookie value if the name matches\r\n if (cookie_name === name) {\r\n return decodeURIComponent(cookie.slice(separatorIndex + 1));\r\n }\r\n }\r\n\r\n // Return `null` as the cookie was not found\r\n return null;\r\n};\r\n\r\nexports.erase = function(name, options) {\r\n exports.set(name, '', {\r\n expires: -1,\r\n domain: options && options.domain,\r\n path: options && options.path,\r\n secure: 0,\r\n httponly: 0}\r\n );\r\n};\r\n\r\nexports.all = function() {\r\n var all = {};\r\n var cookies = document.cookie.split(';');\r\n\r\n // Iterate all cookies\r\n while(cookies.length) {\r\n var cookie = cookies.pop();\r\n\r\n // Determine separator index (\"name=value\")\r\n var separatorIndex = cookie.indexOf('=');\r\n\r\n // IE<11 emits the equal sign when the cookie value is empty\r\n separatorIndex = separatorIndex < 0 ? cookie.length : separatorIndex;\r\n\r\n // add the cookie name and value to the `all` object\r\n var cookie_name = decodeURIComponent(cookie.slice(0, separatorIndex).replace(/^\\s+/, ''));\r\n all[cookie_name] = decodeURIComponent(cookie.slice(separatorIndex + 1));\r\n }\r\n\r\n return all;\r\n};\r\n\n\n//# sourceURL=webpack://Formio/./node_modules/browser-cookies/src/browser-cookies.js?");
3002
1683
 
3003
1684
  /***/ }),
3004
1685
 
3005
- /***/ "./node_modules/core-js/internals/to-primitive.js":
3006
- /*!********************************************************!*\
3007
- !*** ./node_modules/core-js/internals/to-primitive.js ***!
3008
- \********************************************************/
3009
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1686
+ /***/ "./node_modules/browser-md5-file/dist/index.umd.js":
1687
+ /*!*********************************************************!*\
1688
+ !*** ./node_modules/browser-md5-file/dist/index.umd.js ***!
1689
+ \*********************************************************/
1690
+ /***/ (function(module) {
3010
1691
 
3011
- "use strict";
3012
- eval("\nvar call = __webpack_require__(/*! ../internals/function-call */ \"./node_modules/core-js/internals/function-call.js\");\nvar isObject = __webpack_require__(/*! ../internals/is-object */ \"./node_modules/core-js/internals/is-object.js\");\nvar isSymbol = __webpack_require__(/*! ../internals/is-symbol */ \"./node_modules/core-js/internals/is-symbol.js\");\nvar getMethod = __webpack_require__(/*! ../internals/get-method */ \"./node_modules/core-js/internals/get-method.js\");\nvar ordinaryToPrimitive = __webpack_require__(/*! ../internals/ordinary-to-primitive */ \"./node_modules/core-js/internals/ordinary-to-primitive.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\n\nvar $TypeError = TypeError;\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\n\n// `ToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-toprimitive\nmodule.exports = function (input, pref) {\n if (!isObject(input) || isSymbol(input)) return input;\n var exoticToPrim = getMethod(input, TO_PRIMITIVE);\n var result;\n if (exoticToPrim) {\n if (pref === undefined) pref = 'default';\n result = call(exoticToPrim, input, pref);\n if (!isObject(result) || isSymbol(result)) return result;\n throw new $TypeError(\"Can't convert object to primitive value\");\n }\n if (pref === undefined) pref = 'number';\n return ordinaryToPrimitive(input, pref);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/to-primitive.js?");
1692
+ eval("(function (global, factory) {\n\t true ? module.exports = factory() :\n\t0;\n}(this, (function () { 'use strict';\n\n\tfunction createCommonjsModule(fn, module) {\n\t\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n\t}\n\n\tvar sparkMd5 = createCommonjsModule(function (module, exports) {\n\t(function (factory) {\n\t {\n\t // Node/CommonJS\n\t module.exports = factory();\n\t }\n\t}(function (undefined) {\n\n\t /*\n\t * Fastest md5 implementation around (JKM md5).\n\t * Credits: Joseph Myers\n\t *\n\t * @see http://www.myersdaily.org/joseph/javascript/md5-text.html\n\t * @see http://jsperf.com/md5-shootout/7\n\t */\n\n\t /* this function is much faster,\n\t so if possible we use it. Some IEs\n\t are the only ones I know of that\n\t need the idiotic second function,\n\t generated by an if clause. */\n\t var add32 = function (a, b) {\n\t return (a + b) & 0xFFFFFFFF;\n\t },\n\t hex_chr = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'];\n\n\n\t function cmn(q, a, b, x, s, t) {\n\t a = add32(add32(a, q), add32(x, t));\n\t return add32((a << s) | (a >>> (32 - s)), b);\n\t }\n\n\t function ff(a, b, c, d, x, s, t) {\n\t return cmn((b & c) | ((~b) & d), a, b, x, s, t);\n\t }\n\n\t function gg(a, b, c, d, x, s, t) {\n\t return cmn((b & d) | (c & (~d)), a, b, x, s, t);\n\t }\n\n\t function hh(a, b, c, d, x, s, t) {\n\t return cmn(b ^ c ^ d, a, b, x, s, t);\n\t }\n\n\t function ii(a, b, c, d, x, s, t) {\n\t return cmn(c ^ (b | (~d)), a, b, x, s, t);\n\t }\n\n\t function md5cycle(x, k) {\n\t var a = x[0],\n\t b = x[1],\n\t c = x[2],\n\t d = x[3];\n\n\t a = ff(a, b, c, d, k[0], 7, -680876936);\n\t d = ff(d, a, b, c, k[1], 12, -389564586);\n\t c = ff(c, d, a, b, k[2], 17, 606105819);\n\t b = ff(b, c, d, a, k[3], 22, -1044525330);\n\t a = ff(a, b, c, d, k[4], 7, -176418897);\n\t d = ff(d, a, b, c, k[5], 12, 1200080426);\n\t c = ff(c, d, a, b, k[6], 17, -1473231341);\n\t b = ff(b, c, d, a, k[7], 22, -45705983);\n\t a = ff(a, b, c, d, k[8], 7, 1770035416);\n\t d = ff(d, a, b, c, k[9], 12, -1958414417);\n\t c = ff(c, d, a, b, k[10], 17, -42063);\n\t b = ff(b, c, d, a, k[11], 22, -1990404162);\n\t a = ff(a, b, c, d, k[12], 7, 1804603682);\n\t d = ff(d, a, b, c, k[13], 12, -40341101);\n\t c = ff(c, d, a, b, k[14], 17, -1502002290);\n\t b = ff(b, c, d, a, k[15], 22, 1236535329);\n\n\t a = gg(a, b, c, d, k[1], 5, -165796510);\n\t d = gg(d, a, b, c, k[6], 9, -1069501632);\n\t c = gg(c, d, a, b, k[11], 14, 643717713);\n\t b = gg(b, c, d, a, k[0], 20, -373897302);\n\t a = gg(a, b, c, d, k[5], 5, -701558691);\n\t d = gg(d, a, b, c, k[10], 9, 38016083);\n\t c = gg(c, d, a, b, k[15], 14, -660478335);\n\t b = gg(b, c, d, a, k[4], 20, -405537848);\n\t a = gg(a, b, c, d, k[9], 5, 568446438);\n\t d = gg(d, a, b, c, k[14], 9, -1019803690);\n\t c = gg(c, d, a, b, k[3], 14, -187363961);\n\t b = gg(b, c, d, a, k[8], 20, 1163531501);\n\t a = gg(a, b, c, d, k[13], 5, -1444681467);\n\t d = gg(d, a, b, c, k[2], 9, -51403784);\n\t c = gg(c, d, a, b, k[7], 14, 1735328473);\n\t b = gg(b, c, d, a, k[12], 20, -1926607734);\n\n\t a = hh(a, b, c, d, k[5], 4, -378558);\n\t d = hh(d, a, b, c, k[8], 11, -2022574463);\n\t c = hh(c, d, a, b, k[11], 16, 1839030562);\n\t b = hh(b, c, d, a, k[14], 23, -35309556);\n\t a = hh(a, b, c, d, k[1], 4, -1530992060);\n\t d = hh(d, a, b, c, k[4], 11, 1272893353);\n\t c = hh(c, d, a, b, k[7], 16, -155497632);\n\t b = hh(b, c, d, a, k[10], 23, -1094730640);\n\t a = hh(a, b, c, d, k[13], 4, 681279174);\n\t d = hh(d, a, b, c, k[0], 11, -358537222);\n\t c = hh(c, d, a, b, k[3], 16, -722521979);\n\t b = hh(b, c, d, a, k[6], 23, 76029189);\n\t a = hh(a, b, c, d, k[9], 4, -640364487);\n\t d = hh(d, a, b, c, k[12], 11, -421815835);\n\t c = hh(c, d, a, b, k[15], 16, 530742520);\n\t b = hh(b, c, d, a, k[2], 23, -995338651);\n\n\t a = ii(a, b, c, d, k[0], 6, -198630844);\n\t d = ii(d, a, b, c, k[7], 10, 1126891415);\n\t c = ii(c, d, a, b, k[14], 15, -1416354905);\n\t b = ii(b, c, d, a, k[5], 21, -57434055);\n\t a = ii(a, b, c, d, k[12], 6, 1700485571);\n\t d = ii(d, a, b, c, k[3], 10, -1894986606);\n\t c = ii(c, d, a, b, k[10], 15, -1051523);\n\t b = ii(b, c, d, a, k[1], 21, -2054922799);\n\t a = ii(a, b, c, d, k[8], 6, 1873313359);\n\t d = ii(d, a, b, c, k[15], 10, -30611744);\n\t c = ii(c, d, a, b, k[6], 15, -1560198380);\n\t b = ii(b, c, d, a, k[13], 21, 1309151649);\n\t a = ii(a, b, c, d, k[4], 6, -145523070);\n\t d = ii(d, a, b, c, k[11], 10, -1120210379);\n\t c = ii(c, d, a, b, k[2], 15, 718787259);\n\t b = ii(b, c, d, a, k[9], 21, -343485551);\n\n\t x[0] = add32(a, x[0]);\n\t x[1] = add32(b, x[1]);\n\t x[2] = add32(c, x[2]);\n\t x[3] = add32(d, x[3]);\n\t }\n\n\t function md5blk(s) {\n\t var md5blks = [],\n\t i; /* Andy King said do it this way. */\n\n\t for (i = 0; i < 64; i += 4) {\n\t md5blks[i >> 2] = s.charCodeAt(i) + (s.charCodeAt(i + 1) << 8) + (s.charCodeAt(i + 2) << 16) + (s.charCodeAt(i + 3) << 24);\n\t }\n\t return md5blks;\n\t }\n\n\t function md5blk_array(a) {\n\t var md5blks = [],\n\t i; /* Andy King said do it this way. */\n\n\t for (i = 0; i < 64; i += 4) {\n\t md5blks[i >> 2] = a[i] + (a[i + 1] << 8) + (a[i + 2] << 16) + (a[i + 3] << 24);\n\t }\n\t return md5blks;\n\t }\n\n\t function md51(s) {\n\t var n = s.length,\n\t state = [1732584193, -271733879, -1732584194, 271733878],\n\t i,\n\t length,\n\t tail,\n\t tmp,\n\t lo,\n\t hi;\n\n\t for (i = 64; i <= n; i += 64) {\n\t md5cycle(state, md5blk(s.substring(i - 64, i)));\n\t }\n\t s = s.substring(i - 64);\n\t length = s.length;\n\t tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n\t for (i = 0; i < length; i += 1) {\n\t tail[i >> 2] |= s.charCodeAt(i) << ((i % 4) << 3);\n\t }\n\t tail[i >> 2] |= 0x80 << ((i % 4) << 3);\n\t if (i > 55) {\n\t md5cycle(state, tail);\n\t for (i = 0; i < 16; i += 1) {\n\t tail[i] = 0;\n\t }\n\t }\n\n\t // Beware that the final length might not fit in 32 bits so we take care of that\n\t tmp = n * 8;\n\t tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n\t lo = parseInt(tmp[2], 16);\n\t hi = parseInt(tmp[1], 16) || 0;\n\n\t tail[14] = lo;\n\t tail[15] = hi;\n\n\t md5cycle(state, tail);\n\t return state;\n\t }\n\n\t function md51_array(a) {\n\t var n = a.length,\n\t state = [1732584193, -271733879, -1732584194, 271733878],\n\t i,\n\t length,\n\t tail,\n\t tmp,\n\t lo,\n\t hi;\n\n\t for (i = 64; i <= n; i += 64) {\n\t md5cycle(state, md5blk_array(a.subarray(i - 64, i)));\n\t }\n\n\t // Not sure if it is a bug, however IE10 will always produce a sub array of length 1\n\t // containing the last element of the parent array if the sub array specified starts\n\t // beyond the length of the parent array - weird.\n\t // https://connect.microsoft.com/IE/feedback/details/771452/typed-array-subarray-issue\n\t a = (i - 64) < n ? a.subarray(i - 64) : new Uint8Array(0);\n\n\t length = a.length;\n\t tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n\t for (i = 0; i < length; i += 1) {\n\t tail[i >> 2] |= a[i] << ((i % 4) << 3);\n\t }\n\n\t tail[i >> 2] |= 0x80 << ((i % 4) << 3);\n\t if (i > 55) {\n\t md5cycle(state, tail);\n\t for (i = 0; i < 16; i += 1) {\n\t tail[i] = 0;\n\t }\n\t }\n\n\t // Beware that the final length might not fit in 32 bits so we take care of that\n\t tmp = n * 8;\n\t tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n\t lo = parseInt(tmp[2], 16);\n\t hi = parseInt(tmp[1], 16) || 0;\n\n\t tail[14] = lo;\n\t tail[15] = hi;\n\n\t md5cycle(state, tail);\n\n\t return state;\n\t }\n\n\t function rhex(n) {\n\t var s = '',\n\t j;\n\t for (j = 0; j < 4; j += 1) {\n\t s += hex_chr[(n >> (j * 8 + 4)) & 0x0F] + hex_chr[(n >> (j * 8)) & 0x0F];\n\t }\n\t return s;\n\t }\n\n\t function hex(x) {\n\t var i;\n\t for (i = 0; i < x.length; i += 1) {\n\t x[i] = rhex(x[i]);\n\t }\n\t return x.join('');\n\t }\n\n\t // In some cases the fast add32 function cannot be used..\n\t if (hex(md51('hello')) !== '5d41402abc4b2a76b9719d911017c592') {\n\t add32 = function (x, y) {\n\t var lsw = (x & 0xFFFF) + (y & 0xFFFF),\n\t msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n\t return (msw << 16) | (lsw & 0xFFFF);\n\t };\n\t }\n\n\t // ---------------------------------------------------\n\n\t /**\n\t * ArrayBuffer slice polyfill.\n\t *\n\t * @see https://github.com/ttaubert/node-arraybuffer-slice\n\t */\n\n\t if (typeof ArrayBuffer !== 'undefined' && !ArrayBuffer.prototype.slice) {\n\t (function () {\n\t function clamp(val, length) {\n\t val = (val | 0) || 0;\n\n\t if (val < 0) {\n\t return Math.max(val + length, 0);\n\t }\n\n\t return Math.min(val, length);\n\t }\n\n\t ArrayBuffer.prototype.slice = function (from, to) {\n\t var length = this.byteLength,\n\t begin = clamp(from, length),\n\t end = length,\n\t num,\n\t target,\n\t targetArray,\n\t sourceArray;\n\n\t if (to !== undefined) {\n\t end = clamp(to, length);\n\t }\n\n\t if (begin > end) {\n\t return new ArrayBuffer(0);\n\t }\n\n\t num = end - begin;\n\t target = new ArrayBuffer(num);\n\t targetArray = new Uint8Array(target);\n\n\t sourceArray = new Uint8Array(this, begin, num);\n\t targetArray.set(sourceArray);\n\n\t return target;\n\t };\n\t })();\n\t }\n\n\t // ---------------------------------------------------\n\n\t /**\n\t * Helpers.\n\t */\n\n\t function toUtf8(str) {\n\t if (/[\\u0080-\\uFFFF]/.test(str)) {\n\t str = unescape(encodeURIComponent(str));\n\t }\n\n\t return str;\n\t }\n\n\t function utf8Str2ArrayBuffer(str, returnUInt8Array) {\n\t var length = str.length,\n\t buff = new ArrayBuffer(length),\n\t arr = new Uint8Array(buff),\n\t i;\n\n\t for (i = 0; i < length; i += 1) {\n\t arr[i] = str.charCodeAt(i);\n\t }\n\n\t return returnUInt8Array ? arr : buff;\n\t }\n\n\t function arrayBuffer2Utf8Str(buff) {\n\t return String.fromCharCode.apply(null, new Uint8Array(buff));\n\t }\n\n\t function concatenateArrayBuffers(first, second, returnUInt8Array) {\n\t var result = new Uint8Array(first.byteLength + second.byteLength);\n\n\t result.set(new Uint8Array(first));\n\t result.set(new Uint8Array(second), first.byteLength);\n\n\t return returnUInt8Array ? result : result.buffer;\n\t }\n\n\t function hexToBinaryString(hex) {\n\t var bytes = [],\n\t length = hex.length,\n\t x;\n\n\t for (x = 0; x < length - 1; x += 2) {\n\t bytes.push(parseInt(hex.substr(x, 2), 16));\n\t }\n\n\t return String.fromCharCode.apply(String, bytes);\n\t }\n\n\t // ---------------------------------------------------\n\n\t /**\n\t * SparkMD5 OOP implementation.\n\t *\n\t * Use this class to perform an incremental md5, otherwise use the\n\t * static methods instead.\n\t */\n\n\t function SparkMD5() {\n\t // call reset to init the instance\n\t this.reset();\n\t }\n\n\t /**\n\t * Appends a string.\n\t * A conversion will be applied if an utf8 string is detected.\n\t *\n\t * @param {String} str The string to be appended\n\t *\n\t * @return {SparkMD5} The instance itself\n\t */\n\t SparkMD5.prototype.append = function (str) {\n\t // Converts the string to utf8 bytes if necessary\n\t // Then append as binary\n\t this.appendBinary(toUtf8(str));\n\n\t return this;\n\t };\n\n\t /**\n\t * Appends a binary string.\n\t *\n\t * @param {String} contents The binary string to be appended\n\t *\n\t * @return {SparkMD5} The instance itself\n\t */\n\t SparkMD5.prototype.appendBinary = function (contents) {\n\t this._buff += contents;\n\t this._length += contents.length;\n\n\t var length = this._buff.length,\n\t i;\n\n\t for (i = 64; i <= length; i += 64) {\n\t md5cycle(this._hash, md5blk(this._buff.substring(i - 64, i)));\n\t }\n\n\t this._buff = this._buff.substring(i - 64);\n\n\t return this;\n\t };\n\n\t /**\n\t * Finishes the incremental computation, reseting the internal state and\n\t * returning the result.\n\t *\n\t * @param {Boolean} raw True to get the raw string, false to get the hex string\n\t *\n\t * @return {String} The result\n\t */\n\t SparkMD5.prototype.end = function (raw) {\n\t var buff = this._buff,\n\t length = buff.length,\n\t i,\n\t tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n\t ret;\n\n\t for (i = 0; i < length; i += 1) {\n\t tail[i >> 2] |= buff.charCodeAt(i) << ((i % 4) << 3);\n\t }\n\n\t this._finish(tail, length);\n\t ret = hex(this._hash);\n\n\t if (raw) {\n\t ret = hexToBinaryString(ret);\n\t }\n\n\t this.reset();\n\n\t return ret;\n\t };\n\n\t /**\n\t * Resets the internal state of the computation.\n\t *\n\t * @return {SparkMD5} The instance itself\n\t */\n\t SparkMD5.prototype.reset = function () {\n\t this._buff = '';\n\t this._length = 0;\n\t this._hash = [1732584193, -271733879, -1732584194, 271733878];\n\n\t return this;\n\t };\n\n\t /**\n\t * Gets the internal state of the computation.\n\t *\n\t * @return {Object} The state\n\t */\n\t SparkMD5.prototype.getState = function () {\n\t return {\n\t buff: this._buff,\n\t length: this._length,\n\t hash: this._hash\n\t };\n\t };\n\n\t /**\n\t * Gets the internal state of the computation.\n\t *\n\t * @param {Object} state The state\n\t *\n\t * @return {SparkMD5} The instance itself\n\t */\n\t SparkMD5.prototype.setState = function (state) {\n\t this._buff = state.buff;\n\t this._length = state.length;\n\t this._hash = state.hash;\n\n\t return this;\n\t };\n\n\t /**\n\t * Releases memory used by the incremental buffer and other additional\n\t * resources. If you plan to use the instance again, use reset instead.\n\t */\n\t SparkMD5.prototype.destroy = function () {\n\t delete this._hash;\n\t delete this._buff;\n\t delete this._length;\n\t };\n\n\t /**\n\t * Finish the final calculation based on the tail.\n\t *\n\t * @param {Array} tail The tail (will be modified)\n\t * @param {Number} length The length of the remaining buffer\n\t */\n\t SparkMD5.prototype._finish = function (tail, length) {\n\t var i = length,\n\t tmp,\n\t lo,\n\t hi;\n\n\t tail[i >> 2] |= 0x80 << ((i % 4) << 3);\n\t if (i > 55) {\n\t md5cycle(this._hash, tail);\n\t for (i = 0; i < 16; i += 1) {\n\t tail[i] = 0;\n\t }\n\t }\n\n\t // Do the final computation based on the tail and length\n\t // Beware that the final length may not fit in 32 bits so we take care of that\n\t tmp = this._length * 8;\n\t tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n\t lo = parseInt(tmp[2], 16);\n\t hi = parseInt(tmp[1], 16) || 0;\n\n\t tail[14] = lo;\n\t tail[15] = hi;\n\t md5cycle(this._hash, tail);\n\t };\n\n\t /**\n\t * Performs the md5 hash on a string.\n\t * A conversion will be applied if utf8 string is detected.\n\t *\n\t * @param {String} str The string\n\t * @param {Boolean} raw True to get the raw string, false to get the hex string\n\t *\n\t * @return {String} The result\n\t */\n\t SparkMD5.hash = function (str, raw) {\n\t // Converts the string to utf8 bytes if necessary\n\t // Then compute it using the binary function\n\t return SparkMD5.hashBinary(toUtf8(str), raw);\n\t };\n\n\t /**\n\t * Performs the md5 hash on a binary string.\n\t *\n\t * @param {String} content The binary string\n\t * @param {Boolean} raw True to get the raw string, false to get the hex string\n\t *\n\t * @return {String} The result\n\t */\n\t SparkMD5.hashBinary = function (content, raw) {\n\t var hash = md51(content),\n\t ret = hex(hash);\n\n\t return raw ? hexToBinaryString(ret) : ret;\n\t };\n\n\t // ---------------------------------------------------\n\n\t /**\n\t * SparkMD5 OOP implementation for array buffers.\n\t *\n\t * Use this class to perform an incremental md5 ONLY for array buffers.\n\t */\n\t SparkMD5.ArrayBuffer = function () {\n\t // call reset to init the instance\n\t this.reset();\n\t };\n\n\t /**\n\t * Appends an array buffer.\n\t *\n\t * @param {ArrayBuffer} arr The array to be appended\n\t *\n\t * @return {SparkMD5.ArrayBuffer} The instance itself\n\t */\n\t SparkMD5.ArrayBuffer.prototype.append = function (arr) {\n\t var buff = concatenateArrayBuffers(this._buff.buffer, arr, true),\n\t length = buff.length,\n\t i;\n\n\t this._length += arr.byteLength;\n\n\t for (i = 64; i <= length; i += 64) {\n\t md5cycle(this._hash, md5blk_array(buff.subarray(i - 64, i)));\n\t }\n\n\t this._buff = (i - 64) < length ? new Uint8Array(buff.buffer.slice(i - 64)) : new Uint8Array(0);\n\n\t return this;\n\t };\n\n\t /**\n\t * Finishes the incremental computation, reseting the internal state and\n\t * returning the result.\n\t *\n\t * @param {Boolean} raw True to get the raw string, false to get the hex string\n\t *\n\t * @return {String} The result\n\t */\n\t SparkMD5.ArrayBuffer.prototype.end = function (raw) {\n\t var buff = this._buff,\n\t length = buff.length,\n\t tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n\t i,\n\t ret;\n\n\t for (i = 0; i < length; i += 1) {\n\t tail[i >> 2] |= buff[i] << ((i % 4) << 3);\n\t }\n\n\t this._finish(tail, length);\n\t ret = hex(this._hash);\n\n\t if (raw) {\n\t ret = hexToBinaryString(ret);\n\t }\n\n\t this.reset();\n\n\t return ret;\n\t };\n\n\t /**\n\t * Resets the internal state of the computation.\n\t *\n\t * @return {SparkMD5.ArrayBuffer} The instance itself\n\t */\n\t SparkMD5.ArrayBuffer.prototype.reset = function () {\n\t this._buff = new Uint8Array(0);\n\t this._length = 0;\n\t this._hash = [1732584193, -271733879, -1732584194, 271733878];\n\n\t return this;\n\t };\n\n\t /**\n\t * Gets the internal state of the computation.\n\t *\n\t * @return {Object} The state\n\t */\n\t SparkMD5.ArrayBuffer.prototype.getState = function () {\n\t var state = SparkMD5.prototype.getState.call(this);\n\n\t // Convert buffer to a string\n\t state.buff = arrayBuffer2Utf8Str(state.buff);\n\n\t return state;\n\t };\n\n\t /**\n\t * Gets the internal state of the computation.\n\t *\n\t * @param {Object} state The state\n\t *\n\t * @return {SparkMD5.ArrayBuffer} The instance itself\n\t */\n\t SparkMD5.ArrayBuffer.prototype.setState = function (state) {\n\t // Convert string to buffer\n\t state.buff = utf8Str2ArrayBuffer(state.buff, true);\n\n\t return SparkMD5.prototype.setState.call(this, state);\n\t };\n\n\t SparkMD5.ArrayBuffer.prototype.destroy = SparkMD5.prototype.destroy;\n\n\t SparkMD5.ArrayBuffer.prototype._finish = SparkMD5.prototype._finish;\n\n\t /**\n\t * Performs the md5 hash on an array buffer.\n\t *\n\t * @param {ArrayBuffer} arr The array buffer\n\t * @param {Boolean} raw True to get the raw string, false to get the hex one\n\t *\n\t * @return {String} The result\n\t */\n\t SparkMD5.ArrayBuffer.hash = function (arr, raw) {\n\t var hash = md51_array(new Uint8Array(arr)),\n\t ret = hex(hash);\n\n\t return raw ? hexToBinaryString(ret) : ret;\n\t };\n\n\t return SparkMD5;\n\t}));\n\t});\n\n\tclass BMF {\n\t md5(file, md5Fn, progressFn) {\n\t this.aborted = false;\n\t this.progress = 0;\n\t let currentChunk = 0;\n\t const blobSlice =\n\t File.prototype.slice ||\n\t File.prototype.mozSlice ||\n\t File.prototype.webkitSlice;\n\t const chunkSize = 2097152;\n\t const chunks = Math.ceil(file.size / chunkSize);\n\t const spark = new sparkMd5.ArrayBuffer();\n\t const reader = new FileReader();\n\n\t loadNext();\n\n\t reader.onloadend = e => {\n\t spark.append(e.target.result); // Append array buffer\n\t currentChunk++;\n\t this.progress = currentChunk / chunks;\n\n\t if (progressFn && typeof progressFn === 'function') {\n\t progressFn(this.progress);\n\t }\n\n\t if (this.aborted) {\n\t md5Fn('aborted');\n\t return\n\t }\n\n\t if (currentChunk < chunks) {\n\t loadNext();\n\t } else {\n\t md5Fn(null, spark.end());\n\t }\n\t };\n\n\t /////////////////////////\n\t function loadNext() {\n\t const start = currentChunk * chunkSize;\n\t const end = start + chunkSize >= file.size ? file.size : start + chunkSize;\n\t reader.readAsArrayBuffer(blobSlice.call(file, start, end));\n\t }\n\t }\n\n\t abort() {\n\t this.aborted = true;\n\t }\n\t}\n\n\treturn BMF;\n\n})));\n\n\n//# sourceURL=webpack://Formio/./node_modules/browser-md5-file/dist/index.umd.js?");
3013
1693
 
3014
1694
  /***/ }),
3015
1695
 
3016
- /***/ "./node_modules/core-js/internals/to-property-key.js":
3017
- /*!***********************************************************!*\
3018
- !*** ./node_modules/core-js/internals/to-property-key.js ***!
3019
- \***********************************************************/
3020
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1696
+ /***/ "./node_modules/compare-versions/lib/esm/compare.js":
1697
+ /*!**********************************************************!*\
1698
+ !*** ./node_modules/compare-versions/lib/esm/compare.js ***!
1699
+ \**********************************************************/
1700
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
3021
1701
 
3022
1702
  "use strict";
3023
- eval("\nvar toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ \"./node_modules/core-js/internals/to-primitive.js\");\nvar isSymbol = __webpack_require__(/*! ../internals/is-symbol */ \"./node_modules/core-js/internals/is-symbol.js\");\n\n// `ToPropertyKey` abstract operation\n// https://tc39.es/ecma262/#sec-topropertykey\nmodule.exports = function (argument) {\n var key = toPrimitive(argument, 'string');\n return isSymbol(key) ? key : key + '';\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/to-property-key.js?");
1703
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ compare: function() { return /* binding */ compare; }\n/* harmony export */ });\n/* harmony import */ var _compareVersions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./compareVersions */ \"./node_modules/compare-versions/lib/esm/compareVersions.js\");\n\n/**\n * Compare [semver](https://semver.org/) version strings using the specified operator.\n *\n * @param v1 First version to compare\n * @param v2 Second version to compare\n * @param operator Allowed arithmetic operator to use\n * @returns `true` if the comparison between the firstVersion and the secondVersion satisfies the operator, `false` otherwise.\n *\n * @example\n * ```\n * compare('10.1.8', '10.0.4', '>'); // return true\n * compare('10.0.1', '10.0.1', '='); // return true\n * compare('10.1.1', '10.2.2', '<'); // return true\n * compare('10.1.1', '10.2.2', '<='); // return true\n * compare('10.1.1', '10.2.2', '>='); // return false\n * ```\n */\nconst compare = (v1, v2, operator) => {\n // validate input operator\n assertValidOperator(operator);\n // since result of compareVersions can only be -1 or 0 or 1\n // a simple map can be used to replace switch\n const res = (0,_compareVersions__WEBPACK_IMPORTED_MODULE_0__.compareVersions)(v1, v2);\n return operatorResMap[operator].includes(res);\n};\nconst operatorResMap = {\n '>': [1],\n '>=': [0, 1],\n '=': [0],\n '<=': [-1, 0],\n '<': [-1],\n '!=': [-1, 1],\n};\nconst allowedOperators = Object.keys(operatorResMap);\nconst assertValidOperator = (op) => {\n if (typeof op !== 'string') {\n throw new TypeError(`Invalid operator type, expected string but got ${typeof op}`);\n }\n if (allowedOperators.indexOf(op) === -1) {\n throw new Error(`Invalid operator, expected one of ${allowedOperators.join('|')}`);\n }\n};\n//# sourceMappingURL=compare.js.map\n\n//# sourceURL=webpack://Formio/./node_modules/compare-versions/lib/esm/compare.js?");
3024
1704
 
3025
1705
  /***/ }),
3026
1706
 
3027
- /***/ "./node_modules/core-js/internals/to-string-tag-support.js":
3028
- /*!*****************************************************************!*\
3029
- !*** ./node_modules/core-js/internals/to-string-tag-support.js ***!
3030
- \*****************************************************************/
3031
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1707
+ /***/ "./node_modules/compare-versions/lib/esm/compareVersions.js":
1708
+ /*!******************************************************************!*\
1709
+ !*** ./node_modules/compare-versions/lib/esm/compareVersions.js ***!
1710
+ \******************************************************************/
1711
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
3032
1712
 
3033
1713
  "use strict";
3034
- eval("\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar test = {};\n\ntest[TO_STRING_TAG] = 'z';\n\nmodule.exports = String(test) === '[object z]';\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/to-string-tag-support.js?");
1714
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ compareVersions: function() { return /* binding */ compareVersions; }\n/* harmony export */ });\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils */ \"./node_modules/compare-versions/lib/esm/utils.js\");\n\n/**\n * Compare [semver](https://semver.org/) version strings to find greater, equal or lesser.\n * This library supports the full semver specification, including comparing versions with different number of digits like `1.0.0`, `1.0`, `1`, and pre-release versions like `1.0.0-alpha`.\n * @param v1 - First version to compare\n * @param v2 - Second version to compare\n * @returns Numeric value compatible with the [Array.sort(fn) interface](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Parameters).\n */\nconst compareVersions = (v1, v2) => {\n // validate input and split into segments\n const n1 = (0,_utils__WEBPACK_IMPORTED_MODULE_0__.validateAndParse)(v1);\n const n2 = (0,_utils__WEBPACK_IMPORTED_MODULE_0__.validateAndParse)(v2);\n // pop off the patch\n const p1 = n1.pop();\n const p2 = n2.pop();\n // validate numbers\n const r = (0,_utils__WEBPACK_IMPORTED_MODULE_0__.compareSegments)(n1, n2);\n if (r !== 0)\n return r;\n // validate pre-release\n if (p1 && p2) {\n return (0,_utils__WEBPACK_IMPORTED_MODULE_0__.compareSegments)(p1.split('.'), p2.split('.'));\n }\n else if (p1 || p2) {\n return p1 ? -1 : 1;\n }\n return 0;\n};\n//# sourceMappingURL=compareVersions.js.map\n\n//# sourceURL=webpack://Formio/./node_modules/compare-versions/lib/esm/compareVersions.js?");
3035
1715
 
3036
1716
  /***/ }),
3037
1717
 
3038
- /***/ "./node_modules/core-js/internals/try-to-string.js":
3039
- /*!*********************************************************!*\
3040
- !*** ./node_modules/core-js/internals/try-to-string.js ***!
3041
- \*********************************************************/
3042
- /***/ (function(module) {
1718
+ /***/ "./node_modules/compare-versions/lib/esm/index.js":
1719
+ /*!********************************************************!*\
1720
+ !*** ./node_modules/compare-versions/lib/esm/index.js ***!
1721
+ \********************************************************/
1722
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
3043
1723
 
3044
1724
  "use strict";
3045
- eval("\nvar $String = String;\n\nmodule.exports = function (argument) {\n try {\n return $String(argument);\n } catch (error) {\n return 'Object';\n }\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/try-to-string.js?");
1725
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ compare: function() { return /* reexport safe */ _compare__WEBPACK_IMPORTED_MODULE_0__.compare; },\n/* harmony export */ compareVersions: function() { return /* reexport safe */ _compareVersions__WEBPACK_IMPORTED_MODULE_1__.compareVersions; },\n/* harmony export */ satisfies: function() { return /* reexport safe */ _satisfies__WEBPACK_IMPORTED_MODULE_2__.satisfies; },\n/* harmony export */ validate: function() { return /* reexport safe */ _validate__WEBPACK_IMPORTED_MODULE_3__.validate; },\n/* harmony export */ validateStrict: function() { return /* reexport safe */ _validate__WEBPACK_IMPORTED_MODULE_3__.validateStrict; }\n/* harmony export */ });\n/* harmony import */ var _compare__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./compare */ \"./node_modules/compare-versions/lib/esm/compare.js\");\n/* harmony import */ var _compareVersions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./compareVersions */ \"./node_modules/compare-versions/lib/esm/compareVersions.js\");\n/* harmony import */ var _satisfies__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./satisfies */ \"./node_modules/compare-versions/lib/esm/satisfies.js\");\n/* harmony import */ var _validate__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./validate */ \"./node_modules/compare-versions/lib/esm/validate.js\");\n\n\n\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://Formio/./node_modules/compare-versions/lib/esm/index.js?");
3046
1726
 
3047
1727
  /***/ }),
3048
1728
 
3049
- /***/ "./node_modules/core-js/internals/uid.js":
3050
- /*!***********************************************!*\
3051
- !*** ./node_modules/core-js/internals/uid.js ***!
3052
- \***********************************************/
3053
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1729
+ /***/ "./node_modules/compare-versions/lib/esm/satisfies.js":
1730
+ /*!************************************************************!*\
1731
+ !*** ./node_modules/compare-versions/lib/esm/satisfies.js ***!
1732
+ \************************************************************/
1733
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
3054
1734
 
3055
1735
  "use strict";
3056
- eval("\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js/internals/function-uncurry-this.js\");\n\nvar id = 0;\nvar postfix = Math.random();\nvar toString = uncurryThis(1.0.toString);\n\nmodule.exports = function (key) {\n return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/uid.js?");
1736
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ satisfies: function() { return /* binding */ satisfies; }\n/* harmony export */ });\n/* harmony import */ var _compare__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./compare */ \"./node_modules/compare-versions/lib/esm/compare.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils */ \"./node_modules/compare-versions/lib/esm/utils.js\");\n\n\n/**\n * Match [npm semver](https://docs.npmjs.com/cli/v6/using-npm/semver) version range.\n *\n * @param version Version number to match\n * @param range Range pattern for version\n * @returns `true` if the version number is within the range, `false` otherwise.\n *\n * @example\n * ```\n * satisfies('1.1.0', '^1.0.0'); // return true\n * satisfies('1.1.0', '~1.0.0'); // return false\n * ```\n */\nconst satisfies = (version, range) => {\n // clean input\n range = range.replace(/([><=]+)\\s+/g, '$1');\n // handle multiple comparators\n if (range.includes('||')) {\n return range.split('||').some((r) => satisfies(version, r));\n }\n else if (range.includes(' - ')) {\n const [a, b] = range.split(' - ', 2);\n return satisfies(version, `>=${a} <=${b}`);\n }\n else if (range.includes(' ')) {\n return range\n .trim()\n .replace(/\\s{2,}/g, ' ')\n .split(' ')\n .every((r) => satisfies(version, r));\n }\n // if no range operator then \"=\"\n const m = range.match(/^([<>=~^]+)/);\n const op = m ? m[1] : '=';\n // if gt/lt/eq then operator compare\n if (op !== '^' && op !== '~')\n return (0,_compare__WEBPACK_IMPORTED_MODULE_0__.compare)(version, range, op);\n // else range of either \"~\" or \"^\" is assumed\n const [v1, v2, v3, , vp] = (0,_utils__WEBPACK_IMPORTED_MODULE_1__.validateAndParse)(version);\n const [r1, r2, r3, , rp] = (0,_utils__WEBPACK_IMPORTED_MODULE_1__.validateAndParse)(range);\n const v = [v1, v2, v3];\n const r = [r1, r2 !== null && r2 !== void 0 ? r2 : 'x', r3 !== null && r3 !== void 0 ? r3 : 'x'];\n // validate pre-release\n if (rp) {\n if (!vp)\n return false;\n if ((0,_utils__WEBPACK_IMPORTED_MODULE_1__.compareSegments)(v, r) !== 0)\n return false;\n if ((0,_utils__WEBPACK_IMPORTED_MODULE_1__.compareSegments)(vp.split('.'), rp.split('.')) === -1)\n return false;\n }\n // first non-zero number\n const nonZero = r.findIndex((v) => v !== '0') + 1;\n // pointer to where segments can be >=\n const i = op === '~' ? 2 : nonZero > 1 ? nonZero : 1;\n // before pointer must be equal\n if ((0,_utils__WEBPACK_IMPORTED_MODULE_1__.compareSegments)(v.slice(0, i), r.slice(0, i)) !== 0)\n return false;\n // after pointer must be >=\n if ((0,_utils__WEBPACK_IMPORTED_MODULE_1__.compareSegments)(v.slice(i), r.slice(i)) === -1)\n return false;\n return true;\n};\n//# sourceMappingURL=satisfies.js.map\n\n//# sourceURL=webpack://Formio/./node_modules/compare-versions/lib/esm/satisfies.js?");
3057
1737
 
3058
1738
  /***/ }),
3059
1739
 
3060
- /***/ "./node_modules/core-js/internals/use-symbol-as-uid.js":
3061
- /*!*************************************************************!*\
3062
- !*** ./node_modules/core-js/internals/use-symbol-as-uid.js ***!
3063
- \*************************************************************/
3064
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1740
+ /***/ "./node_modules/compare-versions/lib/esm/utils.js":
1741
+ /*!********************************************************!*\
1742
+ !*** ./node_modules/compare-versions/lib/esm/utils.js ***!
1743
+ \********************************************************/
1744
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
3065
1745
 
3066
1746
  "use strict";
3067
- eval("\n/* eslint-disable es/no-symbol -- required for testing */\nvar NATIVE_SYMBOL = __webpack_require__(/*! ../internals/symbol-constructor-detection */ \"./node_modules/core-js/internals/symbol-constructor-detection.js\");\n\nmodule.exports = NATIVE_SYMBOL\n && !Symbol.sham\n && typeof Symbol.iterator == 'symbol';\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/use-symbol-as-uid.js?");
1747
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ compareSegments: function() { return /* binding */ compareSegments; },\n/* harmony export */ semver: function() { return /* binding */ semver; },\n/* harmony export */ validateAndParse: function() { return /* binding */ validateAndParse; }\n/* harmony export */ });\nconst semver = /^[v^~<>=]*?(\\d+)(?:\\.([x*]|\\d+)(?:\\.([x*]|\\d+)(?:\\.([x*]|\\d+))?(?:-([\\da-z\\-]+(?:\\.[\\da-z\\-]+)*))?(?:\\+[\\da-z\\-]+(?:\\.[\\da-z\\-]+)*)?)?)?$/i;\nconst validateAndParse = (version) => {\n if (typeof version !== 'string') {\n throw new TypeError('Invalid argument expected string');\n }\n const match = version.match(semver);\n if (!match) {\n throw new Error(`Invalid argument not valid semver ('${version}' received)`);\n }\n match.shift();\n return match;\n};\nconst isWildcard = (s) => s === '*' || s === 'x' || s === 'X';\nconst tryParse = (v) => {\n const n = parseInt(v, 10);\n return isNaN(n) ? v : n;\n};\nconst forceType = (a, b) => typeof a !== typeof b ? [String(a), String(b)] : [a, b];\nconst compareStrings = (a, b) => {\n if (isWildcard(a) || isWildcard(b))\n return 0;\n const [ap, bp] = forceType(tryParse(a), tryParse(b));\n if (ap > bp)\n return 1;\n if (ap < bp)\n return -1;\n return 0;\n};\nconst compareSegments = (a, b) => {\n for (let i = 0; i < Math.max(a.length, b.length); i++) {\n const r = compareStrings(a[i] || '0', b[i] || '0');\n if (r !== 0)\n return r;\n }\n return 0;\n};\n//# sourceMappingURL=utils.js.map\n\n//# sourceURL=webpack://Formio/./node_modules/compare-versions/lib/esm/utils.js?");
3068
1748
 
3069
1749
  /***/ }),
3070
1750
 
3071
- /***/ "./node_modules/core-js/internals/v8-prototype-define-bug.js":
3072
- /*!*******************************************************************!*\
3073
- !*** ./node_modules/core-js/internals/v8-prototype-define-bug.js ***!
3074
- \*******************************************************************/
3075
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1751
+ /***/ "./node_modules/compare-versions/lib/esm/validate.js":
1752
+ /*!***********************************************************!*\
1753
+ !*** ./node_modules/compare-versions/lib/esm/validate.js ***!
1754
+ \***********************************************************/
1755
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
3076
1756
 
3077
1757
  "use strict";
3078
- eval("\nvar DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\n\n// V8 ~ Chrome 36-\n// https://bugs.chromium.org/p/v8/issues/detail?id=3334\nmodule.exports = DESCRIPTORS && fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n return Object.defineProperty(function () { /* empty */ }, 'prototype', {\n value: 42,\n writable: false\n }).prototype !== 42;\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/v8-prototype-define-bug.js?");
1758
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ validate: function() { return /* binding */ validate; },\n/* harmony export */ validateStrict: function() { return /* binding */ validateStrict; }\n/* harmony export */ });\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils */ \"./node_modules/compare-versions/lib/esm/utils.js\");\n\n/**\n * Validate [semver](https://semver.org/) version strings.\n *\n * @param version Version number to validate\n * @returns `true` if the version number is a valid semver version number, `false` otherwise.\n *\n * @example\n * ```\n * validate('1.0.0-rc.1'); // return true\n * validate('1.0-rc.1'); // return false\n * validate('foo'); // return false\n * ```\n */\nconst validate = (version) => typeof version === 'string' && /^[v\\d]/.test(version) && _utils__WEBPACK_IMPORTED_MODULE_0__.semver.test(version);\n/**\n * Validate [semver](https://semver.org/) version strings strictly. Will not accept wildcards and version ranges.\n *\n * @param version Version number to validate\n * @returns `true` if the version number is a valid semver version number `false` otherwise\n *\n * @example\n * ```\n * validate('1.0.0-rc.1'); // return true\n * validate('1.0-rc.1'); // return false\n * validate('foo'); // return false\n * ```\n */\nconst validateStrict = (version) => typeof version === 'string' &&\n /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/.test(version);\n//# sourceMappingURL=validate.js.map\n\n//# sourceURL=webpack://Formio/./node_modules/compare-versions/lib/esm/validate.js?");
3079
1759
 
3080
1760
  /***/ }),
3081
1761
 
3082
- /***/ "./node_modules/core-js/internals/weak-map-basic-detection.js":
3083
- /*!********************************************************************!*\
3084
- !*** ./node_modules/core-js/internals/weak-map-basic-detection.js ***!
3085
- \********************************************************************/
1762
+ /***/ "./node_modules/contra/debounce.js":
1763
+ /*!*****************************************!*\
1764
+ !*** ./node_modules/contra/debounce.js ***!
1765
+ \*****************************************/
3086
1766
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
3087
1767
 
3088
1768
  "use strict";
3089
- eval("\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar isCallable = __webpack_require__(/*! ../internals/is-callable */ \"./node_modules/core-js/internals/is-callable.js\");\n\nvar WeakMap = global.WeakMap;\n\nmodule.exports = isCallable(WeakMap) && /native code/.test(String(WeakMap));\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/weak-map-basic-detection.js?");
1769
+ eval("\n\nvar ticky = __webpack_require__(/*! ticky */ \"./node_modules/ticky/ticky-browser.js\");\n\nmodule.exports = function debounce (fn, args, ctx) {\n if (!fn) { return; }\n ticky(function run () {\n fn.apply(ctx || null, args || []);\n });\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/contra/debounce.js?");
3090
1770
 
3091
1771
  /***/ }),
3092
1772
 
3093
- /***/ "./node_modules/core-js/internals/well-known-symbol.js":
3094
- /*!*************************************************************!*\
3095
- !*** ./node_modules/core-js/internals/well-known-symbol.js ***!
3096
- \*************************************************************/
1773
+ /***/ "./node_modules/contra/emitter.js":
1774
+ /*!****************************************!*\
1775
+ !*** ./node_modules/contra/emitter.js ***!
1776
+ \****************************************/
3097
1777
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
3098
1778
 
3099
1779
  "use strict";
3100
- eval("\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar shared = __webpack_require__(/*! ../internals/shared */ \"./node_modules/core-js/internals/shared.js\");\nvar hasOwn = __webpack_require__(/*! ../internals/has-own-property */ \"./node_modules/core-js/internals/has-own-property.js\");\nvar uid = __webpack_require__(/*! ../internals/uid */ \"./node_modules/core-js/internals/uid.js\");\nvar NATIVE_SYMBOL = __webpack_require__(/*! ../internals/symbol-constructor-detection */ \"./node_modules/core-js/internals/symbol-constructor-detection.js\");\nvar USE_SYMBOL_AS_UID = __webpack_require__(/*! ../internals/use-symbol-as-uid */ \"./node_modules/core-js/internals/use-symbol-as-uid.js\");\n\nvar Symbol = global.Symbol;\nvar WellKnownSymbolsStore = shared('wks');\nvar createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol['for'] || Symbol : Symbol && Symbol.withoutSetter || uid;\n\nmodule.exports = function (name) {\n if (!hasOwn(WellKnownSymbolsStore, name)) {\n WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn(Symbol, name)\n ? Symbol[name]\n : createWellKnownSymbol('Symbol.' + name);\n } return WellKnownSymbolsStore[name];\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/well-known-symbol.js?");
1780
+ eval("\n\nvar atoa = __webpack_require__(/*! atoa */ \"./node_modules/atoa/atoa.js\");\nvar debounce = __webpack_require__(/*! ./debounce */ \"./node_modules/contra/debounce.js\");\n\nmodule.exports = function emitter (thing, options) {\n var opts = options || {};\n var evt = {};\n if (thing === undefined) { thing = {}; }\n thing.on = function (type, fn) {\n if (!evt[type]) {\n evt[type] = [fn];\n } else {\n evt[type].push(fn);\n }\n return thing;\n };\n thing.once = function (type, fn) {\n fn._once = true; // thing.off(fn) still works!\n thing.on(type, fn);\n return thing;\n };\n thing.off = function (type, fn) {\n var c = arguments.length;\n if (c === 1) {\n delete evt[type];\n } else if (c === 0) {\n evt = {};\n } else {\n var et = evt[type];\n if (!et) { return thing; }\n et.splice(et.indexOf(fn), 1);\n }\n return thing;\n };\n thing.emit = function () {\n var args = atoa(arguments);\n return thing.emitterSnapshot(args.shift()).apply(this, args);\n };\n thing.emitterSnapshot = function (type) {\n var et = (evt[type] || []).slice(0);\n return function () {\n var args = atoa(arguments);\n var ctx = this || thing;\n if (type === 'error' && opts.throws !== false && !et.length) { throw args.length === 1 ? args[0] : args; }\n et.forEach(function emitter (listen) {\n if (opts.async) { debounce(listen, args, ctx); } else { listen.apply(ctx, args); }\n if (listen._once) { thing.off(type, listen); }\n });\n return thing;\n };\n };\n return thing;\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/contra/emitter.js?");
3101
1781
 
3102
1782
  /***/ }),
3103
1783
 
3104
- /***/ "./node_modules/core-js/modules/es.array.iterator.js":
3105
- /*!***********************************************************!*\
3106
- !*** ./node_modules/core-js/modules/es.array.iterator.js ***!
3107
- \***********************************************************/
1784
+ /***/ "./node_modules/create-point-cb/dist/bundle.js":
1785
+ /*!*****************************************************!*\
1786
+ !*** ./node_modules/create-point-cb/dist/bundle.js ***!
1787
+ \*****************************************************/
3108
1788
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
3109
1789
 
3110
1790
  "use strict";
3111
- eval("\nvar toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ \"./node_modules/core-js/internals/to-indexed-object.js\");\nvar addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ \"./node_modules/core-js/internals/add-to-unscopables.js\");\nvar Iterators = __webpack_require__(/*! ../internals/iterators */ \"./node_modules/core-js/internals/iterators.js\");\nvar InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ \"./node_modules/core-js/internals/internal-state.js\");\nvar defineProperty = (__webpack_require__(/*! ../internals/object-define-property */ \"./node_modules/core-js/internals/object-define-property.js\").f);\nvar defineIterator = __webpack_require__(/*! ../internals/iterator-define */ \"./node_modules/core-js/internals/iterator-define.js\");\nvar createIterResultObject = __webpack_require__(/*! ../internals/create-iter-result-object */ \"./node_modules/core-js/internals/create-iter-result-object.js\");\nvar IS_PURE = __webpack_require__(/*! ../internals/is-pure */ \"./node_modules/core-js/internals/is-pure.js\");\nvar DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\n\nvar ARRAY_ITERATOR = 'Array Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);\n\n// `Array.prototype.entries` method\n// https://tc39.es/ecma262/#sec-array.prototype.entries\n// `Array.prototype.keys` method\n// https://tc39.es/ecma262/#sec-array.prototype.keys\n// `Array.prototype.values` method\n// https://tc39.es/ecma262/#sec-array.prototype.values\n// `Array.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-array.prototype-@@iterator\n// `CreateArrayIterator` internal method\n// https://tc39.es/ecma262/#sec-createarrayiterator\nmodule.exports = defineIterator(Array, 'Array', function (iterated, kind) {\n setInternalState(this, {\n type: ARRAY_ITERATOR,\n target: toIndexedObject(iterated), // target\n index: 0, // next index\n kind: kind // kind\n });\n// `%ArrayIteratorPrototype%.next` method\n// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next\n}, function () {\n var state = getInternalState(this);\n var target = state.target;\n var kind = state.kind;\n var index = state.index++;\n if (!target || index >= target.length) {\n state.target = undefined;\n return createIterResultObject(undefined, true);\n }\n switch (kind) {\n case 'keys': return createIterResultObject(index, false);\n case 'values': return createIterResultObject(target[index], false);\n } return createIterResultObject([index, target[index]], false);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values%\n// https://tc39.es/ecma262/#sec-createunmappedargumentsobject\n// https://tc39.es/ecma262/#sec-createmappedargumentsobject\nvar values = Iterators.Arguments = Iterators.Array;\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n\n// V8 ~ Chrome 45- bug\nif (!IS_PURE && DESCRIPTORS && values.name !== 'values') try {\n defineProperty(values, 'name', { value: 'values' });\n} catch (error) { /* empty */ }\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.array.iterator.js?");
3112
-
3113
- /***/ }),
3114
-
3115
- /***/ "./node_modules/core-js/modules/es.object.from-entries.js":
3116
- /*!****************************************************************!*\
3117
- !*** ./node_modules/core-js/modules/es.object.from-entries.js ***!
3118
- \****************************************************************/
3119
- /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
3120
-
3121
- "use strict";
3122
- eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar iterate = __webpack_require__(/*! ../internals/iterate */ \"./node_modules/core-js/internals/iterate.js\");\nvar createProperty = __webpack_require__(/*! ../internals/create-property */ \"./node_modules/core-js/internals/create-property.js\");\n\n// `Object.fromEntries` method\n// https://github.com/tc39/proposal-object-from-entries\n$({ target: 'Object', stat: true }, {\n fromEntries: function fromEntries(iterable) {\n var obj = {};\n iterate(iterable, function (k, v) {\n createProperty(obj, k, v);\n }, { AS_ENTRIES: true });\n return obj;\n }\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.object.from-entries.js?");
1791
+ eval("\n\nvar typeFunc = __webpack_require__(/*! type-func */ \"./node_modules/type-func/dist/bundle.js\");\n\nfunction createPointCB(object, options) {\n\n // A persistent object (as opposed to returned object) is used to save memory\n // This is good to prevent layout thrashing, or for games, and such\n\n // NOTE\n // This uses IE fixes which should be OK to remove some day. :)\n // Some speed will be gained by removal of these.\n\n // pointCB should be saved in a variable on return\n // This allows the usage of element.removeEventListener\n\n options = options || {};\n\n var allowUpdate = typeFunc.boolean(options.allowUpdate, true);\n\n /*if(typeof options.allowUpdate === 'function'){\n allowUpdate = options.allowUpdate;\n }else{\n allowUpdate = function(){return true;};\n }*/\n\n return function pointCB(event) {\n\n event = event || window.event; // IE-ism\n object.target = event.target || event.srcElement || event.originalTarget;\n object.element = this;\n object.type = event.type;\n\n if (!allowUpdate(event)) {\n return;\n }\n\n // Support touch\n // http://www.creativebloq.com/javascript/make-your-site-work-touch-devices-51411644\n\n if (event.targetTouches) {\n object.x = event.targetTouches[0].clientX;\n object.y = event.targetTouches[0].clientY;\n object.pageX = event.targetTouches[0].pageX;\n object.pageY = event.targetTouches[0].pageY;\n object.screenX = event.targetTouches[0].screenX;\n object.screenY = event.targetTouches[0].screenY;\n } else {\n\n // If pageX/Y aren't available and clientX/Y are,\n // calculate pageX/Y - logic taken from jQuery.\n // (This is to support old IE)\n // NOTE Hopefully this can be removed soon.\n\n if (event.pageX === null && event.clientX !== null) {\n var eventDoc = event.target && event.target.ownerDocument || document;\n var doc = eventDoc.documentElement;\n var body = eventDoc.body;\n\n object.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);\n object.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);\n } else {\n object.pageX = event.pageX;\n object.pageY = event.pageY;\n }\n\n // pageX, and pageY change with page scroll\n // so we're not going to use those for x, and y.\n // NOTE Most browsers also alias clientX/Y with x/y\n // so that's something to consider down the road.\n\n object.x = event.clientX;\n object.y = event.clientY;\n\n object.screenX = event.screenX;\n object.screenY = event.screenY;\n }\n\n object.clientX = object.x;\n object.clientY = object.y;\n };\n\n //NOTE Remember accessibility, Aria roles, and labels.\n}\n\n/*\ngit remote add origin https://github.com/hollowdoor/create_point_cb.git\ngit push -u origin master\n*/\n\nmodule.exports = createPointCB;\n//# sourceMappingURL=bundle.js.map\n\n\n//# sourceURL=webpack://Formio/./node_modules/create-point-cb/dist/bundle.js?");
3123
1792
 
3124
1793
  /***/ }),
3125
1794
 
3126
- /***/ "./node_modules/core-js/modules/web.dom-collections.iterator.js":
3127
- /*!**********************************************************************!*\
3128
- !*** ./node_modules/core-js/modules/web.dom-collections.iterator.js ***!
3129
- \**********************************************************************/
3130
- /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
1795
+ /***/ "./node_modules/crossvent/src/crossvent.js":
1796
+ /*!*************************************************!*\
1797
+ !*** ./node_modules/crossvent/src/crossvent.js ***!
1798
+ \*************************************************/
1799
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
3131
1800
 
3132
1801
  "use strict";
3133
- eval("\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar DOMIterables = __webpack_require__(/*! ../internals/dom-iterables */ \"./node_modules/core-js/internals/dom-iterables.js\");\nvar DOMTokenListPrototype = __webpack_require__(/*! ../internals/dom-token-list-prototype */ \"./node_modules/core-js/internals/dom-token-list-prototype.js\");\nvar ArrayIteratorMethods = __webpack_require__(/*! ../modules/es.array.iterator */ \"./node_modules/core-js/modules/es.array.iterator.js\");\nvar createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ \"./node_modules/core-js/internals/create-non-enumerable-property.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar ArrayValues = ArrayIteratorMethods.values;\n\nvar handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {\n if (CollectionPrototype) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype[ITERATOR] !== ArrayValues) try {\n createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);\n } catch (error) {\n CollectionPrototype[ITERATOR] = ArrayValues;\n }\n if (!CollectionPrototype[TO_STRING_TAG]) {\n createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);\n }\n if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {\n createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);\n } catch (error) {\n CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];\n }\n }\n }\n};\n\nfor (var COLLECTION_NAME in DOMIterables) {\n handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype, COLLECTION_NAME);\n}\n\nhandlePrototype(DOMTokenListPrototype, 'DOMTokenList');\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/web.dom-collections.iterator.js?");
1802
+ eval("\n\nvar customEvent = __webpack_require__(/*! custom-event */ \"./node_modules/custom-event/index.js\");\nvar eventmap = __webpack_require__(/*! ./eventmap */ \"./node_modules/crossvent/src/eventmap.js\");\nvar doc = __webpack_require__.g.document;\nvar addEvent = addEventEasy;\nvar removeEvent = removeEventEasy;\nvar hardCache = [];\n\nif (!__webpack_require__.g.addEventListener) {\n addEvent = addEventHard;\n removeEvent = removeEventHard;\n}\n\nmodule.exports = {\n add: addEvent,\n remove: removeEvent,\n fabricate: fabricateEvent\n};\n\nfunction addEventEasy (el, type, fn, capturing) {\n return el.addEventListener(type, fn, capturing);\n}\n\nfunction addEventHard (el, type, fn) {\n return el.attachEvent('on' + type, wrap(el, type, fn));\n}\n\nfunction removeEventEasy (el, type, fn, capturing) {\n return el.removeEventListener(type, fn, capturing);\n}\n\nfunction removeEventHard (el, type, fn) {\n var listener = unwrap(el, type, fn);\n if (listener) {\n return el.detachEvent('on' + type, listener);\n }\n}\n\nfunction fabricateEvent (el, type, model) {\n var e = eventmap.indexOf(type) === -1 ? makeCustomEvent() : makeClassicEvent();\n if (el.dispatchEvent) {\n el.dispatchEvent(e);\n } else {\n el.fireEvent('on' + type, e);\n }\n function makeClassicEvent () {\n var e;\n if (doc.createEvent) {\n e = doc.createEvent('Event');\n e.initEvent(type, true, true);\n } else if (doc.createEventObject) {\n e = doc.createEventObject();\n }\n return e;\n }\n function makeCustomEvent () {\n return new customEvent(type, { detail: model });\n }\n}\n\nfunction wrapperFactory (el, type, fn) {\n return function wrapper (originalEvent) {\n var e = originalEvent || __webpack_require__.g.event;\n e.target = e.target || e.srcElement;\n e.preventDefault = e.preventDefault || function preventDefault () { e.returnValue = false; };\n e.stopPropagation = e.stopPropagation || function stopPropagation () { e.cancelBubble = true; };\n e.which = e.which || e.keyCode;\n fn.call(el, e);\n };\n}\n\nfunction wrap (el, type, fn) {\n var wrapper = unwrap(el, type, fn) || wrapperFactory(el, type, fn);\n hardCache.push({\n wrapper: wrapper,\n element: el,\n type: type,\n fn: fn\n });\n return wrapper;\n}\n\nfunction unwrap (el, type, fn) {\n var i = find(el, type, fn);\n if (i) {\n var wrapper = hardCache[i].wrapper;\n hardCache.splice(i, 1); // free up a tad of memory\n return wrapper;\n }\n}\n\nfunction find (el, type, fn) {\n var i, item;\n for (i = 0; i < hardCache.length; i++) {\n item = hardCache[i];\n if (item.element === el && item.type === type && item.fn === fn) {\n return i;\n }\n }\n}\n\n\n//# sourceURL=webpack://Formio/./node_modules/crossvent/src/crossvent.js?");
3134
1803
 
3135
1804
  /***/ }),
3136
1805
 
3137
- /***/ "./node_modules/core-js/stable/object/from-entries.js":
3138
- /*!************************************************************!*\
3139
- !*** ./node_modules/core-js/stable/object/from-entries.js ***!
3140
- \************************************************************/
1806
+ /***/ "./node_modules/crossvent/src/eventmap.js":
1807
+ /*!************************************************!*\
1808
+ !*** ./node_modules/crossvent/src/eventmap.js ***!
1809
+ \************************************************/
3141
1810
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
3142
1811
 
3143
1812
  "use strict";
3144
- eval("\nvar parent = __webpack_require__(/*! ../../es/object/from-entries */ \"./node_modules/core-js/es/object/from-entries.js\");\n__webpack_require__(/*! ../../modules/web.dom-collections.iterator */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nmodule.exports = parent;\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/stable/object/from-entries.js?");
1813
+ eval("\n\nvar eventmap = [];\nvar eventname = '';\nvar ron = /^on/;\n\nfor (eventname in __webpack_require__.g) {\n if (ron.test(eventname)) {\n eventmap.push(eventname.slice(2));\n }\n}\n\nmodule.exports = eventmap;\n\n\n//# sourceURL=webpack://Formio/./node_modules/crossvent/src/eventmap.js?");
3145
1814
 
3146
1815
  /***/ }),
3147
1816
 
3148
- /***/ "./node_modules/create-point-cb/dist/bundle.js":
3149
- /*!*****************************************************!*\
3150
- !*** ./node_modules/create-point-cb/dist/bundle.js ***!
3151
- \*****************************************************/
1817
+ /***/ "./node_modules/custom-event/index.js":
1818
+ /*!********************************************!*\
1819
+ !*** ./node_modules/custom-event/index.js ***!
1820
+ \********************************************/
3152
1821
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
3153
1822
 
3154
- "use strict";
3155
- eval("\n\nvar typeFunc = __webpack_require__(/*! type-func */ \"./node_modules/type-func/dist/bundle.js\");\n\nfunction createPointCB(object, options) {\n\n // A persistent object (as opposed to returned object) is used to save memory\n // This is good to prevent layout thrashing, or for games, and such\n\n // NOTE\n // This uses IE fixes which should be OK to remove some day. :)\n // Some speed will be gained by removal of these.\n\n // pointCB should be saved in a variable on return\n // This allows the usage of element.removeEventListener\n\n options = options || {};\n\n var allowUpdate = typeFunc.boolean(options.allowUpdate, true);\n\n /*if(typeof options.allowUpdate === 'function'){\n allowUpdate = options.allowUpdate;\n }else{\n allowUpdate = function(){return true;};\n }*/\n\n return function pointCB(event) {\n\n event = event || window.event; // IE-ism\n object.target = event.target || event.srcElement || event.originalTarget;\n object.element = this;\n object.type = event.type;\n\n if (!allowUpdate(event)) {\n return;\n }\n\n // Support touch\n // http://www.creativebloq.com/javascript/make-your-site-work-touch-devices-51411644\n\n if (event.targetTouches) {\n object.x = event.targetTouches[0].clientX;\n object.y = event.targetTouches[0].clientY;\n object.pageX = event.targetTouches[0].pageX;\n object.pageY = event.targetTouches[0].pageY;\n object.screenX = event.targetTouches[0].screenX;\n object.screenY = event.targetTouches[0].screenY;\n } else {\n\n // If pageX/Y aren't available and clientX/Y are,\n // calculate pageX/Y - logic taken from jQuery.\n // (This is to support old IE)\n // NOTE Hopefully this can be removed soon.\n\n if (event.pageX === null && event.clientX !== null) {\n var eventDoc = event.target && event.target.ownerDocument || document;\n var doc = eventDoc.documentElement;\n var body = eventDoc.body;\n\n object.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);\n object.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);\n } else {\n object.pageX = event.pageX;\n object.pageY = event.pageY;\n }\n\n // pageX, and pageY change with page scroll\n // so we're not going to use those for x, and y.\n // NOTE Most browsers also alias clientX/Y with x/y\n // so that's something to consider down the road.\n\n object.x = event.clientX;\n object.y = event.clientY;\n\n object.screenX = event.screenX;\n object.screenY = event.screenY;\n }\n\n object.clientX = object.x;\n object.clientY = object.y;\n };\n\n //NOTE Remember accessibility, Aria roles, and labels.\n}\n\n/*\ngit remote add origin https://github.com/hollowdoor/create_point_cb.git\ngit push -u origin master\n*/\n\nmodule.exports = createPointCB;\n//# sourceMappingURL=bundle.js.map\n\n\n//# sourceURL=webpack://Formio/./node_modules/create-point-cb/dist/bundle.js?");
1823
+ eval("\nvar NativeCustomEvent = __webpack_require__.g.CustomEvent;\n\nfunction useNative () {\n try {\n var p = new NativeCustomEvent('cat', { detail: { foo: 'bar' } });\n return 'cat' === p.type && 'bar' === p.detail.foo;\n } catch (e) {\n }\n return false;\n}\n\n/**\n * Cross-browser `CustomEvent` constructor.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent.CustomEvent\n *\n * @public\n */\n\nmodule.exports = useNative() ? NativeCustomEvent :\n\n// IE >= 9\n'undefined' !== typeof document && 'function' === typeof document.createEvent ? function CustomEvent (type, params) {\n var e = document.createEvent('CustomEvent');\n if (params) {\n e.initCustomEvent(type, params.bubbles, params.cancelable, params.detail);\n } else {\n e.initCustomEvent(type, false, false, void 0);\n }\n return e;\n} :\n\n// IE <= 8\nfunction CustomEvent (type, params) {\n var e = document.createEventObject();\n e.type = type;\n if (params) {\n e.bubbles = Boolean(params.bubbles);\n e.cancelable = Boolean(params.cancelable);\n e.detail = params.detail;\n } else {\n e.bubbles = false;\n e.cancelable = false;\n e.detail = void 0;\n }\n return e;\n}\n\n\n//# sourceURL=webpack://Formio/./node_modules/custom-event/index.js?");
3156
1824
 
3157
1825
  /***/ }),
3158
1826
 
@@ -3260,23 +1928,25 @@ eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPAC
3260
1928
 
3261
1929
  /***/ }),
3262
1930
 
3263
- /***/ "./node_modules/dragula/dist/dragula.min.js":
3264
- /*!**************************************************!*\
3265
- !*** ./node_modules/dragula/dist/dragula.min.js ***!
3266
- \**************************************************/
3267
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1931
+ /***/ "./node_modules/dragula/classes.js":
1932
+ /*!*****************************************!*\
1933
+ !*** ./node_modules/dragula/classes.js ***!
1934
+ \*****************************************/
1935
+ /***/ (function(module) {
3268
1936
 
3269
- eval("var require;!function(e){ true?module.exports=e():0}(function(){return function o(r,i,u){function c(t,e){if(!i[t]){if(!r[t]){var n=undefined;if(!e&&n)return require(t,!0);if(a)return a(t,!0);throw(n=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",__webpack_require__(\"./node_modules/dragula/dist sync recursive\")}n=i[t]={exports:{}},r[t][0].call(n.exports,function(e){return c(r[t][1][e]||e)},n,n.exports,o,r,i,u)}return i[t].exports}for(var a=undefined,e=0;e<u.length;e++)c(u[e]);return c}({1:[function(e,t,n){\"use strict\";var o={},r=\"(?:^|\\\\s)\",i=\"(?:\\\\s|$)\";function u(e){var t=o[e];return t?t.lastIndex=0:o[e]=t=new RegExp(r+e+i,\"g\"),t}t.exports={add:function(e,t){var n=e.className;n.length?u(t).test(n)||(e.className+=\" \"+t):e.className=t},rm:function(e,t){e.className=e.className.replace(u(t),\" \").trim()}}},{}],2:[function(e,t,n){(function(r){\"use strict\";var M=e(\"contra/emitter\"),k=e(\"crossvent\"),j=e(\"./classes\"),R=document,q=R.documentElement;function U(e,t,n,o){r.navigator.pointerEnabled?k[t](e,{mouseup:\"pointerup\",mousedown:\"pointerdown\",mousemove:\"pointermove\"}[n],o):r.navigator.msPointerEnabled?k[t](e,{mouseup:\"MSPointerUp\",mousedown:\"MSPointerDown\",mousemove:\"MSPointerMove\"}[n],o):(k[t](e,{mouseup:\"touchend\",mousedown:\"touchstart\",mousemove:\"touchmove\"}[n],o),k[t](e,n,o))}function K(e){if(void 0!==e.touches)return e.touches.length;if(void 0!==e.which&&0!==e.which)return e.which;if(void 0!==e.buttons)return e.buttons;e=e.button;return void 0!==e?1&e?1:2&e?3:4&e?2:0:void 0}function z(e,t){return void 0!==r[t]?r[t]:(q.clientHeight?q:R.body)[e]}function H(e,t,n){var o=(e=e||{}).className||\"\";return e.className+=\" gu-hide\",n=R.elementFromPoint(t,n),e.className=o,n}function V(){return!1}function $(){return!0}function G(e){return e.width||e.right-e.left}function J(e){return e.height||e.bottom-e.top}function Q(e){return e.parentNode===R?null:e.parentNode}function W(e){return\"INPUT\"===e.tagName||\"TEXTAREA\"===e.tagName||\"SELECT\"===e.tagName||function e(t){if(!t)return!1;if(\"false\"===t.contentEditable)return!1;if(\"true\"===t.contentEditable)return!0;return e(Q(t))}(e)}function Z(t){return t.nextElementSibling||function(){var e=t;for(;e=e.nextSibling,e&&1!==e.nodeType;);return e}()}function ee(e,t){var t=(n=t).targetTouches&&n.targetTouches.length?n.targetTouches[0]:n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,n={pageX:\"clientX\",pageY:\"clientY\"};return e in n&&!(e in t)&&n[e]in t&&(e=n[e]),t[e]}t.exports=function(e,t){var l,f,s,d,m,o,r,v,p,h,n;1===arguments.length&&!1===Array.isArray(e)&&(t=e,e=[]);var i,g=null,y=t||{};void 0===y.moves&&(y.moves=$),void 0===y.accepts&&(y.accepts=$),void 0===y.invalid&&(y.invalid=function(){return!1}),void 0===y.containers&&(y.containers=e||[]),void 0===y.isContainer&&(y.isContainer=V),void 0===y.copy&&(y.copy=!1),void 0===y.copySortSource&&(y.copySortSource=!1),void 0===y.revertOnSpill&&(y.revertOnSpill=!1),void 0===y.removeOnSpill&&(y.removeOnSpill=!1),void 0===y.direction&&(y.direction=\"vertical\"),void 0===y.ignoreInputTextSelection&&(y.ignoreInputTextSelection=!0),void 0===y.mirrorContainer&&(y.mirrorContainer=R.body);var w=M({containers:y.containers,start:function(e){e=S(e);e&&C(e)},end:O,cancel:L,remove:X,destroy:function(){c(!0),N({})},canMove:function(e){return!!S(e)},dragging:!1});return!0===y.removeOnSpill&&w.on(\"over\",function(e){j.rm(e,\"gu-hide\")}).on(\"out\",function(e){w.dragging&&j.add(e,\"gu-hide\")}),c(),w;function u(e){return-1!==w.containers.indexOf(e)||y.isContainer(e)}function c(e){e=e?\"remove\":\"add\";U(q,e,\"mousedown\",E),U(q,e,\"mouseup\",N)}function a(e){U(q,e?\"remove\":\"add\",\"mousemove\",x)}function b(e){e=e?\"remove\":\"add\";k[e](q,\"selectstart\",T),k[e](q,\"click\",T)}function T(e){i&&e.preventDefault()}function E(e){var t,n;o=e.clientX,r=e.clientY,1!==K(e)||e.metaKey||e.ctrlKey||(n=S(t=e.target))&&(i=n,a(),\"mousedown\"===e.type&&(W(t)?t.focus():e.preventDefault()))}function x(e){if(i)if(0!==K(e)){if(!(void 0!==e.clientX&&Math.abs(e.clientX-o)<=(y.slideFactorX||0)&&void 0!==e.clientY&&Math.abs(e.clientY-r)<=(y.slideFactorY||0))){if(y.ignoreInputTextSelection){var t=ee(\"clientX\",e)||0,n=ee(\"clientY\",e)||0;if(W(R.elementFromPoint(t,n)))return}n=i;a(!0),b(),O(),C(n);n=function(e){e=e.getBoundingClientRect();return{left:e.left+z(\"scrollLeft\",\"pageXOffset\"),top:e.top+z(\"scrollTop\",\"pageYOffset\")}}(s);d=ee(\"pageX\",e)-n.left,m=ee(\"pageY\",e)-n.top,j.add(h||s,\"gu-transit\"),function(){if(l)return;var e=s.getBoundingClientRect();(l=s.cloneNode(!0)).style.width=G(e)+\"px\",l.style.height=J(e)+\"px\",j.rm(l,\"gu-transit\"),j.add(l,\"gu-mirror\"),y.mirrorContainer.appendChild(l),U(q,\"add\",\"mousemove\",P),j.add(y.mirrorContainer,\"gu-unselectable\"),w.emit(\"cloned\",l,s,\"mirror\")}(),P(e)}}else N({})}function S(e){if(!(w.dragging&&l||u(e))){for(var t=e;Q(e)&&!1===u(Q(e));){if(y.invalid(e,t))return;if(!(e=Q(e)))return}var n=Q(e);if(n)if(!y.invalid(e,t))if(y.moves(e,n,t,Z(e)))return{item:e,source:n}}}function C(e){var t,n;t=e.item,n=e.source,(\"boolean\"==typeof y.copy?y.copy:y.copy(t,n))&&(h=e.item.cloneNode(!0),w.emit(\"cloned\",h,e.item,\"copy\")),f=e.source,s=e.item,v=p=Z(e.item),w.dragging=!0,w.emit(\"drag\",s,f)}function O(){var e;w.dragging&&_(e=h||s,Q(e))}function I(){a(!(i=!1)),b(!0)}function N(e){var t,n;I(),w.dragging&&(t=h||s,n=ee(\"clientX\",e)||0,e=ee(\"clientY\",e)||0,(e=B(H(l,n,e),n,e))&&(h&&y.copySortSource||!h||e!==f)?_(t,e):(y.removeOnSpill?X:L)())}function _(e,t){var n=Q(e);h&&y.copySortSource&&t===f&&n.removeChild(s),A(t)?w.emit(\"cancel\",e,f,f):w.emit(\"drop\",e,t,f,p),Y()}function X(){var e,t;w.dragging&&((t=Q(e=h||s))&&t.removeChild(e),w.emit(h?\"cancel\":\"remove\",e,t,f),Y())}function L(e){var t,n,o;w.dragging&&(t=0<arguments.length?e:y.revertOnSpill,!1===(e=A(o=Q(n=h||s)))&&t&&(h?o&&o.removeChild(h):f.insertBefore(n,v)),e||t?w.emit(\"cancel\",n,f,f):w.emit(\"drop\",n,o,f,p),Y())}function Y(){var e=h||s;I(),l&&(j.rm(y.mirrorContainer,\"gu-unselectable\"),U(q,\"remove\",\"mousemove\",P),Q(l).removeChild(l),l=null),e&&j.rm(e,\"gu-transit\"),n&&clearTimeout(n),w.dragging=!1,g&&w.emit(\"out\",e,g,f),w.emit(\"dragend\",e),f=s=h=v=p=n=g=null}function A(e,t){t=void 0!==t?t:l?p:Z(h||s);return e===f&&t===v}function B(t,n,o){for(var r=t;r&&!function(){if(!1===u(r))return!1;var e=D(r,t),e=F(r,e,n,o);if(A(r,e))return!0;return y.accepts(s,r,f,e)}();)r=Q(r);return r}function P(e){if(l){e.preventDefault();var t=ee(\"clientX\",e)||0,n=ee(\"clientY\",e)||0,o=t-d,r=n-m;l.style.left=o+\"px\",l.style.top=r+\"px\";var i=h||s,e=H(l,t,n),o=B(e,t,n),u=null!==o&&o!==g;!u&&null!==o||(g&&a(\"out\"),g=o,u&&a(\"over\"));r=Q(i);if(o!==f||!h||y.copySortSource){var c,e=D(o,e);if(null!==e)c=F(o,e,t,n);else{if(!0!==y.revertOnSpill||h)return void(h&&r&&r.removeChild(i));c=v,o=f}(null===c&&u||c!==i&&c!==Z(i))&&(p=c,o.insertBefore(i,c),w.emit(\"shadow\",i,o,f))}else r&&r.removeChild(i)}function a(e){w.emit(e,i,g,f)}}function D(e,t){for(var n=t;n!==e&&Q(n)!==e;)n=Q(n);return n===q?null:n}function F(r,t,i,u){var c=\"horizontal\"===y.direction;return(t!==r?function(){var e=t.getBoundingClientRect();if(c)return n(i>e.left+G(e)/2);return n(u>e.top+J(e)/2)}:function(){var e,t,n,o=r.children.length;for(e=0;e<o;e++){if(t=r.children[e],n=t.getBoundingClientRect(),c&&n.left+n.width/2>i)return t;if(!c&&n.top+n.height/2>u)return t}return null})();function n(e){return e?Z(t):t}}}}).call(this,\"undefined\"!=typeof __webpack_require__.g?__webpack_require__.g:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"./classes\":1,\"contra/emitter\":5,crossvent:6}],3:[function(e,t,n){t.exports=function(e,t){return Array.prototype.slice.call(e,t)}},{}],4:[function(e,t,n){\"use strict\";var o=e(\"ticky\");t.exports=function(e,t,n){e&&o(function(){e.apply(n||null,t||[])})}},{ticky:10}],5:[function(e,t,n){\"use strict\";var c=e(\"atoa\"),a=e(\"./debounce\");t.exports=function(r,e){var i=e||{},u={};return void 0===r&&(r={}),r.on=function(e,t){return u[e]?u[e].push(t):u[e]=[t],r},r.once=function(e,t){return t._once=!0,r.on(e,t),r},r.off=function(e,t){var n=arguments.length;if(1===n)delete u[e];else if(0===n)u={};else{e=u[e];if(!e)return r;e.splice(e.indexOf(t),1)}return r},r.emit=function(){var e=c(arguments);return r.emitterSnapshot(e.shift()).apply(this,e)},r.emitterSnapshot=function(o){var e=(u[o]||[]).slice(0);return function(){var t=c(arguments),n=this||r;if(\"error\"===o&&!1!==i.throws&&!e.length)throw 1===t.length?t[0]:t;return e.forEach(function(e){i.async?a(e,t,n):e.apply(n,t),e._once&&r.off(o,e)}),r}},r}},{\"./debounce\":4,atoa:3}],6:[function(n,o,e){(function(r){\"use strict\";var i=n(\"custom-event\"),u=n(\"./eventmap\"),c=r.document,e=function(e,t,n,o){return e.addEventListener(t,n,o)},t=function(e,t,n,o){return e.removeEventListener(t,n,o)},a=[];function l(e,t,n){t=function(e,t,n){var o,r;for(o=0;o<a.length;o++)if((r=a[o]).element===e&&r.type===t&&r.fn===n)return o}(e,t,n);if(t){n=a[t].wrapper;return a.splice(t,1),n}}r.addEventListener||(e=function(e,t,n){return e.attachEvent(\"on\"+t,function(e,t,n){var o=l(e,t,n)||function(n,o){return function(e){var t=e||r.event;t.target=t.target||t.srcElement,t.preventDefault=t.preventDefault||function(){t.returnValue=!1},t.stopPropagation=t.stopPropagation||function(){t.cancelBubble=!0},t.which=t.which||t.keyCode,o.call(n,t)}}(e,n);return a.push({wrapper:o,element:e,type:t,fn:n}),o}(e,t,n))},t=function(e,t,n){n=l(e,t,n);if(n)return e.detachEvent(\"on\"+t,n)}),o.exports={add:e,remove:t,fabricate:function(e,t,n){var o=-1===u.indexOf(t)?new i(t,{detail:n}):function(){var e;c.createEvent?(e=c.createEvent(\"Event\")).initEvent(t,!0,!0):c.createEventObject&&(e=c.createEventObject());return e}();e.dispatchEvent?e.dispatchEvent(o):e.fireEvent(\"on\"+t,o)}}}).call(this,\"undefined\"!=typeof __webpack_require__.g?__webpack_require__.g:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"./eventmap\":7,\"custom-event\":8}],7:[function(e,r,t){(function(e){\"use strict\";var t=[],n=\"\",o=/^on/;for(n in e)o.test(n)&&t.push(n.slice(2));r.exports=t}).call(this,\"undefined\"!=typeof __webpack_require__.g?__webpack_require__.g:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{}],8:[function(e,n,t){(function(e){var t=e.CustomEvent;n.exports=function(){try{var e=new t(\"cat\",{detail:{foo:\"bar\"}});return\"cat\"===e.type&&\"bar\"===e.detail.foo}catch(e){}}()?t:\"undefined\"!=typeof document&&\"function\"==typeof document.createEvent?function(e,t){var n=document.createEvent(\"CustomEvent\");return t?n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail):n.initCustomEvent(e,!1,!1,void 0),n}:function(e,t){var n=document.createEventObject();return n.type=e,t?(n.bubbles=Boolean(t.bubbles),n.cancelable=Boolean(t.cancelable),n.detail=t.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n}}).call(this,\"undefined\"!=typeof __webpack_require__.g?__webpack_require__.g:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{}],9:[function(e,t,n){var o,r,t=t.exports={};function i(){throw new Error(\"setTimeout has not been defined\")}function u(){throw new Error(\"clearTimeout has not been defined\")}function c(t){if(o===setTimeout)return setTimeout(t,0);if((o===i||!o)&&setTimeout)return o=setTimeout,setTimeout(t,0);try{return o(t,0)}catch(e){try{return o.call(null,t,0)}catch(e){return o.call(this,t,0)}}}!function(){try{o=\"function\"==typeof setTimeout?setTimeout:i}catch(e){o=i}try{r=\"function\"==typeof clearTimeout?clearTimeout:u}catch(e){r=u}}();var a,l=[],f=!1,s=-1;function d(){f&&a&&(f=!1,a.length?l=a.concat(l):s=-1,l.length&&m())}function m(){if(!f){var e=c(d);f=!0;for(var t=l.length;t;){for(a=l,l=[];++s<t;)a&&a[s].run();s=-1,t=l.length}a=null,f=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===u||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(e)}}function v(e,t){this.fun=e,this.array=t}function p(){}t.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new v(e,t)),1!==l.length||f||c(m)},v.prototype.run=function(){this.fun.apply(null,this.array)},t.title=\"browser\",t.browser=!0,t.env={},t.argv=[],t.version=\"\",t.versions={},t.on=p,t.addListener=p,t.once=p,t.off=p,t.removeListener=p,t.removeAllListeners=p,t.emit=p,t.prependListener=p,t.prependOnceListener=p,t.listeners=function(e){return[]},t.binding=function(e){throw new Error(\"process.binding is not supported\")},t.cwd=function(){return\"/\"},t.chdir=function(e){throw new Error(\"process.chdir is not supported\")},t.umask=function(){return 0}},{}],10:[function(e,n,t){(function(t){var e=\"function\"==typeof t?function(e){t(e)}:function(e){setTimeout(e,0)};n.exports=e}).call(this,e(\"timers\").setImmediate)},{timers:11}],11:[function(a,e,l){(function(e,t){var o=a(\"process/browser.js\").nextTick,n=Function.prototype.apply,r=Array.prototype.slice,i={},u=0;function c(e,t){this._id=e,this._clearFn=t}l.setTimeout=function(){return new c(n.call(setTimeout,window,arguments),clearTimeout)},l.setInterval=function(){return new c(n.call(setInterval,window,arguments),clearInterval)},l.clearTimeout=l.clearInterval=function(e){e.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},l.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},l.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},l._unrefActive=l.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;0<=t&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},l.setImmediate=\"function\"==typeof e?e:function(e){var t=u++,n=!(arguments.length<2)&&r.call(arguments,1);return i[t]=!0,o(function(){i[t]&&(n?e.apply(null,n):e.call(null),l.clearImmediate(t))}),t},l.clearImmediate=\"function\"==typeof t?t:function(e){delete i[e]}}).call(this,a(\"timers\").setImmediate,a(\"timers\").clearImmediate)},{\"process/browser.js\":9,timers:11}]},{},[2])(2)});\n\n//# sourceURL=webpack://Formio/./node_modules/dragula/dist/dragula.min.js?");
1937
+ "use strict";
1938
+ eval("\n\nvar cache = {};\nvar start = '(?:^|\\\\s)';\nvar end = '(?:\\\\s|$)';\n\nfunction lookupClass (className) {\n var cached = cache[className];\n if (cached) {\n cached.lastIndex = 0;\n } else {\n cache[className] = cached = new RegExp(start + className + end, 'g');\n }\n return cached;\n}\n\nfunction addClass (el, className) {\n var current = el.className;\n if (!current.length) {\n el.className = className;\n } else if (!lookupClass(className).test(current)) {\n el.className += ' ' + className;\n }\n}\n\nfunction rmClass (el, className) {\n el.className = el.className.replace(lookupClass(className), ' ').trim();\n}\n\nmodule.exports = {\n add: addClass,\n rm: rmClass\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/dragula/classes.js?");
3270
1939
 
3271
1940
  /***/ }),
3272
1941
 
3273
- /***/ "./node_modules/dragula/dist sync recursive":
1942
+ /***/ "./node_modules/dragula/dragula.js":
3274
1943
  /*!*****************************************!*\
3275
- !*** ./node_modules/dragula/dist/ sync ***!
1944
+ !*** ./node_modules/dragula/dragula.js ***!
3276
1945
  \*****************************************/
3277
- /***/ (function(module) {
1946
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
3278
1947
 
3279
- eval("function webpackEmptyContext(req) {\n\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\te.code = 'MODULE_NOT_FOUND';\n\tthrow e;\n}\nwebpackEmptyContext.keys = function() { return []; };\nwebpackEmptyContext.resolve = webpackEmptyContext;\nwebpackEmptyContext.id = \"./node_modules/dragula/dist sync recursive\";\nmodule.exports = webpackEmptyContext;\n\n//# sourceURL=webpack://Formio/./node_modules/dragula/dist/_sync?");
1948
+ "use strict";
1949
+ eval("\n\nvar emitter = __webpack_require__(/*! contra/emitter */ \"./node_modules/contra/emitter.js\");\nvar crossvent = __webpack_require__(/*! crossvent */ \"./node_modules/crossvent/src/crossvent.js\");\nvar classes = __webpack_require__(/*! ./classes */ \"./node_modules/dragula/classes.js\");\nvar doc = document;\nvar documentElement = doc.documentElement;\n\nfunction dragula (initialContainers, options) {\n var len = arguments.length;\n if (len === 1 && Array.isArray(initialContainers) === false) {\n options = initialContainers;\n initialContainers = [];\n }\n var _mirror; // mirror image\n var _source; // source container\n var _item; // item being dragged\n var _offsetX; // reference x\n var _offsetY; // reference y\n var _moveX; // reference move x\n var _moveY; // reference move y\n var _initialSibling; // reference sibling when grabbed\n var _currentSibling; // reference sibling now\n var _copy; // item used for copying\n var _renderTimer; // timer for setTimeout renderMirrorImage\n var _lastDropTarget = null; // last container item was over\n var _grabbed; // holds mousedown context until first mousemove\n\n var o = options || {};\n if (o.moves === void 0) { o.moves = always; }\n if (o.accepts === void 0) { o.accepts = always; }\n if (o.invalid === void 0) { o.invalid = invalidTarget; }\n if (o.containers === void 0) { o.containers = initialContainers || []; }\n if (o.isContainer === void 0) { o.isContainer = never; }\n if (o.copy === void 0) { o.copy = false; }\n if (o.copySortSource === void 0) { o.copySortSource = false; }\n if (o.revertOnSpill === void 0) { o.revertOnSpill = false; }\n if (o.removeOnSpill === void 0) { o.removeOnSpill = false; }\n if (o.direction === void 0) { o.direction = 'vertical'; }\n if (o.ignoreInputTextSelection === void 0) { o.ignoreInputTextSelection = true; }\n if (o.mirrorContainer === void 0) { o.mirrorContainer = doc.body; }\n\n var drake = emitter({\n containers: o.containers,\n start: manualStart,\n end: end,\n cancel: cancel,\n remove: remove,\n destroy: destroy,\n canMove: canMove,\n dragging: false\n });\n\n if (o.removeOnSpill === true) {\n drake.on('over', spillOver).on('out', spillOut);\n }\n\n events();\n\n return drake;\n\n function isContainer (el) {\n return drake.containers.indexOf(el) !== -1 || o.isContainer(el);\n }\n\n function events (remove) {\n var op = remove ? 'remove' : 'add';\n touchy(documentElement, op, 'mousedown', grab);\n touchy(documentElement, op, 'mouseup', release);\n }\n\n function eventualMovements (remove) {\n var op = remove ? 'remove' : 'add';\n touchy(documentElement, op, 'mousemove', startBecauseMouseMoved);\n }\n\n function movements (remove) {\n var op = remove ? 'remove' : 'add';\n crossvent[op](documentElement, 'selectstart', preventGrabbed); // IE8\n crossvent[op](documentElement, 'click', preventGrabbed);\n }\n\n function destroy () {\n events(true);\n release({});\n }\n\n function preventGrabbed (e) {\n if (_grabbed) {\n e.preventDefault();\n }\n }\n\n function grab (e) {\n _moveX = e.clientX;\n _moveY = e.clientY;\n\n var ignore = whichMouseButton(e) !== 1 || e.metaKey || e.ctrlKey;\n if (ignore) {\n return; // we only care about honest-to-god left clicks and touch events\n }\n var item = e.target;\n var context = canStart(item);\n if (!context) {\n return;\n }\n _grabbed = context;\n eventualMovements();\n if (e.type === 'mousedown') {\n if (isInput(item)) { // see also: https://github.com/bevacqua/dragula/issues/208\n item.focus(); // fixes https://github.com/bevacqua/dragula/issues/176\n } else {\n e.preventDefault(); // fixes https://github.com/bevacqua/dragula/issues/155\n }\n }\n }\n\n function startBecauseMouseMoved (e) {\n if (!_grabbed) {\n return;\n }\n if (whichMouseButton(e) === 0) {\n release({});\n return; // when text is selected on an input and then dragged, mouseup doesn't fire. this is our only hope\n }\n\n // truthy check fixes #239, equality fixes #207, fixes #501\n if ((e.clientX !== void 0 && Math.abs(e.clientX - _moveX) <= (o.slideFactorX || 0)) &&\n (e.clientY !== void 0 && Math.abs(e.clientY - _moveY) <= (o.slideFactorY || 0))) {\n return;\n }\n\n if (o.ignoreInputTextSelection) {\n var clientX = getCoord('clientX', e) || 0;\n var clientY = getCoord('clientY', e) || 0;\n var elementBehindCursor = doc.elementFromPoint(clientX, clientY);\n if (isInput(elementBehindCursor)) {\n return;\n }\n }\n\n var grabbed = _grabbed; // call to end() unsets _grabbed\n eventualMovements(true);\n movements();\n end();\n start(grabbed);\n\n var offset = getOffset(_item);\n _offsetX = getCoord('pageX', e) - offset.left;\n _offsetY = getCoord('pageY', e) - offset.top;\n\n classes.add(_copy || _item, 'gu-transit');\n renderMirrorImage();\n drag(e);\n }\n\n function canStart (item) {\n if (drake.dragging && _mirror) {\n return;\n }\n if (isContainer(item)) {\n return; // don't drag container itself\n }\n var handle = item;\n while (getParent(item) && isContainer(getParent(item)) === false) {\n if (o.invalid(item, handle)) {\n return;\n }\n item = getParent(item); // drag target should be a top element\n if (!item) {\n return;\n }\n }\n var source = getParent(item);\n if (!source) {\n return;\n }\n if (o.invalid(item, handle)) {\n return;\n }\n\n var movable = o.moves(item, source, handle, nextEl(item));\n if (!movable) {\n return;\n }\n\n return {\n item: item,\n source: source\n };\n }\n\n function canMove (item) {\n return !!canStart(item);\n }\n\n function manualStart (item) {\n var context = canStart(item);\n if (context) {\n start(context);\n }\n }\n\n function start (context) {\n if (isCopy(context.item, context.source)) {\n _copy = context.item.cloneNode(true);\n drake.emit('cloned', _copy, context.item, 'copy');\n }\n\n _source = context.source;\n _item = context.item;\n _initialSibling = _currentSibling = nextEl(context.item);\n\n drake.dragging = true;\n drake.emit('drag', _item, _source);\n }\n\n function invalidTarget () {\n return false;\n }\n\n function end () {\n if (!drake.dragging) {\n return;\n }\n var item = _copy || _item;\n drop(item, getParent(item));\n }\n\n function ungrab () {\n _grabbed = false;\n eventualMovements(true);\n movements(true);\n }\n\n function release (e) {\n ungrab();\n\n if (!drake.dragging) {\n return;\n }\n var item = _copy || _item;\n var clientX = getCoord('clientX', e) || 0;\n var clientY = getCoord('clientY', e) || 0;\n var elementBehindCursor = getElementBehindPoint(_mirror, clientX, clientY);\n var dropTarget = findDropTarget(elementBehindCursor, clientX, clientY);\n if (dropTarget && ((_copy && o.copySortSource) || (!_copy || dropTarget !== _source))) {\n drop(item, dropTarget);\n } else if (o.removeOnSpill) {\n remove();\n } else {\n cancel();\n }\n }\n\n function drop (item, target) {\n var parent = getParent(item);\n if (_copy && o.copySortSource && target === _source) {\n parent.removeChild(_item);\n }\n if (isInitialPlacement(target)) {\n drake.emit('cancel', item, _source, _source);\n } else {\n drake.emit('drop', item, target, _source, _currentSibling);\n }\n cleanup();\n }\n\n function remove () {\n if (!drake.dragging) {\n return;\n }\n var item = _copy || _item;\n var parent = getParent(item);\n if (parent) {\n parent.removeChild(item);\n }\n drake.emit(_copy ? 'cancel' : 'remove', item, parent, _source);\n cleanup();\n }\n\n function cancel (revert) {\n if (!drake.dragging) {\n return;\n }\n var reverts = arguments.length > 0 ? revert : o.revertOnSpill;\n var item = _copy || _item;\n var parent = getParent(item);\n var initial = isInitialPlacement(parent);\n if (initial === false && reverts) {\n if (_copy) {\n if (parent) {\n parent.removeChild(_copy);\n }\n } else {\n _source.insertBefore(item, _initialSibling);\n }\n }\n if (initial || reverts) {\n drake.emit('cancel', item, _source, _source);\n } else {\n drake.emit('drop', item, parent, _source, _currentSibling);\n }\n cleanup();\n }\n\n function cleanup () {\n var item = _copy || _item;\n ungrab();\n removeMirrorImage();\n if (item) {\n classes.rm(item, 'gu-transit');\n }\n if (_renderTimer) {\n clearTimeout(_renderTimer);\n }\n drake.dragging = false;\n if (_lastDropTarget) {\n drake.emit('out', item, _lastDropTarget, _source);\n }\n drake.emit('dragend', item);\n _source = _item = _copy = _initialSibling = _currentSibling = _renderTimer = _lastDropTarget = null;\n }\n\n function isInitialPlacement (target, s) {\n var sibling;\n if (s !== void 0) {\n sibling = s;\n } else if (_mirror) {\n sibling = _currentSibling;\n } else {\n sibling = nextEl(_copy || _item);\n }\n return target === _source && sibling === _initialSibling;\n }\n\n function findDropTarget (elementBehindCursor, clientX, clientY) {\n var target = elementBehindCursor;\n while (target && !accepted()) {\n target = getParent(target);\n }\n return target;\n\n function accepted () {\n var droppable = isContainer(target);\n if (droppable === false) {\n return false;\n }\n\n var immediate = getImmediateChild(target, elementBehindCursor);\n var reference = getReference(target, immediate, clientX, clientY);\n var initial = isInitialPlacement(target, reference);\n if (initial) {\n return true; // should always be able to drop it right back where it was\n }\n return o.accepts(_item, target, _source, reference);\n }\n }\n\n function drag (e) {\n if (!_mirror) {\n return;\n }\n e.preventDefault();\n\n var clientX = getCoord('clientX', e) || 0;\n var clientY = getCoord('clientY', e) || 0;\n var x = clientX - _offsetX;\n var y = clientY - _offsetY;\n\n _mirror.style.left = x + 'px';\n _mirror.style.top = y + 'px';\n\n var item = _copy || _item;\n var elementBehindCursor = getElementBehindPoint(_mirror, clientX, clientY);\n var dropTarget = findDropTarget(elementBehindCursor, clientX, clientY);\n var changed = dropTarget !== null && dropTarget !== _lastDropTarget;\n if (changed || dropTarget === null) {\n out();\n _lastDropTarget = dropTarget;\n over();\n }\n var parent = getParent(item);\n if (dropTarget === _source && _copy && !o.copySortSource) {\n if (parent) {\n parent.removeChild(item);\n }\n return;\n }\n var reference;\n var immediate = getImmediateChild(dropTarget, elementBehindCursor);\n if (immediate !== null) {\n reference = getReference(dropTarget, immediate, clientX, clientY);\n } else if (o.revertOnSpill === true && !_copy) {\n reference = _initialSibling;\n dropTarget = _source;\n } else {\n if (_copy && parent) {\n parent.removeChild(item);\n }\n return;\n }\n if (\n (reference === null && changed) ||\n reference !== item &&\n reference !== nextEl(item)\n ) {\n _currentSibling = reference;\n dropTarget.insertBefore(item, reference);\n drake.emit('shadow', item, dropTarget, _source);\n }\n function moved (type) { drake.emit(type, item, _lastDropTarget, _source); }\n function over () { if (changed) { moved('over'); } }\n function out () { if (_lastDropTarget) { moved('out'); } }\n }\n\n function spillOver (el) {\n classes.rm(el, 'gu-hide');\n }\n\n function spillOut (el) {\n if (drake.dragging) { classes.add(el, 'gu-hide'); }\n }\n\n function renderMirrorImage () {\n if (_mirror) {\n return;\n }\n var rect = _item.getBoundingClientRect();\n _mirror = _item.cloneNode(true);\n _mirror.style.width = getRectWidth(rect) + 'px';\n _mirror.style.height = getRectHeight(rect) + 'px';\n classes.rm(_mirror, 'gu-transit');\n classes.add(_mirror, 'gu-mirror');\n o.mirrorContainer.appendChild(_mirror);\n touchy(documentElement, 'add', 'mousemove', drag);\n classes.add(o.mirrorContainer, 'gu-unselectable');\n drake.emit('cloned', _mirror, _item, 'mirror');\n }\n\n function removeMirrorImage () {\n if (_mirror) {\n classes.rm(o.mirrorContainer, 'gu-unselectable');\n touchy(documentElement, 'remove', 'mousemove', drag);\n getParent(_mirror).removeChild(_mirror);\n _mirror = null;\n }\n }\n\n function getImmediateChild (dropTarget, target) {\n var immediate = target;\n while (immediate !== dropTarget && getParent(immediate) !== dropTarget) {\n immediate = getParent(immediate);\n }\n if (immediate === documentElement) {\n return null;\n }\n return immediate;\n }\n\n function getReference (dropTarget, target, x, y) {\n var horizontal = o.direction === 'horizontal';\n var reference = target !== dropTarget ? inside() : outside();\n return reference;\n\n function outside () { // slower, but able to figure out any position\n var len = dropTarget.children.length;\n var i;\n var el;\n var rect;\n for (i = 0; i < len; i++) {\n el = dropTarget.children[i];\n rect = el.getBoundingClientRect();\n if (horizontal && (rect.left + rect.width / 2) > x) { return el; }\n if (!horizontal && (rect.top + rect.height / 2) > y) { return el; }\n }\n return null;\n }\n\n function inside () { // faster, but only available if dropped inside a child element\n var rect = target.getBoundingClientRect();\n if (horizontal) {\n return resolve(x > rect.left + getRectWidth(rect) / 2);\n }\n return resolve(y > rect.top + getRectHeight(rect) / 2);\n }\n\n function resolve (after) {\n return after ? nextEl(target) : target;\n }\n }\n\n function isCopy (item, container) {\n return typeof o.copy === 'boolean' ? o.copy : o.copy(item, container);\n }\n}\n\nfunction touchy (el, op, type, fn) {\n var touch = {\n mouseup: 'touchend',\n mousedown: 'touchstart',\n mousemove: 'touchmove'\n };\n var pointers = {\n mouseup: 'pointerup',\n mousedown: 'pointerdown',\n mousemove: 'pointermove'\n };\n var microsoft = {\n mouseup: 'MSPointerUp',\n mousedown: 'MSPointerDown',\n mousemove: 'MSPointerMove'\n };\n if (__webpack_require__.g.navigator.pointerEnabled) {\n crossvent[op](el, pointers[type], fn);\n } else if (__webpack_require__.g.navigator.msPointerEnabled) {\n crossvent[op](el, microsoft[type], fn);\n } else {\n crossvent[op](el, touch[type], fn);\n crossvent[op](el, type, fn);\n }\n}\n\nfunction whichMouseButton (e) {\n if (e.touches !== void 0) { return e.touches.length; }\n if (e.which !== void 0 && e.which !== 0) { return e.which; } // see https://github.com/bevacqua/dragula/issues/261\n if (e.buttons !== void 0) { return e.buttons; }\n var button = e.button;\n if (button !== void 0) { // see https://github.com/jquery/jquery/blob/99e8ff1baa7ae341e94bb89c3e84570c7c3ad9ea/src/event.js#L573-L575\n return button & 1 ? 1 : button & 2 ? 3 : (button & 4 ? 2 : 0);\n }\n}\n\nfunction getOffset (el) {\n var rect = el.getBoundingClientRect();\n return {\n left: rect.left + getScroll('scrollLeft', 'pageXOffset'),\n top: rect.top + getScroll('scrollTop', 'pageYOffset')\n };\n}\n\nfunction getScroll (scrollProp, offsetProp) {\n if (typeof __webpack_require__.g[offsetProp] !== 'undefined') {\n return __webpack_require__.g[offsetProp];\n }\n if (documentElement.clientHeight) {\n return documentElement[scrollProp];\n }\n return doc.body[scrollProp];\n}\n\nfunction getElementBehindPoint (point, x, y) {\n point = point || {};\n var state = point.className || '';\n var el;\n point.className += ' gu-hide';\n el = doc.elementFromPoint(x, y);\n point.className = state;\n return el;\n}\n\nfunction never () { return false; }\nfunction always () { return true; }\nfunction getRectWidth (rect) { return rect.width || (rect.right - rect.left); }\nfunction getRectHeight (rect) { return rect.height || (rect.bottom - rect.top); }\nfunction getParent (el) { return el.parentNode === doc ? null : el.parentNode; }\nfunction isInput (el) { return el.tagName === 'INPUT' || el.tagName === 'TEXTAREA' || el.tagName === 'SELECT' || isEditable(el); }\nfunction isEditable (el) {\n if (!el) { return false; } // no parents were editable\n if (el.contentEditable === 'false') { return false; } // stop the lookup\n if (el.contentEditable === 'true') { return true; } // found a contentEditable element in the chain\n return isEditable(getParent(el)); // contentEditable is set to 'inherit'\n}\n\nfunction nextEl (el) {\n return el.nextElementSibling || manually();\n function manually () {\n var sibling = el;\n do {\n sibling = sibling.nextSibling;\n } while (sibling && sibling.nodeType !== 1);\n return sibling;\n }\n}\n\nfunction getEventHost (e) {\n // on touchend event, we have to use `e.changedTouches`\n // see http://stackoverflow.com/questions/7192563/touchend-event-properties\n // see https://github.com/bevacqua/dragula/issues/34\n if (e.targetTouches && e.targetTouches.length) {\n return e.targetTouches[0];\n }\n if (e.changedTouches && e.changedTouches.length) {\n return e.changedTouches[0];\n }\n return e;\n}\n\nfunction getCoord (coord, e) {\n var host = getEventHost(e);\n var missMap = {\n pageX: 'clientX', // IE8\n pageY: 'clientY' // IE8\n };\n if (coord in missMap && !(coord in host) && missMap[coord] in host) {\n coord = missMap[coord];\n }\n return host[coord];\n}\n\nmodule.exports = dragula;\n\n\n//# sourceURL=webpack://Formio/./node_modules/dragula/dragula.js?");
3280
1950
 
3281
1951
  /***/ }),
3282
1952
 
@@ -5437,6 +4107,16 @@ eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {
5437
4107
 
5438
4108
  /***/ }),
5439
4109
 
4110
+ /***/ "./node_modules/ticky/ticky-browser.js":
4111
+ /*!*********************************************!*\
4112
+ !*** ./node_modules/ticky/ticky-browser.js ***!
4113
+ \*********************************************/
4114
+ /***/ (function(module) {
4115
+
4116
+ eval("var si = typeof setImmediate === 'function', tick;\nif (si) {\n tick = function (fn) { setImmediate(fn); };\n} else {\n tick = function (fn) { setTimeout(fn, 0); };\n}\n\nmodule.exports = tick;\n\n//# sourceURL=webpack://Formio/./node_modules/ticky/ticky-browser.js?");
4117
+
4118
+ /***/ }),
4119
+
5440
4120
  /***/ "./node_modules/tippy.js/dist/tippy.esm.js":
5441
4121
  /*!*************************************************!*\
5442
4122
  !*** ./node_modules/tippy.js/dist/tippy.esm.js ***!
@@ -5642,7 +4322,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));
5642
4322
  /***/ (function(__unused_webpack_module, exports) {
5643
4323
 
5644
4324
  "use strict";
5645
- eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n// All external libs URLs should be injected through this class.\n// CDN libs URLs are accessible throuh CDN object properties\n// like Formio.cdn.ace === 'http://cdn.form.io/ace/1.4.12'.\n// For latest version use empty string\nclass CDN {\n constructor(baseUrl) {\n this.baseUrl = baseUrl || 'https://cdn.form.io';\n this.overrides = {};\n this.libs = {\n 'js': '',\n 'ace': '1.4.12',\n 'bootstrap': '4.6.2',\n 'ckeditor': '19.0.0',\n 'flatpickr': '4.6.8',\n 'flatpickr-formio': '4.6.13-formio.3',\n 'font-awesome': '4.7.0',\n 'grid': 'latest',\n 'moment-timezone': 'latest',\n 'quill': '2.0.0-dev.3',\n 'shortcut-buttons-flatpickr': '0.4.0',\n 'uswds': '2.4.8',\n 'core': ''\n };\n this.updateUrls();\n }\n getVersion(lib) {\n return this.libs[lib];\n }\n // Sets a specific library version\n setVersion(lib, version) {\n this.libs[lib] = version;\n this.updateUrls();\n }\n // Sets base CDN url for all libraries\n setBaseUrl(url) {\n this.baseUrl = url;\n this.updateUrls();\n }\n // Allows to override CDN url for a specific library\n setOverrideUrl(lib, url) {\n this.overrides[lib] = url;\n this.updateUrls();\n }\n // Removes override for a specific library\n removeOverride(lib) {\n delete this.overrides[lib];\n this.updateUrls();\n }\n // Removes all overrides\n removeOverrides() {\n this.overrides = {};\n this.updateUrls();\n }\n buildUrl(cdnUrl, lib, version) {\n let url;\n if (version === 'latest' || version === '') {\n url = `${cdnUrl}/${lib}`;\n }\n else {\n url = `${cdnUrl}/${lib}/${version}`;\n }\n return url;\n }\n updateUrls() {\n for (const lib in this.libs) {\n if (lib in this.overrides) {\n this[lib] = this.buildUrl(this.overrides[lib], lib, this.libs[lib]);\n }\n else {\n this[lib] = this.buildUrl(this.baseUrl, lib, this.libs[lib]);\n }\n }\n }\n}\nexports[\"default\"] = CDN;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/CDN.js?");
4325
+ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n// All external libs URLs should be injected through this class.\n// CDN libs URLs are accessible throuh CDN object properties\n// like Formio.cdn.ace === 'http://cdn.form.io/ace/1.4.12'.\n// For latest version use empty string\nclass CDN {\n constructor(baseUrl, overrides = {}) {\n this.baseUrl = baseUrl || 'https://cdn.form.io';\n this.overrides = overrides;\n this.libs = {\n 'js': '',\n 'ace': '1.4.12',\n 'bootstrap': '4.6.2',\n 'ckeditor': '19.0.0',\n 'flatpickr': '4.6.8',\n 'flatpickr-formio': '4.6.13-formio.3',\n 'font-awesome': '4.7.0',\n 'grid': 'latest',\n 'moment-timezone': 'latest',\n 'quill': '2.0.0-dev.3',\n 'shortcut-buttons-flatpickr': '0.4.0',\n 'uswds': '2.4.8',\n 'core': ''\n };\n this.updateUrls();\n }\n getVersion(lib) {\n return this.libs[lib];\n }\n // Sets a specific library version\n setVersion(lib, version) {\n this.libs[lib] = version;\n this.updateUrls();\n }\n // Sets base CDN url for all libraries\n setBaseUrl(url) {\n this.baseUrl = url;\n this.updateUrls();\n }\n // Allows to override CDN url for a specific library\n setOverrideUrl(lib, url) {\n this.overrides[lib] = url;\n this.updateUrls();\n }\n // Removes override for a specific library\n removeOverride(lib) {\n delete this.overrides[lib];\n this.updateUrls();\n }\n // Removes all overrides\n removeOverrides() {\n this.overrides = {};\n this.updateUrls();\n }\n buildUrl(cdnUrl, lib, version) {\n let url;\n if (version === 'latest' || version === '') {\n url = `${cdnUrl}/${lib}`;\n }\n else {\n url = `${cdnUrl}/${lib}/${version}`;\n }\n return url;\n }\n updateUrls() {\n for (const lib in this.libs) {\n if (lib in this.overrides) {\n this[lib] = this.buildUrl(this.overrides[lib], lib, this.libs[lib]);\n }\n else {\n this[lib] = this.buildUrl(this.baseUrl, lib, this.libs[lib]);\n }\n }\n }\n}\nexports[\"default\"] = CDN;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/CDN.js?");
5646
4326
 
5647
4327
  /***/ }),
5648
4328
 
@@ -5730,7 +4410,7 @@ eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {
5730
4410
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
5731
4411
 
5732
4412
  "use strict";
5733
- eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst Webform_1 = __importDefault(__webpack_require__(/*! ./Webform */ \"./lib/cjs/Webform.js\"));\nconst Component_1 = __importDefault(__webpack_require__(/*! ./components/_classes/component/Component */ \"./lib/cjs/components/_classes/component/Component.js\"));\nconst tippy_js_1 = __importDefault(__webpack_require__(/*! tippy.js */ \"./node_modules/tippy.js/dist/tippy.esm.js\"));\nconst Components_1 = __importDefault(__webpack_require__(/*! ./components/Components */ \"./lib/cjs/components/Components.js\"));\nconst Formio_1 = __webpack_require__(/*! ./Formio */ \"./lib/cjs/Formio.js\");\nconst utils_1 = __webpack_require__(/*! ./utils/utils */ \"./lib/cjs/utils/utils.js\");\nconst formUtils_1 = __webpack_require__(/*! ./utils/formUtils */ \"./lib/cjs/utils/formUtils.js\");\nconst builder_1 = __importDefault(__webpack_require__(/*! ./utils/builder */ \"./lib/cjs/utils/builder.js\"));\nconst lodash_1 = __importDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nconst dom_autoscroller_1 = __importDefault(__webpack_require__(/*! dom-autoscroller */ \"./node_modules/dom-autoscroller/dist/bundle.js\"));\nconst Templates_1 = __importDefault(__webpack_require__(/*! ./templates/Templates */ \"./lib/cjs/templates/Templates.js\"));\n__webpack_require__(/*! ./components/builder */ \"./lib/cjs/components/builder.js\");\n// We need this here because dragula pulls in CustomEvent class that requires global to exist.\nif (typeof window !== 'undefined' && typeof window.global === 'undefined') {\n window.global = window;\n}\nconst dragula_min_js_1 = __importDefault(__webpack_require__(/*! dragula/dist/dragula.min.js */ \"./node_modules/dragula/dist/dragula.min.js\"));\nclass WebformBuilder extends Component_1.default {\n // eslint-disable-next-line max-statements\n constructor() {\n let element, options;\n if (arguments[0] instanceof HTMLElement || arguments[1]) {\n element = arguments[0];\n options = arguments[1];\n }\n else {\n options = arguments[0];\n }\n // Reset skipInit in case PDFBuilder has set it.\n options.skipInit = false;\n options.display = options.display || 'form';\n super(null, options);\n this.moveHandler = (e) => {\n if (e.keyCode === 38 || e.keyCode === 40 || e.keyCode === 13) {\n e.stopPropagation();\n e.preventDefault();\n }\n if (e.keyCode === 38) {\n this.updateComponentPlacement(true);\n }\n if (e.keyCode === 40) {\n this.updateComponentPlacement(false);\n }\n if (e.keyCode === 13) {\n this.stopMoving(this.selectedComponent);\n }\n };\n this.setElement(element);\n this.dragulaLib = dragula_min_js_1.default;\n this.builderHeight = 0;\n this.schemas = {};\n this.repeatablePaths = [];\n this.sideBarScroll = lodash_1.default.get(this.options, 'sideBarScroll', true);\n this.sideBarScrollOffset = lodash_1.default.get(this.options, 'sideBarScrollOffset', 0);\n this.dragDropEnabled = true;\n // Setup the builder options.\n this.builder = lodash_1.default.defaultsDeep({}, this.options.builder, this.defaultGroups);\n // Turn off if explicitely said to do so...\n lodash_1.default.each(this.defaultGroups, (config, key) => {\n if (config === false) {\n this.builder[key] = false;\n }\n });\n // Add the groups.////\n this.groups = {};\n this.groupOrder = [];\n for (const group in this.builder) {\n if (this.builder[group]) {\n this.builder[group].key = group;\n this.groups[group] = this.builder[group];\n this.groups[group].components = this.groups[group].components || {};\n this.groups[group].componentOrder = this.groups[group].componentOrder || [];\n this.groups[group].subgroups = Object.keys(this.groups[group].groups || {}).map((groupKey) => {\n this.groups[group].groups[groupKey].componentOrder = Object.keys(this.groups[group].groups[groupKey].components).map((key) => key);\n return this.groups[group].groups[groupKey];\n });\n this.groupOrder.push(this.groups[group]);\n }\n }\n this.groupOrder = this.groupOrder\n .filter(group => group && !group.ignore)\n .sort((a, b) => a.weight - b.weight)\n .map(group => group.key);\n for (const type in Components_1.default.components) {\n const component = Components_1.default.components[type];\n if (component.builderInfo && component.builderInfo.schema) {\n this.schemas[type] = component.builderInfo.schema;\n component.type = type;\n const builderInfo = component.builderInfo;\n builderInfo.key = component.type;\n this.addBuilderComponentInfo(builderInfo);\n }\n }\n // Filter out any extra components.\n // Add the components in each group.\n for (const group in this.groups) {\n const info = this.groups[group];\n for (const key in info.components) {\n const compKey = group === 'resource' ? `component-${key}` : key;\n let comp = info.components[compKey];\n if (comp === true &&\n Components_1.default.components[key] &&\n Components_1.default.components[key].builderInfo) {\n comp = Components_1.default.components[key].builderInfo;\n }\n if (comp && comp.schema) {\n this.schemas[key] = comp.schema;\n info.components[compKey] = comp;\n info.components[compKey].key = key;\n }\n else {\n // Do not include this component in the components array.\n delete info.components[compKey];\n }\n }\n // Order the components.\n this.orderComponents(info);\n }\n this.options.hooks = this.options.hooks || {};\n this.options.hooks.renderComponent = (html, { component, self }) => {\n var _a;\n if (self.type === 'form' && !self.key) {\n const template = this.hook('renderComponentFormTemplate', html.replace('formio-component-form', ''));\n // The main webform shouldn't have this class as it adds extra styles.\n return template;\n }\n if (this.options.disabled && this.options.disabled.includes(self.key) || self.parent.noDragDrop) {\n return html;\n }\n return this.renderTemplate('builderComponent', {\n html,\n disableBuilderActions: (_a = self === null || self === void 0 ? void 0 : self.component) === null || _a === void 0 ? void 0 : _a.disableBuilderActions,\n childComponent: component,\n });\n };\n this.options.hooks.renderComponents = (html, { components, self }) => {\n // if Datagrid and already has a component, don't make it droppable.\n if (self.type === 'datagrid' && components.length > 0 || self.noDragDrop) {\n return html;\n }\n if (!components ||\n (!components.length && !components.nodrop) ||\n (self.type === 'form' && components.length <= 1 && (components.length === 0 || components[0].type === 'button'))) {\n html = this.renderTemplate('builderPlaceholder', {\n position: 0\n }) + html;\n }\n return this.renderTemplate('builderComponents', {\n key: self.key,\n type: self.type,\n html,\n });\n };\n this.options.hooks.renderInput = (html, { self }) => {\n if (self.type === 'hidden') {\n return html + self.name;\n }\n return html;\n };\n this.options.hooks.renderLoading = (html, { self }) => {\n if (self.type === 'form' && self.key) {\n return self.name;\n }\n return html;\n };\n this.options.hooks.attachComponents = (element, components, container, component) => {\n // Don't attach if no element was found or component doesn't participate in drag'n'drop.\n if (!element) {\n return;\n }\n if (component.noDragDrop) {\n return element;\n }\n // Attach container and component to element for later reference.\n const containerElement = element.querySelector(`[ref=\"${component.component.key}-container\"]`) || element;\n containerElement.formioContainer = container;\n containerElement.formioComponent = component;\n // Add container to draggable list.\n if (this.dragula && this.allowDrop(element)) {\n this.dragula.containers.push(containerElement);\n }\n // If this is an existing datagrid element, don't make it draggable.\n if ((component.type === 'datagrid' || component.type === 'datamap') && components.length > 0) {\n return element;\n }\n // Since we added a wrapper, need to return the original element so that we can find the components inside it.\n return element.children[0];\n };\n this.options.hooks.attachDatagrid = (element, component) => {\n component.loadRefs(element, {\n [`${component.key}-container`]: 'single',\n });\n const dataGridContainer = component.refs[`${component.key}-container`];\n if (dataGridContainer) {\n component.attachComponents(dataGridContainer.parentNode, [], component.component.components);\n }\n // Need to set up horizontal rearrangement of fields.\n };\n this.options.hooks.attachComponent = this.attachComponent.bind(this);\n // Load resources tagged as 'builder'\n const query = {\n params: {\n type: 'resource',\n limit: 1000000,\n select: '_id,title,name,components'\n }\n };\n if (this.options && this.options.resourceTag) {\n query.params.tags = [this.options.resourceTag];\n }\n else if (!this.options || !this.options.hasOwnProperty('resourceTag')) {\n query.params.tags = ['builder'];\n }\n const formio = new Formio_1.Formio(Formio_1.Formio.projectUrl);\n const isResourcesDisabled = this.options.builder && this.options.builder.resource === false;\n formio.loadProject().then((project) => {\n if (project && (lodash_1.default.get(project, 'settings.addConfigToForms', false) || lodash_1.default.get(project, 'addConfigToForms', false))) {\n const config = project.config || {};\n this.options.formConfig = config;\n const pathToFormConfig = 'webform._form.config';\n const webformConfig = lodash_1.default.get(this, pathToFormConfig);\n if (this.webform && !webformConfig) {\n lodash_1.default.set(this, pathToFormConfig, config);\n }\n }\n }).catch((err) => {\n console.warn(`Could not load project settings: ${err.message || err}`);\n });\n if (!formio.noProject && !isResourcesDisabled && formio.formsUrl) {\n const resourceOptions = this.options.builder && this.options.builder.resource;\n formio.loadForms(query)\n .then((resources) => {\n if (resources.length) {\n this.builder.resource = {\n title: resourceOptions ? resourceOptions.title : 'Existing Resource Fields',\n key: 'resource',\n weight: resourceOptions ? resourceOptions.weight : 50,\n subgroups: [],\n components: [],\n componentOrder: []\n };\n this.groups.resource = {\n title: resourceOptions ? resourceOptions.title : 'Existing Resource Fields',\n key: 'resource',\n weight: resourceOptions ? resourceOptions.weight : 50,\n subgroups: [],\n components: [],\n componentOrder: []\n };\n if (!this.groupOrder.includes('resource')) {\n this.groupOrder.push('resource');\n }\n this.addExistingResourceFields(resources);\n }\n });\n }\n // Notify components if they need to modify their render.\n this.options.attachMode = 'builder';\n this.webform = this.webform || this.createForm(this.options);\n this.pathComponentsMapping = {};\n this.arrayDataComponentPaths = [];\n this.nestedDataComponents = [];\n this.arrayDataComponents = [];\n }\n allowDrop() {\n return true;\n }\n addExistingResourceFields(resources) {\n lodash_1.default.each(resources, (resource, index) => {\n const resourceKey = `resource-${resource.name}`;\n const subgroup = {\n key: resourceKey,\n title: resource.title,\n components: [],\n componentOrder: [],\n default: index === 0,\n };\n (0, formUtils_1.eachComponent)(resource.components, (component) => {\n if (component.type === 'button')\n return;\n if (this.options &&\n this.options.resourceFilter &&\n (!component.tags || component.tags.indexOf(this.options.resourceFilter) === -1))\n return;\n let componentName = component.label;\n if (!componentName && component.key) {\n componentName = lodash_1.default.upperFirst(component.key);\n }\n subgroup.componentOrder.push(`component-${component.key}`);\n subgroup.components[`component-${component.key}`] = lodash_1.default.merge((0, utils_1.fastCloneDeep)(Components_1.default.components[component.type]\n ? Components_1.default.components[component.type].builderInfo\n : Components_1.default.components['unknown'].builderInfo), {\n key: component.key,\n title: componentName,\n group: 'resource',\n subgroup: resourceKey,\n }, {\n schema: Object.assign(Object.assign({}, component), { label: component.label, key: component.key, lockKey: true, source: (!this.options.noSource ? resource._id : undefined), isNew: true })\n });\n }, true);\n this.groups.resource.subgroups.push(subgroup);\n });\n this.triggerRedraw();\n }\n attachTooltip(component, title) {\n return (0, tippy_js_1.default)(component, {\n allowHTML: true,\n trigger: 'mouseenter focus',\n placement: 'top',\n delay: [200, 0],\n zIndex: 10000,\n content: title\n });\n }\n attachComponent(element, component) {\n if (component instanceof WebformBuilder) {\n return;\n }\n // Add component to element for later reference.\n element.formioComponent = component;\n component.loadRefs(element, {\n removeComponent: 'single',\n editComponent: 'single',\n moveComponent: 'single',\n copyComponent: 'single',\n pasteComponent: 'single',\n editJson: 'single'\n });\n if (component.refs.copyComponent) {\n this.attachTooltip(component.refs.copyComponent, this.t('Copy'));\n component.addEventListener(component.refs.copyComponent, 'click', () => this.copyComponent(component));\n }\n if (component.refs.pasteComponent) {\n const pasteToolTip = this.attachTooltip(component.refs.pasteComponent, this.t('Paste below'));\n component.addEventListener(component.refs.pasteComponent, 'click', () => {\n pasteToolTip.hide();\n this.pasteComponent(component);\n });\n }\n if (component.refs.moveComponent) {\n this.attachTooltip(component.refs.moveComponent, this.t('Move'));\n if (this.keyboardActionsEnabled) {\n component.addEventListener(component.refs.moveComponent, 'click', () => {\n this.moveComponent(component);\n });\n }\n }\n const parent = this.getParentElement(element);\n if (component.refs.editComponent) {\n this.attachTooltip(component.refs.editComponent, this.t('Edit'));\n component.addEventListener(component.refs.editComponent, 'click', () => this.editComponent(component.schema, parent, false, false, component.component, { inDataGrid: component.isInDataGrid }));\n }\n if (component.refs.editJson) {\n this.attachTooltip(component.refs.editJson, this.t('Edit JSON'));\n component.addEventListener(component.refs.editJson, 'click', () => this.editComponent(component.schema, parent, false, true, component.component));\n }\n if (component.refs.removeComponent) {\n this.attachTooltip(component.refs.removeComponent, this.t('Remove'));\n component.addEventListener(component.refs.removeComponent, 'click', () => this.removeComponent(component.schema, parent, component.component, component));\n }\n return element;\n }\n createForm(options) {\n this.webform = new Webform_1.default(this.element, options);\n if (this.element) {\n this.loadRefs(this.element, {\n form: 'single'\n });\n if (this.refs.form) {\n this.webform.element = this.refs.form;\n }\n }\n return this.webform;\n }\n /**\n * Called when everything is ready.\n *\n * @returns {Promise} - Wait for webform to be ready.\n */\n get ready() {\n return this.webform.ready;\n }\n get defaultGroups() {\n return {\n basic: {\n title: 'Basic',\n weight: 0,\n default: true,\n },\n advanced: {\n title: 'Advanced',\n weight: 10\n },\n layout: {\n title: 'Layout',\n weight: 20\n },\n data: {\n title: 'Data',\n weight: 30\n },\n premium: {\n title: 'Premium',\n weight: 40\n }\n };\n }\n redraw() {\n return Webform_1.default.prototype.redraw.call(this);\n }\n get form() {\n return this.webform.form;\n }\n get schema() {\n return this.webform.schema;\n }\n set form(value) {\n this.setForm(value);\n }\n get container() {\n return this.webform.form.components;\n }\n /**\n * When a component sets its api key, we need to check if it is unique within its namespace. Find the namespace root\n * so we can calculate this correctly.\n * @param component\n */\n findNamespaceRoot(component) {\n const path = (0, utils_1.getArrayFromComponentPath)(component.path);\n // First get the component with nested parents.\n let comp = this.webform.getComponent(path);\n comp = Array.isArray(comp) ? comp[0] : comp;\n const namespaceKey = this.recurseNamespace(comp);\n // If there is no key, it is the root form.\n if (!namespaceKey || this.form.key === namespaceKey) {\n return this.form.components;\n }\n const componentSchema = component.component;\n // If the current component is the namespace, we don't need to find it again.\n if (namespaceKey === component.key) {\n return [...componentSchema.components, componentSchema];\n }\n // Get the namespace component so we have the original object.\n const namespaceComponent = (0, formUtils_1.getComponent)(this.form.components, namespaceKey, true);\n return namespaceComponent ? namespaceComponent.components : comp.components;\n }\n recurseNamespace(component) {\n // If there is no parent, we are at the root level.\n if (!component) {\n return null;\n }\n // Some components are their own namespace.\n if (['address', 'container', 'datagrid', 'editgrid', 'dynamicWizard', 'tree'].includes(component.type) || component.tree || component.arrayTree) {\n return component.key;\n }\n // Anything else, keep going up.\n return this.recurseNamespace(component.parent);\n }\n render() {\n return this.renderTemplate('builder', {\n sidebar: this.renderTemplate('builderSidebar', {\n scrollEnabled: this.sideBarScroll,\n groupOrder: this.groupOrder,\n groupId: `builder-sidebar-${this.id}`,\n groups: this.groupOrder.map((groupKey) => this.renderTemplate('builderSidebarGroup', {\n group: this.groups[groupKey],\n groupKey,\n groupId: `builder-sidebar-${this.id}`,\n subgroups: this.groups[groupKey].subgroups.map((group) => this.renderTemplate('builderSidebarGroup', {\n group,\n groupKey: group.key,\n groupId: `group-container-${groupKey}`,\n subgroups: []\n })),\n keyboardActionsEnabled: this.keyboardActionsEnabled,\n })),\n }),\n form: this.webform.render(),\n });\n }\n attach(element) {\n this.on('change', (form) => {\n this.populateRecaptchaSettings(form);\n });\n return super.attach(element).then(() => {\n this.loadRefs(element, {\n form: 'single',\n sidebar: 'single',\n 'sidebar-search': 'single',\n 'sidebar-groups': 'single',\n 'container': 'multiple',\n 'sidebar-anchor': 'multiple',\n 'sidebar-group': 'multiple',\n 'sidebar-container': 'multiple',\n 'sidebar-component': 'multiple',\n });\n if (this.sideBarScroll && Templates_1.default.current.handleBuilderSidebarScroll) {\n Templates_1.default.current.handleBuilderSidebarScroll.call(this, this);\n }\n // Add the paste status in form\n if (typeof window !== 'undefined' && window.sessionStorage) {\n const data = window.sessionStorage.getItem('formio.clipboard');\n if (data) {\n this.addClass(this.refs.form, 'builder-paste-mode');\n }\n }\n if (!(0, utils_1.bootstrapVersion)(this.options)) {\n const getAttribute = (anchor, attribute) => {\n let elem = anchor.getAttribute(`data-${attribute}`);\n if (!elem) {\n elem = anchor.getAttribute(`data-bs-${attribute}`);\n }\n return elem;\n };\n const hideShow = (group, show) => {\n if (show) {\n group.classList.add(['show']);\n group.style.display = 'inherit';\n }\n else {\n group.classList.remove(['show']);\n group.style.display = 'none';\n }\n };\n // Initialize\n this.refs['sidebar-group'].forEach((group) => {\n hideShow(group, getAttribute(group, 'default') === 'true');\n });\n // Click event\n this.refs['sidebar-anchor'].forEach((anchor, index) => {\n this.addEventListener(anchor, 'click', () => {\n const clickedParentId = getAttribute(anchor, 'parent').slice('#builder-sidebar-'.length);\n const clickedId = getAttribute(anchor, 'target').slice('#group-'.length);\n this.refs['sidebar-group'].forEach((group, groupIndex) => {\n const openByDefault = getAttribute(group, 'default') === 'true';\n const groupId = group.getAttribute('id').slice('group-'.length);\n const groupParent = getAttribute(group, 'parent').slice('#builder-sidebar-'.length);\n hideShow(group, ((openByDefault && groupParent === clickedId) || groupId === clickedParentId || groupIndex === index));\n });\n }, true);\n });\n }\n if (this.keyboardActionsEnabled) {\n this.refs['sidebar-component'].forEach((component) => {\n this.addEventListener(component, 'keydown', (event) => {\n if (event.keyCode === 13) {\n this.addNewComponent(component);\n }\n });\n });\n }\n this.addEventListener(this.refs['sidebar-search'], 'input', lodash_1.default.debounce((e) => {\n const searchString = e.target.value;\n this.searchFields(searchString);\n }, 300));\n if (this.dragDropEnabled) {\n this.initDragula();\n }\n const drake = this.dragula;\n if (this.refs.form) {\n (0, dom_autoscroller_1.default)([window], {\n margin: 20,\n maxSpeed: 6,\n scrollWhenOutside: true,\n autoScroll: function () {\n return this.down && (drake === null || drake === void 0 ? void 0 : drake.dragging);\n }\n });\n return this.webform.attach(this.refs.form);\n }\n });\n }\n searchFields(searchString = '') {\n const searchValue = searchString.toLowerCase();\n const sidebar = this.refs['sidebar'];\n const sidebarGroups = this.refs['sidebar-groups'];\n if (!sidebar || !sidebarGroups) {\n return;\n }\n const filterGroupBy = (group, searchValue = '') => {\n const result = lodash_1.default.toPlainObject(group);\n const { subgroups = [], components } = result;\n const filteredComponents = [];\n for (const key in components) {\n const isMatchedToTitle = this.t(components[key].title).toLowerCase().match(searchValue);\n const isMatchedToKey = components[key].key.toLowerCase().match(searchValue);\n if (isMatchedToTitle || isMatchedToKey) {\n filteredComponents.push(components[key]);\n }\n }\n this.orderComponents(result, filteredComponents);\n if (searchValue) {\n result.default = true;\n }\n if (result.componentOrder.length || subgroups.length) {\n return result;\n }\n return null;\n };\n const filterGroupOrder = (groupOrder, searchValue) => {\n const result = lodash_1.default.cloneDeep(groupOrder);\n return result.filter(key => filterGroupBy(this.groups[key], searchValue));\n };\n const filterSubgroups = (groups, searchValue) => {\n const result = lodash_1.default.clone(groups);\n return result\n .map(subgroup => filterGroupBy(subgroup, searchValue))\n .filter(subgroup => !lodash_1.default.isNull(subgroup));\n };\n const toTemplate = groupKey => {\n return {\n group: filterGroupBy(this.groups[groupKey], searchValue),\n groupKey,\n groupId: sidebar.id || sidebarGroups.id,\n subgroups: filterSubgroups(this.groups[groupKey].subgroups, searchValue)\n .map((group) => this.renderTemplate('builderSidebarGroup', {\n group,\n groupKey: group.key,\n groupId: `group-container-${groupKey}`,\n subgroups: []\n })),\n };\n };\n sidebarGroups.innerHTML = filterGroupOrder(this.groupOrder, searchValue)\n .map(groupKey => this.renderTemplate('builderSidebarGroup', toTemplate(groupKey)))\n .join('');\n this.loadRefs(this.element, {\n 'sidebar-groups': 'single',\n 'sidebar-anchor': 'multiple',\n 'sidebar-group': 'multiple',\n 'sidebar-container': 'multiple',\n });\n this.updateDragAndDrop();\n if (searchValue === '') {\n this.triggerRedraw();\n }\n }\n orderComponents(groupInfo, foundComponents) {\n const components = foundComponents || groupInfo.components;\n const isResource = groupInfo.key.indexOf('resource-') === 0;\n if (components) {\n groupInfo.componentOrder = Object.keys(components)\n .map(key => components[key])\n .filter(component => component && !component.ignore && !component.ignoreForForm)\n .sort((a, b) => a.weight - b.weight)\n .map(component => isResource ? `component-${component.key}` : component.key);\n }\n }\n updateDragAndDrop() {\n if (this.dragDropEnabled) {\n this.initDragula();\n }\n if (this.refs.form) {\n return this.webform.attach(this.refs.form);\n }\n }\n initDragula() {\n const options = this.options;\n if (this.dragula) {\n this.dragula.destroy();\n }\n const containersArray = Array.prototype.slice.call(this.refs['sidebar-container']).filter(item => {\n return item.id !== 'group-container-resource';\n });\n if (!dragula_min_js_1.default) {\n return;\n }\n this.dragula = (0, dragula_min_js_1.default)(containersArray, {\n moves(el) {\n let moves = true;\n const list = Array.from(el.classList).filter(item => item.indexOf('formio-component-') === 0);\n list.forEach(item => {\n const key = item.slice('formio-component-'.length);\n if (options.disabled && options.disabled.includes(key)) {\n moves = false;\n }\n });\n if (el.classList.contains('no-drag')) {\n moves = false;\n }\n return moves;\n },\n copy(el) {\n return el.classList.contains('drag-copy');\n },\n accepts(el, target) {\n return !el.contains(target) && !target.classList.contains('no-drop');\n }\n }).on('drop', (element, target, source, sibling) => this.onDrop(element, target, source, sibling));\n }\n detach() {\n if (this.dragula) {\n this.dragula.destroy();\n }\n this.dragula = null;\n if (this.sideBarScroll && Templates_1.default.current.clearBuilderSidebarScroll) {\n Templates_1.default.current.clearBuilderSidebarScroll.call(this, this);\n }\n super.detach();\n }\n getComponentInfo(key, group) {\n let info;\n // Need to check in first order as resource component key can be the same as from webform default components\n if (group && group.slice(0, group.indexOf('-')) === 'resource') {\n // This is an existing resource field.\n const resourceGroups = this.groups.resource.subgroups;\n const resourceGroup = lodash_1.default.find(resourceGroups, { key: group });\n if (resourceGroup && resourceGroup.components.hasOwnProperty(`component-${key}`)) {\n info = (0, utils_1.fastCloneDeep)(resourceGroup.components[`component-${key}`].schema);\n }\n }\n // This is a new component\n else if (this.schemas.hasOwnProperty(key)) {\n info = (0, utils_1.fastCloneDeep)(this.schemas[key]);\n }\n else if (this.groups.hasOwnProperty(group)) {\n const groupComponents = this.groups[group].components;\n if (groupComponents.hasOwnProperty(key)) {\n info = (0, utils_1.fastCloneDeep)(groupComponents[key].schema);\n }\n }\n else if (group === 'searchFields') { //Search components go into this group\n const resourceGroups = this.groups.resource.subgroups;\n for (let ix = 0; ix < resourceGroups.length; ix++) {\n const resourceGroup = resourceGroups[ix];\n if (resourceGroup.components.hasOwnProperty(`component-${key}`)) {\n info = (0, utils_1.fastCloneDeep)(resourceGroup.components[`component-${key}`].schema);\n break;\n }\n }\n }\n if (info) {\n //if this is a custom component that was already assigned a key, don't stomp on it\n if (!Components_1.default.components.hasOwnProperty(info.type) && info.key) {\n return info;\n }\n info.key = this.generateKey(info);\n }\n return info;\n }\n getComponentsPath(component, parent) {\n // Get path to the component in the parent component.\n let path = 'components';\n let columnIndex = 0;\n let tableRowIndex = 0;\n let tableColumnIndex = 0;\n let tabIndex = 0;\n switch (parent.type) {\n case 'table':\n tableRowIndex = lodash_1.default.findIndex(parent.rows, row => row.some(column => column.components.some(comp => comp.key === component.key)));\n tableColumnIndex = lodash_1.default.findIndex(parent.rows[tableRowIndex], (column => column.components.some(comp => comp.key === component.key)));\n path = `rows[${tableRowIndex}][${tableColumnIndex}].components`;\n break;\n case 'columns':\n columnIndex = lodash_1.default.findIndex(parent.columns, column => column.components.some(comp => comp.key === component.key));\n path = `columns[${columnIndex}].components`;\n break;\n case 'tabs':\n tabIndex = lodash_1.default.findIndex(parent.components, tab => tab.components.some(comp => comp.key === component.key));\n path = `components[${tabIndex}].components`;\n break;\n }\n return path;\n }\n /* eslint-disable max-statements */\n onDrop(element, target, source, sibling) {\n var _a;\n if (!target) {\n return;\n }\n // If you try to drop within itself.\n if (element.contains(target)) {\n return;\n }\n const key = element.getAttribute('data-key');\n const type = element.getAttribute('data-type');\n const group = element.getAttribute('data-group');\n let info, isNew, path, index;\n if (key && group) {\n // This is a new component.\n info = this.getComponentInfo(key, group);\n if (!info && type) {\n info = this.getComponentInfo(type, group);\n }\n isNew = true;\n }\n else if (source.formioContainer) {\n index = lodash_1.default.findIndex(source.formioContainer, { key: element.formioComponent.component.key });\n if (index !== -1) {\n // Grab and remove the component from the source container.\n info = source.formioContainer.splice(lodash_1.default.findIndex(source.formioContainer, { key: element.formioComponent.component.key }), 1);\n // Since splice returns an array of one object, we need to destructure it.\n info = info[0];\n }\n }\n // If we haven't found the component, stop.\n if (!info) {\n return;\n }\n // Show an error if siblings are disabled for a component and such a component already exists.\n const compKey = (group === 'resource') ? `component-${key}` : key;\n const draggableComponent = ((_a = this.groups[group]) === null || _a === void 0 ? void 0 : _a.components[compKey]) || {};\n if (draggableComponent.disableSiblings) {\n let isCompAlreadyExists = false;\n (0, formUtils_1.eachComponent)(this.webform.components, (component) => {\n if (component.type === draggableComponent.schema.type) {\n isCompAlreadyExists = true;\n return;\n }\n }, true);\n if (isCompAlreadyExists) {\n this.webform.redraw();\n this.webform.setAlert('danger', `You cannot add more than one ${draggableComponent.key} component to one page.`);\n return;\n }\n }\n if (target !== source) {\n // Ensure the key remains unique in its new container.\n builder_1.default.uniquify(this.findNamespaceRoot(target.formioComponent), info);\n }\n const parent = target.formioComponent;\n // Insert in the new container.\n if (target.formioContainer) {\n if (sibling) {\n if (!sibling.getAttribute('data-noattach')) {\n index = lodash_1.default.findIndex(target.formioContainer, { key: lodash_1.default.get(sibling, 'formioComponent.component.key') });\n index = (index === -1) ? 0 : index;\n }\n else {\n index = sibling.getAttribute('data-position');\n }\n if (index !== -1) {\n target.formioContainer.splice(index, 0, info);\n }\n }\n else {\n target.formioContainer.push(info);\n }\n path = this.getComponentsPath(info, parent.component);\n index = lodash_1.default.findIndex(lodash_1.default.get(parent.schema, path), { key: info.key });\n if (index === -1) {\n index = 0;\n }\n }\n if (parent && parent.addChildComponent) {\n parent.addChildComponent(info, element, target, source, sibling);\n }\n const componentInDataGrid = parent.type === 'datagrid';\n if (isNew && !this.options.noNewEdit && !info.noNewEdit) {\n this.editComponent(info, target, isNew, null, null, { inDataGrid: componentInDataGrid });\n }\n // Only rebuild the parts needing to be rebuilt.\n let rebuild;\n if (target !== source) {\n if (source.formioContainer && source.contains(target)) {\n rebuild = source.formioComponent.rebuild();\n }\n else if (target.contains(source)) {\n rebuild = target.formioComponent.rebuild();\n }\n else {\n if (source.formioContainer) {\n rebuild = source.formioComponent.rebuild();\n }\n rebuild = target.formioComponent.rebuild();\n }\n }\n else {\n // If they are the same, only rebuild one.\n rebuild = target.formioComponent.rebuild();\n }\n if (!rebuild) {\n rebuild = Promise.resolve();\n }\n return rebuild.then(() => {\n this.emit('addComponent', info, parent, path, index, isNew && !this.options.noNewEdit && !info.noNewEdit);\n if (!isNew || this.options.noNewEdit || info.noNewEdit) {\n this.emit('change', this.form);\n }\n });\n }\n setForm(form) {\n var _a;\n if (!form.components) {\n form.components = [];\n }\n if (form && form.properties) {\n this.options.properties = form.properties;\n }\n this.keyboardActionsEnabled = lodash_1.default.get(this.options, 'keyboardBuilder', false) || ((_a = this.options.properties) === null || _a === void 0 ? void 0 : _a.keyboardBuilder);\n const isShowSubmitButton = !this.options.noDefaultSubmitButton\n && (!form.components.length || !form.components.find(comp => comp.key === 'submit'));\n // Ensure there is at least a submit button.\n if (isShowSubmitButton) {\n form.components.push({\n type: 'button',\n label: 'Submit',\n key: 'submit',\n size: 'md',\n block: false,\n action: 'submit',\n disableOnInvalid: true,\n theme: 'primary'\n });\n }\n if (this.webform) {\n const shouldRebuild = !this.webform.form.components ||\n (form.components.length !== this.webform.form.components.length);\n return this.webform.setForm(form, { keepAsReference: true }).then(() => {\n if (this.refs.form) {\n this.builderHeight = this.refs.form.offsetHeight;\n }\n if (!shouldRebuild) {\n return this.form;\n }\n return this.rebuild().then(() => this.form);\n });\n }\n return Promise.resolve(form);\n }\n populateRecaptchaSettings(form) {\n //populate isEnabled for recaptcha form settings\n let isRecaptchaEnabled = false;\n if (this.form.components) {\n (0, formUtils_1.eachComponent)(form.components, component => {\n if (isRecaptchaEnabled) {\n return;\n }\n if (component.type === 'recaptcha') {\n isRecaptchaEnabled = true;\n return false;\n }\n });\n if (isRecaptchaEnabled) {\n lodash_1.default.set(form, 'settings.recaptcha.isEnabled', true);\n }\n else if (lodash_1.default.get(form, 'settings.recaptcha.isEnabled')) {\n lodash_1.default.set(form, 'settings.recaptcha.isEnabled', false);\n }\n }\n }\n removeComponent(component, parent, original, componentInstance) {\n if (!parent) {\n return;\n }\n let remove = true;\n const removingComponentsGroup = !component.skipRemoveConfirm &&\n ((Array.isArray(component.components) && component.components.length) ||\n (Array.isArray(component.rows) && component.rows.length) ||\n (Array.isArray(component.columns) && component.columns.length));\n if (this.options.alwaysConfirmComponentRemoval || removingComponentsGroup) {\n const message = removingComponentsGroup ? 'Removing this component will also remove all of its children. Are you sure you want to do this?'\n : 'Are you sure you want to remove this component?';\n remove = window.confirm(this.t(message));\n }\n if (!original) {\n original = parent.formioContainer.find((comp) => comp.id === component.id);\n }\n const index = parent.formioContainer ? parent.formioContainer.indexOf(original) : 0;\n if (remove && index !== -1) {\n const path = this.getComponentsPath(component, parent.formioComponent.component);\n if (parent.formioContainer) {\n parent.formioContainer.splice(index, 1);\n }\n else if (parent.formioComponent && parent.formioComponent.removeChildComponent) {\n parent.formioComponent.removeChildComponent(component);\n }\n if (component.input && componentInstance && componentInstance.parent) {\n lodash_1.default.unset(componentInstance._data, componentInstance.key);\n }\n const rebuild = parent.formioComponent.rebuild() || Promise.resolve();\n rebuild.then(() => {\n this.emit('removeComponent', component, parent.formioComponent.schema, path, index);\n this.emit('change', this.form);\n });\n }\n return remove;\n }\n replaceDoubleQuotes(data, fieldsToRemoveDoubleQuotes = []) {\n if (data) {\n fieldsToRemoveDoubleQuotes.forEach((key) => {\n if (data[key]) {\n data[key] = data[key].replace(/\"/g, \"'\");\n }\n });\n return data;\n }\n }\n updateComponent(component, changed) {\n // Update the preview.\n if (this.preview) {\n this.preview.form = {\n components: [lodash_1.default.omit(Object.assign({}, component), [\n 'hidden',\n 'conditional',\n 'calculateValue',\n 'logic',\n 'autofocus',\n 'customConditional',\n ])],\n config: this.options.formConfig || {}\n };\n const fieldsToRemoveDoubleQuotes = ['label', 'tooltip'];\n this.preview.form.components.forEach(component => this.replaceDoubleQuotes(component, fieldsToRemoveDoubleQuotes));\n const previewElement = this.componentEdit.querySelector('[ref=\"preview\"]');\n if (previewElement) {\n this.setContent(previewElement, this.preview.render());\n this.preview.attach(previewElement);\n }\n }\n // Change the \"default value\" field to be reflective of this component.\n const defaultValueComponent = (0, formUtils_1.getComponent)(this.editForm.components, 'defaultValue', true);\n if (defaultValueComponent && component.type !== 'hidden') {\n const defaultChanged = changed && ((changed.component && changed.component.key === 'defaultValue')\n || (changed.instance && defaultValueComponent.hasComponent && defaultValueComponent.hasComponent(changed.instance)));\n if (!defaultChanged) {\n lodash_1.default.assign(defaultValueComponent.component, lodash_1.default.omit(Object.assign({}, component), [\n 'key',\n 'label',\n 'labelPosition',\n 'labelMargin',\n 'labelWidth',\n 'placeholder',\n 'tooltip',\n 'hidden',\n 'autofocus',\n 'validate',\n 'disabled',\n 'defaultValue',\n 'customDefaultValue',\n 'calculateValue',\n 'conditional',\n 'customConditional',\n 'id'\n ]));\n const parentComponent = defaultValueComponent.parent;\n let tabIndex = -1;\n let index = -1;\n parentComponent.tabs.some((tab, tIndex) => {\n tab.some((comp, compIndex) => {\n if (comp.id === defaultValueComponent.id) {\n tabIndex = tIndex;\n index = compIndex;\n return true;\n }\n return false;\n });\n });\n if (tabIndex !== -1 && index !== -1 && changed && !lodash_1.default.isNil(changed.value)) {\n const sibling = parentComponent.tabs[tabIndex][index + 1];\n parentComponent.removeComponent(defaultValueComponent);\n const newComp = parentComponent.addComponent(defaultValueComponent.component, defaultValueComponent.data, sibling);\n lodash_1.default.pull(newComp.validators, 'required');\n parentComponent.tabs[tabIndex].splice(index, 1, newComp);\n newComp.checkValidity = () => true;\n newComp.build(defaultValueComponent.element);\n }\n }\n else {\n let dataPath = changed.instance._data.key;\n const path = (0, utils_1.getArrayFromComponentPath)(changed.instance.path);\n path.shift();\n if (path.length) {\n path.unshift(component.key);\n dataPath = (0, utils_1.getStringFromComponentPath)(path);\n }\n lodash_1.default.set(this.preview._data, dataPath, changed.value);\n lodash_1.default.set(this.webform._data, dataPath, changed.value);\n }\n }\n // Called when we update a component.\n this.emit('updateComponent', component);\n }\n findRepeatablePaths() {\n const repeatablePaths = [];\n const keys = new Map();\n (0, formUtils_1.eachComponent)(this.form.components, (comp, path) => {\n if (!comp.key) {\n return;\n }\n if (keys.has(comp.key)) {\n if (keys.get(comp.key).includes(path)) {\n repeatablePaths.push(path);\n }\n else {\n keys.set(comp.key, [...keys.get(comp.key), path]);\n }\n }\n else {\n keys.set(comp.key, [path]);\n }\n }, true);\n return repeatablePaths;\n }\n highlightInvalidComponents() {\n const repeatablePaths = this.findRepeatablePaths();\n let hasInvalidComponents = false;\n this.webform.everyComponent((comp) => {\n var _a;\n const path = comp.path;\n const errors = comp.visibleErrors || [];\n if (repeatablePaths.includes(path)) {\n comp.setCustomValidity(`API Key is not unique: ${comp.key}`);\n hasInvalidComponents = true;\n }\n else if (errors.length && ((_a = errors[0].message) === null || _a === void 0 ? void 0 : _a.startsWith('API Key is not unique'))) {\n comp.setCustomValidity('');\n }\n });\n this.emit('builderFormValidityChange', hasInvalidComponents);\n }\n /**\n * Called when a new component is saved.\n *\n * @param parent\n * @param component\n * @return {boolean}\n */\n saveComponent(component, parent, isNew, original) {\n this.editForm.detach();\n const parentContainer = parent ? parent.formioContainer : this.container;\n const parentComponent = parent ? parent.formioComponent : this;\n this.dialog.close();\n const path = parentContainer ? this.getComponentsPath(component, parentComponent.component) : '';\n if (!original) {\n original = parent.formioContainer.find((comp) => comp.id === component.id);\n }\n const index = parentContainer ? parentContainer.indexOf(original) : 0;\n if (index !== -1) {\n let submissionData = this.editForm.submission.data;\n submissionData = submissionData.componentJson || submissionData;\n const fieldsToRemoveDoubleQuotes = ['label', 'tooltip'];\n this.replaceDoubleQuotes(submissionData, fieldsToRemoveDoubleQuotes);\n this.hook('beforeSaveComponentSettings', submissionData);\n let comp = null;\n parentComponent.getComponents().forEach((component) => {\n if (component.component.key === original.key) {\n comp = component;\n }\n });\n const originalComp = comp.component;\n const originalComponentSchema = comp.schema;\n const isParentSaveChildMethod = this.isParentSaveChildMethod(parent.formioComponent);\n if (parentContainer && !isParentSaveChildMethod) {\n parentContainer[index] = submissionData;\n if (comp) {\n comp.component = submissionData;\n }\n }\n else if (isParentSaveChildMethod) {\n parent.formioComponent.saveChildComponent(submissionData);\n }\n const rebuild = parentComponent.rebuild() || Promise.resolve();\n return rebuild.then(() => {\n const schema = parentContainer ? parentContainer[index] : (comp ? comp.schema : []);\n this.emitSaveComponentEvent(schema, originalComp, parentComponent.schema, path, index, isNew, originalComponentSchema);\n this.emit('change', this.form);\n this.highlightInvalidComponents();\n if (this.isComponentCreated) {\n const component = parent.formioComponent.components[0];\n this.moveComponent(component);\n this.isComponentCreated = false;\n }\n });\n }\n this.highlightInvalidComponents();\n return Promise.resolve();\n }\n emitSaveComponentEvent(schema, originalComp, parentComponentSchema, path, index, isNew, originalComponentSchema) {\n this.emit('saveComponent', schema, originalComp, parentComponentSchema, path, index, isNew, originalComponentSchema);\n }\n attachEditComponentControls(component, parent, isNew, original, ComponentClass) {\n const cancelButtons = this.componentEdit.querySelectorAll('[ref=\"cancelButton\"]');\n cancelButtons.forEach((cancelButton) => {\n this.editForm.addEventListener(cancelButton, 'click', (event) => {\n event.preventDefault();\n this.editForm.detach();\n this.emit('cancelComponent', component);\n this.dialog.close();\n this.highlightInvalidComponents();\n });\n });\n const removeButtons = this.componentEdit.querySelectorAll('[ref=\"removeButton\"]');\n removeButtons.forEach((removeButton) => {\n this.editForm.addEventListener(removeButton, 'click', (event) => {\n event.preventDefault();\n // Since we are already removing the component, don't trigger another remove.\n this.saved = true;\n this.editForm.detach();\n this.removeComponent(component, parent, original);\n this.dialog.close();\n this.highlightInvalidComponents();\n });\n });\n const saveButtons = this.componentEdit.querySelectorAll('[ref=\"saveButton\"]');\n saveButtons.forEach((saveButton) => {\n this.editForm.addEventListener(saveButton, 'click', (event) => {\n event.preventDefault();\n const errors = this.editForm.validate(this.editForm.data, {\n dirty: true\n });\n if (errors.length) {\n this.editForm.setPristine(false);\n this.editForm.showErrors(errors);\n return false;\n }\n this.saved = true;\n this.saveComponent(component, parent, isNew, original);\n });\n });\n const previewButtons = this.componentEdit.querySelectorAll('[ref=\"previewButton\"]');\n previewButtons.forEach((previewButton) => {\n this.editForm.addEventListener(previewButton, 'click', (event) => {\n event.preventDefault();\n this.showPreview = !this.showPreview;\n this.editForm.detach();\n this.setContent(this.componentEdit, this.renderTemplate('builderEditForm', {\n componentInfo: ComponentClass.builderInfo,\n editForm: this.editForm.render(),\n preview: this.preview ? this.preview.render() : false,\n showPreview: this.showPreview,\n helplinks: this.helplinks,\n }));\n this.editForm.attach(this.componentEdit.querySelector('[ref=\"editForm\"]'));\n this.attachEditComponentControls(component, parent, isNew, original, ComponentClass);\n });\n });\n }\n editComponent(component, parent, isNew, isJsonEdit, original, flags = {}) {\n var _a, _b;\n if (!component.key) {\n return;\n }\n this.saved = false;\n const componentCopy = (0, utils_1.fastCloneDeep)(component);\n let ComponentClass = Components_1.default.components[componentCopy.type];\n const isCustom = ComponentClass === undefined;\n isJsonEdit = isJsonEdit || isCustom;\n ComponentClass = isCustom ? Components_1.default.components.unknown : ComponentClass;\n // Make sure we only have one dialog open at a time.\n if (this.dialog) {\n this.dialog.close();\n this.highlightInvalidComponents();\n }\n // This is the render step.\n const editFormOptions = lodash_1.default.clone(lodash_1.default.get(this, 'options.editForm', {}));\n if (this.editForm) {\n this.editForm.destroy();\n }\n // Allow editForm overrides per component.\n const overrides = lodash_1.default.get(this.options, `editForm.${componentCopy.type}`, {});\n // Pass along the form being edited.\n editFormOptions.editForm = this.form;\n editFormOptions.editComponent = component;\n editFormOptions.flags = flags;\n this.hook('editComponentParentInstance', editFormOptions, parent);\n this.editForm = new Webform_1.default(Object.assign(Object.assign(Object.assign(Object.assign({}, lodash_1.default.omit(this.options, ['hooks', 'builder', 'events', 'attachMode', 'skipInit'])), { language: this.options.language }), editFormOptions), { evalContext: Object.assign(Object.assign({}, ((editFormOptions === null || editFormOptions === void 0 ? void 0 : editFormOptions.evalContext) || ((_a = this.options) === null || _a === void 0 ? void 0 : _a.evalContext) || {})), { buildingForm: this.form }) }));\n this.hook('editFormProperties', parent);\n this.editForm.form = (isJsonEdit && !isCustom) ? {\n components: [\n {\n type: 'textarea',\n as: 'json',\n editor: 'ace',\n weight: 10,\n input: true,\n key: 'componentJson',\n label: 'Component JSON',\n tooltip: 'Edit the JSON for this component.'\n },\n {\n type: 'checkbox',\n key: 'showFullSchema',\n label: 'Full Schema'\n }\n ]\n } : ComponentClass.editForm(lodash_1.default.cloneDeep(overrides));\n const instanceOptions = {\n inFormBuilder: true,\n };\n this.hook('instanceOptionsPreview', instanceOptions);\n const instance = new ComponentClass(componentCopy, instanceOptions);\n const schema = this.hook('builderComponentSchema', component, instance);\n this.editForm.submission = isJsonEdit ? {\n data: {\n componentJson: schema,\n showFullSchema: this.options.showFullJsonSchema\n },\n } : {\n data: instance.component,\n };\n if (this.preview) {\n this.preview.destroy();\n }\n if (!ComponentClass.builderInfo.hasOwnProperty('preview') || ComponentClass.builderInfo.preview) {\n this.preview = new Webform_1.default(lodash_1.default.omit(Object.assign(Object.assign({}, this.options), { preview: true }), [\n 'hooks',\n 'builder',\n 'events',\n 'attachMode',\n 'calculateValue'\n ]));\n this.hook('previewFormSettitngs', schema, isJsonEdit);\n }\n this.showPreview = (_b = ComponentClass.builderInfo.showPreview) !== null && _b !== void 0 ? _b : true;\n this.componentEdit = this.ce('div', { 'class': 'component-edit-container' });\n this.setContent(this.componentEdit, this.renderTemplate('builderEditForm', {\n componentInfo: ComponentClass.builderInfo,\n editForm: this.editForm.render(),\n preview: this.preview ? this.preview.render() : false,\n showPreview: this.showPreview,\n helplinks: this.helplinks\n }));\n this.dialog = this.createModal(this.componentEdit, lodash_1.default.get(this.options, 'dialogAttr', {}));\n // This is the attach step.\n this.editForm.attach(this.componentEdit.querySelector('[ref=\"editForm\"]'));\n this.hook('editFormWrapper');\n this.updateComponent(componentCopy);\n this.editForm.on('change', (event) => {\n if (event.changed) {\n if (event.changed.component && event.changed.component.key === 'showFullSchema') {\n const { value } = event.changed;\n this.editForm.submission = {\n data: {\n componentJson: value ? instance.component : component,\n showFullSchema: value\n },\n };\n return;\n }\n // See if this is a manually modified key. Treat custom component keys as manually modified\n if ((event.changed.component && (event.changed.component.key === 'key')) || isJsonEdit) {\n componentCopy.keyModified = true;\n }\n let isComponentLabelChanged = false;\n if (event.changed.instance) {\n isComponentLabelChanged = ['label', 'title'].includes(event.changed.instance.path);\n }\n else if (event.changed.component) {\n isComponentLabelChanged = ['label', 'title'].includes(event.changed.component.key);\n }\n if (isComponentLabelChanged) {\n // Ensure this component has a key.\n if (isNew) {\n if (!event.data.keyModified) {\n this.editForm.everyComponent(component => {\n if (component.key === 'key' && component.parent.component.key === 'tabs') {\n component.setValue(this.updateComponentKey(event.data));\n return false;\n }\n });\n }\n if (this.form) {\n let formComponents = this.findNamespaceRoot(parent.formioComponent);\n // excluding component which key uniqueness is to be checked to prevent the comparing of the same keys\n formComponents = formComponents.filter(comp => editFormOptions.editComponent.id !== comp.id);\n // Set a unique key for this component.\n builder_1.default.uniquify(formComponents, event.data);\n }\n }\n }\n // If the edit form has any nested form inside, we get a partial data (nested form's data) in the\n // event.data property\n let editFormData;\n if (event.changed.instance && event.changed.instance.root && event.changed.instance.root.id !== this.editForm.id) {\n editFormData = this.editForm.data;\n }\n // Update the component.\n this.updateComponent(event.data.componentJson || editFormData || event.data, event.changed);\n }\n });\n this.attachEditComponentControls(component, parent, isNew, original, ComponentClass);\n const dialogClose = () => {\n this.editForm.destroy(true);\n if (this.preview) {\n this.preview.destroy(true);\n this.preview = null;\n }\n if (isNew && !this.saved) {\n this.removeComponent(component, parent, original);\n this.highlightInvalidComponents();\n }\n // Clean up.\n this.removeEventListener(this.dialog, 'close', dialogClose);\n this.dialog = null;\n };\n this.addEventListener(this.dialog, 'close', dialogClose);\n // Called when we edit a component.\n this.emit('editComponent', component);\n }\n updateComponentKey(data) {\n return lodash_1.default.camelCase(data.title ||\n data.label ||\n data.placeholder ||\n data.type).replace(/^[0-9]*/, '');\n }\n moveComponent(component) {\n var _a;\n if (this.selectedComponent) {\n const prevSelected = this.selectedComponent;\n (_a = prevSelected.element) === null || _a === void 0 ? void 0 : _a.classList.remove('builder-component-selected');\n this.removeEventListener(document, 'keydown');\n }\n component.element.focus();\n component.element.classList.add('builder-component-selected');\n this.selectedComponent = component;\n this.addEventListener(document, 'keydown', this.moveHandler.bind(this));\n }\n updateComponentPlacement(direction) {\n const component = this.selectedComponent;\n let index, info;\n const step = direction ? -1 : 1;\n if (component) {\n const element = component.element;\n const sibling = direction ? element.previousElementSibling : element.nextElementSibling;\n const source = element.parentNode;\n const containerLength = source.formioContainer.length;\n if (containerLength && containerLength <= 1) {\n return;\n }\n if (source.formioContainer) {\n index = lodash_1.default.findIndex(source.formioContainer, { key: element.formioComponent.component.key });\n if (index !== -1) {\n info = source.formioContainer.splice(lodash_1.default.findIndex(source.formioContainer, { key: element.formioComponent.component.key }), 1);\n info = info[0];\n source.removeChild(element);\n }\n }\n const len = source.formioComponent.components.length;\n index = (index === -1) ? 0 : index + step;\n if (index === -1) {\n source.formioContainer.push(info);\n source.appendChild(element);\n }\n else if (index === len) {\n const key = source.formioContainer[0].key;\n index = lodash_1.default.findIndex(source.formioComponent.components, { key: key });\n const firstElement = source.formioComponent.components[index].element;\n source.formioContainer.splice(0, 0, info);\n source.insertBefore(element, firstElement);\n }\n else if (index !== -1) {\n source.formioContainer.splice(index, 0, info);\n direction\n ? source.insertBefore(element, sibling)\n : source.insertBefore(element, sibling.nextElementSibling);\n }\n element.focus();\n }\n }\n stopMoving(comp) {\n const parent = comp.element.parentNode;\n this.removeEventListener(document, 'keydown');\n parent.formioComponent.rebuild();\n this.selectedComponent = null;\n }\n addNewComponent(element) {\n var _a;\n const source = document.querySelector('.formio-builder-form');\n const key = element.getAttribute('data-key');\n const group = element.getAttribute('data-group');\n const isNew = true;\n let info;\n if (key && group) {\n info = this.getComponentInfo(key, group);\n }\n if (isNew && !this.options.noNewEdit && !info.noNewEdit) {\n builder_1.default.uniquify(this.findNamespaceRoot(source.formioComponent), info);\n this.editComponent(info, source, isNew, null, null);\n }\n const firstComponent = (_a = source.formioComponent.components[0]) === null || _a === void 0 ? void 0 : _a.element;\n if (firstComponent) {\n source.formioContainer.splice(0, 0, info);\n }\n else {\n source.formioContainer.push(info);\n }\n source.formioComponent.rebuild().then(() => {\n this.isComponentCreated = true;\n });\n }\n /**\n * Creates copy of component schema and stores it under sessionStorage.\n * @param {Component} component\n * @return {*}\n */\n copyComponent(component) {\n if (!window.sessionStorage) {\n return console.warn('Session storage is not supported in this browser.');\n }\n this.addClass(this.refs.form, 'builder-paste-mode');\n window.sessionStorage.setItem('formio.clipboard', JSON.stringify(component.schema));\n }\n /**\n * Paste copied component after the current component.\n * @param {Component} component\n * @return {*}\n */\n pasteComponent(component) {\n if (!window.sessionStorage) {\n return console.warn('Session storage is not supported in this browser.');\n }\n this.removeClass(this.refs.form, 'builder-paste-mode');\n if (window.sessionStorage) {\n const data = window.sessionStorage.getItem('formio.clipboard');\n if (data) {\n const schema = JSON.parse(data);\n const parent = this.getParentElement(component.element);\n if (parent) {\n builder_1.default.uniquify(this.findNamespaceRoot(parent.formioComponent), schema);\n let path = '';\n let index = 0;\n const isParentSaveChildMethod = this.isParentSaveChildMethod(parent.formioComponent);\n if (parent.formioContainer && !isParentSaveChildMethod) {\n index = parent.formioContainer.indexOf(component.component);\n path = this.getComponentsPath(schema, parent.formioComponent.component);\n parent.formioContainer.splice(index + 1, 0, schema);\n }\n else if (isParentSaveChildMethod) {\n parent.formioComponent.saveChildComponent(schema, false);\n }\n parent.formioComponent.rebuild();\n this.emitSaveComponentEvent(schema, schema, parent.formioComponent.component, path, (index + 1), true, schema);\n }\n this.emit('change', this.form);\n }\n }\n }\n isParentSaveChildMethod(parentComp) {\n return !!(parentComp && parentComp.saveChildComponent);\n }\n getParentElement(element) {\n let container = element;\n do {\n container = container.parentNode;\n } while (container && !container.formioComponent);\n return container;\n }\n addBuilderComponentInfo(component) {\n if (!component || !component.group || !this.groups[component.group]) {\n return;\n }\n component = lodash_1.default.clone(component);\n const groupInfo = this.groups[component.group];\n if (!groupInfo.components.hasOwnProperty(component.key)) {\n groupInfo.components[component.key] = component;\n }\n return component;\n }\n init() {\n if (this.webform) {\n this.webform.init();\n }\n return super.init();\n }\n clear() {\n if (this.webform.initialized) {\n this.webform.clear();\n }\n }\n destroy(all = false) {\n if (this.webform.initialized) {\n this.webform.destroy(all);\n }\n super.destroy(all);\n }\n addBuilderGroup(name, group) {\n if (!this.groups[name]) {\n this.groups[name] = group;\n this.groupOrder.push(name);\n this.triggerRedraw();\n }\n else {\n this.updateBuilderGroup(name, group);\n }\n }\n updateBuilderGroup(name, group) {\n if (this.groups[name]) {\n this.groups[name] = group;\n this.triggerRedraw();\n }\n }\n generateKey(info) {\n return info.key || lodash_1.default.camelCase(info.title ||\n info.label ||\n info.placeholder ||\n info.type);\n }\n}\nexports[\"default\"] = WebformBuilder;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/WebformBuilder.js?");
4413
+ eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst Webform_1 = __importDefault(__webpack_require__(/*! ./Webform */ \"./lib/cjs/Webform.js\"));\nconst Component_1 = __importDefault(__webpack_require__(/*! ./components/_classes/component/Component */ \"./lib/cjs/components/_classes/component/Component.js\"));\nconst tippy_js_1 = __importDefault(__webpack_require__(/*! tippy.js */ \"./node_modules/tippy.js/dist/tippy.esm.js\"));\nconst Components_1 = __importDefault(__webpack_require__(/*! ./components/Components */ \"./lib/cjs/components/Components.js\"));\nconst Formio_1 = __webpack_require__(/*! ./Formio */ \"./lib/cjs/Formio.js\");\nconst utils_1 = __webpack_require__(/*! ./utils/utils */ \"./lib/cjs/utils/utils.js\");\nconst formUtils_1 = __webpack_require__(/*! ./utils/formUtils */ \"./lib/cjs/utils/formUtils.js\");\nconst builder_1 = __importDefault(__webpack_require__(/*! ./utils/builder */ \"./lib/cjs/utils/builder.js\"));\nconst lodash_1 = __importDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nconst dom_autoscroller_1 = __importDefault(__webpack_require__(/*! dom-autoscroller */ \"./node_modules/dom-autoscroller/dist/bundle.js\"));\nconst Templates_1 = __importDefault(__webpack_require__(/*! ./templates/Templates */ \"./lib/cjs/templates/Templates.js\"));\n__webpack_require__(/*! ./components/builder */ \"./lib/cjs/components/builder.js\");\n// We need this here because dragula pulls in CustomEvent class that requires global to exist.\nif (typeof window !== 'undefined' && typeof window.global === 'undefined') {\n window.global = window;\n}\nconst dragula_1 = __importDefault(__webpack_require__(/*! dragula */ \"./node_modules/dragula/dragula.js\"));\nclass WebformBuilder extends Component_1.default {\n // eslint-disable-next-line max-statements\n constructor() {\n let element, options;\n if (arguments[0] instanceof HTMLElement || arguments[1]) {\n element = arguments[0];\n options = arguments[1];\n }\n else {\n options = arguments[0];\n }\n // Reset skipInit in case PDFBuilder has set it.\n options.skipInit = false;\n options.display = options.display || 'form';\n super(null, options);\n this.moveHandler = (e) => {\n if (e.keyCode === 38 || e.keyCode === 40 || e.keyCode === 13) {\n e.stopPropagation();\n e.preventDefault();\n }\n if (e.keyCode === 38) {\n this.updateComponentPlacement(true);\n }\n if (e.keyCode === 40) {\n this.updateComponentPlacement(false);\n }\n if (e.keyCode === 13) {\n this.stopMoving(this.selectedComponent);\n }\n };\n this.setElement(element);\n this.dragulaLib = dragula_1.default;\n this.builderHeight = 0;\n this.schemas = {};\n this.repeatablePaths = [];\n this.sideBarScroll = lodash_1.default.get(this.options, 'sideBarScroll', true);\n this.sideBarScrollOffset = lodash_1.default.get(this.options, 'sideBarScrollOffset', 0);\n this.dragDropEnabled = true;\n // Setup the builder options.\n this.builder = lodash_1.default.defaultsDeep({}, this.options.builder, this.defaultGroups);\n // Turn off if explicitely said to do so...\n lodash_1.default.each(this.defaultGroups, (config, key) => {\n if (config === false) {\n this.builder[key] = false;\n }\n });\n // Add the groups.////\n this.groups = {};\n this.groupOrder = [];\n for (const group in this.builder) {\n if (this.builder[group]) {\n this.builder[group].key = group;\n this.groups[group] = this.builder[group];\n this.groups[group].components = this.groups[group].components || {};\n this.groups[group].componentOrder = this.groups[group].componentOrder || [];\n this.groups[group].subgroups = Object.keys(this.groups[group].groups || {}).map((groupKey) => {\n this.groups[group].groups[groupKey].componentOrder = Object.keys(this.groups[group].groups[groupKey].components).map((key) => key);\n return this.groups[group].groups[groupKey];\n });\n this.groupOrder.push(this.groups[group]);\n }\n }\n this.groupOrder = this.groupOrder\n .filter(group => group && !group.ignore)\n .sort((a, b) => a.weight - b.weight)\n .map(group => group.key);\n for (const type in Components_1.default.components) {\n const component = Components_1.default.components[type];\n if (component.builderInfo && component.builderInfo.schema) {\n this.schemas[type] = component.builderInfo.schema;\n component.type = type;\n const builderInfo = component.builderInfo;\n builderInfo.key = component.type;\n this.addBuilderComponentInfo(builderInfo);\n }\n }\n // Filter out any extra components.\n // Add the components in each group.\n for (const group in this.groups) {\n const info = this.groups[group];\n for (const key in info.components) {\n const compKey = group === 'resource' ? `component-${key}` : key;\n let comp = info.components[compKey];\n if (comp === true &&\n Components_1.default.components[key] &&\n Components_1.default.components[key].builderInfo) {\n comp = Components_1.default.components[key].builderInfo;\n }\n if (comp && comp.schema) {\n this.schemas[key] = comp.schema;\n info.components[compKey] = comp;\n info.components[compKey].key = key;\n }\n else {\n // Do not include this component in the components array.\n delete info.components[compKey];\n }\n }\n // Order the components.\n this.orderComponents(info);\n }\n this.options.hooks = this.options.hooks || {};\n this.options.hooks.renderComponent = (html, { component, self }) => {\n var _a;\n if (self.type === 'form' && !self.key) {\n const template = this.hook('renderComponentFormTemplate', html.replace('formio-component-form', ''));\n // The main webform shouldn't have this class as it adds extra styles.\n return template;\n }\n if (this.options.disabled && this.options.disabled.includes(self.key) || self.parent.noDragDrop) {\n return html;\n }\n return this.renderTemplate('builderComponent', {\n html,\n disableBuilderActions: (_a = self === null || self === void 0 ? void 0 : self.component) === null || _a === void 0 ? void 0 : _a.disableBuilderActions,\n childComponent: component,\n });\n };\n this.options.hooks.renderComponents = (html, { components, self }) => {\n // if Datagrid and already has a component, don't make it droppable.\n if (self.type === 'datagrid' && components.length > 0 || self.noDragDrop) {\n return html;\n }\n if (!components ||\n (!components.length && !components.nodrop) ||\n (self.type === 'form' && components.length <= 1 && (components.length === 0 || components[0].type === 'button'))) {\n html = this.renderTemplate('builderPlaceholder', {\n position: 0\n }) + html;\n }\n return this.renderTemplate('builderComponents', {\n key: self.key,\n type: self.type,\n html,\n });\n };\n this.options.hooks.renderInput = (html, { self }) => {\n if (self.type === 'hidden') {\n return html + self.name;\n }\n return html;\n };\n this.options.hooks.renderLoading = (html, { self }) => {\n if (self.type === 'form' && self.key) {\n return self.name;\n }\n return html;\n };\n this.options.hooks.attachComponents = (element, components, container, component) => {\n // Don't attach if no element was found or component doesn't participate in drag'n'drop.\n if (!element) {\n return;\n }\n if (component.noDragDrop) {\n return element;\n }\n // Attach container and component to element for later reference.\n const containerElement = element.querySelector(`[ref=\"${component.component.key}-container\"]`) || element;\n containerElement.formioContainer = container;\n containerElement.formioComponent = component;\n // Add container to draggable list.\n if (this.dragula && this.allowDrop(element)) {\n this.dragula.containers.push(containerElement);\n }\n // If this is an existing datagrid element, don't make it draggable.\n if ((component.type === 'datagrid' || component.type === 'datamap') && components.length > 0) {\n return element;\n }\n // Since we added a wrapper, need to return the original element so that we can find the components inside it.\n return element.children[0];\n };\n this.options.hooks.attachDatagrid = (element, component) => {\n component.loadRefs(element, {\n [`${component.key}-container`]: 'single',\n });\n const dataGridContainer = component.refs[`${component.key}-container`];\n if (dataGridContainer) {\n component.attachComponents(dataGridContainer.parentNode, [], component.component.components);\n }\n // Need to set up horizontal rearrangement of fields.\n };\n this.options.hooks.attachComponent = this.attachComponent.bind(this);\n // Load resources tagged as 'builder'\n const query = {\n params: {\n type: 'resource',\n limit: 1000000,\n select: '_id,title,name,components'\n }\n };\n if (this.options && this.options.resourceTag) {\n query.params.tags = [this.options.resourceTag];\n }\n else if (!this.options || !this.options.hasOwnProperty('resourceTag')) {\n query.params.tags = ['builder'];\n }\n const formio = new Formio_1.Formio(Formio_1.Formio.projectUrl);\n const isResourcesDisabled = this.options.builder && this.options.builder.resource === false;\n formio.loadProject().then((project) => {\n if (project && (lodash_1.default.get(project, 'settings.addConfigToForms', false) || lodash_1.default.get(project, 'addConfigToForms', false))) {\n const config = project.config || {};\n this.options.formConfig = config;\n const pathToFormConfig = 'webform._form.config';\n const webformConfig = lodash_1.default.get(this, pathToFormConfig);\n if (this.webform && !webformConfig) {\n lodash_1.default.set(this, pathToFormConfig, config);\n }\n }\n }).catch((err) => {\n console.warn(`Could not load project settings: ${err.message || err}`);\n });\n if (!formio.noProject && !isResourcesDisabled && formio.formsUrl) {\n const resourceOptions = this.options.builder && this.options.builder.resource;\n formio.loadForms(query)\n .then((resources) => {\n if (resources.length) {\n this.builder.resource = {\n title: resourceOptions ? resourceOptions.title : 'Existing Resource Fields',\n key: 'resource',\n weight: resourceOptions ? resourceOptions.weight : 50,\n subgroups: [],\n components: [],\n componentOrder: []\n };\n this.groups.resource = {\n title: resourceOptions ? resourceOptions.title : 'Existing Resource Fields',\n key: 'resource',\n weight: resourceOptions ? resourceOptions.weight : 50,\n subgroups: [],\n components: [],\n componentOrder: []\n };\n if (!this.groupOrder.includes('resource')) {\n this.groupOrder.push('resource');\n }\n this.addExistingResourceFields(resources);\n }\n });\n }\n // Notify components if they need to modify their render.\n this.options.attachMode = 'builder';\n this.webform = this.webform || this.createForm(this.options);\n this.pathComponentsMapping = {};\n this.arrayDataComponentPaths = [];\n this.nestedDataComponents = [];\n this.arrayDataComponents = [];\n }\n allowDrop() {\n return true;\n }\n addExistingResourceFields(resources) {\n lodash_1.default.each(resources, (resource, index) => {\n const resourceKey = `resource-${resource.name}`;\n const subgroup = {\n key: resourceKey,\n title: resource.title,\n components: [],\n componentOrder: [],\n default: index === 0,\n };\n (0, formUtils_1.eachComponent)(resource.components, (component) => {\n if (component.type === 'button')\n return;\n if (this.options &&\n this.options.resourceFilter &&\n (!component.tags || component.tags.indexOf(this.options.resourceFilter) === -1))\n return;\n let componentName = component.label;\n if (!componentName && component.key) {\n componentName = lodash_1.default.upperFirst(component.key);\n }\n subgroup.componentOrder.push(`component-${component.key}`);\n subgroup.components[`component-${component.key}`] = lodash_1.default.merge((0, utils_1.fastCloneDeep)(Components_1.default.components[component.type]\n ? Components_1.default.components[component.type].builderInfo\n : Components_1.default.components['unknown'].builderInfo), {\n key: component.key,\n title: componentName,\n group: 'resource',\n subgroup: resourceKey,\n }, {\n schema: Object.assign(Object.assign({}, component), { label: component.label, key: component.key, lockKey: true, source: (!this.options.noSource ? resource._id : undefined), isNew: true })\n });\n }, true);\n this.groups.resource.subgroups.push(subgroup);\n });\n this.triggerRedraw();\n }\n attachTooltip(component, title) {\n return (0, tippy_js_1.default)(component, {\n allowHTML: true,\n trigger: 'mouseenter focus',\n placement: 'top',\n delay: [200, 0],\n zIndex: 10000,\n content: title\n });\n }\n attachComponent(element, component) {\n if (component instanceof WebformBuilder) {\n return;\n }\n // Add component to element for later reference.\n element.formioComponent = component;\n component.loadRefs(element, {\n removeComponent: 'single',\n editComponent: 'single',\n moveComponent: 'single',\n copyComponent: 'single',\n pasteComponent: 'single',\n editJson: 'single'\n });\n if (component.refs.copyComponent) {\n this.attachTooltip(component.refs.copyComponent, this.t('Copy'));\n component.addEventListener(component.refs.copyComponent, 'click', () => this.copyComponent(component));\n }\n if (component.refs.pasteComponent) {\n const pasteToolTip = this.attachTooltip(component.refs.pasteComponent, this.t('Paste below'));\n component.addEventListener(component.refs.pasteComponent, 'click', () => {\n pasteToolTip.hide();\n this.pasteComponent(component);\n });\n }\n if (component.refs.moveComponent) {\n this.attachTooltip(component.refs.moveComponent, this.t('Move'));\n if (this.keyboardActionsEnabled) {\n component.addEventListener(component.refs.moveComponent, 'click', () => {\n this.moveComponent(component);\n });\n }\n }\n const parent = this.getParentElement(element);\n if (component.refs.editComponent) {\n this.attachTooltip(component.refs.editComponent, this.t('Edit'));\n component.addEventListener(component.refs.editComponent, 'click', () => this.editComponent(component.schema, parent, false, false, component.component, { inDataGrid: component.isInDataGrid }));\n }\n if (component.refs.editJson) {\n this.attachTooltip(component.refs.editJson, this.t('Edit JSON'));\n component.addEventListener(component.refs.editJson, 'click', () => this.editComponent(component.schema, parent, false, true, component.component));\n }\n if (component.refs.removeComponent) {\n this.attachTooltip(component.refs.removeComponent, this.t('Remove'));\n component.addEventListener(component.refs.removeComponent, 'click', () => this.removeComponent(component.schema, parent, component.component, component));\n }\n return element;\n }\n createForm(options) {\n this.webform = new Webform_1.default(this.element, options);\n if (this.element) {\n this.loadRefs(this.element, {\n form: 'single'\n });\n if (this.refs.form) {\n this.webform.element = this.refs.form;\n }\n }\n return this.webform;\n }\n /**\n * Called when everything is ready.\n *\n * @returns {Promise} - Wait for webform to be ready.\n */\n get ready() {\n return this.webform.ready;\n }\n get defaultGroups() {\n return {\n basic: {\n title: 'Basic',\n weight: 0,\n default: true,\n },\n advanced: {\n title: 'Advanced',\n weight: 10\n },\n layout: {\n title: 'Layout',\n weight: 20\n },\n data: {\n title: 'Data',\n weight: 30\n },\n premium: {\n title: 'Premium',\n weight: 40\n }\n };\n }\n redraw() {\n return Webform_1.default.prototype.redraw.call(this);\n }\n get form() {\n return this.webform.form;\n }\n get schema() {\n return this.webform.schema;\n }\n set form(value) {\n this.setForm(value);\n }\n get container() {\n return this.webform.form.components;\n }\n /**\n * When a component sets its api key, we need to check if it is unique within its namespace. Find the namespace root\n * so we can calculate this correctly.\n * @param component\n */\n findNamespaceRoot(component) {\n const path = (0, utils_1.getArrayFromComponentPath)(component.path);\n // First get the component with nested parents.\n let comp = this.webform.getComponent(path);\n comp = Array.isArray(comp) ? comp[0] : comp;\n const namespaceKey = this.recurseNamespace(comp);\n // If there is no key, it is the root form.\n if (!namespaceKey || this.form.key === namespaceKey) {\n return this.form.components;\n }\n const componentSchema = component.component;\n // If the current component is the namespace, we don't need to find it again.\n if (namespaceKey === component.key) {\n return [...componentSchema.components, componentSchema];\n }\n // Get the namespace component so we have the original object.\n const namespaceComponent = (0, formUtils_1.getComponent)(this.form.components, namespaceKey, true);\n return namespaceComponent ? namespaceComponent.components : comp.components;\n }\n recurseNamespace(component) {\n // If there is no parent, we are at the root level.\n if (!component) {\n return null;\n }\n // Some components are their own namespace.\n if (['address', 'container', 'datagrid', 'editgrid', 'dynamicWizard', 'tree'].includes(component.type) || component.tree || component.arrayTree) {\n return component.key;\n }\n // Anything else, keep going up.\n return this.recurseNamespace(component.parent);\n }\n render() {\n return this.renderTemplate('builder', {\n sidebar: this.renderTemplate('builderSidebar', {\n scrollEnabled: this.sideBarScroll,\n groupOrder: this.groupOrder,\n groupId: `builder-sidebar-${this.id}`,\n groups: this.groupOrder.map((groupKey) => this.renderTemplate('builderSidebarGroup', {\n group: this.groups[groupKey],\n groupKey,\n groupId: `builder-sidebar-${this.id}`,\n subgroups: this.groups[groupKey].subgroups.map((group) => this.renderTemplate('builderSidebarGroup', {\n group,\n groupKey: group.key,\n groupId: `group-container-${groupKey}`,\n subgroups: []\n })),\n keyboardActionsEnabled: this.keyboardActionsEnabled,\n })),\n }),\n form: this.webform.render(),\n });\n }\n attach(element) {\n this.on('change', (form) => {\n this.populateRecaptchaSettings(form);\n });\n return super.attach(element).then(() => {\n this.loadRefs(element, {\n form: 'single',\n sidebar: 'single',\n 'sidebar-search': 'single',\n 'sidebar-groups': 'single',\n 'container': 'multiple',\n 'sidebar-anchor': 'multiple',\n 'sidebar-group': 'multiple',\n 'sidebar-container': 'multiple',\n 'sidebar-component': 'multiple',\n });\n if (this.sideBarScroll && Templates_1.default.current.handleBuilderSidebarScroll) {\n Templates_1.default.current.handleBuilderSidebarScroll.call(this, this);\n }\n // Add the paste status in form\n if (typeof window !== 'undefined' && window.sessionStorage) {\n const data = window.sessionStorage.getItem('formio.clipboard');\n if (data) {\n this.addClass(this.refs.form, 'builder-paste-mode');\n }\n }\n if (!(0, utils_1.bootstrapVersion)(this.options)) {\n const getAttribute = (anchor, attribute) => {\n let elem = anchor.getAttribute(`data-${attribute}`);\n if (!elem) {\n elem = anchor.getAttribute(`data-bs-${attribute}`);\n }\n return elem;\n };\n const hideShow = (group, show) => {\n if (show) {\n group.classList.add(['show']);\n group.style.display = 'inherit';\n }\n else {\n group.classList.remove(['show']);\n group.style.display = 'none';\n }\n };\n // Initialize\n this.refs['sidebar-group'].forEach((group) => {\n hideShow(group, getAttribute(group, 'default') === 'true');\n });\n // Click event\n this.refs['sidebar-anchor'].forEach((anchor, index) => {\n this.addEventListener(anchor, 'click', () => {\n const clickedParentId = getAttribute(anchor, 'parent').slice('#builder-sidebar-'.length);\n const clickedId = getAttribute(anchor, 'target').slice('#group-'.length);\n this.refs['sidebar-group'].forEach((group, groupIndex) => {\n const openByDefault = getAttribute(group, 'default') === 'true';\n const groupId = group.getAttribute('id').slice('group-'.length);\n const groupParent = getAttribute(group, 'parent').slice('#builder-sidebar-'.length);\n hideShow(group, ((openByDefault && groupParent === clickedId) || groupId === clickedParentId || groupIndex === index));\n });\n }, true);\n });\n }\n if (this.keyboardActionsEnabled) {\n this.refs['sidebar-component'].forEach((component) => {\n this.addEventListener(component, 'keydown', (event) => {\n if (event.keyCode === 13) {\n this.addNewComponent(component);\n }\n });\n });\n }\n this.addEventListener(this.refs['sidebar-search'], 'input', lodash_1.default.debounce((e) => {\n const searchString = e.target.value;\n this.searchFields(searchString);\n }, 300));\n if (this.dragDropEnabled) {\n this.initDragula();\n }\n const drake = this.dragula;\n if (this.refs.form) {\n (0, dom_autoscroller_1.default)([window], {\n margin: 20,\n maxSpeed: 6,\n scrollWhenOutside: true,\n autoScroll: function () {\n return this.down && (drake === null || drake === void 0 ? void 0 : drake.dragging);\n }\n });\n return this.webform.attach(this.refs.form);\n }\n });\n }\n searchFields(searchString = '') {\n const searchValue = searchString.toLowerCase();\n const sidebar = this.refs['sidebar'];\n const sidebarGroups = this.refs['sidebar-groups'];\n if (!sidebar || !sidebarGroups) {\n return;\n }\n const filterGroupBy = (group, searchValue = '') => {\n const result = lodash_1.default.toPlainObject(group);\n const { subgroups = [], components } = result;\n const filteredComponents = [];\n for (const key in components) {\n const isMatchedToTitle = this.t(components[key].title).toLowerCase().match(searchValue);\n const isMatchedToKey = components[key].key.toLowerCase().match(searchValue);\n if (isMatchedToTitle || isMatchedToKey) {\n filteredComponents.push(components[key]);\n }\n }\n this.orderComponents(result, filteredComponents);\n if (searchValue) {\n result.default = true;\n }\n if (result.componentOrder.length || subgroups.length) {\n return result;\n }\n return null;\n };\n const filterGroupOrder = (groupOrder, searchValue) => {\n const result = lodash_1.default.cloneDeep(groupOrder);\n return result.filter(key => filterGroupBy(this.groups[key], searchValue));\n };\n const filterSubgroups = (groups, searchValue) => {\n const result = lodash_1.default.clone(groups);\n return result\n .map(subgroup => filterGroupBy(subgroup, searchValue))\n .filter(subgroup => !lodash_1.default.isNull(subgroup));\n };\n const toTemplate = groupKey => {\n return {\n group: filterGroupBy(this.groups[groupKey], searchValue),\n groupKey,\n groupId: sidebar.id || sidebarGroups.id,\n subgroups: filterSubgroups(this.groups[groupKey].subgroups, searchValue)\n .map((group) => this.renderTemplate('builderSidebarGroup', {\n group,\n groupKey: group.key,\n groupId: `group-container-${groupKey}`,\n subgroups: []\n })),\n };\n };\n sidebarGroups.innerHTML = filterGroupOrder(this.groupOrder, searchValue)\n .map(groupKey => this.renderTemplate('builderSidebarGroup', toTemplate(groupKey)))\n .join('');\n this.loadRefs(this.element, {\n 'sidebar-groups': 'single',\n 'sidebar-anchor': 'multiple',\n 'sidebar-group': 'multiple',\n 'sidebar-container': 'multiple',\n });\n this.updateDragAndDrop();\n if (searchValue === '') {\n this.triggerRedraw();\n }\n }\n orderComponents(groupInfo, foundComponents) {\n const components = foundComponents || groupInfo.components;\n const isResource = groupInfo.key.indexOf('resource-') === 0;\n if (components) {\n groupInfo.componentOrder = Object.keys(components)\n .map(key => components[key])\n .filter(component => component && !component.ignore && !component.ignoreForForm)\n .sort((a, b) => a.weight - b.weight)\n .map(component => isResource ? `component-${component.key}` : component.key);\n }\n }\n updateDragAndDrop() {\n if (this.dragDropEnabled) {\n this.initDragula();\n }\n if (this.refs.form) {\n return this.webform.attach(this.refs.form);\n }\n }\n initDragula() {\n const options = this.options;\n if (this.dragula) {\n this.dragula.destroy();\n }\n const containersArray = Array.prototype.slice.call(this.refs['sidebar-container']).filter(item => {\n return item.id !== 'group-container-resource';\n });\n if (!dragula_1.default) {\n return;\n }\n this.dragula = (0, dragula_1.default)(containersArray, {\n moves(el) {\n let moves = true;\n const list = Array.from(el.classList).filter(item => item.indexOf('formio-component-') === 0);\n list.forEach(item => {\n const key = item.slice('formio-component-'.length);\n if (options.disabled && options.disabled.includes(key)) {\n moves = false;\n }\n });\n if (el.classList.contains('no-drag')) {\n moves = false;\n }\n return moves;\n },\n copy(el) {\n return el.classList.contains('drag-copy');\n },\n accepts(el, target) {\n return !el.contains(target) && !target.classList.contains('no-drop');\n }\n }).on('drop', (element, target, source, sibling) => this.onDrop(element, target, source, sibling));\n }\n detach() {\n if (this.dragula) {\n this.dragula.destroy();\n }\n this.dragula = null;\n if (this.sideBarScroll && Templates_1.default.current.clearBuilderSidebarScroll) {\n Templates_1.default.current.clearBuilderSidebarScroll.call(this, this);\n }\n super.detach();\n }\n getComponentInfo(key, group) {\n let info;\n // Need to check in first order as resource component key can be the same as from webform default components\n if (group && group.slice(0, group.indexOf('-')) === 'resource') {\n // This is an existing resource field.\n const resourceGroups = this.groups.resource.subgroups;\n const resourceGroup = lodash_1.default.find(resourceGroups, { key: group });\n if (resourceGroup && resourceGroup.components.hasOwnProperty(`component-${key}`)) {\n info = (0, utils_1.fastCloneDeep)(resourceGroup.components[`component-${key}`].schema);\n }\n }\n // This is a new component\n else if (this.schemas.hasOwnProperty(key)) {\n info = (0, utils_1.fastCloneDeep)(this.schemas[key]);\n }\n else if (this.groups.hasOwnProperty(group)) {\n const groupComponents = this.groups[group].components;\n if (groupComponents.hasOwnProperty(key)) {\n info = (0, utils_1.fastCloneDeep)(groupComponents[key].schema);\n }\n }\n else if (group === 'searchFields') { //Search components go into this group\n const resourceGroups = this.groups.resource.subgroups;\n for (let ix = 0; ix < resourceGroups.length; ix++) {\n const resourceGroup = resourceGroups[ix];\n if (resourceGroup.components.hasOwnProperty(`component-${key}`)) {\n info = (0, utils_1.fastCloneDeep)(resourceGroup.components[`component-${key}`].schema);\n break;\n }\n }\n }\n if (info) {\n //if this is a custom component that was already assigned a key, don't stomp on it\n if (!Components_1.default.components.hasOwnProperty(info.type) && info.key) {\n return info;\n }\n info.key = this.generateKey(info);\n }\n return info;\n }\n getComponentsPath(component, parent) {\n // Get path to the component in the parent component.\n let path = 'components';\n let columnIndex = 0;\n let tableRowIndex = 0;\n let tableColumnIndex = 0;\n let tabIndex = 0;\n switch (parent.type) {\n case 'table':\n tableRowIndex = lodash_1.default.findIndex(parent.rows, row => row.some(column => column.components.some(comp => comp.key === component.key)));\n tableColumnIndex = lodash_1.default.findIndex(parent.rows[tableRowIndex], (column => column.components.some(comp => comp.key === component.key)));\n path = `rows[${tableRowIndex}][${tableColumnIndex}].components`;\n break;\n case 'columns':\n columnIndex = lodash_1.default.findIndex(parent.columns, column => column.components.some(comp => comp.key === component.key));\n path = `columns[${columnIndex}].components`;\n break;\n case 'tabs':\n tabIndex = lodash_1.default.findIndex(parent.components, tab => tab.components.some(comp => comp.key === component.key));\n path = `components[${tabIndex}].components`;\n break;\n }\n return path;\n }\n /* eslint-disable max-statements */\n onDrop(element, target, source, sibling) {\n var _a;\n if (!target) {\n return;\n }\n // If you try to drop within itself.\n if (element.contains(target)) {\n return;\n }\n const key = element.getAttribute('data-key');\n const type = element.getAttribute('data-type');\n const group = element.getAttribute('data-group');\n let info, isNew, path, index;\n if (key && group) {\n // This is a new component.\n info = this.getComponentInfo(key, group);\n if (!info && type) {\n info = this.getComponentInfo(type, group);\n }\n isNew = true;\n }\n else if (source.formioContainer) {\n index = lodash_1.default.findIndex(source.formioContainer, { key: element.formioComponent.component.key });\n if (index !== -1) {\n // Grab and remove the component from the source container.\n info = source.formioContainer.splice(lodash_1.default.findIndex(source.formioContainer, { key: element.formioComponent.component.key }), 1);\n // Since splice returns an array of one object, we need to destructure it.\n info = info[0];\n }\n }\n // If we haven't found the component, stop.\n if (!info) {\n return;\n }\n // Show an error if siblings are disabled for a component and such a component already exists.\n const compKey = (group === 'resource') ? `component-${key}` : key;\n const draggableComponent = ((_a = this.groups[group]) === null || _a === void 0 ? void 0 : _a.components[compKey]) || {};\n if (draggableComponent.disableSiblings) {\n let isCompAlreadyExists = false;\n (0, formUtils_1.eachComponent)(this.webform.components, (component) => {\n if (component.type === draggableComponent.schema.type) {\n isCompAlreadyExists = true;\n return;\n }\n }, true);\n if (isCompAlreadyExists) {\n this.webform.redraw();\n this.webform.setAlert('danger', `You cannot add more than one ${draggableComponent.key} component to one page.`);\n return;\n }\n }\n if (target !== source) {\n // Ensure the key remains unique in its new container.\n builder_1.default.uniquify(this.findNamespaceRoot(target.formioComponent), info);\n }\n const parent = target.formioComponent;\n // Insert in the new container.\n if (target.formioContainer) {\n if (sibling) {\n if (!sibling.getAttribute('data-noattach')) {\n index = lodash_1.default.findIndex(target.formioContainer, { key: lodash_1.default.get(sibling, 'formioComponent.component.key') });\n index = (index === -1) ? 0 : index;\n }\n else {\n index = sibling.getAttribute('data-position');\n }\n if (index !== -1) {\n target.formioContainer.splice(index, 0, info);\n }\n }\n else {\n target.formioContainer.push(info);\n }\n path = this.getComponentsPath(info, parent.component);\n index = lodash_1.default.findIndex(lodash_1.default.get(parent.schema, path), { key: info.key });\n if (index === -1) {\n index = 0;\n }\n }\n if (parent && parent.addChildComponent) {\n parent.addChildComponent(info, element, target, source, sibling);\n }\n const componentInDataGrid = parent.type === 'datagrid';\n if (isNew && !this.options.noNewEdit && !info.noNewEdit) {\n this.editComponent(info, target, isNew, null, null, { inDataGrid: componentInDataGrid });\n }\n // Only rebuild the parts needing to be rebuilt.\n let rebuild;\n if (target !== source) {\n if (source.formioContainer && source.contains(target)) {\n rebuild = source.formioComponent.rebuild();\n }\n else if (target.contains(source)) {\n rebuild = target.formioComponent.rebuild();\n }\n else {\n if (source.formioContainer) {\n rebuild = source.formioComponent.rebuild();\n }\n rebuild = target.formioComponent.rebuild();\n }\n }\n else {\n // If they are the same, only rebuild one.\n rebuild = target.formioComponent.rebuild();\n }\n if (!rebuild) {\n rebuild = Promise.resolve();\n }\n return rebuild.then(() => {\n this.emit('addComponent', info, parent, path, index, isNew && !this.options.noNewEdit && !info.noNewEdit);\n if (!isNew || this.options.noNewEdit || info.noNewEdit) {\n this.emit('change', this.form);\n }\n });\n }\n setForm(form) {\n var _a;\n if (!form.components) {\n form.components = [];\n }\n if (form && form.properties) {\n this.options.properties = form.properties;\n }\n this.keyboardActionsEnabled = lodash_1.default.get(this.options, 'keyboardBuilder', false) || ((_a = this.options.properties) === null || _a === void 0 ? void 0 : _a.keyboardBuilder);\n const isShowSubmitButton = !this.options.noDefaultSubmitButton\n && (!form.components.length || !form.components.find(comp => comp.key === 'submit'));\n // Ensure there is at least a submit button.\n if (isShowSubmitButton) {\n form.components.push({\n type: 'button',\n label: 'Submit',\n key: 'submit',\n size: 'md',\n block: false,\n action: 'submit',\n disableOnInvalid: true,\n theme: 'primary'\n });\n }\n if (this.webform) {\n const shouldRebuild = !this.webform.form.components ||\n (form.components.length !== this.webform.form.components.length);\n return this.webform.setForm(form, { keepAsReference: true }).then(() => {\n if (this.refs.form) {\n this.builderHeight = this.refs.form.offsetHeight;\n }\n if (!shouldRebuild) {\n return this.form;\n }\n return this.rebuild().then(() => this.form);\n });\n }\n return Promise.resolve(form);\n }\n populateRecaptchaSettings(form) {\n //populate isEnabled for recaptcha form settings\n let isRecaptchaEnabled = false;\n if (this.form.components) {\n (0, formUtils_1.eachComponent)(form.components, component => {\n if (isRecaptchaEnabled) {\n return;\n }\n if (component.type === 'recaptcha') {\n isRecaptchaEnabled = true;\n return false;\n }\n });\n if (isRecaptchaEnabled) {\n lodash_1.default.set(form, 'settings.recaptcha.isEnabled', true);\n }\n else if (lodash_1.default.get(form, 'settings.recaptcha.isEnabled')) {\n lodash_1.default.set(form, 'settings.recaptcha.isEnabled', false);\n }\n }\n }\n removeComponent(component, parent, original, componentInstance) {\n if (!parent) {\n return;\n }\n let remove = true;\n const removingComponentsGroup = !component.skipRemoveConfirm &&\n ((Array.isArray(component.components) && component.components.length) ||\n (Array.isArray(component.rows) && component.rows.length) ||\n (Array.isArray(component.columns) && component.columns.length));\n if (this.options.alwaysConfirmComponentRemoval || removingComponentsGroup) {\n const message = removingComponentsGroup ? 'Removing this component will also remove all of its children. Are you sure you want to do this?'\n : 'Are you sure you want to remove this component?';\n remove = window.confirm(this.t(message));\n }\n if (!original) {\n original = parent.formioContainer.find((comp) => comp.id === component.id);\n }\n const index = parent.formioContainer ? parent.formioContainer.indexOf(original) : 0;\n if (remove && index !== -1) {\n const path = this.getComponentsPath(component, parent.formioComponent.component);\n if (parent.formioContainer) {\n parent.formioContainer.splice(index, 1);\n }\n else if (parent.formioComponent && parent.formioComponent.removeChildComponent) {\n parent.formioComponent.removeChildComponent(component);\n }\n if (component.input && componentInstance && componentInstance.parent) {\n lodash_1.default.unset(componentInstance._data, componentInstance.key);\n }\n const rebuild = parent.formioComponent.rebuild() || Promise.resolve();\n rebuild.then(() => {\n this.emit('removeComponent', component, parent.formioComponent.schema, path, index);\n this.emit('change', this.form);\n });\n }\n return remove;\n }\n replaceDoubleQuotes(data, fieldsToRemoveDoubleQuotes = []) {\n if (data) {\n fieldsToRemoveDoubleQuotes.forEach((key) => {\n if (data[key]) {\n data[key] = data[key].replace(/\"/g, \"'\");\n }\n });\n return data;\n }\n }\n updateComponent(component, changed) {\n // Update the preview.\n if (this.preview) {\n this.preview.form = {\n components: [lodash_1.default.omit(Object.assign({}, component), [\n 'hidden',\n 'conditional',\n 'calculateValue',\n 'logic',\n 'autofocus',\n 'customConditional',\n ])],\n config: this.options.formConfig || {}\n };\n const fieldsToRemoveDoubleQuotes = ['label', 'tooltip'];\n this.preview.form.components.forEach(component => this.replaceDoubleQuotes(component, fieldsToRemoveDoubleQuotes));\n const previewElement = this.componentEdit.querySelector('[ref=\"preview\"]');\n if (previewElement) {\n this.setContent(previewElement, this.preview.render());\n this.preview.attach(previewElement);\n }\n }\n // Change the \"default value\" field to be reflective of this component.\n const defaultValueComponent = (0, formUtils_1.getComponent)(this.editForm.components, 'defaultValue', true);\n if (defaultValueComponent && component.type !== 'hidden') {\n const defaultChanged = changed && ((changed.component && changed.component.key === 'defaultValue')\n || (changed.instance && defaultValueComponent.hasComponent && defaultValueComponent.hasComponent(changed.instance)));\n if (!defaultChanged) {\n lodash_1.default.assign(defaultValueComponent.component, lodash_1.default.omit(Object.assign({}, component), [\n 'key',\n 'label',\n 'labelPosition',\n 'labelMargin',\n 'labelWidth',\n 'placeholder',\n 'tooltip',\n 'hidden',\n 'autofocus',\n 'validate',\n 'disabled',\n 'defaultValue',\n 'customDefaultValue',\n 'calculateValue',\n 'conditional',\n 'customConditional',\n 'id'\n ]));\n const parentComponent = defaultValueComponent.parent;\n let tabIndex = -1;\n let index = -1;\n parentComponent.tabs.some((tab, tIndex) => {\n tab.some((comp, compIndex) => {\n if (comp.id === defaultValueComponent.id) {\n tabIndex = tIndex;\n index = compIndex;\n return true;\n }\n return false;\n });\n });\n if (tabIndex !== -1 && index !== -1 && changed && !lodash_1.default.isNil(changed.value)) {\n const sibling = parentComponent.tabs[tabIndex][index + 1];\n parentComponent.removeComponent(defaultValueComponent);\n const newComp = parentComponent.addComponent(defaultValueComponent.component, defaultValueComponent.data, sibling);\n lodash_1.default.pull(newComp.validators, 'required');\n parentComponent.tabs[tabIndex].splice(index, 1, newComp);\n newComp.checkValidity = () => true;\n newComp.build(defaultValueComponent.element);\n }\n }\n else {\n let dataPath = changed.instance._data.key;\n const path = (0, utils_1.getArrayFromComponentPath)(changed.instance.path);\n path.shift();\n if (path.length) {\n path.unshift(component.key);\n dataPath = (0, utils_1.getStringFromComponentPath)(path);\n }\n lodash_1.default.set(this.preview._data, dataPath, changed.value);\n lodash_1.default.set(this.webform._data, dataPath, changed.value);\n }\n }\n // Called when we update a component.\n this.emit('updateComponent', component);\n }\n findRepeatablePaths() {\n const repeatablePaths = [];\n const keys = new Map();\n (0, formUtils_1.eachComponent)(this.form.components, (comp, path) => {\n if (!comp.key) {\n return;\n }\n if (keys.has(comp.key)) {\n if (keys.get(comp.key).includes(path)) {\n repeatablePaths.push(path);\n }\n else {\n keys.set(comp.key, [...keys.get(comp.key), path]);\n }\n }\n else {\n keys.set(comp.key, [path]);\n }\n }, true);\n return repeatablePaths;\n }\n highlightInvalidComponents() {\n const repeatablePaths = this.findRepeatablePaths();\n let hasInvalidComponents = false;\n this.webform.everyComponent((comp) => {\n var _a;\n const path = comp.path;\n const errors = comp.visibleErrors || [];\n if (repeatablePaths.includes(path)) {\n comp.setCustomValidity(`API Key is not unique: ${comp.key}`);\n hasInvalidComponents = true;\n }\n else if (errors.length && ((_a = errors[0].message) === null || _a === void 0 ? void 0 : _a.startsWith('API Key is not unique'))) {\n comp.setCustomValidity('');\n }\n });\n this.emit('builderFormValidityChange', hasInvalidComponents);\n }\n /**\n * Called when a new component is saved.\n *\n * @param parent\n * @param component\n * @return {boolean}\n */\n saveComponent(component, parent, isNew, original) {\n this.editForm.detach();\n const parentContainer = parent ? parent.formioContainer : this.container;\n const parentComponent = parent ? parent.formioComponent : this;\n this.dialog.close();\n const path = parentContainer ? this.getComponentsPath(component, parentComponent.component) : '';\n if (!original) {\n original = parent.formioContainer.find((comp) => comp.id === component.id);\n }\n const index = parentContainer ? parentContainer.indexOf(original) : 0;\n if (index !== -1) {\n let submissionData = this.editForm.submission.data;\n submissionData = submissionData.componentJson || submissionData;\n const fieldsToRemoveDoubleQuotes = ['label', 'tooltip'];\n this.replaceDoubleQuotes(submissionData, fieldsToRemoveDoubleQuotes);\n this.hook('beforeSaveComponentSettings', submissionData);\n let comp = null;\n parentComponent.getComponents().forEach((component) => {\n if (component.component.key === original.key) {\n comp = component;\n }\n });\n const originalComp = comp === null || comp === void 0 ? void 0 : comp.component;\n const originalComponentSchema = comp === null || comp === void 0 ? void 0 : comp.schema;\n const isParentSaveChildMethod = this.isParentSaveChildMethod(parent.formioComponent);\n if (parentContainer && !isParentSaveChildMethod) {\n parentContainer[index] = submissionData;\n if (comp) {\n comp.component = submissionData;\n }\n }\n else if (isParentSaveChildMethod) {\n parent.formioComponent.saveChildComponent(submissionData);\n }\n const rebuild = parentComponent.rebuild() || Promise.resolve();\n return rebuild.then(() => {\n const schema = parentContainer ? parentContainer[index] : (comp ? comp.schema : []);\n this.emitSaveComponentEvent(schema, originalComp, parentComponent.schema, path, index, isNew, originalComponentSchema);\n this.emit('change', this.form);\n this.highlightInvalidComponents();\n if (this.isComponentCreated) {\n const component = parent.formioComponent.components[0];\n this.moveComponent(component);\n this.isComponentCreated = false;\n }\n });\n }\n this.highlightInvalidComponents();\n return Promise.resolve();\n }\n emitSaveComponentEvent(schema, originalComp, parentComponentSchema, path, index, isNew, originalComponentSchema) {\n this.emit('saveComponent', schema, originalComp, parentComponentSchema, path, index, isNew, originalComponentSchema);\n }\n attachEditComponentControls(component, parent, isNew, original, ComponentClass) {\n const cancelButtons = this.componentEdit.querySelectorAll('[ref=\"cancelButton\"]');\n cancelButtons.forEach((cancelButton) => {\n this.editForm.addEventListener(cancelButton, 'click', (event) => {\n event.preventDefault();\n this.editForm.detach();\n this.emit('cancelComponent', component);\n this.dialog.close();\n this.highlightInvalidComponents();\n });\n });\n const removeButtons = this.componentEdit.querySelectorAll('[ref=\"removeButton\"]');\n removeButtons.forEach((removeButton) => {\n this.editForm.addEventListener(removeButton, 'click', (event) => {\n event.preventDefault();\n // Since we are already removing the component, don't trigger another remove.\n this.saved = true;\n this.editForm.detach();\n this.removeComponent(component, parent, original);\n this.dialog.close();\n this.highlightInvalidComponents();\n });\n });\n const saveButtons = this.componentEdit.querySelectorAll('[ref=\"saveButton\"]');\n saveButtons.forEach((saveButton) => {\n this.editForm.addEventListener(saveButton, 'click', (event) => {\n event.preventDefault();\n const errors = this.editForm.validate(this.editForm.data, {\n dirty: true\n });\n if (errors.length) {\n this.editForm.setPristine(false);\n this.editForm.showErrors(errors);\n return false;\n }\n this.saved = true;\n this.saveComponent(component, parent, isNew, original);\n });\n });\n const previewButtons = this.componentEdit.querySelectorAll('[ref=\"previewButton\"]');\n previewButtons.forEach((previewButton) => {\n this.editForm.addEventListener(previewButton, 'click', (event) => {\n event.preventDefault();\n this.showPreview = !this.showPreview;\n this.editForm.detach();\n this.setContent(this.componentEdit, this.renderTemplate('builderEditForm', {\n componentInfo: ComponentClass.builderInfo,\n editForm: this.editForm.render(),\n preview: this.preview ? this.preview.render() : false,\n showPreview: this.showPreview,\n helplinks: this.helplinks,\n }));\n this.editForm.attach(this.componentEdit.querySelector('[ref=\"editForm\"]'));\n this.attachEditComponentControls(component, parent, isNew, original, ComponentClass);\n });\n });\n }\n editComponent(component, parent, isNew, isJsonEdit, original, flags = {}) {\n var _a, _b;\n if (!component.key) {\n return;\n }\n this.saved = false;\n const componentCopy = (0, utils_1.fastCloneDeep)(component);\n let ComponentClass = Components_1.default.components[componentCopy.type];\n const isCustom = ComponentClass === undefined;\n isJsonEdit = isJsonEdit || isCustom;\n ComponentClass = isCustom ? Components_1.default.components.unknown : ComponentClass;\n // Make sure we only have one dialog open at a time.\n if (this.dialog) {\n this.dialog.close();\n this.highlightInvalidComponents();\n }\n // This is the render step.\n const editFormOptions = lodash_1.default.clone(lodash_1.default.get(this, 'options.editForm', {}));\n if (this.editForm) {\n this.editForm.destroy();\n }\n // Allow editForm overrides per component.\n const overrides = lodash_1.default.get(this.options, `editForm.${componentCopy.type}`, {});\n // Pass along the form being edited.\n editFormOptions.editForm = this.form;\n editFormOptions.editComponent = component;\n editFormOptions.flags = flags;\n this.hook('editComponentParentInstance', editFormOptions, parent);\n this.editForm = new Webform_1.default(Object.assign(Object.assign(Object.assign(Object.assign({}, lodash_1.default.omit(this.options, ['hooks', 'builder', 'events', 'attachMode', 'skipInit'])), { language: this.options.language }), editFormOptions), { evalContext: Object.assign(Object.assign({}, ((editFormOptions === null || editFormOptions === void 0 ? void 0 : editFormOptions.evalContext) || ((_a = this.options) === null || _a === void 0 ? void 0 : _a.evalContext) || {})), { buildingForm: this.form }) }));\n this.hook('editFormProperties', parent);\n this.editForm.form = (isJsonEdit && !isCustom) ? {\n components: [\n {\n type: 'textarea',\n as: 'json',\n editor: 'ace',\n weight: 10,\n input: true,\n key: 'componentJson',\n label: 'Component JSON',\n tooltip: 'Edit the JSON for this component.'\n },\n {\n type: 'checkbox',\n key: 'showFullSchema',\n label: 'Full Schema'\n }\n ]\n } : ComponentClass.editForm(lodash_1.default.cloneDeep(overrides));\n const instanceOptions = {\n inFormBuilder: true,\n };\n this.hook('instanceOptionsPreview', instanceOptions);\n const instance = new ComponentClass(componentCopy, instanceOptions);\n const schema = this.hook('builderComponentSchema', component, instance);\n this.editForm.submission = isJsonEdit ? {\n data: {\n componentJson: schema,\n showFullSchema: this.options.showFullJsonSchema\n },\n } : {\n data: instance.component,\n };\n if (this.preview) {\n this.preview.destroy();\n }\n if (!ComponentClass.builderInfo.hasOwnProperty('preview') || ComponentClass.builderInfo.preview) {\n this.preview = new Webform_1.default(lodash_1.default.omit(Object.assign(Object.assign({}, this.options), { preview: true }), [\n 'hooks',\n 'builder',\n 'events',\n 'attachMode',\n 'calculateValue'\n ]));\n this.hook('previewFormSettitngs', schema, isJsonEdit);\n }\n this.showPreview = (_b = ComponentClass.builderInfo.showPreview) !== null && _b !== void 0 ? _b : true;\n this.componentEdit = this.ce('div', { 'class': 'component-edit-container' });\n this.setContent(this.componentEdit, this.renderTemplate('builderEditForm', {\n componentInfo: ComponentClass.builderInfo,\n editForm: this.editForm.render(),\n preview: this.preview ? this.preview.render() : false,\n showPreview: this.showPreview,\n helplinks: this.helplinks\n }));\n this.dialog = this.createModal(this.componentEdit, lodash_1.default.get(this.options, 'dialogAttr', {}));\n // This is the attach step.\n this.editForm.attach(this.componentEdit.querySelector('[ref=\"editForm\"]'));\n this.hook('editFormWrapper');\n this.updateComponent(componentCopy);\n this.editForm.on('change', (event) => {\n if (event.changed) {\n if (event.changed.component && event.changed.component.key === 'showFullSchema') {\n const { value } = event.changed;\n this.editForm.submission = {\n data: {\n componentJson: value ? instance.component : component,\n showFullSchema: value\n },\n };\n return;\n }\n // See if this is a manually modified key. Treat custom component keys as manually modified\n if ((event.changed.component && (event.changed.component.key === 'key')) || isJsonEdit) {\n componentCopy.keyModified = true;\n }\n let isComponentLabelChanged = false;\n if (event.changed.instance) {\n isComponentLabelChanged = ['label', 'title'].includes(event.changed.instance.path);\n }\n else if (event.changed.component) {\n isComponentLabelChanged = ['label', 'title'].includes(event.changed.component.key);\n }\n if (isComponentLabelChanged) {\n // Ensure this component has a key.\n if (isNew) {\n if (!event.data.keyModified) {\n this.editForm.everyComponent(component => {\n if (component.key === 'key' && component.parent.component.key === 'tabs') {\n component.setValue(this.updateComponentKey(event.data));\n return false;\n }\n });\n }\n if (this.form) {\n let formComponents = this.findNamespaceRoot(parent.formioComponent);\n // excluding component which key uniqueness is to be checked to prevent the comparing of the same keys\n formComponents = formComponents.filter(comp => editFormOptions.editComponent.id !== comp.id);\n // Set a unique key for this component.\n builder_1.default.uniquify(formComponents, event.data);\n }\n }\n }\n // If the edit form has any nested form inside, we get a partial data (nested form's data) in the\n // event.data property\n let editFormData;\n if (event.changed.instance && event.changed.instance.root && event.changed.instance.root.id !== this.editForm.id) {\n editFormData = this.editForm.data;\n }\n // Update the component.\n this.updateComponent(event.data.componentJson || editFormData || event.data, event.changed);\n }\n });\n this.attachEditComponentControls(component, parent, isNew, original, ComponentClass);\n const dialogClose = () => {\n this.editForm.destroy(true);\n if (this.preview) {\n this.preview.destroy(true);\n this.preview = null;\n }\n if (isNew && !this.saved) {\n this.removeComponent(component, parent, original);\n this.highlightInvalidComponents();\n }\n // Clean up.\n this.removeEventListener(this.dialog, 'close', dialogClose);\n this.dialog = null;\n };\n this.addEventListener(this.dialog, 'close', dialogClose);\n // Called when we edit a component.\n this.emit('editComponent', component);\n }\n updateComponentKey(data) {\n return lodash_1.default.camelCase(data.title ||\n data.label ||\n data.placeholder ||\n data.type).replace(/^[0-9]*/, '');\n }\n moveComponent(component) {\n var _a;\n if (this.selectedComponent) {\n const prevSelected = this.selectedComponent;\n (_a = prevSelected.element) === null || _a === void 0 ? void 0 : _a.classList.remove('builder-component-selected');\n this.removeEventListener(document, 'keydown');\n }\n component.element.focus();\n component.element.classList.add('builder-component-selected');\n this.selectedComponent = component;\n this.addEventListener(document, 'keydown', this.moveHandler.bind(this));\n }\n updateComponentPlacement(direction) {\n const component = this.selectedComponent;\n let index, info;\n const step = direction ? -1 : 1;\n if (component) {\n const element = component.element;\n const sibling = direction ? element.previousElementSibling : element.nextElementSibling;\n const source = element.parentNode;\n const containerLength = source.formioContainer.length;\n if (containerLength && containerLength <= 1) {\n return;\n }\n if (source.formioContainer) {\n index = lodash_1.default.findIndex(source.formioContainer, { key: element.formioComponent.component.key });\n if (index !== -1) {\n info = source.formioContainer.splice(lodash_1.default.findIndex(source.formioContainer, { key: element.formioComponent.component.key }), 1);\n info = info[0];\n source.removeChild(element);\n }\n }\n const len = source.formioComponent.components.length;\n index = (index === -1) ? 0 : index + step;\n if (index === -1) {\n source.formioContainer.push(info);\n source.appendChild(element);\n }\n else if (index === len) {\n const key = source.formioContainer[0].key;\n index = lodash_1.default.findIndex(source.formioComponent.components, { key: key });\n const firstElement = source.formioComponent.components[index].element;\n source.formioContainer.splice(0, 0, info);\n source.insertBefore(element, firstElement);\n }\n else if (index !== -1) {\n source.formioContainer.splice(index, 0, info);\n direction\n ? source.insertBefore(element, sibling)\n : source.insertBefore(element, sibling.nextElementSibling);\n }\n element.focus();\n }\n }\n stopMoving(comp) {\n const parent = comp.element.parentNode;\n this.removeEventListener(document, 'keydown');\n parent.formioComponent.rebuild();\n this.selectedComponent = null;\n }\n addNewComponent(element) {\n var _a;\n const source = document.querySelector('.formio-builder-form');\n const key = element.getAttribute('data-key');\n const group = element.getAttribute('data-group');\n const isNew = true;\n let info;\n if (key && group) {\n info = this.getComponentInfo(key, group);\n }\n if (isNew && !this.options.noNewEdit && !info.noNewEdit) {\n builder_1.default.uniquify(this.findNamespaceRoot(source.formioComponent), info);\n this.editComponent(info, source, isNew, null, null);\n }\n const firstComponent = (_a = source.formioComponent.components[0]) === null || _a === void 0 ? void 0 : _a.element;\n if (firstComponent) {\n source.formioContainer.splice(0, 0, info);\n }\n else {\n source.formioContainer.push(info);\n }\n source.formioComponent.rebuild().then(() => {\n this.isComponentCreated = true;\n });\n }\n /**\n * Creates copy of component schema and stores it under sessionStorage.\n * @param {Component} component\n * @return {*}\n */\n copyComponent(component) {\n if (!window.sessionStorage) {\n return console.warn('Session storage is not supported in this browser.');\n }\n this.addClass(this.refs.form, 'builder-paste-mode');\n window.sessionStorage.setItem('formio.clipboard', JSON.stringify(component.schema));\n }\n /**\n * Paste copied component after the current component.\n * @param {Component} component\n * @return {*}\n */\n pasteComponent(component) {\n if (!window.sessionStorage) {\n return console.warn('Session storage is not supported in this browser.');\n }\n this.removeClass(this.refs.form, 'builder-paste-mode');\n if (window.sessionStorage) {\n const data = window.sessionStorage.getItem('formio.clipboard');\n if (data) {\n const schema = JSON.parse(data);\n const parent = this.getParentElement(component.element);\n if (parent) {\n builder_1.default.uniquify(this.findNamespaceRoot(parent.formioComponent), schema);\n let path = '';\n let index = 0;\n const isParentSaveChildMethod = this.isParentSaveChildMethod(parent.formioComponent);\n if (parent.formioContainer && !isParentSaveChildMethod) {\n index = parent.formioContainer.indexOf(component.component);\n path = this.getComponentsPath(schema, parent.formioComponent.component);\n parent.formioContainer.splice(index + 1, 0, schema);\n }\n else if (isParentSaveChildMethod) {\n parent.formioComponent.saveChildComponent(schema, false);\n }\n parent.formioComponent.rebuild();\n this.emitSaveComponentEvent(schema, schema, parent.formioComponent.component, path, (index + 1), true, schema);\n }\n this.emit('change', this.form);\n }\n }\n }\n isParentSaveChildMethod(parentComp) {\n return !!(parentComp && parentComp.saveChildComponent);\n }\n getParentElement(element) {\n let container = element;\n do {\n container = container.parentNode;\n } while (container && !container.formioComponent);\n return container;\n }\n addBuilderComponentInfo(component) {\n if (!component || !component.group || !this.groups[component.group]) {\n return;\n }\n component = lodash_1.default.clone(component);\n const groupInfo = this.groups[component.group];\n if (!groupInfo.components.hasOwnProperty(component.key)) {\n groupInfo.components[component.key] = component;\n }\n return component;\n }\n init() {\n if (this.webform) {\n this.webform.init();\n }\n return super.init();\n }\n clear() {\n if (this.webform.initialized) {\n this.webform.clear();\n }\n }\n destroy(all = false) {\n if (this.webform.initialized) {\n this.webform.destroy(all);\n }\n super.destroy(all);\n }\n addBuilderGroup(name, group) {\n if (!this.groups[name]) {\n this.groups[name] = group;\n this.groupOrder.push(name);\n this.triggerRedraw();\n }\n else {\n this.updateBuilderGroup(name, group);\n }\n }\n updateBuilderGroup(name, group) {\n if (this.groups[name]) {\n this.groups[name] = group;\n this.triggerRedraw();\n }\n }\n generateKey(info) {\n return info.key || lodash_1.default.camelCase(info.title ||\n info.label ||\n info.placeholder ||\n info.type);\n }\n}\nexports[\"default\"] = WebformBuilder;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/WebformBuilder.js?");
5734
4414
 
5735
4415
  /***/ }),
5736
4416
 
@@ -5851,7 +4531,7 @@ eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {
5851
4531
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
5852
4532
 
5853
4533
  "use strict";
5854
- eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n/* globals Quill, ClassicEditor, CKEDITOR */\nconst vanilla_text_mask_1 = __webpack_require__(/*! @formio/vanilla-text-mask */ \"./node_modules/@formio/vanilla-text-mask/dist/vanillaTextMask.js\");\nconst tippy_js_1 = __importDefault(__webpack_require__(/*! tippy.js */ \"./node_modules/tippy.js/dist/tippy.esm.js\"));\nconst lodash_1 = __importDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nconst ismobilejs_1 = __importDefault(__webpack_require__(/*! ismobilejs */ \"./node_modules/ismobilejs/esm/index.js\"));\nconst core_1 = __webpack_require__(/*! @formio/core */ \"./node_modules/@formio/core/lib/index.js\");\nconst Formio_1 = __webpack_require__(/*! ../../../Formio */ \"./lib/cjs/Formio.js\");\nconst FormioUtils = __importStar(__webpack_require__(/*! ../../../utils/utils */ \"./lib/cjs/utils/utils.js\"));\nconst utils_1 = __webpack_require__(/*! ../../../utils/utils */ \"./lib/cjs/utils/utils.js\");\nconst Element_1 = __importDefault(__webpack_require__(/*! ../../../Element */ \"./lib/cjs/Element.js\"));\nconst ComponentModal_1 = __importDefault(__webpack_require__(/*! ../componentModal/ComponentModal */ \"./lib/cjs/components/_classes/componentModal/ComponentModal.js\"));\nconst widgets_1 = __importDefault(__webpack_require__(/*! ../../../widgets */ \"./lib/cjs/widgets/index.js\"));\nconst addons_1 = __importDefault(__webpack_require__(/*! ../../../addons */ \"./lib/cjs/addons/index.js\"));\nconst uploadAdapter_1 = __webpack_require__(/*! ../../../providers/storage/uploadAdapter */ \"./lib/cjs/providers/storage/uploadAdapter.js\");\nconst en_1 = __importDefault(__webpack_require__(/*! ../../../translations/en */ \"./lib/cjs/translations/en.js\"));\nconst Templates_1 = __importDefault(__webpack_require__(/*! ../../../templates/Templates */ \"./lib/cjs/templates/Templates.js\"));\nconst isIEBrowser = FormioUtils.getBrowserInfo().ie;\n/**\n * This is the Component class\n which all elements within the FormioForm derive from.\n */\nclass Component extends Element_1.default {\n static schema(...sources) {\n return lodash_1.default.merge({\n /**\n * Determines if this component provides an input.\n */\n input: true,\n /**\n * The data key for this component (how the data is stored in the database).\n */\n key: '',\n /**\n * The input placeholder for this component.\n */\n placeholder: '',\n /**\n * The input prefix\n */\n prefix: '',\n /**\n * The custom CSS class to provide to this component.\n */\n customClass: '',\n /**\n * The input suffix.\n */\n suffix: '',\n /**\n * If this component should allow an array of values to be captured.\n */\n multiple: false,\n /**\n * The default value of this component.\n */\n defaultValue: null,\n /**\n * If the data of this component should be protected (no GET api requests can see the data)\n */\n protected: false,\n /**\n * Validate if the value of this component should be unique within the form.\n */\n unique: false,\n /**\n * If the value of this component should be persisted within the backend api database.\n */\n persistent: true,\n /**\n * Determines if the component should be within the form, but not visible.\n */\n hidden: false,\n /**\n * If the component should be cleared when hidden.\n */\n clearOnHide: true,\n /**\n * This will refresh this component options when this field changes.\n */\n refreshOn: '',\n /**\n * This will redraw the component when this field changes.\n */\n redrawOn: '',\n /**\n * If this component should be included as a column within a submission table.\n */\n tableView: false,\n /**\n * If this component should be rendering in modal.\n */\n modalEdit: false,\n /**\n * The input label provided to this component.\n */\n label: '',\n dataGridLabel: false,\n labelPosition: 'top',\n description: '',\n errorLabel: '',\n tooltip: '',\n hideLabel: false,\n tabindex: '',\n disabled: false,\n autofocus: false,\n dbIndex: false,\n customDefaultValue: '',\n calculateValue: '',\n calculateServer: false,\n widget: null,\n /**\n * Attributes that will be assigned to the input elements of this component.\n */\n attributes: {},\n /**\n * This will perform the validation on either \"change\" or \"blur\" of the input element.\n */\n validateOn: 'change',\n /**\n * The validation criteria for this component.\n */\n validate: {\n /**\n * If this component is required.\n */\n required: false,\n /**\n * Custom JavaScript validation.\n */\n custom: '',\n /**\n * If the custom validation should remain private (only the backend will see it and execute it).\n */\n customPrivate: false,\n /**\n * If this component should implement a strict date validation if the Calendar widget is implemented.\n */\n strictDateValidation: false,\n multiple: false,\n unique: false\n },\n /**\n * The simple conditional settings for a component.\n */\n conditional: {\n show: null,\n when: null,\n eq: ''\n },\n overlay: {\n style: '',\n left: '',\n top: '',\n width: '',\n height: '',\n },\n allowCalculateOverride: false,\n encrypted: false,\n showCharCount: false,\n showWordCount: false,\n properties: {},\n allowMultipleMasks: false,\n addons: [],\n }, ...sources);\n }\n /**\n * Return the simple condition settings as part of the component.\n *\n * @return {Object}\n *\n */\n static get conditionOperatorsSettings() {\n return {\n operators: ['isEqual', 'isNotEqual', 'isEmpty', 'isNotEmpty'],\n valueComponent() {\n return { type: 'textfield' };\n }\n };\n }\n /**\n * Return the array of possible types of component value absed on its schema.\n *\n * @param schema\n * @return {Array}\n *\n */\n static savedValueTypes(schema) {\n schema = schema || {};\n return FormioUtils.getComponentSavedTypes(schema) || [FormioUtils.componentValueTypes.any];\n }\n /**\n * Provides a table view for this component. Override if you wish to do something different than using getView\n * method of your instance.\n *\n * @param value\n * @param options\n */\n /* eslint-disable no-unused-vars */\n static tableView(value, options) { }\n /* eslint-enable no-unused-vars */\n /**\n * Initialize a new Component.\n *\n * @param {Object} component - The component JSON you wish to initialize.\n * @param {Object} options - The options for this component.\n * @param {Object} data - The global data submission object this component will belong.\n */\n /* eslint-disable max-statements */\n constructor(component, options, data) {\n super(Object.assign({\n renderMode: 'form',\n attachMode: 'full',\n noDefaults: false\n }, options || {}));\n // Restore the component id.\n if (component && component.id) {\n this.id = component.id;\n }\n /**\n * Determines if this component has a condition assigned to it.\n * @type {null}\n * @private\n */\n this._hasCondition = null;\n /**\n * References to dom elements\n */\n this.refs = {};\n // Allow global override for any component JSON.\n if (component &&\n this.options.components &&\n this.options.components[component.type]) {\n lodash_1.default.merge(component, this.options.components[component.type]);\n }\n /**\n * The data path to this specific component instance.\n *\n * @type {string}\n */\n this.path = (component === null || component === void 0 ? void 0 : component.key) || '';\n /**\n * An array of all the children components errors.\n */\n this.childErrors = [];\n /**\n * Last validation errors that have occured.\n */\n this._errors = [];\n this._visibleErrors = [];\n /**\n * The Form.io component JSON schema.\n * @type {*}\n */\n this.component = this.mergeSchema(component || {});\n // Add the id to the component.\n this.component.id = this.id;\n this.afterComponentAssign();\n // Save off the original component to be used in logic.\n this.originalComponent = (0, utils_1.fastCloneDeep)(this.component);\n /**\n * If the component has been attached\n */\n this.attached = false;\n /**\n * If the component has been rendered\n */\n this.rendered = false;\n /**\n * The data object in which this component resides.\n * @type {*}\n */\n this._data = data || {};\n /**\n * Tool tip text after processing\n * @type {string}\n */\n this.tooltip = '';\n /**\n * The row path of this component.\n * @type {number}\n */\n this.row = this.options.row;\n /**\n * Points to a flat map of child components (if applicable).\n *\n * @type {Object}\n */\n this.childComponentsMap = {};\n /**\n * Determines if this component is disabled, or not.\n *\n * @type {boolean}\n */\n this._disabled = (0, utils_1.boolValue)(this.component.disabled) ? this.component.disabled : false;\n /**\n * Points to the root component, usually the FormComponent.\n *\n * @type {Component}\n */\n this.root = this.options.root || this;\n this.localRoot = this.options.localRoot || this;\n /**\n * If this input has been input and provided value.\n *\n * @type {boolean}\n */\n this.pristine = true;\n /**\n * Points to the parent component.\n *\n * @type {Component}\n */\n this.parent = this.options.parent;\n this.options.name = this.options.name || 'data';\n this._path = '';\n // Needs for Nextgen Rules Engine\n this.resetCaches();\n /**\n * Determines if this component is visible, or not.\n */\n this._parentVisible = this.options.hasOwnProperty('parentVisible') ? this.options.parentVisible : true;\n this._visible = this._parentVisible && this.conditionallyVisible(null, data);\n this._parentDisabled = false;\n /**\n * Used to trigger a new change in this component.\n * @type {function} - Call to trigger a change in this component.\n */\n let changes = [];\n let lastChanged = null;\n let triggerArgs = [];\n const _triggerChange = lodash_1.default.debounce((...args) => {\n if (this.root) {\n this.root.changing = false;\n }\n triggerArgs = [];\n if (!args[1] && lastChanged) {\n // Set the changed component if one isn't provided.\n args[1] = lastChanged;\n }\n if (lodash_1.default.isEmpty(args[0]) && lastChanged) {\n // Set the flags if it is empty and lastChanged exists.\n args[0] = lastChanged.flags;\n }\n lastChanged = null;\n args[3] = changes;\n const retVal = this.onChange(...args);\n changes = [];\n return retVal;\n }, 100);\n this.triggerChange = (...args) => {\n if (args[1]) {\n // Make sure that during the debounce that we always track lastChanged component, even if they\n // don't provide one later.\n lastChanged = args[1];\n changes.push(lastChanged);\n }\n if (this.root) {\n this.root.changing = true;\n }\n if (args.length) {\n triggerArgs = args;\n }\n return _triggerChange(...triggerArgs);\n };\n /**\n * Used to trigger a redraw event within this component.\n *\n * @type {Function}\n */\n this.triggerRedraw = lodash_1.default.debounce(this.redraw.bind(this), 100);\n /**\n * list of attached tooltips\n * @type {Array}\n */\n this.tooltips = [];\n /**\n * List of attached addons\n * @type {Array}\n */\n this.addons = [];\n // To force this component to be invalid.\n this.invalid = false;\n if (this.component) {\n this.type = this.component.type;\n if (this.allowData && this.key) {\n this.options.name += `[${this.key}]`;\n // If component is visible or not set to clear on hide, set the default value.\n if (this.visible || !this.component.clearOnHide) {\n if (!this.hasValue()) {\n if (this.shouldAddDefaultValue) {\n this.dataValue = this.defaultValue;\n }\n }\n else {\n // Ensure the dataValue is set.\n /* eslint-disable no-self-assign */\n this.dataValue = this.dataValue;\n /* eslint-enable no-self-assign */\n }\n }\n }\n /**\n * The element information for creating the input element.\n * @type {*}\n */\n this.info = this.elementInfo();\n }\n // Allow anyone to hook into the component creation.\n this.hook('component');\n if (!this.options.skipInit) {\n this.init();\n }\n }\n /* eslint-enable max-statements */\n get componentsMap() {\n var _a;\n if ((_a = this.localRoot) === null || _a === void 0 ? void 0 : _a.childComponentsMap) {\n return this.localRoot.childComponentsMap;\n }\n const localMap = {};\n localMap[this.path] = this;\n return localMap;\n }\n get data() {\n return this._data;\n }\n set data(value) {\n this._data = value;\n }\n mergeSchema(component = {}) {\n return lodash_1.default.defaultsDeep(component, this.defaultSchema);\n }\n // Allow componets to notify when ready.\n get ready() {\n return Promise.resolve(this);\n }\n get isPDFReadOnlyMode() {\n return this.parent &&\n this.parent.form &&\n (this.parent.form.display === 'pdf') &&\n this.options.readOnly;\n }\n get labelInfo() {\n const label = {};\n label.hidden = this.labelIsHidden();\n label.className = '';\n label.labelPosition = this.component.labelPosition;\n label.tooltipClass = `${this.iconClass('question-sign')} text-muted`;\n const isPDFReadOnlyMode = this.isPDFReadOnlyMode;\n if (this.hasInput && this.component.validate && (0, utils_1.boolValue)(this.component.validate.required) && !isPDFReadOnlyMode) {\n label.className += ' field-required';\n }\n if (label.hidden) {\n label.className += ' control-label--hidden';\n }\n if (this.info.attr.id) {\n label.for = this.info.attr.id;\n }\n return label;\n }\n init() {\n var _a;\n this.disabled = this.shouldDisabled;\n this._visible = this.conditionallyVisible(null, null);\n if ((_a = this.component.addons) === null || _a === void 0 ? void 0 : _a.length) {\n this.component.addons.forEach((addon) => this.createAddon(addon));\n }\n }\n afterComponentAssign() {\n //implement in extended classes\n }\n createAddon(addonConfiguration) {\n var _a;\n const name = addonConfiguration.name;\n if (!name) {\n return;\n }\n const settings = ((_a = addonConfiguration.settings) === null || _a === void 0 ? void 0 : _a.data) || {};\n const Addon = addons_1.default[name.value];\n let addon = null;\n if (Addon) {\n const supportedComponents = Addon.info.supportedComponents;\n const supportsThisComponentType = !(supportedComponents === null || supportedComponents === void 0 ? void 0 : supportedComponents.length) ||\n supportedComponents.indexOf(this.component.type) !== -1;\n if (supportsThisComponentType) {\n addon = new Addon(settings, this);\n this.addons.push(addon);\n }\n else {\n console.warn(`Addon ${name.label} does not support component of type ${this.component.type}.`);\n }\n }\n return addon;\n }\n teardown() {\n if (this.element) {\n delete this.element.component;\n delete this.element;\n }\n delete this._currentForm;\n delete this.parent;\n delete this.root;\n delete this.triggerChange;\n delete this.triggerRedraw;\n if (this.options) {\n delete this.options.root;\n delete this.options.parent;\n delete this.options.i18next;\n }\n super.teardown();\n }\n destroy(all = false) {\n super.destroy(all);\n this.detach();\n this.addons.forEach((addon) => addon.destroy());\n if (all) {\n this.teardown();\n }\n }\n get shouldDisabled() {\n return this.options.readOnly || this.component.disabled || (this.options.hasOwnProperty('disabled') && this.options.disabled[this.key]);\n }\n get isInputComponent() {\n return !this.component.hasOwnProperty('input') || this.component.input;\n }\n get allowData() {\n return this.hasInput;\n }\n get hasInput() {\n return this.isInputComponent || (this.refs.input && this.refs.input.length);\n }\n get defaultSchema() {\n return Component.schema();\n }\n get key() {\n return lodash_1.default.get(this.component, 'key', '');\n }\n set parentVisible(value) {\n this._parentVisible = value;\n }\n get parentVisible() {\n return this._parentVisible;\n }\n set parentDisabled(value) {\n this._parentDisabled = value;\n }\n get parentDisabled() {\n return this._parentDisabled;\n }\n shouldForceVisibility(component, visibility) {\n if (!this.options[visibility]) {\n return false;\n }\n if (!component) {\n component = this.component;\n }\n if (lodash_1.default.isArray(this.options[visibility])) {\n return this.options[visibility].includes(component.key);\n }\n return this.options[visibility][component.key];\n }\n shouldForceHide(component) {\n return this.shouldForceVisibility(component, 'hide');\n }\n shouldForceShow(component) {\n return this.shouldForceVisibility(component, 'show');\n }\n /**\n *\n * @param value {boolean}\n */\n set visible(value) {\n if (this._visible !== value) {\n // Skip if this component is set to visible and is supposed to be hidden.\n if (value && this.shouldForceHide()) {\n return;\n }\n // Skip if this component is set to hidden and is supposed to be shown.\n if (!value && this.shouldForceShow()) {\n return;\n }\n this._visible = value;\n this.clearOnHide();\n this.redraw();\n }\n }\n /**\n *\n * @returns {boolean}\n */\n get visible() {\n // Show only if visibility changes or if we are in builder mode or if hidden fields should be shown.\n if (this.builderMode || this.previewMode || this.options.showHiddenFields) {\n return true;\n }\n if (this.shouldForceHide()) {\n return false;\n }\n if (this.shouldForceShow()) {\n return true;\n }\n return this._visible && this._parentVisible;\n }\n get currentForm() {\n return this._currentForm;\n }\n set currentForm(instance) {\n this._currentForm = instance;\n }\n get fullMode() {\n return this.options.attachMode === 'full';\n }\n get builderMode() {\n return this.options.attachMode === 'builder';\n }\n get calculatedPath() {\n console.error('component.calculatedPath was deprecated, use component.path instead.');\n return this.path;\n }\n get labelPosition() {\n return this.component.labelPosition;\n }\n get labelWidth() {\n const width = this.component.labelWidth;\n return width >= 0 ? width : 30;\n }\n get labelMargin() {\n const margin = this.component.labelMargin;\n return margin >= 0 ? margin : 3;\n }\n get isAdvancedLabel() {\n return [\n 'left-left',\n 'left-right',\n 'right-left',\n 'right-right'\n ].includes(this.labelPosition);\n }\n get labelPositions() {\n return this.labelPosition.split('-');\n }\n get skipInEmail() {\n return false;\n }\n rightDirection(direction) {\n if (this.options.condensedMode) {\n return false;\n }\n return direction === 'right';\n }\n getLabelInfo(isCondensed = false) {\n const isRightPosition = this.rightDirection(this.labelPositions[0]);\n const isLeftPosition = this.labelPositions[0] === 'left' || isCondensed;\n const isRightAlign = this.rightDirection(this.labelPositions[1]);\n let contentMargin = '';\n if (this.component.hideLabel) {\n const margin = isCondensed ? 0 : this.labelWidth + this.labelMargin;\n contentMargin = isRightPosition ? `margin-right: ${margin}%` : '';\n contentMargin = isLeftPosition ? `margin-left: ${margin}%` : '';\n }\n const labelStyles = `\n flex: ${this.labelWidth};\n ${isRightPosition ? 'margin-left' : 'margin-right'}: ${this.labelMargin}%;\n `;\n const contentStyles = `\n flex: ${100 - this.labelWidth - this.labelMargin};\n ${contentMargin};\n ${this.component.hideLabel ? `max-width: ${100 - this.labelWidth - this.labelMargin}` : ''};\n `;\n return {\n isRightPosition,\n isRightAlign,\n labelStyles,\n contentStyles\n };\n }\n /**\n * Returns only the schema that is different from the default.\n *\n * @param schema\n * @param defaultSchema\n */\n getModifiedSchema(schema, defaultSchema, recursion) {\n const modified = {};\n if (!defaultSchema) {\n return schema;\n }\n lodash_1.default.each(schema, (val, key) => {\n if (!lodash_1.default.isArray(val) && lodash_1.default.isObject(val) && defaultSchema.hasOwnProperty(key)) {\n const subModified = this.getModifiedSchema(val, defaultSchema[key], true);\n if (!lodash_1.default.isEmpty(subModified)) {\n modified[key] = subModified;\n }\n }\n else if (lodash_1.default.isArray(val)) {\n if (val.length !== 0 && !lodash_1.default.isEqual(val, defaultSchema[key])) {\n modified[key] = val;\n }\n }\n else if ((!recursion && (key === 'type')) ||\n (!recursion && (key === 'key')) ||\n (!recursion && (key === 'label')) ||\n (!recursion && (key === 'input')) ||\n (!recursion && (key === 'tableView')) ||\n (val !== '' && !defaultSchema.hasOwnProperty(key)) ||\n (val !== '' && val !== defaultSchema[key]) ||\n (defaultSchema[key] && val !== defaultSchema[key])) {\n modified[key] = val;\n }\n });\n return modified;\n }\n /**\n * Returns the JSON schema for this component.\n */\n get schema() {\n return (0, utils_1.fastCloneDeep)(this.getModifiedSchema(lodash_1.default.omit(this.component, 'id'), this.defaultSchema));\n }\n /**\n * Returns true if component is inside DataGrid\n */\n get isInDataGrid() {\n return this.inDataGrid;\n }\n /**\n * Translate a text using the i18n system.\n *\n * @param {string} text - The i18n identifier.\n * @param {Object} params - The i18n parameters to use for translation.\n */\n t(text, params = {}, ...args) {\n if (!text) {\n return '';\n }\n // Use _userInput: true to ignore translations from defaults\n if (text in en_1.default && params._userInput) {\n return text;\n }\n params.data = params.data || this.rootValue;\n params.row = params.row || this.data;\n params.component = params.component || this.component;\n return super.t(text, params, ...args);\n }\n labelIsHidden() {\n return !this.component.label ||\n ((!this.isInDataGrid && this.component.hideLabel) ||\n (this.isInDataGrid && !this.component.dataGridLabel) ||\n this.options.inputsOnly) && !this.builderMode;\n }\n transform(type, value) {\n const frameworkTemplates = this.options.template ? Templates_1.default.templates[this.options.template] : Templates_1.default.current;\n return frameworkTemplates.hasOwnProperty('transform')\n ? frameworkTemplates.transform(type, value, this)\n : (type, value) => value;\n }\n getTemplate(names, modes) {\n modes = Array.isArray(modes) ? modes : [modes];\n names = Array.isArray(names) ? names : [names];\n if (!modes.includes('form')) {\n modes.push('form');\n }\n let result = null;\n if (this.options.templates) {\n result = this.checkTemplate(this.options.templates, names, modes);\n if (result) {\n return result;\n }\n }\n const frameworkTemplates = this.options.template ? Templates_1.default.templates[this.options.template] : Templates_1.default.current;\n result = this.checkTemplate(frameworkTemplates, names, modes);\n if (result) {\n return result;\n }\n // Default back to bootstrap if not defined.\n const name = names[names.length - 1];\n const templatesByName = Templates_1.default.defaultTemplates[name];\n if (!templatesByName) {\n return `Unknown template: ${name}`;\n }\n const templateByMode = this.checkTemplateMode(templatesByName, modes);\n if (templateByMode) {\n return templateByMode;\n }\n return templatesByName.form;\n }\n checkTemplate(templates, names, modes) {\n for (const name of names) {\n const templatesByName = templates[name];\n if (templatesByName) {\n const templateByMode = this.checkTemplateMode(templatesByName, modes);\n if (templateByMode) {\n return templateByMode;\n }\n }\n }\n return null;\n }\n checkTemplateMode(templatesByName, modes) {\n for (const mode of modes) {\n const templateByMode = templatesByName[mode];\n if (templateByMode) {\n return templateByMode;\n }\n }\n return null;\n }\n getFormattedAttribute(attr) {\n return attr ? this.t(attr, { _userInput: true }).replace(/\"/g, '&quot;') : '';\n }\n getFormattedTooltip(tooltipValue) {\n const tooltip = this.interpolate(tooltipValue || '').replace(/(?:\\r\\n|\\r|\\n)/g, '<br />');\n return this.getFormattedAttribute(tooltip);\n }\n isHtmlRenderMode() {\n return this.options.renderMode === 'html';\n }\n renderTemplate(name, data = {}, modeOption) {\n // Need to make this fall back to form if renderMode is not found similar to how we search templates.\n const mode = modeOption || this.options.renderMode || 'form';\n data.component = this.component;\n data.self = this;\n data.options = this.options;\n data.readOnly = this.options.readOnly;\n data.iconClass = this.iconClass.bind(this);\n data.size = this.size.bind(this);\n data.t = this.t.bind(this);\n data.transform = this.transform.bind(this);\n data.id = data.id || this.id;\n data.key = data.key || this.key;\n data.value = data.value || this.dataValue;\n data.disabled = this.disabled;\n data.builder = this.builderMode;\n data.render = (...args) => {\n console.warn(`Form.io 'render' template function is deprecated.\n If you need to render template (template A) inside of another template (template B),\n pass pre-compiled template A (use this.renderTemplate('template_A_name') as template context variable for template B`);\n return this.renderTemplate(...args);\n };\n data.label = data.labelInfo || this.labelInfo;\n data.tooltip = this.getFormattedTooltip(this.component.tooltip);\n // Allow more specific template names\n const names = [\n `${name}-${this.component.type}-${this.key}`,\n `${name}-${this.component.type}`,\n `${name}-${this.key}`,\n `${name}`,\n ];\n // Allow template alters.\n return this.hook(`render${name.charAt(0).toUpperCase() + name.substring(1, name.length)}`, this.interpolate(this.getTemplate(names, mode), data), data, mode);\n }\n /**\n * Sanitize an html string.\n *\n * @param string\n * @returns {*}\n */\n sanitize(dirty, forceSanitize, options) {\n var _a;\n if (!this.shouldSanitizeValue && !forceSanitize) {\n return dirty;\n }\n return FormioUtils.sanitize(dirty, {\n sanitizeConfig: lodash_1.default.merge(((_a = this.options) === null || _a === void 0 ? void 0 : _a.sanitizeConfig) || {}, options || {}),\n });\n }\n /**\n * Render a template string into html.\n *\n * @param template\n * @param data\n * @param actions\n *\n * @return {HTMLElement|String} - The created element or an empty string if template is not specified.\n */\n renderString(template, data) {\n if (!template) {\n return '';\n }\n // Interpolate the template and populate\n return this.interpolate(template, data);\n }\n performInputMapping(input) {\n return input;\n }\n get widget() {\n var _a;\n const settings = this.component.widget;\n if (settings && ((_a = this.root) === null || _a === void 0 ? void 0 : _a.shadowRoot)) {\n settings.shadowRoot = this.root.shadowRoot;\n }\n const widget = settings && widgets_1.default[settings.type] ? new widgets_1.default[settings.type](settings, this.component, this) : null;\n return widget;\n }\n getBrowserLanguage() {\n const nav = window.navigator;\n const browserLanguagePropertyKeys = ['language', 'browserLanguage', 'systemLanguage', 'userLanguage'];\n let language;\n // support for HTML 5.1 \"navigator.languages\"\n if (Array.isArray(nav.languages)) {\n for (let i = 0; i < nav.languages.length; i++) {\n language = nav.languages[i];\n if (language && language.length) {\n return language.split(';')[0];\n }\n }\n }\n // support for other well known properties in browsers\n for (let i = 0; i < browserLanguagePropertyKeys.length; i++) {\n language = nav[browserLanguagePropertyKeys[i]];\n if (language && language.length) {\n return language.split(';')[0];\n }\n }\n return null;\n }\n /**\n * Called before a next and previous page is triggered allowing the components\n * to perform special functions.\n *\n * @return {*}\n */\n beforePage() {\n return Promise.resolve(true);\n }\n beforeNext() {\n return this.beforePage(true);\n }\n /**\n * Called before a submission is triggered allowing the components\n * to perform special async functions.\n *\n * @return {*}\n */\n beforeSubmit() {\n return Promise.resolve(true);\n }\n /**\n * Return the submission timezone.\n *\n * @return {*}\n */\n get submissionTimezone() {\n this.options.submissionTimezone = this.options.submissionTimezone || lodash_1.default.get(this.root, 'options.submissionTimezone');\n return this.options.submissionTimezone;\n }\n get timezone() {\n return this.getTimezone(this.component);\n }\n getTimezone(settings) {\n if (settings.timezone) {\n return settings.timezone;\n }\n if (settings.displayInTimezone === 'utc') {\n return 'UTC';\n }\n const submissionTimezone = this.submissionTimezone;\n if (submissionTimezone &&\n ((settings.displayInTimezone === 'submission') ||\n ((this.options.pdf || this.options.server) && (settings.displayInTimezone === 'viewer')))) {\n return submissionTimezone;\n }\n // Return current timezone if none are provided.\n return (0, utils_1.currentTimezone)();\n }\n loadRefs(element, refs) {\n for (const ref in refs) {\n const refType = refs[ref];\n const isString = typeof refType === 'string';\n const selector = isString && refType.includes('scope') ? `:scope > [ref=\"${ref}\"]` : `[ref=\"${ref}\"]`;\n if (isString && refType.startsWith('single')) {\n this.refs[ref] = element.querySelector(selector);\n }\n else {\n this.refs[ref] = element.querySelectorAll(selector);\n }\n }\n }\n setOpenModalElement(template) {\n this.componentModal.setOpenModalElement(template || this.getModalPreviewTemplate());\n }\n getModalPreviewTemplate() {\n var _a;\n const dataValue = this.component.type === 'password' ? this.dataValue.replace(/./g, '•') : this.dataValue;\n let modalLabel;\n if (this.hasInput && ((_a = this.component.validate) === null || _a === void 0 ? void 0 : _a.required) && !this.isPDFReadOnlyMode) {\n modalLabel = { className: 'field-required' };\n }\n return this.renderTemplate('modalPreview', {\n previewText: this.getValueAsString(dataValue, { modalPreview: true }) || this.t('Click to set value'),\n messages: '',\n labelInfo: modalLabel,\n });\n }\n build(element) {\n element = element || this.element;\n this.empty(element);\n this.setContent(element, this.render());\n return this.attach(element);\n }\n get hasModalSaveButton() {\n return true;\n }\n render(children = `Unknown component: ${this.component.type}`, topLevel = false) {\n const isVisible = this.visible;\n this.rendered = true;\n if (!this.builderMode && !this.previewMode && this.component.modalEdit) {\n return ComponentModal_1.default.render(this, {\n visible: isVisible,\n showSaveButton: this.hasModalSaveButton,\n id: this.id,\n classes: this.className,\n styles: this.customStyle,\n children\n }, topLevel);\n }\n else {\n return this.renderTemplate('component', {\n visible: isVisible,\n id: this.id,\n classes: this.className,\n styles: this.customStyle,\n children\n }, topLevel);\n }\n }\n attachTooltips(toolTipsRefs) {\n toolTipsRefs === null || toolTipsRefs === void 0 ? void 0 : toolTipsRefs.forEach((tooltip, index) => {\n if (tooltip) {\n const tooltipAttribute = tooltip.getAttribute('data-tooltip');\n const tooltipDataTitle = tooltip.getAttribute('data-title');\n const tooltipText = this.interpolate(tooltipDataTitle || tooltipAttribute)\n .replace(/(?:\\r\\n|\\r|\\n)/g, '<br />');\n this.tooltips[index] = (0, tippy_js_1.default)(tooltip, {\n allowHTML: true,\n trigger: 'mouseenter click focus',\n placement: 'right',\n zIndex: 10000,\n interactive: true,\n content: this.t(tooltipText, { _userInput: true }),\n });\n }\n });\n }\n createComponentModal(element, modalShouldBeOpened, currentValue) {\n return new ComponentModal_1.default(this, element, modalShouldBeOpened, currentValue);\n }\n attach(element) {\n if (!this.builderMode && !this.previewMode && this.component.modalEdit) {\n const modalShouldBeOpened = this.componentModal ? this.componentModal.isOpened : false;\n const currentValue = modalShouldBeOpened ? this.componentModal.currentValue : this.dataValue;\n const openModalTemplate = this.componentModal && modalShouldBeOpened\n ? this.componentModal.openModalTemplate\n : null;\n this.componentModal = this.createComponentModal(element, modalShouldBeOpened, currentValue);\n this.setOpenModalElement(openModalTemplate);\n }\n this.attached = true;\n this.setElement(element);\n element.component = this;\n // If this already has an id, get it from the dom. If SSR, it could be different from the initiated id.\n if (this.element.id) {\n this.id = this.element.id;\n this.component.id = this.id;\n }\n this.loadRefs(element, {\n messageContainer: 'single',\n tooltip: 'multiple'\n });\n this.attachTooltips(this.refs.tooltip);\n // Attach logic.\n this.attachLogic();\n this.autofocus();\n // Allow global attach.\n this.hook('attachComponent', element, this);\n // Allow attach per component type.\n const type = this.component.type;\n if (type) {\n this.hook(`attach${type.charAt(0).toUpperCase() + type.substring(1, type.length)}`, element, this);\n }\n this.restoreFocus();\n this.addons.forEach((addon) => addon.attach(element));\n return Promise.resolve();\n }\n restoreFocus() {\n var _a, _b, _c;\n const isFocused = ((_b = (_a = this.root) === null || _a === void 0 ? void 0 : _a.focusedComponent) === null || _b === void 0 ? void 0 : _b.path) === this.path;\n if (isFocused) {\n this.loadRefs(this.element, { input: 'multiple' });\n this.focus((_c = this.root.currentSelection) === null || _c === void 0 ? void 0 : _c.index);\n this.restoreCaretPosition();\n }\n }\n addShortcut(element, shortcut) {\n // Avoid infinite recursion.\n if (!element || !this.root || (this.root === this)) {\n return;\n }\n if (!shortcut) {\n shortcut = this.component.shortcut;\n }\n this.root.addShortcut(element, shortcut);\n }\n removeShortcut(element, shortcut) {\n // Avoid infinite recursion.\n if (!element || (this.root === this)) {\n return;\n }\n if (!shortcut) {\n shortcut = this.component.shortcut;\n }\n this.root.removeShortcut(element, shortcut);\n }\n /**\n * Remove all event handlers.\n */\n detach() {\n // First iterate through each ref and delete the component so there are no dangling component references.\n lodash_1.default.each(this.refs, (ref) => {\n if (typeof ref === NodeList) {\n ref.forEach((elem) => {\n delete elem.component;\n });\n }\n else if (ref) {\n delete ref.component;\n }\n });\n this.refs = {};\n this.removeEventListeners();\n this.detachLogic();\n if (this.tooltip) {\n this.tooltip.destroy();\n }\n }\n checkRefresh(refreshData, changed, flags) {\n const changePath = lodash_1.default.get(changed, 'instance.path', false);\n // Don't let components change themselves.\n if (changePath && this.path === changePath) {\n return;\n }\n if (refreshData === 'data') {\n this.refresh(this.data, changed, flags);\n }\n else if ((changePath && (0, utils_1.getComponentPath)(changed.instance) === refreshData) && changed && changed.instance &&\n // Make sure the changed component is not in a different \"context\". Solves issues where refreshOn being set\n // in fields inside EditGrids could alter their state from other rows (which is bad).\n this.inContext(changed.instance)) {\n this.refresh(changed.value, changed, flags);\n }\n }\n checkRefreshOn(changes, flags = {}) {\n changes = changes || [];\n if (flags.noRefresh) {\n return;\n }\n if (!changes.length && flags.changed) {\n changes = [flags.changed];\n }\n const refreshOn = flags.fromBlur ? this.component.refreshOnBlur : this.component.refreshOn || this.component.redrawOn;\n // If they wish to refresh on a value, then add that here.\n if (refreshOn) {\n if (Array.isArray(refreshOn)) {\n refreshOn.forEach(refreshData => changes.forEach(changed => this.checkRefresh(refreshData, changed, flags)));\n }\n else {\n changes.forEach(changed => this.checkRefresh(refreshOn, changed, flags));\n }\n }\n }\n /**\n * Refreshes the component with a new value.\n *\n * @param value\n */\n refresh(value) {\n if (this.hasOwnProperty('refreshOnValue')) {\n this.refreshOnChanged = !lodash_1.default.isEqual(value, this.refreshOnValue);\n }\n else {\n this.refreshOnChanged = true;\n }\n this.refreshOnValue = (0, utils_1.fastCloneDeep)(value);\n if (this.refreshOnChanged) {\n if (this.component.clearOnRefresh) {\n this.setValue(null);\n }\n this.triggerRedraw();\n }\n }\n /**\n * Checks to see if a separate component is in the \"context\" of this component. This is determined by first checking\n * if they share the same \"data\" object. It will then walk up the parent tree and compare its parents data objects\n * with the components data and returns true if they are in the same context.\n *\n * Different rows of the same EditGrid, for example, are in different contexts.\n *\n * @param component\n */\n inContext(component) {\n if (component.data === this.data) {\n return true;\n }\n let parent = this.parent;\n while (parent) {\n if (parent.data === component.data) {\n return true;\n }\n parent = parent.parent;\n }\n return false;\n }\n get viewOnly() {\n return this.options.readOnly && this.options.viewAsHtml;\n }\n setElement(element) {\n if (this.element) {\n delete this.element.component;\n delete this.element;\n }\n this.element = element;\n }\n createViewOnlyElement() {\n this.setElement(this.ce('dl', {\n id: this.id\n }));\n if (this.element) {\n // Ensure you can get the component info from the element.\n this.element.component = this;\n }\n return this.element;\n }\n get defaultViewOnlyValue() {\n return '-';\n }\n /**\n * Uses the widget to determine the output string.\n *\n * @param value\n * @return {*}\n */\n getWidgetValueAsString(value, options) {\n const noInputWidget = !this.refs.input || !this.refs.input[0] || !this.refs.input[0].widget;\n if (!value || noInputWidget) {\n if (!this.widget || !value) {\n return value;\n }\n else {\n return this.widget.getValueAsString(value);\n }\n }\n if (Array.isArray(value)) {\n const values = [];\n value.forEach((val, index) => {\n const widget = this.refs.input[index] && this.refs.input[index].widget;\n if (widget) {\n values.push(widget.getValueAsString(val, options));\n }\n });\n return values;\n }\n const widget = this.refs.input[0].widget;\n return widget.getValueAsString(value, options);\n }\n getValueAsString(value, options) {\n if (!value) {\n return '';\n }\n value = this.getWidgetValueAsString(value, options);\n if (Array.isArray(value)) {\n return value.join(', ');\n }\n if (lodash_1.default.isPlainObject(value)) {\n return JSON.stringify(value);\n }\n if (value === null || value === undefined) {\n return '';\n }\n const stringValue = value.toString();\n return this.sanitize(stringValue);\n }\n getView(value, options) {\n if (this.component.protected) {\n return '--- PROTECTED ---';\n }\n return this.getValueAsString(value, options);\n }\n updateItems(...args) {\n this.restoreValue();\n this.onChange(...args);\n }\n /**\n * @param {*} data\n * @param {boolean} [forceUseValue=false] - if true, return 'value' property of the data\n * @return {*}\n */\n itemValue(data, forceUseValue = false) {\n if (lodash_1.default.isObject(data) && !lodash_1.default.isArray(data)) {\n if (this.valueProperty) {\n return lodash_1.default.get(data, this.valueProperty);\n }\n if (forceUseValue) {\n return data.value;\n }\n }\n return data;\n }\n itemValueForHTMLMode(value) {\n if (Array.isArray(value)) {\n const values = value.map(item => Array.isArray(item) ? this.itemValueForHTMLMode(item) : this.itemValue(item));\n return values.join(', ');\n }\n return this.itemValue(value);\n }\n createModal(element, attr, confirm) {\n const dialog = this.ce('div', attr || {});\n this.setContent(dialog, this.renderTemplate('dialog'));\n // Add refs to dialog, not \"this\".\n dialog.refs = {};\n this.loadRefs.call(dialog, dialog, {\n dialogOverlay: 'single',\n dialogContents: 'single',\n dialogClose: 'single',\n });\n dialog.refs.dialogContents.appendChild(element);\n document.body.appendChild(dialog);\n document.body.classList.add('modal-open');\n dialog.close = () => {\n document.body.classList.remove('modal-open');\n dialog.dispatchEvent(new CustomEvent('close'));\n };\n this.addEventListener(dialog, 'close', () => this.removeChildFrom(dialog, document.body));\n const close = (event) => {\n event.preventDefault();\n dialog.close();\n };\n const handleCloseClick = (e) => {\n if (confirm) {\n confirm().then(() => close(e))\n .catch(() => { });\n }\n else {\n close(e);\n }\n };\n this.addEventListener(dialog.refs.dialogOverlay, 'click', handleCloseClick);\n this.addEventListener(dialog.refs.dialogClose, 'click', handleCloseClick);\n return dialog;\n }\n get optimizeRedraw() {\n if (this.options.optimizeRedraw && this.element && !this.visible) {\n this.addClass(this.element, 'formio-removed');\n return true;\n }\n return false;\n }\n /**\n * Retrieves the CSS class name of this component.\n * @returns {string} - The class name of this component.\n */\n get className() {\n let className = this.hasInput ? `${this.transform('class', 'form-group')} has-feedback ` : '';\n className += `formio-component formio-component-${this.component.type} `;\n // TODO: find proper way to avoid overriding of default type-based component styles\n if (this.key && this.key !== 'form') {\n className += `formio-component-${this.key} `;\n }\n if (this.component.multiple) {\n className += 'formio-component-multiple ';\n }\n if (this.component.customClass) {\n className += this.component.customClass;\n }\n if (this.hasInput && this.component.validate && (0, utils_1.boolValue)(this.component.validate.required)) {\n className += ' required';\n }\n if (this.labelIsHidden()) {\n className += ' formio-component-label-hidden';\n }\n if (!this.visible) {\n className += ' formio-hidden';\n }\n return className;\n }\n /**\n * Build the custom style from the layout values\n * @return {string} - The custom style\n */\n get customStyle() {\n let customCSS = '';\n lodash_1.default.each(this.component.style, (value, key) => {\n if (value !== '') {\n customCSS += `${key}:${value};`;\n }\n });\n return customCSS;\n }\n static get serverConditionSettings() {\n return Component.conditionOperatorsSettings;\n }\n get isMobile() {\n return (0, ismobilejs_1.default)();\n }\n /**\n * Returns the outside wrapping element of this component.\n * @returns {HTMLElement}\n */\n getElement() {\n return this.element;\n }\n /**\n * Create an evaluation context for all script executions and interpolations.\n *\n * @param additional\n * @return {*}\n */\n evalContext(additional) {\n return super.evalContext(Object.assign({\n component: this.component,\n row: this.data,\n rowIndex: this.rowIndex,\n data: this.rootValue,\n iconClass: this.iconClass.bind(this),\n // Bind the translate function to the data context of any interpolated string.\n // It is useful to translate strings in different scenarions (eg: custom edit grid templates, custom error messages etc.)\n // and desirable to be publicly available rather than calling the internal {instance.t} function in the template string.\n t: this.t.bind(this),\n submission: (this.root ? this.root._submission : {\n data: this.rootValue\n }),\n form: this.root ? this.root._form : {},\n options: this.options,\n }, additional));\n }\n /**\n * Sets the pristine flag for this component.\n *\n * @param pristine {boolean} - TRUE to make pristine, FALSE not pristine.\n */\n setPristine(pristine) {\n this.pristine = pristine;\n }\n get isPristine() {\n return this.pristine;\n }\n setDirty(dirty) {\n this.dirty = dirty;\n }\n get isDirty() {\n return this.dirty;\n }\n /**\n * Removes a value out of the data array and rebuild the rows.\n * @param {number} index - The index of the data element to remove.\n */\n removeValue(index) {\n this.splice(index);\n this.redraw();\n this.restoreValue();\n this.triggerRootChange();\n }\n iconClass(name, spinning) {\n const iconset = this.options.iconset || Templates_1.default.current.defaultIconset || 'fa';\n return Templates_1.default.current.hasOwnProperty('iconClass')\n ? Templates_1.default.current.iconClass(iconset, name, spinning)\n : this.options.iconset === 'fa' ? Templates_1.default.defaultTemplates.iconClass(iconset, name, spinning) : name;\n }\n size(size) {\n return Templates_1.default.current.hasOwnProperty('size')\n ? Templates_1.default.current.size(size)\n : size;\n }\n /**\n * The readible name for this component.\n * @returns {string} - The name of the component.\n */\n get name() {\n return this.t(this.component.label || this.component.placeholder || this.key, { _userInput: true });\n }\n get visibleErrors() {\n return this._visibleErrors;\n }\n get errors() {\n return this._errors;\n }\n /**\n * Returns the error label for this component.\n * @return {*}\n */\n get errorLabel() {\n return this.t(this.component.errorLabel\n || this.component.label\n || this.component.placeholder\n || this.key);\n }\n /**\n * Get the error message provided a certain type of error.\n * @param type\n * @return {*}\n */\n errorMessage(type) {\n return (this.component.errors && this.component.errors[type]) ? this.component.errors[type] : type;\n }\n setContent(element, content, forceSanitize, sanitizeOptions) {\n if (element instanceof HTMLElement) {\n element.innerHTML = this.sanitize(content, forceSanitize, sanitizeOptions);\n return true;\n }\n return false;\n }\n restoreCaretPosition() {\n var _a, _b, _c;\n if ((_a = this.root) === null || _a === void 0 ? void 0 : _a.currentSelection) {\n if ((_b = this.refs.input) === null || _b === void 0 ? void 0 : _b.length) {\n const { selection, index } = this.root.currentSelection;\n let input = this.refs.input[index];\n const isInputRangeSelectable = (i) => /text|search|password|tel|url/i.test((i === null || i === void 0 ? void 0 : i.type) || '');\n if (input) {\n if (isInputRangeSelectable(input)) {\n input.setSelectionRange(...selection);\n }\n }\n else {\n input = this.refs.input[this.refs.input.length];\n const lastCharacter = ((_c = input.value) === null || _c === void 0 ? void 0 : _c.length) || 0;\n if (isInputRangeSelectable(input)) {\n input.setSelectionRange(lastCharacter, lastCharacter);\n }\n }\n }\n }\n }\n redraw() {\n // Don't bother if we have not built yet.\n if (!this.element || !this.element.parentNode || this.optimizeRedraw) {\n // Return a non-resolving promise.\n return Promise.resolve();\n }\n this.detach();\n this.emit('redraw');\n // Since we are going to replace the element, we need to know it's position so we can find it in the parent's children.\n const parent = this.element.parentNode;\n const index = Array.prototype.indexOf.call(parent.children, this.element);\n this.element.outerHTML = this.sanitize(this.render());\n this.setElement(parent.children[index]);\n return this.attach(this.element);\n }\n rebuild() {\n this.destroy();\n this.init();\n this.visible = this.conditionallyVisible(null, null);\n return this.redraw();\n }\n removeEventListeners() {\n super.removeEventListeners();\n this.tooltips.forEach(tooltip => tooltip.destroy());\n this.tooltips = [];\n }\n hasClass(element, className) {\n if (!element) {\n return;\n }\n return super.hasClass(element, this.transform('class', className));\n }\n addClass(element, className) {\n if (!element) {\n return;\n }\n return super.addClass(element, this.transform('class', className));\n }\n removeClass(element, className) {\n if (!element) {\n return;\n }\n return super.removeClass(element, this.transform('class', className));\n }\n /**\n * Determines if this component has a condition defined.\n *\n * @return {null}\n */\n hasCondition() {\n if (this._hasCondition !== null) {\n return this._hasCondition;\n }\n this._hasCondition = FormioUtils.hasCondition(this.component);\n return this._hasCondition;\n }\n /**\n * Check if this component is conditionally visible.\n *\n * @param data\n * @return {boolean}\n */\n conditionallyVisible(data, row) {\n data = data || this.rootValue;\n row = row || this.data;\n if (this.builderMode || this.previewMode || !this.hasCondition()) {\n return !this.component.hidden;\n }\n data = data || (this.root ? this.root.data : {});\n return this.checkCondition(row, data);\n }\n /**\n * Checks the condition of this component.\n *\n * TODO: Switch row and data parameters to be consistent with other methods.\n *\n * @param row - The row contextual data.\n * @param data - The global data object.\n * @return {boolean} - True if the condition applies to this component.\n */\n checkCondition(row, data) {\n return FormioUtils.checkCondition(this.component, row || this.data, data || this.rootValue, this.root ? this.root._form : {}, this);\n }\n /**\n * Check for conditionals and hide/show the element based on those conditions.\n */\n checkComponentConditions(data, flags, row) {\n data = data || this.rootValue;\n flags = flags || {};\n row = row || this.data;\n if (!this.builderMode & !this.previewMode && this.fieldLogic(data, row)) {\n this.redraw();\n }\n // Check advanced conditions\n const visible = this.conditionallyVisible(data, row);\n if (this.visible !== visible) {\n this.visible = visible;\n }\n return visible;\n }\n /**\n * Checks conditions for this component and any sub components.\n * @param args\n * @return {boolean}\n */\n checkConditions(data, flags, row) {\n data = data || this.rootValue;\n flags = flags || {};\n row = row || this.data;\n return this.checkComponentConditions(data, flags, row);\n }\n get logic() {\n return this.component.logic || [];\n }\n /**\n * Check all triggers and apply necessary actions.\n *\n * @param data\n */\n fieldLogic(data, row) {\n data = data || this.rootValue;\n row = row || this.data;\n const logics = this.logic;\n // If there aren't logic, don't go further.\n if (logics.length === 0) {\n return;\n }\n const newComponent = (0, utils_1.fastCloneDeep)(this.originalComponent);\n let changed = logics.reduce((changed, logic) => {\n const result = FormioUtils.checkTrigger(newComponent, logic.trigger, row, data, this.root ? this.root._form : {}, this);\n return (result ? this.applyActions(newComponent, logic.actions, result, row, data) : false) || changed;\n }, false);\n // If component definition changed, replace and mark as changed.\n if (!lodash_1.default.isEqual(this.component, newComponent)) {\n this.component = newComponent;\n changed = true;\n const disabled = this.shouldDisabled;\n // Change disabled state if it has changed\n if (this.disabled !== disabled) {\n this.disabled = disabled;\n }\n }\n return changed;\n }\n isIE() {\n if (typeof window === 'undefined') {\n return false;\n }\n const userAgent = window.navigator.userAgent;\n const msie = userAgent.indexOf('MSIE ');\n if (msie > 0) {\n // IE 10 or older => return version number\n return parseInt(userAgent.substring(msie + 5, userAgent.indexOf('.', msie)), 10);\n }\n const trident = userAgent.indexOf('Trident/');\n if (trident > 0) {\n // IE 11 => return version number\n const rv = userAgent.indexOf('rv:');\n return parseInt(userAgent.substring(rv + 3, userAgent.indexOf('.', rv)), 10);\n }\n const edge = userAgent.indexOf('Edge/');\n if (edge > 0) {\n // IE 12 (aka Edge) => return version number\n return parseInt(userAgent.substring(edge + 5, userAgent.indexOf('.', edge)), 10);\n }\n // other browser\n return false;\n }\n defineActionValue(action, argsObject) {\n return this.evaluate(action.value, argsObject, 'value');\n }\n applyActions(newComponent, actions, result, row, data) {\n data = data || this.rootValue;\n row = row || this.data;\n return actions.reduce((changed, action) => {\n switch (action.type) {\n case 'property': {\n FormioUtils.setActionProperty(newComponent, action, result, row, data, this);\n const property = action.property.value;\n if (!lodash_1.default.isEqual(lodash_1.default.get(this.component, property), lodash_1.default.get(newComponent, property))) {\n changed = true;\n }\n break;\n }\n case 'value': {\n const oldValue = this.getValue();\n const newValue = this.defineActionValue(action, {\n value: lodash_1.default.clone(oldValue),\n data,\n row,\n component: newComponent,\n result,\n });\n if (!lodash_1.default.isEqual(oldValue, newValue) && !(this.component.clearOnHide && !this.visible)) {\n this.setValue(newValue);\n if (this.viewOnly) {\n this.dataValue = newValue;\n }\n changed = true;\n }\n break;\n }\n case 'mergeComponentSchema': {\n const schema = this.evaluate(action.schemaDefinition, {\n value: lodash_1.default.clone(this.getValue()),\n data,\n row,\n component: newComponent,\n result,\n }, 'schema');\n lodash_1.default.assign(newComponent, schema);\n if (!lodash_1.default.isEqual(this.component, newComponent)) {\n changed = true;\n }\n break;\n }\n case 'customAction': {\n const oldValue = this.getValue();\n const newValue = this.evaluate(action.customAction, {\n value: lodash_1.default.clone(oldValue),\n data,\n row,\n input: oldValue,\n component: newComponent,\n result,\n }, 'value');\n if (!lodash_1.default.isEqual(oldValue, newValue) && !(this.component.clearOnHide && !this.visible)) {\n this.setValue(newValue);\n if (this.viewOnly) {\n this.dataValue = newValue;\n }\n changed = true;\n }\n break;\n }\n }\n return changed;\n }, false);\n }\n // Deprecated\n addInputError(message, dirty, elements) {\n this.addMessages(message);\n this.setErrorClasses(elements, dirty, !!message);\n }\n // Deprecated\n removeInputError(elements) {\n this.setErrorClasses(elements, true, false);\n }\n /**\n * Add a new input error to this element.\n *\n * @param message\n * @param dirty\n */\n addMessages(messages) {\n if (!messages) {\n return;\n }\n // Standardize on array of objects for message.\n if (typeof messages === 'string') {\n messages = {\n messages,\n level: 'error',\n };\n }\n if (!Array.isArray(messages)) {\n messages = [messages];\n }\n messages = lodash_1.default.uniqBy(messages, message => message.message);\n if (this.refs.messageContainer) {\n this.setContent(this.refs.messageContainer, messages.map((message) => {\n if (message.message && typeof message.message === 'string') {\n message.message = message.message.replaceAll('<', '&lt;').replaceAll('>', '&gt;');\n }\n return this.renderTemplate('message', Object.assign({}, message));\n }).join(''));\n }\n }\n setErrorClasses(elements, dirty, hasErrors, hasMessages, element = this.element) {\n this.clearErrorClasses();\n elements.forEach((element) => {\n this.setElementInvalid(this.performInputMapping(element), false);\n });\n this.setInputWidgetErrorClasses(elements, hasErrors);\n if (hasErrors) {\n // Add error classes\n elements.forEach((input) => {\n this.setElementInvalid(this.performInputMapping(input), true);\n });\n if (dirty && this.options.highlightErrors) {\n this.addClass(element, this.options.componentErrorClass);\n }\n else {\n this.addClass(element, 'has-error');\n }\n }\n if (hasMessages) {\n this.addClass(element, 'has-message');\n }\n }\n setElementInvalid(element, invalid) {\n if (!element)\n return;\n if (invalid) {\n this.addClass(element, 'is-invalid');\n }\n else {\n this.removeClass(element, 'is-invalid');\n }\n element.setAttribute('aria-invalid', invalid ? 'true' : 'false');\n }\n clearOnHide() {\n // clearOnHide defaults to true for old forms (without the value set) so only trigger if the value is false.\n if (\n // if change happens inside EditGrid's row, it doesn't trigger change on the root level, so rootPristine will be true\n (!this.rootPristine || this.options.server || (0, utils_1.isInsideScopingComponent)(this)) &&\n this.component.clearOnHide !== false &&\n !this.options.readOnly &&\n !this.options.showHiddenFields) {\n if (!this.visible) {\n this.deleteValue();\n }\n else if (!this.hasValue() && this.shouldAddDefaultValue) {\n // If shown, ensure the default is set.\n this.setValue(this.defaultValue, {\n noUpdateEvent: true\n });\n }\n }\n }\n triggerRootChange(...args) {\n if (this.options.onChange) {\n this.options.onChange(...args);\n }\n else if (this.root) {\n this.root.triggerChange(...args);\n }\n }\n onChange(flags, fromRoot) {\n flags = flags || {};\n if (flags.modified) {\n if (!flags.noPristineChangeOnModified) {\n this.pristine = false;\n }\n this.addClass(this.getElement(), 'formio-modified');\n }\n // If we are supposed to validate on blur, then don't trigger validation yet.\n if (this.component.validateOn === 'blur') {\n flags.noValidate = true;\n }\n if (this.component.onChange) {\n this.evaluate(this.component.onChange, {\n flags\n });\n }\n // Set the changed variable.\n const changed = {\n instance: this,\n component: this.component,\n value: this.dataValue,\n flags: flags\n };\n // Emit the change.\n this.emit('componentChange', changed);\n // Do not propogate the modified flag.\n let modified = false;\n if (flags.modified) {\n modified = true;\n delete flags.modified;\n }\n // Bubble this change up to the top.\n if (!fromRoot) {\n this.triggerRootChange(flags, changed, modified);\n }\n return changed;\n }\n get wysiwygDefault() {\n return {\n quill: {\n theme: 'snow',\n placeholder: this.t(this.component.placeholder, { _userInput: true }),\n modules: {\n toolbar: [\n [{ 'size': ['small', false, 'large', 'huge'] }],\n [{ 'header': [1, 2, 3, 4, 5, 6, false] }],\n [{ 'font': [] }],\n ['bold', 'italic', 'underline', 'strike', { 'script': 'sub' }, { 'script': 'super' }, 'clean'],\n [{ 'color': [] }, { 'background': [] }],\n [{ 'list': 'ordered' }, { 'list': 'bullet' }, { 'indent': '-1' }, { 'indent': '+1' }, { 'align': [] }],\n ['blockquote', 'code-block'],\n ['link', 'image', 'video', 'formula', 'source']\n ]\n }\n },\n ace: {\n theme: 'ace/theme/xcode',\n maxLines: 12,\n minLines: 12,\n tabSize: 2,\n mode: 'ace/mode/javascript',\n placeholder: this.t(this.component.placeholder, { _userInput: true })\n },\n ckeditor: {\n image: {\n toolbar: [\n 'imageTextAlternative',\n '|',\n 'imageStyle:full',\n 'imageStyle:alignLeft',\n 'imageStyle:alignCenter',\n 'imageStyle:alignRight'\n ],\n styles: [\n 'full',\n 'alignLeft',\n 'alignCenter',\n 'alignRight'\n ]\n },\n extraPlugins: []\n },\n default: {}\n };\n }\n addCKE(element, settings, onChange) {\n settings = lodash_1.default.isEmpty(settings) ? {} : settings;\n settings.base64Upload = this.component.isUploadEnabled ? false : true;\n settings.mediaEmbed = { previewsInData: true };\n settings = lodash_1.default.merge(this.wysiwygDefault.ckeditor, lodash_1.default.get(this.options, 'editors.ckeditor.settings', {}), settings);\n if (this.component.isUploadEnabled) {\n settings.extraPlugins.push((0, uploadAdapter_1.getFormioUploadAdapterPlugin)(this.fileService, this));\n }\n return Formio_1.Formio.requireLibrary('ckeditor', isIEBrowser ? 'CKEDITOR' : 'ClassicEditor', lodash_1.default.get(this.options, 'editors.ckeditor.src', `${Formio_1.Formio.cdn.ckeditor}/ckeditor.js`), true)\n .then(() => {\n if (!element.parentNode) {\n return Promise.reject();\n }\n if (isIEBrowser) {\n const editor = CKEDITOR.replace(element);\n editor.on('change', () => onChange(editor.getData()));\n return Promise.resolve(editor);\n }\n else {\n return ClassicEditor.create(element, settings).then(editor => {\n editor.model.document.on('change', () => onChange(editor.data.get()));\n return editor;\n });\n }\n });\n }\n addQuill(element, settings, onChange) {\n settings = lodash_1.default.isEmpty(settings) ? this.wysiwygDefault.quill : settings;\n settings = lodash_1.default.merge(this.wysiwygDefault.quill, lodash_1.default.get(this.options, 'editors.quill.settings', {}), settings);\n settings = Object.assign(Object.assign({}, settings), { modules: Object.assign({ table: true }, settings.modules) });\n // Lazy load the quill css.\n Formio_1.Formio.requireLibrary(`quill-css-${settings.theme}`, 'Quill', [\n { type: 'styles', src: `${Formio_1.Formio.cdn.quill}/quill.${settings.theme}.css` }\n ], true);\n // Lazy load the quill library.\n return Formio_1.Formio.requireLibrary('quill', 'Quill', lodash_1.default.get(this.options, 'editors.quill.src', `${Formio_1.Formio.cdn.quill}/quill.min.js`), true)\n .then(() => {\n return Formio_1.Formio.requireLibrary('quill-table', 'Quill', `${Formio_1.Formio.cdn.baseUrl}/quill/quill-table.js`, true)\n .then(() => {\n if (!element.parentNode) {\n return Promise.reject();\n }\n this.quill = new Quill(element, isIEBrowser ? Object.assign(Object.assign({}, settings), { modules: {} }) : settings);\n /** This block of code adds the [source] capabilities. See https://codepen.io/anon/pen/ZyEjrQ **/\n const txtArea = document.createElement('textarea');\n txtArea.setAttribute('class', 'quill-source-code');\n this.quill.addContainer('ql-custom').appendChild(txtArea);\n const qlSource = element.parentNode.querySelector('.ql-source');\n if (qlSource) {\n this.addEventListener(qlSource, 'click', (event) => {\n event.preventDefault();\n if (txtArea.style.display === 'inherit') {\n this.quill.setContents(this.quill.clipboard.convert({ html: txtArea.value }));\n }\n txtArea.style.display = (txtArea.style.display === 'none') ? 'inherit' : 'none';\n });\n }\n /** END CODEBLOCK **/\n // Make sure to select cursor when they click on the element.\n this.addEventListener(element, 'click', () => this.quill.focus());\n // Allows users to skip toolbar items when tabbing though form\n const elm = document.querySelectorAll('.ql-formats > button');\n for (let i = 0; i < elm.length; i++) {\n elm[i].setAttribute('tabindex', '-1');\n }\n this.quill.on('text-change', () => {\n txtArea.value = this.quill.root.innerHTML;\n onChange(txtArea);\n });\n return this.quill;\n });\n });\n }\n get shouldSanitizeValue() {\n var _a;\n // Sanitize value if sanitizing for thw whole content is turned off\n return (((_a = this.options) === null || _a === void 0 ? void 0 : _a.sanitize) !== false);\n }\n addAce(element, settings, onChange) {\n if (!settings || (settings.theme === 'snow')) {\n const mode = settings ? settings.mode : '';\n settings = {};\n if (mode) {\n settings.mode = mode;\n }\n }\n settings = lodash_1.default.merge(this.wysiwygDefault.ace, lodash_1.default.get(this.options, 'editors.ace.settings', {}), settings || {});\n return Formio_1.Formio.requireLibrary('ace', 'ace', lodash_1.default.get(this.options, 'editors.ace.src', `${Formio_1.Formio.cdn.ace}/ace.js`), true)\n .then((editor) => {\n editor = editor.edit(element);\n editor.removeAllListeners('change');\n editor.setOptions(settings);\n editor.getSession().setMode(settings.mode);\n editor.on('change', () => onChange(editor.getValue()));\n if (settings.isUseWorkerDisabled) {\n editor.session.setUseWorker(false);\n }\n return editor;\n });\n }\n get tree() {\n return this.component.tree || false;\n }\n /**\n * The empty value for this component.\n *\n * @return {null}\n */\n get emptyValue() {\n return null;\n }\n /**\n * Returns if this component has a value set.\n *\n */\n hasValue(data) {\n return !lodash_1.default.isUndefined(lodash_1.default.get(data || this.data, this.key));\n }\n /**\n * Get the data value at the root level.\n *\n * @return {*}\n */\n get rootValue() {\n return this.root ? this.root.data : this.data;\n }\n get rootPristine() {\n return lodash_1.default.get(this, 'root.pristine', false);\n }\n /**\n * Get the static value of this component.\n * @return {*}\n */\n get dataValue() {\n if (!this.key ||\n (!this.visible && this.component.clearOnHide && !this.rootPristine)) {\n return this.emptyValue;\n }\n if (!this.hasValue() && this.shouldAddDefaultValue) {\n const empty = this.component.multiple ? [] : this.emptyValue;\n if (!this.rootPristine) {\n this.dataValue = empty;\n }\n return empty;\n }\n return lodash_1.default.get(this._data, this.key);\n }\n /**\n * Sets the static value of this component.\n *\n * @param value\n */\n set dataValue(value) {\n if (!this.allowData ||\n !this.key ||\n (!this.visible && this.component.clearOnHide && !this.rootPristine)) {\n return;\n }\n if ((value !== null) && (value !== undefined)) {\n value = this.hook('setDataValue', value, this.key, this._data);\n }\n if ((value === null) || (value === undefined)) {\n this.unset();\n return;\n }\n lodash_1.default.set(this._data, this.key, value);\n return;\n }\n /**\n * Splice a value from the dataValue.\n *\n * @param index\n */\n splice(index, flags = {}) {\n if (this.hasValue()) {\n const dataValue = this.dataValue || [];\n if (lodash_1.default.isArray(dataValue) && dataValue.hasOwnProperty(index)) {\n dataValue.splice(index, 1);\n this.dataValue = dataValue;\n this.triggerChange(flags);\n }\n }\n }\n unset() {\n lodash_1.default.unset(this._data, this.key);\n }\n /**\n * Deletes the value of the component.\n */\n deleteValue() {\n this.setValue(null, {\n noUpdateEvent: true,\n noDefault: true\n });\n this.unset();\n }\n getCustomDefaultValue(defaultValue) {\n if (this.component.customDefaultValue && !this.options.preview) {\n defaultValue = this.evaluate(this.component.customDefaultValue, { value: '' }, 'value');\n }\n return defaultValue;\n }\n get shouldAddDefaultValue() {\n return !this.options.noDefaults || (this.component.defaultValue && !this.isEmpty(this.component.defaultValue)) || this.component.customDefaultValue;\n }\n get defaultValue() {\n let defaultValue = this.emptyValue;\n if (this.component.defaultValue) {\n defaultValue = this.component.defaultValue;\n }\n defaultValue = this.getCustomDefaultValue(defaultValue);\n const checkMask = (value) => {\n if (typeof value === 'string') {\n const placeholderChar = this.placeholderChar;\n value = (0, vanilla_text_mask_1.conformToMask)(value, this.defaultMask, { placeholderChar }).conformedValue;\n if (!FormioUtils.matchInputMask(value, this.defaultMask)) {\n value = '';\n }\n }\n else {\n value = '';\n }\n return value;\n };\n if (this.defaultMask) {\n if (Array.isArray(defaultValue)) {\n defaultValue = defaultValue.map(checkMask);\n }\n else {\n defaultValue = checkMask(defaultValue);\n }\n }\n // Clone so that it creates a new instance.\n return lodash_1.default.cloneDeep(defaultValue);\n }\n /**\n * Get the input value of this component.\n *\n * @return {*}\n */\n getValue() {\n if (!this.hasInput || this.viewOnly || !this.refs.input || !this.refs.input.length) {\n return this.dataValue;\n }\n const values = [];\n for (const i in this.refs.input) {\n if (this.refs.input.hasOwnProperty(i)) {\n if (!this.component.multiple) {\n return this.getValueAt(i);\n }\n values.push(this.getValueAt(i));\n }\n }\n if (values.length === 0 && !this.component.multiple) {\n return '';\n }\n return values;\n }\n /**\n * Get the value at a specific index.\n *\n * @param index\n * @returns {*}\n */\n getValueAt(index) {\n const input = this.performInputMapping(this.refs.input[index]);\n return input ? input.value : undefined;\n }\n /**\n * Set the value of this component.\n *\n * @param value\n * @param flags\n *\n * @return {boolean} - If the value changed.\n */\n setValue(value, flags = {}) {\n const changed = this.updateValue(value, flags);\n value = this.dataValue;\n if (!this.hasInput) {\n return changed;\n }\n const isArray = Array.isArray(value);\n const valueInput = this.refs.fileLink || this.refs.input;\n if (isArray &&\n Array.isArray(this.defaultValue) &&\n this.refs.hasOwnProperty('input') &&\n valueInput &&\n (valueInput.length !== value.length) &&\n this.visible) {\n this.redraw();\n }\n if (this.isHtmlRenderMode() && flags && flags.fromSubmission && changed) {\n this.redraw();\n return changed;\n }\n for (const i in this.refs.input) {\n if (this.refs.input.hasOwnProperty(i)) {\n this.setValueAt(i, isArray ? value[i] : value, flags);\n }\n }\n return changed;\n }\n /**\n * Set the value at a specific index.\n *\n * @param index\n * @param value\n */\n setValueAt(index, value, flags = {}) {\n if (!flags.noDefault && (value === null || value === undefined) && !this.component.multiple) {\n value = this.defaultValue;\n }\n const input = this.performInputMapping(this.refs.input[index]);\n const valueMaskInput = this.refs.valueMaskInput;\n if (valueMaskInput === null || valueMaskInput === void 0 ? void 0 : valueMaskInput.mask) {\n valueMaskInput.mask.textMaskInputElement.update(value);\n }\n if (input.mask) {\n input.mask.textMaskInputElement.update(value);\n }\n else if (input.widget && input.widget.setValue) {\n input.widget.setValue(value);\n }\n else {\n input.value = value;\n }\n }\n get hasSetValue() {\n return this.hasValue() && !this.isEmpty(this.dataValue);\n }\n setDefaultValue() {\n if (this.defaultValue && this.shouldAddDefaultValue) {\n const defaultValue = (this.component.multiple && !this.dataValue.length) ? [] : this.defaultValue;\n this.setValue(defaultValue, {\n noUpdateEvent: true\n });\n }\n }\n /**\n * Restore the value of a control.\n */\n restoreValue() {\n if (this.hasSetValue) {\n this.setValue(this.dataValue, {\n noUpdateEvent: true\n });\n }\n else {\n this.setDefaultValue();\n }\n }\n /**\n * Normalize values coming into updateValue.\n *\n * @param value\n * @return {*}\n */\n normalizeValue(value) {\n if (this.component.multiple && !Array.isArray(value)) {\n value = value ? [value] : [];\n }\n return value;\n }\n /**\n * Update a value of this component.\n *\n * @param flags\n */\n updateComponentValue(value, flags = {}) {\n let newValue = (!flags.resetValue && (value === undefined || value === null)) ? this.getValue() : value;\n newValue = this.normalizeValue(newValue, flags);\n const oldValue = this.dataValue;\n let changed = ((newValue !== undefined) ? this.hasChanged(newValue, oldValue) : false);\n if (changed) {\n this.dataValue = newValue;\n changed = this.dataValue !== oldValue;\n this.updateOnChange(flags, changed);\n }\n if (this.componentModal && flags && flags.fromSubmission) {\n this.componentModal.setValue(value);\n }\n return changed;\n }\n /**\n * Updates the value of this component plus all sub-components.\n *\n * @param args\n * @return {boolean}\n */\n updateValue(...args) {\n return this.updateComponentValue(...args);\n }\n getIcon(name, content, styles, ref = 'icon') {\n return this.renderTemplate('icon', {\n className: this.iconClass(name),\n ref,\n styles,\n content\n });\n }\n /**\n * Resets the value of this component.\n */\n resetValue() {\n this.unset();\n this.setValue(this.emptyValue, {\n noUpdateEvent: true,\n noValidate: true,\n resetValue: true\n });\n }\n /**\n * Determine if the value of this component has changed.\n *\n * @param newValue\n * @param oldValue\n * @return {boolean}\n */\n hasChanged(newValue, oldValue) {\n if (((newValue === undefined) || (newValue === null)) &&\n ((oldValue === undefined) || (oldValue === null) || this.isEmpty(oldValue))) {\n return false;\n }\n // If we do not have a value and are getting set to anything other than undefined or null, then we changed.\n if (newValue !== undefined &&\n newValue !== null &&\n this.allowData &&\n !this.hasValue()) {\n return true;\n }\n return !lodash_1.default.isEqual(newValue, oldValue);\n }\n /**\n * Update the value on change.\n *\n * @param flags\n */\n updateOnChange(flags = {}, changed = false) {\n if (!flags.noUpdateEvent && changed) {\n if (flags.fromSubmission) {\n // Reset the errors when a submission has been made and allow it to revalidate.\n this._errors = [];\n }\n this.triggerChange(flags);\n return true;\n }\n return false;\n }\n /**\n * Perform a calculated value operation.\n *\n * @param data - The global data object.\n *\n * @return {boolean} - If the value changed during calculation.\n */\n convertNumberOrBoolToString(value) {\n if (typeof value === 'number' || typeof value === 'boolean') {\n return value.toString();\n }\n return value;\n }\n doValueCalculation(dataValue, data, row) {\n var _a;\n return this.evaluate(this.component.calculateValue, {\n value: dataValue,\n data,\n row: row || this.data,\n submission: ((_a = this.root) === null || _a === void 0 ? void 0 : _a._submission) || {\n data: this.rootValue\n }\n }, 'value');\n }\n /* eslint-disable max-statements */\n calculateComponentValue(data, flags, row) {\n // Skip value calculation for the component if we don't have entire form data set\n if (lodash_1.default.isUndefined(lodash_1.default.get(this, 'root.data'))) {\n return false;\n }\n // If no calculated value or\n // hidden and set to clearOnHide (Don't calculate a value for a hidden field set to clear when hidden)\n const { clearOnHide } = this.component;\n const shouldBeCleared = !this.visible && clearOnHide;\n const allowOverride = lodash_1.default.get(this.component, 'allowCalculateOverride', false);\n // Handle all cases when calculated values should not fire.\n if ((this.options.readOnly && !this.options.pdf && !this.component.calculateValue) ||\n !(this.component.calculateValue || this.component.calculateValueVariable) ||\n shouldBeCleared ||\n (this.options.server && !this.component.calculateServer) ||\n (flags.dataSourceInitialLoading && allowOverride)) {\n return false;\n }\n const dataValue = this.dataValue;\n // Calculate the new value.\n let calculatedValue = this.doValueCalculation(dataValue, data, row, flags);\n if (this.options.readOnly && dataValue && !calculatedValue) {\n return false;\n }\n if (lodash_1.default.isNil(calculatedValue)) {\n calculatedValue = this.emptyValue;\n }\n const changed = !lodash_1.default.isEqual(dataValue, calculatedValue);\n // Do not override calculations on server if they have calculateServer set.\n if (allowOverride) {\n // The value is considered locked if it is not empty and comes from a submission value.\n const fromSubmission = (flags.fromSubmission && this.component.persistent === true);\n if (this.isEmpty(dataValue)) {\n // Reset the calculation lock if ever the data is cleared.\n this.calculationLocked = false;\n }\n else if (this.calculationLocked || fromSubmission) {\n this.calculationLocked = true;\n return false;\n }\n const firstPass = (this.calculatedValue === undefined);\n if (firstPass) {\n this.calculatedValue = null;\n }\n const newCalculatedValue = this.normalizeValue(this.convertNumberOrBoolToString(calculatedValue));\n const previousCalculatedValue = this.normalizeValue(this.convertNumberOrBoolToString(this.calculatedValue));\n const normalizedDataValue = this.normalizeValue(this.convertNumberOrBoolToString(dataValue));\n const calculationChanged = !lodash_1.default.isEqual(previousCalculatedValue, newCalculatedValue);\n const previousChanged = !lodash_1.default.isEqual(normalizedDataValue, previousCalculatedValue);\n if (calculationChanged && previousChanged && !firstPass) {\n return false;\n }\n // Check to ensure that the calculated value is different than the previously calculated value.\n if (previousCalculatedValue && previousChanged && !calculationChanged) {\n return false;\n }\n if (flags.isReordered || !calculationChanged) {\n return false;\n }\n if (fromSubmission) {\n // If we set value from submission and it differs from calculated one, set the calculated value to prevent overriding dataValue in the next pass\n this.calculatedValue = calculatedValue;\n return false;\n }\n // If this is the firstPass, and the dataValue is different than to the calculatedValue.\n if (firstPass && !this.isEmpty(dataValue) && changed && calculationChanged) {\n // Return that we have a change so it will perform another pass.\n return true;\n }\n }\n this.calculatedValue = calculatedValue;\n if (changed) {\n if (!flags.noPristineChangeOnModified) {\n this.pristine = false;\n }\n flags.triggeredComponentId = this.id;\n return this.setValue(calculatedValue, flags);\n }\n return false;\n }\n /* eslint-enable max-statements */\n /**\n * Performs calculations in this component plus any child components.\n *\n * @param args\n * @return {boolean}\n */\n calculateValue(data, flags, row) {\n data = data || this.rootValue;\n flags = flags || {};\n row = row || this.data;\n return this.calculateComponentValue(data, flags, row);\n }\n /**\n * Get this component's label text.\n *\n */\n get label() {\n return this.component.label;\n }\n /**\n * Set this component's label text and render it.\n *\n * @param value - The new label text.\n */\n set label(value) {\n this.component.label = value;\n if (this.labelElement) {\n this.labelElement.innerText = value;\n }\n }\n /**\n * Get FormioForm element at the root of this component tree.\n *\n */\n getRoot() {\n return this.root;\n }\n /**\n * Returns the invalid message, or empty string if the component is valid.\n *\n * @param data\n * @param dirty\n * @return {*}\n */\n invalidMessage(data, dirty, ignoreCondition, row) {\n if (!ignoreCondition && !this.checkCondition(row, data)) {\n return '';\n }\n // See if this is forced invalid.\n if (this.invalid) {\n return this.invalid;\n }\n // No need to check for errors if there is no input or if it is pristine.\n if (!this.hasInput || (!dirty && this.pristine)) {\n return '';\n }\n const validationScope = { errors: [] };\n (0, core_1.processOneSync)({\n component: this.component,\n data,\n row,\n path: this.path || this.component.key,\n scope: validationScope,\n instance: this,\n processors: [\n core_1.validateProcessSync\n ]\n });\n const errors = validationScope.errors;\n const interpolatedErrors = FormioUtils.interpolateErrors(this.component, errors, this.t.bind(this));\n return lodash_1.default.map(interpolatedErrors, 'message').join('\\n\\n');\n }\n /**\n * Returns if the component is valid or not.\n *\n * @param data\n * @param dirty\n * @return {boolean}\n */\n isValid(data, dirty) {\n return !this.invalidMessage(data, dirty);\n }\n setComponentValidity(errors, dirty, silentCheck) {\n if (silentCheck) {\n return [];\n }\n const messages = errors.filter(message => !message.fromServer);\n if (errors.length && !!messages.length && (!this.isEmpty(this.defaultValue) || dirty || !this.pristine)) {\n return this.setCustomValidity(messages, dirty);\n }\n else {\n return this.setCustomValidity('');\n }\n }\n /**\n * Interpolate errors from the validation methods.\n * @param {*} errors\n * @returns\n */\n interpolateErrors(errors) {\n var _a;\n const interpolatedErrors = FormioUtils.interpolateErrors(this.component, errors, this.t.bind(this));\n return ((_a = this.serverErrors) === null || _a === void 0 ? void 0 : _a.length) ? [...interpolatedErrors, ...this.serverErrors] : interpolatedErrors;\n }\n /**\n * Show component validation errors.\n * @param {*} errors - An array of errors that have occured.\n * @param {*} data - The root submission data.\n * @param {*} row - The contextual row data.\n * @param {*} flags - The flags to perform validation.\n * @returns\n */\n showValidationErrors(errors, data, row, flags) {\n if (flags.silentCheck) {\n return [];\n }\n if (this.options.alwaysDirty) {\n flags.dirty = true;\n }\n if (flags.fromSubmission && this.hasValue(data)) {\n flags.dirty = true;\n }\n this.setDirty(flags.dirty);\n return this.setComponentValidity(errors, flags.dirty, flags.silentCheck, flags.fromSubmission);\n }\n /**\n * Perform a component validation.\n * @param {*} data - The root data you wish to use for this component.\n * @param {*} row - The contextual row data you wish to use for this component.\n * @param {*} flags - The flags to control the behavior of the validation.\n * @returns\n */\n validateComponent(data, row, flags = {}) {\n data = data || this.rootValue;\n row = row || this.data;\n const { async = false } = flags;\n if (this.shouldSkipValidation(data, row, flags)) {\n return async ? Promise.resolve([]) : [];\n }\n const processContext = {\n component: this.component,\n data,\n row,\n path: this.path || this.component.key,\n instance: this,\n scope: { errors: [] },\n processors: [\n async ? core_1.validateProcess : core_1.validateProcessSync\n ]\n };\n if (async) {\n return (0, core_1.processOne)(processContext).then(() => {\n this._errors = this.interpolateErrors(processContext.scope.errors);\n return this._errors;\n });\n }\n (0, core_1.processOneSync)(processContext);\n this._errors = this.interpolateErrors(processContext.scope.errors);\n return this._errors;\n }\n /**\n * Checks the validity of this component and sets the error message if it is invalid.\n *\n * @param data\n * @param dirty\n * @param row\n * @return {boolean}\n */\n checkComponentValidity(data, dirty, row, flags = {}, allErrors = []) {\n data = data || this.rootValue;\n row = row || this.data;\n flags.dirty = dirty || false;\n if (flags.async) {\n return this.validateComponent(data, row, flags).then((errors) => {\n allErrors.push(...errors);\n if (this.parent && this.parent.childErrors) {\n this.parent.childErrors.push(...errors);\n }\n this.showValidationErrors(errors, data, row, flags);\n return errors.length === 0;\n });\n }\n else {\n const errors = this.validateComponent(data, row, flags);\n this.showValidationErrors(errors, data, row, flags);\n allErrors.push(...errors);\n if (this.parent && this.parent.childErrors) {\n this.parent.childErrors.push(...errors);\n }\n return errors.length === 0;\n }\n }\n /**\n * Checks the validity of the component.\n * @param {*} data\n * @param {*} dirty\n * @param {*} row\n * @param {*} silentCheck\n * @returns\n */\n checkValidity(data, dirty, row, silentCheck, errors = []) {\n data = data || this.rootValue;\n row = row || this.data;\n console.log('Deprecation warning: Component.checkValidity() will be deprecated in 6.x version of renderer. Use Component.validateComponent instead.');\n return this.checkComponentValidity(data, dirty, row, { silentCheck }, errors);\n }\n checkAsyncValidity(data, dirty, row, silentCheck, errors = []) {\n console.log('Deprecation warning: Component.checkAsyncValidity() will be deprecated in 6.x version of renderer. Use Component.validateComponent instead.');\n return this.checkComponentValidity(data, dirty, row, { async: true, silentCheck }, errors);\n }\n /**\n * Check the conditions, calculations, and validity of a single component and triggers an update if\n * something changed.\n *\n * @param data - The root data of the change event.\n * @param flags - The flags from this change event.\n *\n * @return boolean - If component is valid or not.\n */\n checkData(data, flags, row) {\n data = data || this.rootValue;\n flags = flags || {};\n row = row || this.data;\n // Needs for Nextgen Rules Engine\n this.resetCaches();\n // Do not trigger refresh if change was triggered on blur event since components with Refresh on Blur have their own listeners\n if (!flags.fromBlur) {\n this.checkRefreshOn(flags.changes, flags);\n }\n if (flags.noCheck) {\n return true;\n }\n this.checkComponentConditions(data, flags, row);\n if (this.id !== flags.triggeredComponentId) {\n this.calculateComponentValue(data, flags, row);\n }\n }\n checkModal(errors = [], dirty = false) {\n const messages = errors.filter(error => !error.fromServer);\n const isValid = errors.length === 0;\n if (!this.component.modalEdit || !this.componentModal) {\n return;\n }\n if (dirty && !isValid) {\n this.setErrorClasses([this.refs.openModal], dirty, !isValid, !!messages.length, this.refs.openModalWrapper);\n }\n else {\n this.clearErrorClasses(this.refs.openModalWrapper);\n }\n }\n get validationValue() {\n return this.dataValue;\n }\n isEmpty(value = this.dataValue) {\n const isEmptyArray = (lodash_1.default.isArray(value) && value.length === 1) ? lodash_1.default.isEqual(value[0], this.emptyValue) : false;\n return value == null || value.length === 0 || lodash_1.default.isEqual(value, this.emptyValue) || isEmptyArray;\n }\n isEqual(valueA, valueB = this.dataValue) {\n return (this.isEmpty(valueA) && this.isEmpty(valueB)) || lodash_1.default.isEqual(valueA, valueB);\n }\n /**\n * Check if a component is eligible for multiple validation\n *\n * @return {boolean}\n */\n validateMultiple() {\n return true;\n }\n clearErrorClasses(element = this.element) {\n this.removeClass(element, this.options.componentErrorClass);\n this.removeClass(element, 'alert alert-danger');\n this.removeClass(element, 'has-error');\n this.removeClass(element, 'has-message');\n }\n setInputWidgetErrorClasses(inputRefs, hasErrors) {\n if (!this.isInputComponent || !this.component.widget || !(inputRefs === null || inputRefs === void 0 ? void 0 : inputRefs.length)) {\n return;\n }\n inputRefs.forEach((input) => {\n if ((input === null || input === void 0 ? void 0 : input.widget) && input.widget.setErrorClasses) {\n input.widget.setErrorClasses(hasErrors);\n }\n });\n }\n addFocusBlurEvents(element) {\n this.addEventListener(element, 'focus', () => {\n if (this.root.focusedComponent !== this) {\n if (this.root.pendingBlur) {\n this.root.pendingBlur();\n }\n this.root.focusedComponent = this;\n this.emit('focus', this);\n }\n else if (this.root.focusedComponent === this && this.root.pendingBlur) {\n this.root.pendingBlur.cancel();\n this.root.pendingBlur = null;\n }\n });\n this.addEventListener(element, 'blur', () => {\n this.root.pendingBlur = FormioUtils.delay(() => {\n this.emit('blur', this);\n if (this.component.validateOn === 'blur') {\n this.root.triggerChange({ fromBlur: true }, {\n instance: this,\n component: this.component,\n value: this.dataValue,\n flags: { fromBlur: true }\n });\n }\n this.root.focusedComponent = null;\n this.root.pendingBlur = null;\n });\n });\n }\n // eslint-disable-next-line max-statements\n setCustomValidity(messages, dirty, external) {\n const inputRefs = this.isInputComponent ? this.refs.input || [] : null;\n if (typeof messages === 'string' && messages) {\n messages = {\n level: 'error',\n message: messages,\n component: this.component,\n };\n }\n if (!Array.isArray(messages)) {\n if (messages) {\n messages = [messages];\n }\n else {\n messages = [];\n }\n }\n const errors = messages.filter(message => message.level === 'error');\n let invalidInputRefs = inputRefs;\n // Filter the invalid input refs in multiple components\n if (this.component.multiple) {\n const refsArray = Array.from(inputRefs);\n refsArray.forEach((input) => {\n this.setElementInvalid(this.performInputMapping(input), false);\n });\n this.setInputWidgetErrorClasses(refsArray, false);\n invalidInputRefs = refsArray.filter((ref, index) => {\n var _a;\n return (_a = messages.some) === null || _a === void 0 ? void 0 : _a.call(messages, (msg) => {\n var _a;\n return ((_a = msg === null || msg === void 0 ? void 0 : msg.context) === null || _a === void 0 ? void 0 : _a.index) === index;\n });\n });\n }\n if (messages.length) {\n if (this.refs.messageContainer) {\n this.empty(this.refs.messageContainer);\n }\n this.emit('componentError', {\n instance: this,\n component: this.component,\n message: messages[0].message,\n messages,\n external: !!external,\n });\n this.addMessages(messages, dirty, invalidInputRefs);\n if (invalidInputRefs) {\n this.setErrorClasses(invalidInputRefs, dirty, !!errors.length, !!messages.length);\n }\n }\n else if (!errors.length || (errors[0].external === !!external)) {\n if (this.refs.messageContainer) {\n this.empty(this.refs.messageContainer);\n }\n if (this.refs.modalMessageContainer) {\n this.empty(this.refs.modalMessageContainer);\n }\n if (invalidInputRefs) {\n this.setErrorClasses(invalidInputRefs, dirty, !!errors.length, !!messages.length);\n }\n this.clearErrorClasses();\n }\n this._visibleErrors = messages;\n return messages;\n }\n /**\n * Determines if the value of this component is hidden from the user as if it is coming from the server, but is\n * protected.\n *\n * @return {boolean|*}\n */\n isValueHidden() {\n if (this.component.protected && this.root.editing) {\n return false;\n }\n if (!this.root || !this.root.hasOwnProperty('editing')) {\n return false;\n }\n if (!this.root || !this.root.editing) {\n return false;\n }\n return (this.component.protected || !this.component.persistent || (this.component.persistent === 'client-only'));\n }\n shouldSkipValidation(data, row, flags = {}) {\n const rules = [\n // Do not validate if the flags say not too.\n () => flags.noValidate,\n // Do not check custom validation for empty data if it is not required\n () => this.component.validate.custom && !this.dataValue && !this.component.validate.required,\n // Force valid if component is read-only\n () => this.options.readOnly,\n // Do not check validations if component is not an input component.\n () => !this.hasInput,\n // Check to see if we are editing and if so, check component persistence.\n () => this.isValueHidden(),\n // Force valid if component is hidden.\n () => !this.visible,\n // Force valid if component is conditionally hidden.\n () => !this.checkCondition(row, data)\n ];\n return rules.some(pred => pred());\n }\n // Maintain reverse compatibility.\n whenReady() {\n console.warn('The whenReady() method has been deprecated. Please use the dataReady property instead.');\n return this.dataReady;\n }\n get dataReady() {\n return Promise.resolve();\n }\n /**\n * Prints out the value of this component as a string value.\n */\n asString(value) {\n value = value || this.getValue();\n return (Array.isArray(value) ? value : [value]).map(lodash_1.default.toString).join(', ');\n }\n /**\n * Return if the component is disabled.\n * @return {boolean}\n */\n get disabled() {\n return this._disabled || this.parentDisabled;\n }\n /**\n * Disable this component.\n *\n * @param {boolean} disabled\n */\n set disabled(disabled) {\n this._disabled = disabled;\n }\n setDisabled(element, disabled) {\n if (!element) {\n return;\n }\n element.disabled = disabled;\n if (disabled) {\n element.setAttribute('disabled', 'disabled');\n }\n else {\n element.removeAttribute('disabled');\n }\n }\n setLoading(element, loading) {\n if (!element || (element.loading === loading)) {\n return;\n }\n element.loading = loading;\n if (!element.loader && loading) {\n element.loader = this.ce('i', {\n class: `${this.iconClass('refresh', true)} button-icon-right`\n });\n }\n if (element.loader) {\n if (loading) {\n this.appendTo(element.loader, element);\n }\n else {\n this.removeChildFrom(element.loader, element);\n }\n }\n }\n selectOptions(select, tag, options, defaultValue) {\n lodash_1.default.each(options, (option) => {\n const attrs = {\n value: option.value\n };\n if (defaultValue !== undefined && (option.value === defaultValue)) {\n attrs.selected = 'selected';\n }\n const optionElement = this.ce('option', attrs);\n optionElement.appendChild(this.text(option.label));\n select.appendChild(optionElement);\n });\n }\n setSelectValue(select, value) {\n const options = select.querySelectorAll('option');\n lodash_1.default.each(options, (option) => {\n if (option.value === value) {\n option.setAttribute('selected', 'selected');\n }\n else {\n option.removeAttribute('selected');\n }\n });\n if (select.onchange) {\n select.onchange();\n }\n if (select.onselect) {\n select.onselect();\n }\n }\n getRelativePath(path) {\n const keyPart = `.${this.key}`;\n const thisPath = this.isInputComponent ? this.path\n : this.path.slice(0).replace(keyPart, '');\n return path.replace(thisPath, '');\n }\n clear() {\n this.detach();\n this.empty(this.getElement());\n }\n append(element) {\n this.appendTo(element, this.element);\n }\n prepend(element) {\n this.prependTo(element, this.element);\n }\n removeChild(element) {\n this.removeChildFrom(element, this.element);\n }\n detachLogic() {\n this.logic.forEach(logic => {\n if (logic.trigger.type === 'event') {\n const event = this.interpolate(logic.trigger.event);\n this.off(event); // only applies to callbacks on this component\n }\n });\n }\n attachLogic() {\n // Do not attach logic during builder mode.\n if (this.builderMode) {\n return;\n }\n this.logic.forEach((logic) => {\n if (logic.trigger.type === 'event') {\n const event = this.interpolate(logic.trigger.event);\n this.on(event, (...args) => {\n const newComponent = (0, utils_1.fastCloneDeep)(this.originalComponent);\n if (this.applyActions(newComponent, logic.actions, args)) {\n // If component definition changed, replace it.\n if (!lodash_1.default.isEqual(this.component, newComponent)) {\n this.component = newComponent;\n const visible = this.conditionallyVisible(null, null);\n const disabled = this.shouldDisabled;\n // Change states which won't be recalculated during redrawing\n if (this.visible !== visible) {\n this.visible = visible;\n }\n if (this.disabled !== disabled) {\n this.disabled = disabled;\n }\n this.redraw();\n }\n }\n }, true);\n }\n });\n }\n /**\n * Get the element information.\n */\n elementInfo() {\n const attributes = {\n name: this.options.name,\n type: this.component.inputType || 'text',\n class: 'form-control',\n lang: this.options.language\n };\n if (this.component.placeholder) {\n attributes.placeholder = this.t(this.component.placeholder, { _userInput: true });\n }\n if (this.component.tabindex) {\n attributes.tabindex = this.component.tabindex;\n }\n if (this.disabled) {\n attributes.disabled = 'disabled';\n }\n lodash_1.default.defaults(attributes, this.component.attributes);\n return {\n type: 'input',\n component: this.component,\n changeEvent: 'change',\n attr: attributes\n };\n }\n autofocus() {\n const hasAutofocus = this.component.autofocus && !this.builderMode && !this.options.preview;\n if (hasAutofocus) {\n this.on('render', () => this.focus(), true);\n }\n }\n scrollIntoView(element = this.element) {\n if (!element) {\n return;\n }\n const { left, top } = element.getBoundingClientRect();\n window.scrollTo(left + window.scrollX, top + window.scrollY);\n }\n focus(index) {\n var _a, _b;\n if ('beforeFocus' in this.parent) {\n this.parent.beforeFocus(this);\n }\n if ((_a = this.refs.input) === null || _a === void 0 ? void 0 : _a.length) {\n const focusingInput = typeof index === 'number' && this.refs.input[index]\n ? this.refs.input[index]\n : this.refs.input[this.refs.input.length - 1];\n if (((_b = this.component.widget) === null || _b === void 0 ? void 0 : _b.type) === 'calendar') {\n const sibling = focusingInput.nextSibling;\n if (sibling) {\n sibling.focus();\n }\n }\n else {\n focusingInput.focus();\n }\n }\n if (this.refs.openModal) {\n this.refs.openModal.focus();\n }\n if (this.parent.refs.openModal) {\n this.parent.refs.openModal.focus();\n }\n }\n /**\n * Get `Formio` instance for working with files\n */\n get fileService() {\n if (this.options.fileService) {\n return this.options.fileService;\n }\n if (this.options.formio) {\n return this.options.formio;\n }\n if (this.root && this.root.formio) {\n return this.root.formio;\n }\n const formio = new Formio_1.Formio();\n // If a form is loaded, then make sure to set the correct formUrl.\n if (this.root && this.root._form && this.root._form._id) {\n formio.formUrl = `${formio.projectUrl}/form/${this.root._form._id}`;\n }\n return formio;\n }\n resetCaches() { }\n get previewMode() {\n return false;\n }\n}\nexports[\"default\"] = Component;\nComponent.externalLibraries = {};\nComponent.requireLibrary = function (name, property, src, polling) {\n if (!Component.externalLibraries.hasOwnProperty(name)) {\n Component.externalLibraries[name] = {};\n Component.externalLibraries[name].ready = new Promise((resolve, reject) => {\n Component.externalLibraries[name].resolve = resolve;\n Component.externalLibraries[name].reject = reject;\n });\n const callbackName = `${name}Callback`;\n if (!polling && !window[callbackName]) {\n window[callbackName] = function () {\n this.resolve();\n }.bind(Component.externalLibraries[name]);\n }\n // See if the plugin already exists.\n const plugin = lodash_1.default.get(window, property);\n if (plugin) {\n Component.externalLibraries[name].resolve(plugin);\n }\n else {\n src = Array.isArray(src) ? src : [src];\n src.forEach((lib) => {\n let attrs = {};\n let elementType = '';\n if (typeof lib === 'string') {\n lib = {\n type: 'script',\n src: lib\n };\n }\n switch (lib.type) {\n case 'script':\n elementType = 'script';\n attrs = {\n src: lib.src,\n type: 'text/javascript',\n defer: true,\n async: true\n };\n break;\n case 'styles':\n elementType = 'link';\n attrs = {\n href: lib.src,\n rel: 'stylesheet'\n };\n break;\n }\n // Add the script to the top page.\n const script = document.createElement(elementType);\n for (const attr in attrs) {\n script.setAttribute(attr, attrs[attr]);\n }\n document.getElementsByTagName('head')[0].appendChild(script);\n });\n // if no callback is provided, then check periodically for the script.\n if (polling) {\n setTimeout(function checkLibrary() {\n const plugin = lodash_1.default.get(window, property);\n if (plugin) {\n Component.externalLibraries[name].resolve(plugin);\n }\n else {\n // check again after 200 ms.\n setTimeout(checkLibrary, 200);\n }\n }, 200);\n }\n }\n }\n return Component.externalLibraries[name].ready;\n};\nComponent.libraryReady = function (name) {\n if (Component.externalLibraries.hasOwnProperty(name) &&\n Component.externalLibraries[name].ready) {\n return Component.externalLibraries[name].ready;\n }\n return Promise.reject(`${name} library was not required.`);\n};\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/components/_classes/component/Component.js?");
4534
+ eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n/* globals Quill, ClassicEditor, CKEDITOR */\nconst vanilla_text_mask_1 = __webpack_require__(/*! @formio/vanilla-text-mask */ \"./node_modules/@formio/vanilla-text-mask/dist/vanillaTextMask.js\");\nconst tippy_js_1 = __importDefault(__webpack_require__(/*! tippy.js */ \"./node_modules/tippy.js/dist/tippy.esm.js\"));\nconst lodash_1 = __importDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nconst ismobilejs_1 = __importDefault(__webpack_require__(/*! ismobilejs */ \"./node_modules/ismobilejs/esm/index.js\"));\nconst process_1 = __webpack_require__(/*! @formio/core/process */ \"./node_modules/@formio/core/lib/process/index.js\");\nconst Formio_1 = __webpack_require__(/*! ../../../Formio */ \"./lib/cjs/Formio.js\");\nconst FormioUtils = __importStar(__webpack_require__(/*! ../../../utils/utils */ \"./lib/cjs/utils/utils.js\"));\nconst utils_1 = __webpack_require__(/*! ../../../utils/utils */ \"./lib/cjs/utils/utils.js\");\nconst Element_1 = __importDefault(__webpack_require__(/*! ../../../Element */ \"./lib/cjs/Element.js\"));\nconst ComponentModal_1 = __importDefault(__webpack_require__(/*! ../componentModal/ComponentModal */ \"./lib/cjs/components/_classes/componentModal/ComponentModal.js\"));\nconst widgets_1 = __importDefault(__webpack_require__(/*! ../../../widgets */ \"./lib/cjs/widgets/index.js\"));\nconst addons_1 = __importDefault(__webpack_require__(/*! ../../../addons */ \"./lib/cjs/addons/index.js\"));\nconst uploadAdapter_1 = __webpack_require__(/*! ../../../providers/storage/uploadAdapter */ \"./lib/cjs/providers/storage/uploadAdapter.js\");\nconst en_1 = __importDefault(__webpack_require__(/*! ../../../translations/en */ \"./lib/cjs/translations/en.js\"));\nconst Templates_1 = __importDefault(__webpack_require__(/*! ../../../templates/Templates */ \"./lib/cjs/templates/Templates.js\"));\nconst isIEBrowser = FormioUtils.getBrowserInfo().ie;\n/**\n * This is the Component class\n which all elements within the FormioForm derive from.\n */\nclass Component extends Element_1.default {\n static schema(...sources) {\n return lodash_1.default.merge({\n /**\n * Determines if this component provides an input.\n */\n input: true,\n /**\n * The data key for this component (how the data is stored in the database).\n */\n key: '',\n /**\n * The input placeholder for this component.\n */\n placeholder: '',\n /**\n * The input prefix\n */\n prefix: '',\n /**\n * The custom CSS class to provide to this component.\n */\n customClass: '',\n /**\n * The input suffix.\n */\n suffix: '',\n /**\n * If this component should allow an array of values to be captured.\n */\n multiple: false,\n /**\n * The default value of this component.\n */\n defaultValue: null,\n /**\n * If the data of this component should be protected (no GET api requests can see the data)\n */\n protected: false,\n /**\n * Validate if the value of this component should be unique within the form.\n */\n unique: false,\n /**\n * If the value of this component should be persisted within the backend api database.\n */\n persistent: true,\n /**\n * Determines if the component should be within the form, but not visible.\n */\n hidden: false,\n /**\n * If the component should be cleared when hidden.\n */\n clearOnHide: true,\n /**\n * This will refresh this component options when this field changes.\n */\n refreshOn: '',\n /**\n * This will redraw the component when this field changes.\n */\n redrawOn: '',\n /**\n * If this component should be included as a column within a submission table.\n */\n tableView: false,\n /**\n * If this component should be rendering in modal.\n */\n modalEdit: false,\n /**\n * The input label provided to this component.\n */\n label: '',\n dataGridLabel: false,\n labelPosition: 'top',\n description: '',\n errorLabel: '',\n tooltip: '',\n hideLabel: false,\n tabindex: '',\n disabled: false,\n autofocus: false,\n dbIndex: false,\n customDefaultValue: '',\n calculateValue: '',\n calculateServer: false,\n widget: null,\n /**\n * Attributes that will be assigned to the input elements of this component.\n */\n attributes: {},\n /**\n * This will perform the validation on either \"change\" or \"blur\" of the input element.\n */\n validateOn: 'change',\n /**\n * The validation criteria for this component.\n */\n validate: {\n /**\n * If this component is required.\n */\n required: false,\n /**\n * Custom JavaScript validation.\n */\n custom: '',\n /**\n * If the custom validation should remain private (only the backend will see it and execute it).\n */\n customPrivate: false,\n /**\n * If this component should implement a strict date validation if the Calendar widget is implemented.\n */\n strictDateValidation: false,\n multiple: false,\n unique: false\n },\n /**\n * The simple conditional settings for a component.\n */\n conditional: {\n show: null,\n when: null,\n eq: ''\n },\n overlay: {\n style: '',\n left: '',\n top: '',\n width: '',\n height: '',\n },\n allowCalculateOverride: false,\n encrypted: false,\n showCharCount: false,\n showWordCount: false,\n properties: {},\n allowMultipleMasks: false,\n addons: [],\n }, ...sources);\n }\n /**\n * Return the simple condition settings as part of the component.\n *\n * @return {Object}\n *\n */\n static get conditionOperatorsSettings() {\n return {\n operators: ['isEqual', 'isNotEqual', 'isEmpty', 'isNotEmpty'],\n valueComponent() {\n return { type: 'textfield' };\n }\n };\n }\n /**\n * Return the array of possible types of component value absed on its schema.\n *\n * @param schema\n * @return {Array}\n *\n */\n static savedValueTypes(schema) {\n schema = schema || {};\n return FormioUtils.getComponentSavedTypes(schema) || [FormioUtils.componentValueTypes.any];\n }\n /**\n * Provides a table view for this component. Override if you wish to do something different than using getView\n * method of your instance.\n *\n * @param value\n * @param options\n */\n /* eslint-disable no-unused-vars */\n static tableView(value, options) { }\n /* eslint-enable no-unused-vars */\n /**\n * Initialize a new Component.\n *\n * @param {Object} component - The component JSON you wish to initialize.\n * @param {Object} options - The options for this component.\n * @param {Object} data - The global data submission object this component will belong.\n */\n /* eslint-disable max-statements */\n constructor(component, options, data) {\n super(Object.assign({\n renderMode: 'form',\n attachMode: 'full',\n noDefaults: false\n }, options || {}));\n // Restore the component id.\n if (component && component.id) {\n this.id = component.id;\n }\n /**\n * Determines if this component has a condition assigned to it.\n * @type {null}\n * @private\n */\n this._hasCondition = null;\n /**\n * References to dom elements\n */\n this.refs = {};\n // Allow global override for any component JSON.\n if (component &&\n this.options.components &&\n this.options.components[component.type]) {\n lodash_1.default.merge(component, this.options.components[component.type]);\n }\n /**\n * The data path to this specific component instance.\n *\n * @type {string}\n */\n this.path = (component === null || component === void 0 ? void 0 : component.key) || '';\n /**\n * An array of all the children components errors.\n */\n this.childErrors = [];\n /**\n * Last validation errors that have occured.\n */\n this._errors = [];\n this._visibleErrors = [];\n /**\n * The Form.io component JSON schema.\n * @type {*}\n */\n this.component = this.mergeSchema(component || {});\n // Add the id to the component.\n this.component.id = this.id;\n this.afterComponentAssign();\n // Save off the original component to be used in logic.\n this.originalComponent = (0, utils_1.fastCloneDeep)(this.component);\n /**\n * If the component has been attached\n */\n this.attached = false;\n /**\n * If the component has been rendered\n */\n this.rendered = false;\n /**\n * The data object in which this component resides.\n * @type {*}\n */\n this._data = data || {};\n /**\n * Tool tip text after processing\n * @type {string}\n */\n this.tooltip = '';\n /**\n * The row path of this component.\n * @type {number}\n */\n this.row = this.options.row;\n /**\n * Points to a flat map of child components (if applicable).\n *\n * @type {Object}\n */\n this.childComponentsMap = {};\n /**\n * Determines if this component is disabled, or not.\n *\n * @type {boolean}\n */\n this._disabled = (0, utils_1.boolValue)(this.component.disabled) ? this.component.disabled : false;\n /**\n * Points to the root component, usually the FormComponent.\n *\n * @type {Component}\n */\n this.root = this.options.root || this;\n this.localRoot = this.options.localRoot || this;\n /**\n * If this input has been input and provided value.\n *\n * @type {boolean}\n */\n this.pristine = true;\n /**\n * Points to the parent component.\n *\n * @type {Component}\n */\n this.parent = this.options.parent;\n this.options.name = this.options.name || 'data';\n this._path = '';\n // Needs for Nextgen Rules Engine\n this.resetCaches();\n /**\n * Determines if this component is visible, or not.\n */\n this._parentVisible = this.options.hasOwnProperty('parentVisible') ? this.options.parentVisible : true;\n this._visible = this._parentVisible && this.conditionallyVisible(null, data);\n this._parentDisabled = false;\n /**\n * Used to trigger a new change in this component.\n * @type {function} - Call to trigger a change in this component.\n */\n let changes = [];\n let lastChanged = null;\n let triggerArgs = [];\n const _triggerChange = lodash_1.default.debounce((...args) => {\n if (this.root) {\n this.root.changing = false;\n }\n triggerArgs = [];\n if (!args[1] && lastChanged) {\n // Set the changed component if one isn't provided.\n args[1] = lastChanged;\n }\n if (lodash_1.default.isEmpty(args[0]) && lastChanged) {\n // Set the flags if it is empty and lastChanged exists.\n args[0] = lastChanged.flags;\n }\n lastChanged = null;\n args[3] = changes;\n const retVal = this.onChange(...args);\n changes = [];\n return retVal;\n }, 100);\n this.triggerChange = (...args) => {\n if (args[1]) {\n // Make sure that during the debounce that we always track lastChanged component, even if they\n // don't provide one later.\n lastChanged = args[1];\n changes.push(lastChanged);\n }\n if (this.root) {\n this.root.changing = true;\n }\n if (args.length) {\n triggerArgs = args;\n }\n return _triggerChange(...triggerArgs);\n };\n /**\n * Used to trigger a redraw event within this component.\n *\n * @type {Function}\n */\n this.triggerRedraw = lodash_1.default.debounce(this.redraw.bind(this), 100);\n /**\n * list of attached tooltips\n * @type {Array}\n */\n this.tooltips = [];\n /**\n * List of attached addons\n * @type {Array}\n */\n this.addons = [];\n // To force this component to be invalid.\n this.invalid = false;\n if (this.component) {\n this.type = this.component.type;\n if (this.allowData && this.key) {\n this.options.name += `[${this.key}]`;\n // If component is visible or not set to clear on hide, set the default value.\n if (this.visible || !this.component.clearOnHide) {\n if (!this.hasValue()) {\n if (this.shouldAddDefaultValue) {\n this.dataValue = this.defaultValue;\n }\n }\n else {\n // Ensure the dataValue is set.\n /* eslint-disable no-self-assign */\n this.dataValue = this.dataValue;\n /* eslint-enable no-self-assign */\n }\n }\n }\n /**\n * The element information for creating the input element.\n * @type {*}\n */\n this.info = this.elementInfo();\n }\n // Allow anyone to hook into the component creation.\n this.hook('component');\n if (!this.options.skipInit) {\n this.init();\n }\n }\n /* eslint-enable max-statements */\n get componentsMap() {\n var _a;\n if ((_a = this.localRoot) === null || _a === void 0 ? void 0 : _a.childComponentsMap) {\n return this.localRoot.childComponentsMap;\n }\n const localMap = {};\n localMap[this.path] = this;\n return localMap;\n }\n get data() {\n return this._data;\n }\n set data(value) {\n this._data = value;\n }\n mergeSchema(component = {}) {\n return lodash_1.default.defaultsDeep(component, this.defaultSchema);\n }\n // Allow componets to notify when ready.\n get ready() {\n return Promise.resolve(this);\n }\n get isPDFReadOnlyMode() {\n return this.parent &&\n this.parent.form &&\n (this.parent.form.display === 'pdf') &&\n this.options.readOnly;\n }\n get labelInfo() {\n const label = {};\n label.hidden = this.labelIsHidden();\n label.className = '';\n label.labelPosition = this.component.labelPosition;\n label.tooltipClass = `${this.iconClass('question-sign')} text-muted`;\n const isPDFReadOnlyMode = this.isPDFReadOnlyMode;\n if (this.hasInput && this.component.validate && (0, utils_1.boolValue)(this.component.validate.required) && !isPDFReadOnlyMode) {\n label.className += ' field-required';\n }\n if (label.hidden) {\n label.className += ' control-label--hidden';\n }\n if (this.info.attr.id) {\n label.for = this.info.attr.id;\n }\n return label;\n }\n init() {\n var _a;\n this.disabled = this.shouldDisabled;\n this._visible = this.conditionallyVisible(null, null);\n if ((_a = this.component.addons) === null || _a === void 0 ? void 0 : _a.length) {\n this.component.addons.forEach((addon) => this.createAddon(addon));\n }\n }\n afterComponentAssign() {\n //implement in extended classes\n }\n createAddon(addonConfiguration) {\n var _a;\n const name = addonConfiguration.name;\n if (!name) {\n return;\n }\n const settings = ((_a = addonConfiguration.settings) === null || _a === void 0 ? void 0 : _a.data) || {};\n const Addon = addons_1.default[name.value];\n let addon = null;\n if (Addon) {\n const supportedComponents = Addon.info.supportedComponents;\n const supportsThisComponentType = !(supportedComponents === null || supportedComponents === void 0 ? void 0 : supportedComponents.length) ||\n supportedComponents.indexOf(this.component.type) !== -1;\n if (supportsThisComponentType) {\n addon = new Addon(settings, this);\n this.addons.push(addon);\n }\n else {\n console.warn(`Addon ${name.label} does not support component of type ${this.component.type}.`);\n }\n }\n return addon;\n }\n teardown() {\n if (this.element) {\n delete this.element.component;\n delete this.element;\n }\n delete this._currentForm;\n delete this.parent;\n delete this.root;\n delete this.triggerChange;\n delete this.triggerRedraw;\n if (this.options) {\n delete this.options.root;\n delete this.options.parent;\n delete this.options.i18next;\n }\n super.teardown();\n }\n destroy(all = false) {\n super.destroy(all);\n this.detach();\n this.addons.forEach((addon) => addon.destroy());\n if (all) {\n this.teardown();\n }\n }\n get shouldDisabled() {\n return this.options.readOnly || this.component.disabled || (this.options.hasOwnProperty('disabled') && this.options.disabled[this.key]);\n }\n get isInputComponent() {\n return !this.component.hasOwnProperty('input') || this.component.input;\n }\n get allowData() {\n return this.hasInput;\n }\n get hasInput() {\n return this.isInputComponent || (this.refs.input && this.refs.input.length);\n }\n get defaultSchema() {\n return Component.schema();\n }\n get key() {\n return lodash_1.default.get(this.component, 'key', '');\n }\n set parentVisible(value) {\n this._parentVisible = value;\n }\n get parentVisible() {\n return this._parentVisible;\n }\n set parentDisabled(value) {\n this._parentDisabled = value;\n }\n get parentDisabled() {\n return this._parentDisabled;\n }\n shouldForceVisibility(component, visibility) {\n if (!this.options[visibility]) {\n return false;\n }\n if (!component) {\n component = this.component;\n }\n if (lodash_1.default.isArray(this.options[visibility])) {\n return this.options[visibility].includes(component.key);\n }\n return this.options[visibility][component.key];\n }\n shouldForceHide(component) {\n return this.shouldForceVisibility(component, 'hide');\n }\n shouldForceShow(component) {\n return this.shouldForceVisibility(component, 'show');\n }\n /**\n *\n * @param value {boolean}\n */\n set visible(value) {\n if (this._visible !== value) {\n // Skip if this component is set to visible and is supposed to be hidden.\n if (value && this.shouldForceHide()) {\n return;\n }\n // Skip if this component is set to hidden and is supposed to be shown.\n if (!value && this.shouldForceShow()) {\n return;\n }\n this._visible = value;\n this.clearOnHide();\n this.redraw();\n }\n }\n /**\n *\n * @returns {boolean}\n */\n get visible() {\n // Show only if visibility changes or if we are in builder mode or if hidden fields should be shown.\n if (this.builderMode || this.previewMode || this.options.showHiddenFields) {\n return true;\n }\n if (this.shouldForceHide()) {\n return false;\n }\n if (this.shouldForceShow()) {\n return true;\n }\n return this._visible && this._parentVisible;\n }\n get currentForm() {\n return this._currentForm;\n }\n set currentForm(instance) {\n this._currentForm = instance;\n }\n get fullMode() {\n return this.options.attachMode === 'full';\n }\n get builderMode() {\n return this.options.attachMode === 'builder';\n }\n get calculatedPath() {\n console.error('component.calculatedPath was deprecated, use component.path instead.');\n return this.path;\n }\n get labelPosition() {\n return this.component.labelPosition;\n }\n get labelWidth() {\n const width = this.component.labelWidth;\n return width >= 0 ? width : 30;\n }\n get labelMargin() {\n const margin = this.component.labelMargin;\n return margin >= 0 ? margin : 3;\n }\n get isAdvancedLabel() {\n return [\n 'left-left',\n 'left-right',\n 'right-left',\n 'right-right'\n ].includes(this.labelPosition);\n }\n get labelPositions() {\n return this.labelPosition.split('-');\n }\n get skipInEmail() {\n return false;\n }\n rightDirection(direction) {\n if (this.options.condensedMode) {\n return false;\n }\n return direction === 'right';\n }\n getLabelInfo(isCondensed = false) {\n const isRightPosition = this.rightDirection(this.labelPositions[0]);\n const isLeftPosition = this.labelPositions[0] === 'left' || isCondensed;\n const isRightAlign = this.rightDirection(this.labelPositions[1]);\n let contentMargin = '';\n if (this.component.hideLabel) {\n const margin = isCondensed ? 0 : this.labelWidth + this.labelMargin;\n contentMargin = isRightPosition ? `margin-right: ${margin}%` : '';\n contentMargin = isLeftPosition ? `margin-left: ${margin}%` : '';\n }\n const labelStyles = `\n flex: ${this.labelWidth};\n ${isRightPosition ? 'margin-left' : 'margin-right'}: ${this.labelMargin}%;\n `;\n const contentStyles = `\n flex: ${100 - this.labelWidth - this.labelMargin};\n ${contentMargin};\n ${this.component.hideLabel ? `max-width: ${100 - this.labelWidth - this.labelMargin}` : ''};\n `;\n return {\n isRightPosition,\n isRightAlign,\n labelStyles,\n contentStyles\n };\n }\n /**\n * Returns only the schema that is different from the default.\n *\n * @param schema\n * @param defaultSchema\n */\n getModifiedSchema(schema, defaultSchema, recursion) {\n const modified = {};\n if (!defaultSchema) {\n return schema;\n }\n lodash_1.default.each(schema, (val, key) => {\n if (!lodash_1.default.isArray(val) && lodash_1.default.isObject(val) && defaultSchema.hasOwnProperty(key)) {\n const subModified = this.getModifiedSchema(val, defaultSchema[key], true);\n if (!lodash_1.default.isEmpty(subModified)) {\n modified[key] = subModified;\n }\n }\n else if (lodash_1.default.isArray(val)) {\n if (val.length !== 0 && !lodash_1.default.isEqual(val, defaultSchema[key])) {\n modified[key] = val;\n }\n }\n else if ((!recursion && (key === 'type')) ||\n (!recursion && (key === 'key')) ||\n (!recursion && (key === 'label')) ||\n (!recursion && (key === 'input')) ||\n (!recursion && (key === 'tableView')) ||\n (val !== '' && !defaultSchema.hasOwnProperty(key)) ||\n (val !== '' && val !== defaultSchema[key]) ||\n (defaultSchema[key] && val !== defaultSchema[key])) {\n modified[key] = val;\n }\n });\n return modified;\n }\n /**\n * Returns the JSON schema for this component.\n */\n get schema() {\n return (0, utils_1.fastCloneDeep)(this.getModifiedSchema(lodash_1.default.omit(this.component, 'id'), this.defaultSchema));\n }\n /**\n * Returns true if component is inside DataGrid\n */\n get isInDataGrid() {\n return this.inDataGrid;\n }\n /**\n * Translate a text using the i18n system.\n *\n * @param {string} text - The i18n identifier.\n * @param {Object} params - The i18n parameters to use for translation.\n */\n t(text, params = {}, ...args) {\n if (!text) {\n return '';\n }\n // Use _userInput: true to ignore translations from defaults\n if (text in en_1.default && params._userInput) {\n return text;\n }\n params.data = params.data || this.rootValue;\n params.row = params.row || this.data;\n params.component = params.component || this.component;\n return super.t(text, params, ...args);\n }\n labelIsHidden() {\n return !this.component.label ||\n ((!this.isInDataGrid && this.component.hideLabel) ||\n (this.isInDataGrid && !this.component.dataGridLabel) ||\n this.options.inputsOnly) && !this.builderMode;\n }\n transform(type, value) {\n const frameworkTemplates = this.options.template ? Templates_1.default.templates[this.options.template] : Templates_1.default.current;\n return frameworkTemplates.hasOwnProperty('transform')\n ? frameworkTemplates.transform(type, value, this)\n : (type, value) => value;\n }\n getTemplate(names, modes) {\n modes = Array.isArray(modes) ? modes : [modes];\n names = Array.isArray(names) ? names : [names];\n if (!modes.includes('form')) {\n modes.push('form');\n }\n let result = null;\n if (this.options.templates) {\n result = this.checkTemplate(this.options.templates, names, modes);\n if (result) {\n return result;\n }\n }\n const frameworkTemplates = this.options.template ? Templates_1.default.templates[this.options.template] : Templates_1.default.current;\n result = this.checkTemplate(frameworkTemplates, names, modes);\n if (result) {\n return result;\n }\n // Default back to bootstrap if not defined.\n const name = names[names.length - 1];\n const templatesByName = Templates_1.default.defaultTemplates[name];\n if (!templatesByName) {\n return `Unknown template: ${name}`;\n }\n const templateByMode = this.checkTemplateMode(templatesByName, modes);\n if (templateByMode) {\n return templateByMode;\n }\n return templatesByName.form;\n }\n checkTemplate(templates, names, modes) {\n for (const name of names) {\n const templatesByName = templates[name];\n if (templatesByName) {\n const templateByMode = this.checkTemplateMode(templatesByName, modes);\n if (templateByMode) {\n return templateByMode;\n }\n }\n }\n return null;\n }\n checkTemplateMode(templatesByName, modes) {\n for (const mode of modes) {\n const templateByMode = templatesByName[mode];\n if (templateByMode) {\n return templateByMode;\n }\n }\n return null;\n }\n getFormattedAttribute(attr) {\n return attr ? this.t(attr, { _userInput: true }).replace(/\"/g, '&quot;') : '';\n }\n getFormattedTooltip(tooltipValue) {\n const tooltip = this.interpolate(tooltipValue || '').replace(/(?:\\r\\n|\\r|\\n)/g, '<br />');\n return this.getFormattedAttribute(tooltip);\n }\n isHtmlRenderMode() {\n return this.options.renderMode === 'html';\n }\n renderTemplate(name, data = {}, modeOption) {\n // Need to make this fall back to form if renderMode is not found similar to how we search templates.\n const mode = modeOption || this.options.renderMode || 'form';\n data.component = this.component;\n data.self = this;\n data.options = this.options;\n data.readOnly = this.options.readOnly;\n data.iconClass = this.iconClass.bind(this);\n data.size = this.size.bind(this);\n data.t = this.t.bind(this);\n data.transform = this.transform.bind(this);\n data.id = data.id || this.id;\n data.key = data.key || this.key;\n data.value = data.value || this.dataValue;\n data.disabled = this.disabled;\n data.builder = this.builderMode;\n data.render = (...args) => {\n console.warn(`Form.io 'render' template function is deprecated.\n If you need to render template (template A) inside of another template (template B),\n pass pre-compiled template A (use this.renderTemplate('template_A_name') as template context variable for template B`);\n return this.renderTemplate(...args);\n };\n data.label = data.labelInfo || this.labelInfo;\n data.tooltip = this.getFormattedTooltip(this.component.tooltip);\n // Allow more specific template names\n const names = [\n `${name}-${this.component.type}-${this.key}`,\n `${name}-${this.component.type}`,\n `${name}-${this.key}`,\n `${name}`,\n ];\n // Allow template alters.\n return this.hook(`render${name.charAt(0).toUpperCase() + name.substring(1, name.length)}`, this.interpolate(this.getTemplate(names, mode), data), data, mode);\n }\n /**\n * Sanitize an html string.\n *\n * @param string\n * @returns {*}\n */\n sanitize(dirty, forceSanitize, options) {\n var _a;\n if (!this.shouldSanitizeValue && !forceSanitize) {\n return dirty;\n }\n return FormioUtils.sanitize(dirty, {\n sanitizeConfig: lodash_1.default.merge(((_a = this.options) === null || _a === void 0 ? void 0 : _a.sanitizeConfig) || {}, options || {}),\n });\n }\n /**\n * Render a template string into html.\n *\n * @param template\n * @param data\n * @param actions\n *\n * @return {HTMLElement|String} - The created element or an empty string if template is not specified.\n */\n renderString(template, data) {\n if (!template) {\n return '';\n }\n // Interpolate the template and populate\n return this.interpolate(template, data);\n }\n performInputMapping(input) {\n return input;\n }\n get widget() {\n var _a;\n const settings = this.component.widget;\n if (settings && ((_a = this.root) === null || _a === void 0 ? void 0 : _a.shadowRoot)) {\n settings.shadowRoot = this.root.shadowRoot;\n }\n const widget = settings && widgets_1.default[settings.type] ? new widgets_1.default[settings.type](settings, this.component, this) : null;\n return widget;\n }\n getBrowserLanguage() {\n const nav = window.navigator;\n const browserLanguagePropertyKeys = ['language', 'browserLanguage', 'systemLanguage', 'userLanguage'];\n let language;\n // support for HTML 5.1 \"navigator.languages\"\n if (Array.isArray(nav.languages)) {\n for (let i = 0; i < nav.languages.length; i++) {\n language = nav.languages[i];\n if (language && language.length) {\n return language.split(';')[0];\n }\n }\n }\n // support for other well known properties in browsers\n for (let i = 0; i < browserLanguagePropertyKeys.length; i++) {\n language = nav[browserLanguagePropertyKeys[i]];\n if (language && language.length) {\n return language.split(';')[0];\n }\n }\n return null;\n }\n /**\n * Called before a next and previous page is triggered allowing the components\n * to perform special functions.\n *\n * @return {*}\n */\n beforePage() {\n return Promise.resolve(true);\n }\n beforeNext() {\n return this.beforePage(true);\n }\n /**\n * Called before a submission is triggered allowing the components\n * to perform special async functions.\n *\n * @return {*}\n */\n beforeSubmit() {\n return Promise.resolve(true);\n }\n /**\n * Return the submission timezone.\n *\n * @return {*}\n */\n get submissionTimezone() {\n this.options.submissionTimezone = this.options.submissionTimezone || lodash_1.default.get(this.root, 'options.submissionTimezone');\n return this.options.submissionTimezone;\n }\n get timezone() {\n return this.getTimezone(this.component);\n }\n getTimezone(settings) {\n if (settings.timezone) {\n return settings.timezone;\n }\n if (settings.displayInTimezone === 'utc') {\n return 'UTC';\n }\n const submissionTimezone = this.submissionTimezone;\n if (submissionTimezone &&\n ((settings.displayInTimezone === 'submission') ||\n ((this.options.pdf || this.options.server) && (settings.displayInTimezone === 'viewer')))) {\n return submissionTimezone;\n }\n // Return current timezone if none are provided.\n return (0, utils_1.currentTimezone)();\n }\n loadRefs(element, refs) {\n for (const ref in refs) {\n const refType = refs[ref];\n const isString = typeof refType === 'string';\n const selector = isString && refType.includes('scope') ? `:scope > [ref=\"${ref}\"]` : `[ref=\"${ref}\"]`;\n if (isString && refType.startsWith('single')) {\n this.refs[ref] = element.querySelector(selector);\n }\n else {\n this.refs[ref] = element.querySelectorAll(selector);\n }\n }\n }\n setOpenModalElement(template) {\n this.componentModal.setOpenModalElement(template || this.getModalPreviewTemplate());\n }\n getModalPreviewTemplate() {\n var _a;\n const dataValue = this.component.type === 'password' ? this.dataValue.replace(/./g, '•') : this.dataValue;\n let modalLabel;\n if (this.hasInput && ((_a = this.component.validate) === null || _a === void 0 ? void 0 : _a.required) && !this.isPDFReadOnlyMode) {\n modalLabel = { className: 'field-required' };\n }\n return this.renderTemplate('modalPreview', {\n previewText: this.getValueAsString(dataValue, { modalPreview: true }) || this.t('Click to set value'),\n messages: '',\n labelInfo: modalLabel,\n });\n }\n build(element) {\n element = element || this.element;\n this.empty(element);\n this.setContent(element, this.render());\n return this.attach(element);\n }\n get hasModalSaveButton() {\n return true;\n }\n render(children = `Unknown component: ${this.component.type}`, topLevel = false) {\n const isVisible = this.visible;\n this.rendered = true;\n if (!this.builderMode && !this.previewMode && this.component.modalEdit) {\n return ComponentModal_1.default.render(this, {\n visible: isVisible,\n showSaveButton: this.hasModalSaveButton,\n id: this.id,\n classes: this.className,\n styles: this.customStyle,\n children\n }, topLevel);\n }\n else {\n return this.renderTemplate('component', {\n visible: isVisible,\n id: this.id,\n classes: this.className,\n styles: this.customStyle,\n children\n }, topLevel);\n }\n }\n attachTooltips(toolTipsRefs) {\n toolTipsRefs === null || toolTipsRefs === void 0 ? void 0 : toolTipsRefs.forEach((tooltip, index) => {\n if (tooltip) {\n const tooltipAttribute = tooltip.getAttribute('data-tooltip');\n const tooltipDataTitle = tooltip.getAttribute('data-title');\n const tooltipText = this.interpolate(tooltipDataTitle || tooltipAttribute)\n .replace(/(?:\\r\\n|\\r|\\n)/g, '<br />');\n this.tooltips[index] = (0, tippy_js_1.default)(tooltip, {\n allowHTML: true,\n trigger: 'mouseenter click focus',\n placement: 'right',\n zIndex: 10000,\n interactive: true,\n content: this.t(tooltipText, { _userInput: true }),\n });\n }\n });\n }\n createComponentModal(element, modalShouldBeOpened, currentValue) {\n return new ComponentModal_1.default(this, element, modalShouldBeOpened, currentValue);\n }\n attach(element) {\n if (!this.builderMode && !this.previewMode && this.component.modalEdit) {\n const modalShouldBeOpened = this.componentModal ? this.componentModal.isOpened : false;\n const currentValue = modalShouldBeOpened ? this.componentModal.currentValue : this.dataValue;\n const openModalTemplate = this.componentModal && modalShouldBeOpened\n ? this.componentModal.openModalTemplate\n : null;\n this.componentModal = this.createComponentModal(element, modalShouldBeOpened, currentValue);\n this.setOpenModalElement(openModalTemplate);\n }\n this.attached = true;\n this.setElement(element);\n element.component = this;\n // If this already has an id, get it from the dom. If SSR, it could be different from the initiated id.\n if (this.element.id) {\n this.id = this.element.id;\n this.component.id = this.id;\n }\n this.loadRefs(element, {\n messageContainer: 'single',\n tooltip: 'multiple'\n });\n this.attachTooltips(this.refs.tooltip);\n // Attach logic.\n this.attachLogic();\n this.autofocus();\n // Allow global attach.\n this.hook('attachComponent', element, this);\n // Allow attach per component type.\n const type = this.component.type;\n if (type) {\n this.hook(`attach${type.charAt(0).toUpperCase() + type.substring(1, type.length)}`, element, this);\n }\n this.restoreFocus();\n this.addons.forEach((addon) => addon.attach(element));\n return Promise.resolve();\n }\n restoreFocus() {\n var _a, _b, _c;\n const isFocused = ((_b = (_a = this.root) === null || _a === void 0 ? void 0 : _a.focusedComponent) === null || _b === void 0 ? void 0 : _b.path) === this.path;\n if (isFocused) {\n this.loadRefs(this.element, { input: 'multiple' });\n this.focus((_c = this.root.currentSelection) === null || _c === void 0 ? void 0 : _c.index);\n this.restoreCaretPosition();\n }\n }\n addShortcut(element, shortcut) {\n // Avoid infinite recursion.\n if (!element || !this.root || (this.root === this)) {\n return;\n }\n if (!shortcut) {\n shortcut = this.component.shortcut;\n }\n this.root.addShortcut(element, shortcut);\n }\n removeShortcut(element, shortcut) {\n // Avoid infinite recursion.\n if (!element || (this.root === this)) {\n return;\n }\n if (!shortcut) {\n shortcut = this.component.shortcut;\n }\n this.root.removeShortcut(element, shortcut);\n }\n /**\n * Remove all event handlers.\n */\n detach() {\n // First iterate through each ref and delete the component so there are no dangling component references.\n lodash_1.default.each(this.refs, (ref) => {\n if (typeof ref === NodeList) {\n ref.forEach((elem) => {\n delete elem.component;\n });\n }\n else if (ref) {\n delete ref.component;\n }\n });\n this.refs = {};\n this.removeEventListeners();\n this.detachLogic();\n if (this.tooltip) {\n this.tooltip.destroy();\n }\n }\n checkRefresh(refreshData, changed, flags) {\n const changePath = lodash_1.default.get(changed, 'instance.path', false);\n // Don't let components change themselves.\n if (changePath && this.path === changePath) {\n return;\n }\n if (refreshData === 'data') {\n this.refresh(this.data, changed, flags);\n }\n else if ((changePath && (0, utils_1.getComponentPath)(changed.instance) === refreshData) && changed && changed.instance &&\n // Make sure the changed component is not in a different \"context\". Solves issues where refreshOn being set\n // in fields inside EditGrids could alter their state from other rows (which is bad).\n this.inContext(changed.instance)) {\n this.refresh(changed.value, changed, flags);\n }\n }\n checkRefreshOn(changes, flags = {}) {\n changes = changes || [];\n if (flags.noRefresh) {\n return;\n }\n if (!changes.length && flags.changed) {\n changes = [flags.changed];\n }\n const refreshOn = flags.fromBlur ? this.component.refreshOnBlur : this.component.refreshOn || this.component.redrawOn;\n // If they wish to refresh on a value, then add that here.\n if (refreshOn) {\n if (Array.isArray(refreshOn)) {\n refreshOn.forEach(refreshData => changes.forEach(changed => this.checkRefresh(refreshData, changed, flags)));\n }\n else {\n changes.forEach(changed => this.checkRefresh(refreshOn, changed, flags));\n }\n }\n }\n /**\n * Refreshes the component with a new value.\n *\n * @param value\n */\n refresh(value) {\n if (this.hasOwnProperty('refreshOnValue')) {\n this.refreshOnChanged = !lodash_1.default.isEqual(value, this.refreshOnValue);\n }\n else {\n this.refreshOnChanged = true;\n }\n this.refreshOnValue = (0, utils_1.fastCloneDeep)(value);\n if (this.refreshOnChanged) {\n if (this.component.clearOnRefresh) {\n this.setValue(null);\n }\n this.triggerRedraw();\n }\n }\n /**\n * Checks to see if a separate component is in the \"context\" of this component. This is determined by first checking\n * if they share the same \"data\" object. It will then walk up the parent tree and compare its parents data objects\n * with the components data and returns true if they are in the same context.\n *\n * Different rows of the same EditGrid, for example, are in different contexts.\n *\n * @param component\n */\n inContext(component) {\n if (component.data === this.data) {\n return true;\n }\n let parent = this.parent;\n while (parent) {\n if (parent.data === component.data) {\n return true;\n }\n parent = parent.parent;\n }\n return false;\n }\n get viewOnly() {\n return this.options.readOnly && this.options.viewAsHtml;\n }\n setElement(element) {\n if (this.element) {\n delete this.element.component;\n delete this.element;\n }\n this.element = element;\n }\n createViewOnlyElement() {\n this.setElement(this.ce('dl', {\n id: this.id\n }));\n if (this.element) {\n // Ensure you can get the component info from the element.\n this.element.component = this;\n }\n return this.element;\n }\n get defaultViewOnlyValue() {\n return '-';\n }\n /**\n * Uses the widget to determine the output string.\n *\n * @param value\n * @return {*}\n */\n getWidgetValueAsString(value, options) {\n const noInputWidget = !this.refs.input || !this.refs.input[0] || !this.refs.input[0].widget;\n if (!value || noInputWidget) {\n if (!this.widget || !value) {\n return value;\n }\n else {\n return this.widget.getValueAsString(value);\n }\n }\n if (Array.isArray(value)) {\n const values = [];\n value.forEach((val, index) => {\n const widget = this.refs.input[index] && this.refs.input[index].widget;\n if (widget) {\n values.push(widget.getValueAsString(val, options));\n }\n });\n return values;\n }\n const widget = this.refs.input[0].widget;\n return widget.getValueAsString(value, options);\n }\n getValueAsString(value, options) {\n if (!value) {\n return '';\n }\n value = this.getWidgetValueAsString(value, options);\n if (Array.isArray(value)) {\n return value.join(', ');\n }\n if (lodash_1.default.isPlainObject(value)) {\n return JSON.stringify(value);\n }\n if (value === null || value === undefined) {\n return '';\n }\n const stringValue = value.toString();\n return this.sanitize(stringValue);\n }\n getView(value, options) {\n if (this.component.protected) {\n return '--- PROTECTED ---';\n }\n return this.getValueAsString(value, options);\n }\n updateItems(...args) {\n this.restoreValue();\n this.onChange(...args);\n }\n /**\n * @param {*} data\n * @param {boolean} [forceUseValue=false] - if true, return 'value' property of the data\n * @return {*}\n */\n itemValue(data, forceUseValue = false) {\n if (lodash_1.default.isObject(data) && !lodash_1.default.isArray(data)) {\n if (this.valueProperty) {\n return lodash_1.default.get(data, this.valueProperty);\n }\n if (forceUseValue) {\n return data.value;\n }\n }\n return data;\n }\n itemValueForHTMLMode(value) {\n if (Array.isArray(value)) {\n const values = value.map(item => Array.isArray(item) ? this.itemValueForHTMLMode(item) : this.itemValue(item));\n return values.join(', ');\n }\n return this.itemValue(value);\n }\n createModal(element, attr, confirm) {\n const dialog = this.ce('div', attr || {});\n this.setContent(dialog, this.renderTemplate('dialog'));\n // Add refs to dialog, not \"this\".\n dialog.refs = {};\n this.loadRefs.call(dialog, dialog, {\n dialogOverlay: 'single',\n dialogContents: 'single',\n dialogClose: 'single',\n });\n dialog.refs.dialogContents.appendChild(element);\n document.body.appendChild(dialog);\n document.body.classList.add('modal-open');\n dialog.close = () => {\n document.body.classList.remove('modal-open');\n dialog.dispatchEvent(new CustomEvent('close'));\n };\n this.addEventListener(dialog, 'close', () => this.removeChildFrom(dialog, document.body));\n const close = (event) => {\n event.preventDefault();\n dialog.close();\n };\n const handleCloseClick = (e) => {\n if (confirm) {\n confirm().then(() => close(e))\n .catch(() => { });\n }\n else {\n close(e);\n }\n };\n this.addEventListener(dialog.refs.dialogOverlay, 'click', handleCloseClick);\n this.addEventListener(dialog.refs.dialogClose, 'click', handleCloseClick);\n return dialog;\n }\n get optimizeRedraw() {\n if (this.options.optimizeRedraw && this.element && !this.visible) {\n this.addClass(this.element, 'formio-removed');\n return true;\n }\n return false;\n }\n /**\n * Retrieves the CSS class name of this component.\n * @returns {string} - The class name of this component.\n */\n get className() {\n let className = this.hasInput ? `${this.transform('class', 'form-group')} has-feedback ` : '';\n className += `formio-component formio-component-${this.component.type} `;\n // TODO: find proper way to avoid overriding of default type-based component styles\n if (this.key && this.key !== 'form') {\n className += `formio-component-${this.key} `;\n }\n if (this.component.multiple) {\n className += 'formio-component-multiple ';\n }\n if (this.component.customClass) {\n className += this.component.customClass;\n }\n if (this.hasInput && this.component.validate && (0, utils_1.boolValue)(this.component.validate.required)) {\n className += ' required';\n }\n if (this.labelIsHidden()) {\n className += ' formio-component-label-hidden';\n }\n if (!this.visible) {\n className += ' formio-hidden';\n }\n return className;\n }\n /**\n * Build the custom style from the layout values\n * @return {string} - The custom style\n */\n get customStyle() {\n let customCSS = '';\n lodash_1.default.each(this.component.style, (value, key) => {\n if (value !== '') {\n customCSS += `${key}:${value};`;\n }\n });\n return customCSS;\n }\n static get serverConditionSettings() {\n return Component.conditionOperatorsSettings;\n }\n get isMobile() {\n return (0, ismobilejs_1.default)();\n }\n /**\n * Returns the outside wrapping element of this component.\n * @returns {HTMLElement}\n */\n getElement() {\n return this.element;\n }\n /**\n * Create an evaluation context for all script executions and interpolations.\n *\n * @param additional\n * @return {*}\n */\n evalContext(additional) {\n return super.evalContext(Object.assign({\n component: this.component,\n row: this.data,\n rowIndex: this.rowIndex,\n data: this.rootValue,\n iconClass: this.iconClass.bind(this),\n // Bind the translate function to the data context of any interpolated string.\n // It is useful to translate strings in different scenarions (eg: custom edit grid templates, custom error messages etc.)\n // and desirable to be publicly available rather than calling the internal {instance.t} function in the template string.\n t: this.t.bind(this),\n submission: (this.root ? this.root._submission : {\n data: this.rootValue\n }),\n form: this.root ? this.root._form : {},\n options: this.options,\n }, additional));\n }\n /**\n * Sets the pristine flag for this component.\n *\n * @param pristine {boolean} - TRUE to make pristine, FALSE not pristine.\n */\n setPristine(pristine) {\n this.pristine = pristine;\n }\n get isPristine() {\n return this.pristine;\n }\n setDirty(dirty) {\n this.dirty = dirty;\n }\n get isDirty() {\n return this.dirty;\n }\n /**\n * Removes a value out of the data array and rebuild the rows.\n * @param {number} index - The index of the data element to remove.\n */\n removeValue(index) {\n this.splice(index);\n this.redraw();\n this.restoreValue();\n this.triggerRootChange();\n }\n iconClass(name, spinning) {\n const iconset = this.options.iconset || Templates_1.default.current.defaultIconset || 'fa';\n return Templates_1.default.current.hasOwnProperty('iconClass')\n ? Templates_1.default.current.iconClass(iconset, name, spinning)\n : this.options.iconset === 'fa' ? Templates_1.default.defaultTemplates.iconClass(iconset, name, spinning) : name;\n }\n size(size) {\n return Templates_1.default.current.hasOwnProperty('size')\n ? Templates_1.default.current.size(size)\n : size;\n }\n /**\n * The readible name for this component.\n * @returns {string} - The name of the component.\n */\n get name() {\n return this.t(this.component.label || this.component.placeholder || this.key, { _userInput: true });\n }\n get visibleErrors() {\n return this._visibleErrors;\n }\n get errors() {\n return this._errors;\n }\n /**\n * Returns the error label for this component.\n * @return {*}\n */\n get errorLabel() {\n return this.t(this.component.errorLabel\n || this.component.label\n || this.component.placeholder\n || this.key);\n }\n /**\n * Get the error message provided a certain type of error.\n * @param type\n * @return {*}\n */\n errorMessage(type) {\n return (this.component.errors && this.component.errors[type]) ? this.component.errors[type] : type;\n }\n setContent(element, content, forceSanitize, sanitizeOptions) {\n if (element instanceof HTMLElement) {\n element.innerHTML = this.sanitize(content, forceSanitize, sanitizeOptions);\n return true;\n }\n return false;\n }\n restoreCaretPosition() {\n var _a, _b, _c;\n if ((_a = this.root) === null || _a === void 0 ? void 0 : _a.currentSelection) {\n if ((_b = this.refs.input) === null || _b === void 0 ? void 0 : _b.length) {\n const { selection, index } = this.root.currentSelection;\n let input = this.refs.input[index];\n const isInputRangeSelectable = (i) => /text|search|password|tel|url/i.test((i === null || i === void 0 ? void 0 : i.type) || '');\n if (input) {\n if (isInputRangeSelectable(input)) {\n input.setSelectionRange(...selection);\n }\n }\n else {\n input = this.refs.input[this.refs.input.length];\n const lastCharacter = ((_c = input.value) === null || _c === void 0 ? void 0 : _c.length) || 0;\n if (isInputRangeSelectable(input)) {\n input.setSelectionRange(lastCharacter, lastCharacter);\n }\n }\n }\n }\n }\n redraw() {\n // Don't bother if we have not built yet.\n if (!this.element || !this.element.parentNode || this.optimizeRedraw) {\n // Return a non-resolving promise.\n return Promise.resolve();\n }\n this.detach();\n this.emit('redraw');\n // Since we are going to replace the element, we need to know it's position so we can find it in the parent's children.\n const parent = this.element.parentNode;\n const index = Array.prototype.indexOf.call(parent.children, this.element);\n this.element.outerHTML = this.sanitize(this.render());\n this.setElement(parent.children[index]);\n return this.attach(this.element);\n }\n rebuild() {\n this.destroy();\n this.init();\n this.visible = this.conditionallyVisible(null, null);\n return this.redraw();\n }\n removeEventListeners() {\n super.removeEventListeners();\n this.tooltips.forEach(tooltip => tooltip.destroy());\n this.tooltips = [];\n }\n hasClass(element, className) {\n if (!element) {\n return;\n }\n return super.hasClass(element, this.transform('class', className));\n }\n addClass(element, className) {\n if (!element) {\n return;\n }\n return super.addClass(element, this.transform('class', className));\n }\n removeClass(element, className) {\n if (!element) {\n return;\n }\n return super.removeClass(element, this.transform('class', className));\n }\n /**\n * Determines if this component has a condition defined.\n *\n * @return {null}\n */\n hasCondition() {\n if (this._hasCondition !== null) {\n return this._hasCondition;\n }\n this._hasCondition = FormioUtils.hasCondition(this.component);\n return this._hasCondition;\n }\n /**\n * Check if this component is conditionally visible.\n *\n * @param data\n * @return {boolean}\n */\n conditionallyVisible(data, row) {\n data = data || this.rootValue;\n row = row || this.data;\n if (this.builderMode || this.previewMode || !this.hasCondition()) {\n return !this.component.hidden;\n }\n data = data || (this.root ? this.root.data : {});\n return this.checkCondition(row, data);\n }\n /**\n * Checks the condition of this component.\n *\n * TODO: Switch row and data parameters to be consistent with other methods.\n *\n * @param row - The row contextual data.\n * @param data - The global data object.\n * @return {boolean} - True if the condition applies to this component.\n */\n checkCondition(row, data) {\n return FormioUtils.checkCondition(this.component, row || this.data, data || this.rootValue, this.root ? this.root._form : {}, this);\n }\n /**\n * Check for conditionals and hide/show the element based on those conditions.\n */\n checkComponentConditions(data, flags, row) {\n data = data || this.rootValue;\n flags = flags || {};\n row = row || this.data;\n if (!this.builderMode & !this.previewMode && this.fieldLogic(data, row)) {\n this.redraw();\n }\n // Check advanced conditions\n const visible = this.conditionallyVisible(data, row);\n if (this.visible !== visible) {\n this.visible = visible;\n }\n return visible;\n }\n /**\n * Checks conditions for this component and any sub components.\n * @param args\n * @return {boolean}\n */\n checkConditions(data, flags, row) {\n data = data || this.rootValue;\n flags = flags || {};\n row = row || this.data;\n return this.checkComponentConditions(data, flags, row);\n }\n get logic() {\n return this.component.logic || [];\n }\n /**\n * Check all triggers and apply necessary actions.\n *\n * @param data\n */\n fieldLogic(data, row) {\n data = data || this.rootValue;\n row = row || this.data;\n const logics = this.logic;\n // If there aren't logic, don't go further.\n if (logics.length === 0) {\n return;\n }\n const newComponent = (0, utils_1.fastCloneDeep)(this.originalComponent);\n let changed = logics.reduce((changed, logic) => {\n const result = FormioUtils.checkTrigger(newComponent, logic.trigger, row, data, this.root ? this.root._form : {}, this);\n return (result ? this.applyActions(newComponent, logic.actions, result, row, data) : false) || changed;\n }, false);\n // If component definition changed, replace and mark as changed.\n if (!lodash_1.default.isEqual(this.component, newComponent)) {\n this.component = newComponent;\n changed = true;\n const disabled = this.shouldDisabled;\n // Change disabled state if it has changed\n if (this.disabled !== disabled) {\n this.disabled = disabled;\n }\n }\n return changed;\n }\n isIE() {\n if (typeof window === 'undefined') {\n return false;\n }\n const userAgent = window.navigator.userAgent;\n const msie = userAgent.indexOf('MSIE ');\n if (msie > 0) {\n // IE 10 or older => return version number\n return parseInt(userAgent.substring(msie + 5, userAgent.indexOf('.', msie)), 10);\n }\n const trident = userAgent.indexOf('Trident/');\n if (trident > 0) {\n // IE 11 => return version number\n const rv = userAgent.indexOf('rv:');\n return parseInt(userAgent.substring(rv + 3, userAgent.indexOf('.', rv)), 10);\n }\n const edge = userAgent.indexOf('Edge/');\n if (edge > 0) {\n // IE 12 (aka Edge) => return version number\n return parseInt(userAgent.substring(edge + 5, userAgent.indexOf('.', edge)), 10);\n }\n // other browser\n return false;\n }\n defineActionValue(action, argsObject) {\n return this.evaluate(action.value, argsObject, 'value');\n }\n applyActions(newComponent, actions, result, row, data) {\n data = data || this.rootValue;\n row = row || this.data;\n return actions.reduce((changed, action) => {\n switch (action.type) {\n case 'property': {\n FormioUtils.setActionProperty(newComponent, action, result, row, data, this);\n const property = action.property.value;\n if (!lodash_1.default.isEqual(lodash_1.default.get(this.component, property), lodash_1.default.get(newComponent, property))) {\n changed = true;\n }\n break;\n }\n case 'value': {\n const oldValue = this.getValue();\n const newValue = this.defineActionValue(action, {\n value: lodash_1.default.clone(oldValue),\n data,\n row,\n component: newComponent,\n result,\n });\n if (!lodash_1.default.isEqual(oldValue, newValue) && !(this.component.clearOnHide && !this.visible)) {\n this.setValue(newValue);\n if (this.viewOnly) {\n this.dataValue = newValue;\n }\n changed = true;\n }\n break;\n }\n case 'mergeComponentSchema': {\n const schema = this.evaluate(action.schemaDefinition, {\n value: lodash_1.default.clone(this.getValue()),\n data,\n row,\n component: newComponent,\n result,\n }, 'schema');\n lodash_1.default.assign(newComponent, schema);\n if (!lodash_1.default.isEqual(this.component, newComponent)) {\n changed = true;\n }\n break;\n }\n case 'customAction': {\n const oldValue = this.getValue();\n const newValue = this.evaluate(action.customAction, {\n value: lodash_1.default.clone(oldValue),\n data,\n row,\n input: oldValue,\n component: newComponent,\n result,\n }, 'value');\n if (!lodash_1.default.isEqual(oldValue, newValue) && !(this.component.clearOnHide && !this.visible)) {\n this.setValue(newValue);\n if (this.viewOnly) {\n this.dataValue = newValue;\n }\n changed = true;\n }\n break;\n }\n }\n return changed;\n }, false);\n }\n // Deprecated\n addInputError(message, dirty, elements) {\n this.addMessages(message);\n this.setErrorClasses(elements, dirty, !!message);\n }\n // Deprecated\n removeInputError(elements) {\n this.setErrorClasses(elements, true, false);\n }\n /**\n * Add a new input error to this element.\n *\n * @param message\n * @param dirty\n */\n addMessages(messages) {\n if (!messages) {\n return;\n }\n // Standardize on array of objects for message.\n if (typeof messages === 'string') {\n messages = {\n messages,\n level: 'error',\n };\n }\n if (!Array.isArray(messages)) {\n messages = [messages];\n }\n messages = lodash_1.default.uniqBy(messages, message => message.message);\n if (this.refs.messageContainer) {\n this.setContent(this.refs.messageContainer, messages.map((message) => {\n if (message.message && typeof message.message === 'string') {\n message.message = message.message.replaceAll('<', '&lt;').replaceAll('>', '&gt;');\n }\n return this.renderTemplate('message', Object.assign({}, message));\n }).join(''));\n }\n }\n setErrorClasses(elements, dirty, hasErrors, hasMessages, element = this.element) {\n this.clearErrorClasses();\n elements.forEach((element) => {\n this.setElementInvalid(this.performInputMapping(element), false);\n });\n this.setInputWidgetErrorClasses(elements, hasErrors);\n if (hasErrors) {\n // Add error classes\n elements.forEach((input) => {\n this.setElementInvalid(this.performInputMapping(input), true);\n });\n if (dirty && this.options.highlightErrors) {\n this.addClass(element, this.options.componentErrorClass);\n }\n else {\n this.addClass(element, 'has-error');\n }\n }\n if (hasMessages) {\n this.addClass(element, 'has-message');\n }\n }\n setElementInvalid(element, invalid) {\n if (!element)\n return;\n if (invalid) {\n this.addClass(element, 'is-invalid');\n }\n else {\n this.removeClass(element, 'is-invalid');\n }\n element.setAttribute('aria-invalid', invalid ? 'true' : 'false');\n }\n clearOnHide() {\n // clearOnHide defaults to true for old forms (without the value set) so only trigger if the value is false.\n if (\n // if change happens inside EditGrid's row, it doesn't trigger change on the root level, so rootPristine will be true\n (!this.rootPristine || this.options.server || (0, utils_1.isInsideScopingComponent)(this)) &&\n this.component.clearOnHide !== false &&\n !this.options.readOnly &&\n !this.options.showHiddenFields) {\n if (!this.visible) {\n this.deleteValue();\n }\n else if (!this.hasValue() && this.shouldAddDefaultValue) {\n // If shown, ensure the default is set.\n this.setValue(this.defaultValue, {\n noUpdateEvent: true\n });\n }\n }\n }\n triggerRootChange(...args) {\n if (this.options.onChange) {\n this.options.onChange(...args);\n }\n else if (this.root) {\n this.root.triggerChange(...args);\n }\n }\n onChange(flags, fromRoot) {\n flags = flags || {};\n if (flags.modified) {\n if (!flags.noPristineChangeOnModified) {\n this.pristine = false;\n }\n this.addClass(this.getElement(), 'formio-modified');\n }\n // If we are supposed to validate on blur, then don't trigger validation yet.\n if (this.component.validateOn === 'blur') {\n flags.noValidate = true;\n }\n if (this.component.onChange) {\n this.evaluate(this.component.onChange, {\n flags\n });\n }\n // Set the changed variable.\n const changed = {\n instance: this,\n component: this.component,\n value: this.dataValue,\n flags: flags\n };\n // Emit the change.\n this.emit('componentChange', changed);\n // Do not propogate the modified flag.\n let modified = false;\n if (flags.modified) {\n modified = true;\n delete flags.modified;\n }\n // Bubble this change up to the top.\n if (!fromRoot) {\n this.triggerRootChange(flags, changed, modified);\n }\n return changed;\n }\n get wysiwygDefault() {\n return {\n quill: {\n theme: 'snow',\n placeholder: this.t(this.component.placeholder, { _userInput: true }),\n modules: {\n toolbar: [\n [{ 'size': ['small', false, 'large', 'huge'] }],\n [{ 'header': [1, 2, 3, 4, 5, 6, false] }],\n [{ 'font': [] }],\n ['bold', 'italic', 'underline', 'strike', { 'script': 'sub' }, { 'script': 'super' }, 'clean'],\n [{ 'color': [] }, { 'background': [] }],\n [{ 'list': 'ordered' }, { 'list': 'bullet' }, { 'indent': '-1' }, { 'indent': '+1' }, { 'align': [] }],\n ['blockquote', 'code-block'],\n ['link', 'image', 'video', 'formula', 'source']\n ]\n }\n },\n ace: {\n theme: 'ace/theme/xcode',\n maxLines: 12,\n minLines: 12,\n tabSize: 2,\n mode: 'ace/mode/javascript',\n placeholder: this.t(this.component.placeholder, { _userInput: true })\n },\n ckeditor: {\n image: {\n toolbar: [\n 'imageTextAlternative',\n '|',\n 'imageStyle:full',\n 'imageStyle:alignLeft',\n 'imageStyle:alignCenter',\n 'imageStyle:alignRight'\n ],\n styles: [\n 'full',\n 'alignLeft',\n 'alignCenter',\n 'alignRight'\n ]\n },\n extraPlugins: []\n },\n default: {}\n };\n }\n addCKE(element, settings, onChange) {\n settings = lodash_1.default.isEmpty(settings) ? {} : settings;\n settings.base64Upload = this.component.isUploadEnabled ? false : true;\n settings.mediaEmbed = { previewsInData: true };\n settings = lodash_1.default.merge(this.wysiwygDefault.ckeditor, lodash_1.default.get(this.options, 'editors.ckeditor.settings', {}), settings);\n if (this.component.isUploadEnabled) {\n settings.extraPlugins.push((0, uploadAdapter_1.getFormioUploadAdapterPlugin)(this.fileService, this));\n }\n return Formio_1.Formio.requireLibrary('ckeditor', isIEBrowser ? 'CKEDITOR' : 'ClassicEditor', lodash_1.default.get(this.options, 'editors.ckeditor.src', `${Formio_1.Formio.cdn.ckeditor}/ckeditor.js`), true)\n .then(() => {\n if (!element.parentNode) {\n return Promise.reject();\n }\n if (isIEBrowser) {\n const editor = CKEDITOR.replace(element);\n editor.on('change', () => onChange(editor.getData()));\n return Promise.resolve(editor);\n }\n else {\n return ClassicEditor.create(element, settings).then(editor => {\n editor.model.document.on('change', () => onChange(editor.data.get()));\n return editor;\n });\n }\n });\n }\n addQuill(element, settings, onChange) {\n settings = lodash_1.default.isEmpty(settings) ? this.wysiwygDefault.quill : settings;\n settings = lodash_1.default.merge(this.wysiwygDefault.quill, lodash_1.default.get(this.options, 'editors.quill.settings', {}), settings);\n settings = Object.assign(Object.assign({}, settings), { modules: Object.assign({ table: true }, settings.modules) });\n // Lazy load the quill css.\n Formio_1.Formio.requireLibrary(`quill-css-${settings.theme}`, 'Quill', [\n { type: 'styles', src: `${Formio_1.Formio.cdn.quill}/quill.${settings.theme}.css` }\n ], true);\n // Lazy load the quill library.\n return Formio_1.Formio.requireLibrary('quill', 'Quill', lodash_1.default.get(this.options, 'editors.quill.src', `${Formio_1.Formio.cdn.quill}/quill.min.js`), true)\n .then(() => {\n return Formio_1.Formio.requireLibrary('quill-table', 'Quill', `${Formio_1.Formio.cdn.baseUrl}/quill/quill-table.js`, true)\n .then(() => {\n if (!element.parentNode) {\n return Promise.reject();\n }\n this.quill = new Quill(element, isIEBrowser ? Object.assign(Object.assign({}, settings), { modules: {} }) : settings);\n /** This block of code adds the [source] capabilities. See https://codepen.io/anon/pen/ZyEjrQ **/\n const txtArea = document.createElement('textarea');\n txtArea.setAttribute('class', 'quill-source-code');\n this.quill.addContainer('ql-custom').appendChild(txtArea);\n const qlSource = element.parentNode.querySelector('.ql-source');\n if (qlSource) {\n this.addEventListener(qlSource, 'click', (event) => {\n event.preventDefault();\n if (txtArea.style.display === 'inherit') {\n this.quill.setContents(this.quill.clipboard.convert({ html: txtArea.value }));\n }\n txtArea.style.display = (txtArea.style.display === 'none') ? 'inherit' : 'none';\n });\n }\n /** END CODEBLOCK **/\n // Make sure to select cursor when they click on the element.\n this.addEventListener(element, 'click', () => this.quill.focus());\n // Allows users to skip toolbar items when tabbing though form\n const elm = document.querySelectorAll('.ql-formats > button');\n for (let i = 0; i < elm.length; i++) {\n elm[i].setAttribute('tabindex', '-1');\n }\n this.quill.on('text-change', () => {\n txtArea.value = this.quill.root.innerHTML;\n onChange(txtArea);\n });\n return this.quill;\n });\n });\n }\n get shouldSanitizeValue() {\n var _a;\n // Sanitize value if sanitizing for thw whole content is turned off\n return (((_a = this.options) === null || _a === void 0 ? void 0 : _a.sanitize) !== false);\n }\n addAce(element, settings, onChange) {\n if (!settings || (settings.theme === 'snow')) {\n const mode = settings ? settings.mode : '';\n settings = {};\n if (mode) {\n settings.mode = mode;\n }\n }\n settings = lodash_1.default.merge(this.wysiwygDefault.ace, lodash_1.default.get(this.options, 'editors.ace.settings', {}), settings || {});\n return Formio_1.Formio.requireLibrary('ace', 'ace', lodash_1.default.get(this.options, 'editors.ace.src', `${Formio_1.Formio.cdn.ace}/ace.js`), true)\n .then((editor) => {\n editor = editor.edit(element);\n editor.removeAllListeners('change');\n editor.setOptions(settings);\n editor.getSession().setMode(settings.mode);\n editor.on('change', () => onChange(editor.getValue()));\n if (settings.isUseWorkerDisabled) {\n editor.session.setUseWorker(false);\n }\n return editor;\n });\n }\n get tree() {\n return this.component.tree || false;\n }\n /**\n * The empty value for this component.\n *\n * @return {null}\n */\n get emptyValue() {\n return null;\n }\n /**\n * Returns if this component has a value set.\n *\n */\n hasValue(data) {\n return !lodash_1.default.isUndefined(lodash_1.default.get(data || this.data, this.key));\n }\n /**\n * Get the data value at the root level.\n *\n * @return {*}\n */\n get rootValue() {\n return this.root ? this.root.data : this.data;\n }\n get rootPristine() {\n return lodash_1.default.get(this, 'root.pristine', false);\n }\n /**\n * Get the static value of this component.\n * @return {*}\n */\n get dataValue() {\n if (!this.key ||\n (!this.visible && this.component.clearOnHide && !this.rootPristine)) {\n return this.emptyValue;\n }\n if (!this.hasValue() && this.shouldAddDefaultValue) {\n const empty = this.component.multiple ? [] : this.emptyValue;\n if (!this.rootPristine) {\n this.dataValue = empty;\n }\n return empty;\n }\n return lodash_1.default.get(this._data, this.key);\n }\n /**\n * Sets the static value of this component.\n *\n * @param value\n */\n set dataValue(value) {\n if (!this.allowData ||\n !this.key ||\n (!this.visible && this.component.clearOnHide && !this.rootPristine)) {\n return;\n }\n if ((value !== null) && (value !== undefined)) {\n value = this.hook('setDataValue', value, this.key, this._data);\n }\n if ((value === null) || (value === undefined)) {\n this.unset();\n return;\n }\n lodash_1.default.set(this._data, this.key, value);\n return;\n }\n /**\n * Splice a value from the dataValue.\n *\n * @param index\n */\n splice(index, flags = {}) {\n if (this.hasValue()) {\n const dataValue = this.dataValue || [];\n if (lodash_1.default.isArray(dataValue) && dataValue.hasOwnProperty(index)) {\n dataValue.splice(index, 1);\n this.dataValue = dataValue;\n this.triggerChange(flags);\n }\n }\n }\n unset() {\n lodash_1.default.unset(this._data, this.key);\n }\n /**\n * Deletes the value of the component.\n */\n deleteValue() {\n this.setValue(null, {\n noUpdateEvent: true,\n noDefault: true\n });\n this.unset();\n }\n getCustomDefaultValue(defaultValue) {\n if (this.component.customDefaultValue && !this.options.preview) {\n defaultValue = this.evaluate(this.component.customDefaultValue, { value: '' }, 'value');\n }\n return defaultValue;\n }\n get shouldAddDefaultValue() {\n return !this.options.noDefaults || (this.component.defaultValue && !this.isEmpty(this.component.defaultValue)) || this.component.customDefaultValue;\n }\n get defaultValue() {\n let defaultValue = this.emptyValue;\n if (this.component.defaultValue) {\n defaultValue = this.component.defaultValue;\n }\n defaultValue = this.getCustomDefaultValue(defaultValue);\n const checkMask = (value) => {\n if (typeof value === 'string') {\n const placeholderChar = this.placeholderChar;\n value = (0, vanilla_text_mask_1.conformToMask)(value, this.defaultMask, { placeholderChar }).conformedValue;\n if (!FormioUtils.matchInputMask(value, this.defaultMask)) {\n value = '';\n }\n }\n else {\n value = '';\n }\n return value;\n };\n if (this.defaultMask) {\n if (Array.isArray(defaultValue)) {\n defaultValue = defaultValue.map(checkMask);\n }\n else {\n defaultValue = checkMask(defaultValue);\n }\n }\n // Clone so that it creates a new instance.\n return lodash_1.default.cloneDeep(defaultValue);\n }\n /**\n * Get the input value of this component.\n *\n * @return {*}\n */\n getValue() {\n if (!this.hasInput || this.viewOnly || !this.refs.input || !this.refs.input.length) {\n return this.dataValue;\n }\n const values = [];\n for (const i in this.refs.input) {\n if (this.refs.input.hasOwnProperty(i)) {\n if (!this.component.multiple) {\n return this.getValueAt(i);\n }\n values.push(this.getValueAt(i));\n }\n }\n if (values.length === 0 && !this.component.multiple) {\n return '';\n }\n return values;\n }\n /**\n * Get the value at a specific index.\n *\n * @param index\n * @returns {*}\n */\n getValueAt(index) {\n const input = this.performInputMapping(this.refs.input[index]);\n return input ? input.value : undefined;\n }\n /**\n * Set the value of this component.\n *\n * @param value\n * @param flags\n *\n * @return {boolean} - If the value changed.\n */\n setValue(value, flags = {}) {\n const changed = this.updateValue(value, flags);\n value = this.dataValue;\n if (!this.hasInput) {\n return changed;\n }\n const isArray = Array.isArray(value);\n const valueInput = this.refs.fileLink || this.refs.input;\n if (isArray &&\n Array.isArray(this.defaultValue) &&\n this.refs.hasOwnProperty('input') &&\n valueInput &&\n (valueInput.length !== value.length) &&\n this.visible) {\n this.redraw();\n }\n if (this.isHtmlRenderMode() && flags && flags.fromSubmission && changed) {\n this.redraw();\n return changed;\n }\n for (const i in this.refs.input) {\n if (this.refs.input.hasOwnProperty(i)) {\n this.setValueAt(i, isArray ? value[i] : value, flags);\n }\n }\n return changed;\n }\n /**\n * Set the value at a specific index.\n *\n * @param index\n * @param value\n */\n setValueAt(index, value, flags = {}) {\n if (!flags.noDefault && (value === null || value === undefined) && !this.component.multiple) {\n value = this.defaultValue;\n }\n const input = this.performInputMapping(this.refs.input[index]);\n const valueMaskInput = this.refs.valueMaskInput;\n if (valueMaskInput === null || valueMaskInput === void 0 ? void 0 : valueMaskInput.mask) {\n valueMaskInput.mask.textMaskInputElement.update(value);\n }\n if (input.mask) {\n input.mask.textMaskInputElement.update(value);\n }\n else if (input.widget && input.widget.setValue) {\n input.widget.setValue(value);\n }\n else {\n input.value = value;\n }\n }\n get hasSetValue() {\n return this.hasValue() && !this.isEmpty(this.dataValue);\n }\n setDefaultValue() {\n if (this.defaultValue && this.shouldAddDefaultValue) {\n const defaultValue = (this.component.multiple && !this.dataValue.length) ? [] : this.defaultValue;\n this.setValue(defaultValue, {\n noUpdateEvent: true\n });\n }\n }\n /**\n * Restore the value of a control.\n */\n restoreValue() {\n if (this.hasSetValue) {\n this.setValue(this.dataValue, {\n noUpdateEvent: true\n });\n }\n else {\n this.setDefaultValue();\n }\n }\n /**\n * Normalize values coming into updateValue.\n *\n * @param value\n * @return {*}\n */\n normalizeValue(value) {\n if (this.component.multiple && !Array.isArray(value)) {\n value = value ? [value] : [];\n }\n return value;\n }\n /**\n * Update a value of this component.\n *\n * @param flags\n */\n updateComponentValue(value, flags = {}) {\n let newValue = (!flags.resetValue && (value === undefined || value === null)) ? this.getValue() : value;\n newValue = this.normalizeValue(newValue, flags);\n const oldValue = this.dataValue;\n let changed = ((newValue !== undefined) ? this.hasChanged(newValue, oldValue) : false);\n if (changed) {\n this.dataValue = newValue;\n changed = this.dataValue !== oldValue;\n this.updateOnChange(flags, changed);\n }\n if (this.componentModal && flags && flags.fromSubmission) {\n this.componentModal.setValue(value);\n }\n return changed;\n }\n /**\n * Updates the value of this component plus all sub-components.\n *\n * @param args\n * @return {boolean}\n */\n updateValue(...args) {\n return this.updateComponentValue(...args);\n }\n getIcon(name, content, styles, ref = 'icon') {\n return this.renderTemplate('icon', {\n className: this.iconClass(name),\n ref,\n styles,\n content\n });\n }\n /**\n * Resets the value of this component.\n */\n resetValue() {\n this.unset();\n this.setValue(this.emptyValue, {\n noUpdateEvent: true,\n noValidate: true,\n resetValue: true\n });\n }\n /**\n * Determine if the value of this component has changed.\n *\n * @param newValue\n * @param oldValue\n * @return {boolean}\n */\n hasChanged(newValue, oldValue) {\n if (((newValue === undefined) || (newValue === null)) &&\n ((oldValue === undefined) || (oldValue === null) || this.isEmpty(oldValue))) {\n return false;\n }\n // If we do not have a value and are getting set to anything other than undefined or null, then we changed.\n if (newValue !== undefined &&\n newValue !== null &&\n this.allowData &&\n !this.hasValue()) {\n return true;\n }\n return !lodash_1.default.isEqual(newValue, oldValue);\n }\n /**\n * Update the value on change.\n *\n * @param flags\n */\n updateOnChange(flags = {}, changed = false) {\n if (!flags.noUpdateEvent && changed) {\n if (flags.fromSubmission) {\n // Reset the errors when a submission has been made and allow it to revalidate.\n this._errors = [];\n }\n this.triggerChange(flags);\n return true;\n }\n return false;\n }\n /**\n * Perform a calculated value operation.\n *\n * @param data - The global data object.\n *\n * @return {boolean} - If the value changed during calculation.\n */\n convertNumberOrBoolToString(value) {\n if (typeof value === 'number' || typeof value === 'boolean') {\n return value.toString();\n }\n return value;\n }\n doValueCalculation(dataValue, data, row) {\n var _a;\n return this.evaluate(this.component.calculateValue, {\n value: dataValue,\n data,\n row: row || this.data,\n submission: ((_a = this.root) === null || _a === void 0 ? void 0 : _a._submission) || {\n data: this.rootValue\n }\n }, 'value');\n }\n /* eslint-disable max-statements */\n calculateComponentValue(data, flags, row) {\n // Skip value calculation for the component if we don't have entire form data set\n if (lodash_1.default.isUndefined(lodash_1.default.get(this, 'root.data'))) {\n return false;\n }\n // If no calculated value or\n // hidden and set to clearOnHide (Don't calculate a value for a hidden field set to clear when hidden)\n const { clearOnHide } = this.component;\n const shouldBeCleared = !this.visible && clearOnHide;\n const allowOverride = lodash_1.default.get(this.component, 'allowCalculateOverride', false);\n // Handle all cases when calculated values should not fire.\n if ((this.options.readOnly && !this.options.pdf && !this.component.calculateValue) ||\n !(this.component.calculateValue || this.component.calculateValueVariable) ||\n shouldBeCleared ||\n (this.options.server && !this.component.calculateServer) ||\n (flags.dataSourceInitialLoading && allowOverride)) {\n return false;\n }\n const dataValue = this.dataValue;\n // Calculate the new value.\n let calculatedValue = this.doValueCalculation(dataValue, data, row, flags);\n if (this.options.readOnly && dataValue && !calculatedValue) {\n return false;\n }\n if (lodash_1.default.isNil(calculatedValue)) {\n calculatedValue = this.emptyValue;\n }\n const changed = !lodash_1.default.isEqual(dataValue, calculatedValue);\n // Do not override calculations on server if they have calculateServer set.\n if (allowOverride) {\n // The value is considered locked if it is not empty and comes from a submission value.\n const fromSubmission = (flags.fromSubmission && this.component.persistent === true);\n if (this.isEmpty(dataValue)) {\n // Reset the calculation lock if ever the data is cleared.\n this.calculationLocked = false;\n }\n else if (this.calculationLocked || fromSubmission) {\n this.calculationLocked = true;\n return false;\n }\n const firstPass = (this.calculatedValue === undefined);\n if (firstPass) {\n this.calculatedValue = null;\n }\n const newCalculatedValue = this.normalizeValue(this.convertNumberOrBoolToString(calculatedValue));\n const previousCalculatedValue = this.normalizeValue(this.convertNumberOrBoolToString(this.calculatedValue));\n const normalizedDataValue = this.normalizeValue(this.convertNumberOrBoolToString(dataValue));\n const calculationChanged = !lodash_1.default.isEqual(previousCalculatedValue, newCalculatedValue);\n const previousChanged = !lodash_1.default.isEqual(normalizedDataValue, previousCalculatedValue);\n if (calculationChanged && previousChanged && !firstPass) {\n return false;\n }\n // Check to ensure that the calculated value is different than the previously calculated value.\n if (previousCalculatedValue && previousChanged && !calculationChanged) {\n return false;\n }\n if (flags.isReordered || !calculationChanged) {\n return false;\n }\n if (fromSubmission) {\n // If we set value from submission and it differs from calculated one, set the calculated value to prevent overriding dataValue in the next pass\n this.calculatedValue = calculatedValue;\n return false;\n }\n // If this is the firstPass, and the dataValue is different than to the calculatedValue.\n if (firstPass && !this.isEmpty(dataValue) && changed && calculationChanged) {\n // Return that we have a change so it will perform another pass.\n return true;\n }\n }\n this.calculatedValue = calculatedValue;\n if (changed) {\n if (!flags.noPristineChangeOnModified) {\n this.pristine = false;\n }\n flags.triggeredComponentId = this.id;\n return this.setValue(calculatedValue, flags);\n }\n return false;\n }\n /* eslint-enable max-statements */\n /**\n * Performs calculations in this component plus any child components.\n *\n * @param args\n * @return {boolean}\n */\n calculateValue(data, flags, row) {\n data = data || this.rootValue;\n flags = flags || {};\n row = row || this.data;\n return this.calculateComponentValue(data, flags, row);\n }\n /**\n * Get this component's label text.\n *\n */\n get label() {\n return this.component.label;\n }\n /**\n * Set this component's label text and render it.\n *\n * @param value - The new label text.\n */\n set label(value) {\n this.component.label = value;\n if (this.labelElement) {\n this.labelElement.innerText = value;\n }\n }\n /**\n * Get FormioForm element at the root of this component tree.\n *\n */\n getRoot() {\n return this.root;\n }\n /**\n * Returns the invalid message, or empty string if the component is valid.\n *\n * @param data\n * @param dirty\n * @return {*}\n */\n invalidMessage(data, dirty, ignoreCondition, row) {\n if (!ignoreCondition && !this.checkCondition(row, data)) {\n return '';\n }\n // See if this is forced invalid.\n if (this.invalid) {\n return this.invalid;\n }\n // No need to check for errors if there is no input or if it is pristine.\n if (!this.hasInput || (!dirty && this.pristine)) {\n return '';\n }\n const validationScope = { errors: [] };\n (0, process_1.processOneSync)({\n component: this.component,\n data,\n row,\n path: this.path || this.component.key,\n scope: validationScope,\n instance: this,\n processors: [\n process_1.validateProcessSync\n ]\n });\n const errors = validationScope.errors;\n const interpolatedErrors = FormioUtils.interpolateErrors(this.component, errors, this.t.bind(this));\n return lodash_1.default.map(interpolatedErrors, 'message').join('\\n\\n');\n }\n /**\n * Returns if the component is valid or not.\n *\n * @param data\n * @param dirty\n * @return {boolean}\n */\n isValid(data, dirty) {\n return !this.invalidMessage(data, dirty);\n }\n setComponentValidity(errors, dirty, silentCheck) {\n if (silentCheck) {\n return [];\n }\n const messages = errors.filter(message => !message.fromServer);\n if (errors.length && !!messages.length && (!this.isEmpty(this.defaultValue) || dirty || !this.pristine)) {\n return this.setCustomValidity(messages, dirty);\n }\n else {\n return this.setCustomValidity('');\n }\n }\n /**\n * Interpolate errors from the validation methods.\n * @param {*} errors\n * @returns\n */\n interpolateErrors(errors) {\n var _a;\n const interpolatedErrors = FormioUtils.interpolateErrors(this.component, errors, this.t.bind(this));\n return ((_a = this.serverErrors) === null || _a === void 0 ? void 0 : _a.length) ? [...interpolatedErrors, ...this.serverErrors] : interpolatedErrors;\n }\n /**\n * Show component validation errors.\n * @param {*} errors - An array of errors that have occured.\n * @param {*} data - The root submission data.\n * @param {*} row - The contextual row data.\n * @param {*} flags - The flags to perform validation.\n * @returns\n */\n showValidationErrors(errors, data, row, flags) {\n if (flags.silentCheck) {\n return [];\n }\n if (this.options.alwaysDirty) {\n flags.dirty = true;\n }\n if (flags.fromSubmission && this.hasValue(data)) {\n flags.dirty = true;\n }\n this.setDirty(flags.dirty);\n return this.setComponentValidity(errors, flags.dirty, flags.silentCheck, flags.fromSubmission);\n }\n /**\n * Perform a component validation.\n * @param {*} data - The root data you wish to use for this component.\n * @param {*} row - The contextual row data you wish to use for this component.\n * @param {*} flags - The flags to control the behavior of the validation.\n * @returns\n */\n validateComponent(data, row, flags = {}) {\n data = data || this.rootValue;\n row = row || this.data;\n const { async = false } = flags;\n if (this.shouldSkipValidation(data, row, flags)) {\n return async ? Promise.resolve([]) : [];\n }\n const processContext = {\n component: this.component,\n data,\n row,\n path: this.path || this.component.key,\n instance: this,\n scope: { errors: [] },\n processors: [\n async ? process_1.validateProcess : process_1.validateProcessSync\n ]\n };\n if (async) {\n return (0, process_1.processOne)(processContext).then(() => {\n this._errors = this.interpolateErrors(processContext.scope.errors);\n return this._errors;\n });\n }\n (0, process_1.processOneSync)(processContext);\n this._errors = this.interpolateErrors(processContext.scope.errors);\n return this._errors;\n }\n /**\n * Checks the validity of this component and sets the error message if it is invalid.\n *\n * @param data\n * @param dirty\n * @param row\n * @return {boolean}\n */\n checkComponentValidity(data, dirty, row, flags = {}, allErrors = []) {\n data = data || this.rootValue;\n row = row || this.data;\n flags.dirty = dirty || false;\n if (flags.async) {\n return this.validateComponent(data, row, flags).then((errors) => {\n allErrors.push(...errors);\n if (this.parent && this.parent.childErrors) {\n this.parent.childErrors.push(...errors);\n }\n this.showValidationErrors(errors, data, row, flags);\n return errors.length === 0;\n });\n }\n else {\n const errors = this.validateComponent(data, row, flags);\n this.showValidationErrors(errors, data, row, flags);\n allErrors.push(...errors);\n if (this.parent && this.parent.childErrors) {\n this.parent.childErrors.push(...errors);\n }\n return errors.length === 0;\n }\n }\n /**\n * Checks the validity of the component.\n * @param {*} data\n * @param {*} dirty\n * @param {*} row\n * @param {*} silentCheck\n * @returns\n */\n checkValidity(data, dirty, row, silentCheck, errors = []) {\n data = data || this.rootValue;\n row = row || this.data;\n console.log('Deprecation warning: Component.checkValidity() will be deprecated in 6.x version of renderer. Use Component.validateComponent instead.');\n return this.checkComponentValidity(data, dirty, row, { silentCheck }, errors);\n }\n checkAsyncValidity(data, dirty, row, silentCheck, errors = []) {\n console.log('Deprecation warning: Component.checkAsyncValidity() will be deprecated in 6.x version of renderer. Use Component.validateComponent instead.');\n return this.checkComponentValidity(data, dirty, row, { async: true, silentCheck }, errors);\n }\n /**\n * Check the conditions, calculations, and validity of a single component and triggers an update if\n * something changed.\n *\n * @param data - The root data of the change event.\n * @param flags - The flags from this change event.\n *\n * @return boolean - If component is valid or not.\n */\n checkData(data, flags, row) {\n data = data || this.rootValue;\n flags = flags || {};\n row = row || this.data;\n // Needs for Nextgen Rules Engine\n this.resetCaches();\n // Do not trigger refresh if change was triggered on blur event since components with Refresh on Blur have their own listeners\n if (!flags.fromBlur) {\n this.checkRefreshOn(flags.changes, flags);\n }\n if (flags.noCheck) {\n return true;\n }\n this.checkComponentConditions(data, flags, row);\n if (this.id !== flags.triggeredComponentId) {\n this.calculateComponentValue(data, flags, row);\n }\n }\n checkModal(errors = [], dirty = false) {\n const messages = errors.filter(error => !error.fromServer);\n const isValid = errors.length === 0;\n if (!this.component.modalEdit || !this.componentModal) {\n return;\n }\n if (dirty && !isValid) {\n this.setErrorClasses([this.refs.openModal], dirty, !isValid, !!messages.length, this.refs.openModalWrapper);\n }\n else {\n this.clearErrorClasses(this.refs.openModalWrapper);\n }\n }\n get validationValue() {\n return this.dataValue;\n }\n isEmpty(value = this.dataValue) {\n const isEmptyArray = (lodash_1.default.isArray(value) && value.length === 1) ? lodash_1.default.isEqual(value[0], this.emptyValue) : false;\n return value == null || value.length === 0 || lodash_1.default.isEqual(value, this.emptyValue) || isEmptyArray;\n }\n isEqual(valueA, valueB = this.dataValue) {\n return (this.isEmpty(valueA) && this.isEmpty(valueB)) || lodash_1.default.isEqual(valueA, valueB);\n }\n /**\n * Check if a component is eligible for multiple validation\n *\n * @return {boolean}\n */\n validateMultiple() {\n return true;\n }\n clearErrorClasses(element = this.element) {\n this.removeClass(element, this.options.componentErrorClass);\n this.removeClass(element, 'alert alert-danger');\n this.removeClass(element, 'has-error');\n this.removeClass(element, 'has-message');\n }\n setInputWidgetErrorClasses(inputRefs, hasErrors) {\n if (!this.isInputComponent || !this.component.widget || !(inputRefs === null || inputRefs === void 0 ? void 0 : inputRefs.length)) {\n return;\n }\n inputRefs.forEach((input) => {\n if ((input === null || input === void 0 ? void 0 : input.widget) && input.widget.setErrorClasses) {\n input.widget.setErrorClasses(hasErrors);\n }\n });\n }\n addFocusBlurEvents(element) {\n this.addEventListener(element, 'focus', () => {\n if (this.root.focusedComponent !== this) {\n if (this.root.pendingBlur) {\n this.root.pendingBlur();\n }\n this.root.focusedComponent = this;\n this.emit('focus', this);\n }\n else if (this.root.focusedComponent === this && this.root.pendingBlur) {\n this.root.pendingBlur.cancel();\n this.root.pendingBlur = null;\n }\n });\n this.addEventListener(element, 'blur', () => {\n this.root.pendingBlur = FormioUtils.delay(() => {\n this.emit('blur', this);\n if (this.component.validateOn === 'blur') {\n this.root.triggerChange({ fromBlur: true }, {\n instance: this,\n component: this.component,\n value: this.dataValue,\n flags: { fromBlur: true }\n });\n }\n this.root.focusedComponent = null;\n this.root.pendingBlur = null;\n });\n });\n }\n // eslint-disable-next-line max-statements\n setCustomValidity(messages, dirty, external) {\n const inputRefs = this.isInputComponent ? this.refs.input || [] : null;\n if (typeof messages === 'string' && messages) {\n messages = {\n level: 'error',\n message: messages,\n component: this.component,\n };\n }\n if (!Array.isArray(messages)) {\n if (messages) {\n messages = [messages];\n }\n else {\n messages = [];\n }\n }\n const errors = messages.filter(message => message.level === 'error');\n let invalidInputRefs = inputRefs;\n // Filter the invalid input refs in multiple components\n if (this.component.multiple) {\n const refsArray = Array.from(inputRefs);\n refsArray.forEach((input) => {\n this.setElementInvalid(this.performInputMapping(input), false);\n });\n this.setInputWidgetErrorClasses(refsArray, false);\n invalidInputRefs = refsArray.filter((ref, index) => {\n var _a;\n return (_a = messages.some) === null || _a === void 0 ? void 0 : _a.call(messages, (msg) => {\n var _a;\n return ((_a = msg === null || msg === void 0 ? void 0 : msg.context) === null || _a === void 0 ? void 0 : _a.index) === index;\n });\n });\n }\n if (messages.length) {\n if (this.refs.messageContainer) {\n this.empty(this.refs.messageContainer);\n }\n this.emit('componentError', {\n instance: this,\n component: this.component,\n message: messages[0].message,\n messages,\n external: !!external,\n });\n this.addMessages(messages, dirty, invalidInputRefs);\n if (invalidInputRefs) {\n this.setErrorClasses(invalidInputRefs, dirty, !!errors.length, !!messages.length);\n }\n }\n else if (!errors.length || (errors[0].external === !!external)) {\n if (this.refs.messageContainer) {\n this.empty(this.refs.messageContainer);\n }\n if (this.refs.modalMessageContainer) {\n this.empty(this.refs.modalMessageContainer);\n }\n if (invalidInputRefs) {\n this.setErrorClasses(invalidInputRefs, dirty, !!errors.length, !!messages.length);\n }\n this.clearErrorClasses();\n }\n this._visibleErrors = messages;\n return messages;\n }\n /**\n * Determines if the value of this component is hidden from the user as if it is coming from the server, but is\n * protected.\n *\n * @return {boolean|*}\n */\n isValueHidden() {\n if (this.component.protected && this.root.editing) {\n return false;\n }\n if (!this.root || !this.root.hasOwnProperty('editing')) {\n return false;\n }\n if (!this.root || !this.root.editing) {\n return false;\n }\n return (this.component.protected || !this.component.persistent || (this.component.persistent === 'client-only'));\n }\n shouldSkipValidation(data, row, flags = {}) {\n const rules = [\n // Do not validate if the flags say not too.\n () => flags.noValidate,\n // Do not check custom validation for empty data if it is not required\n () => this.component.validate.custom && !this.dataValue && !this.component.validate.required,\n // Force valid if component is read-only\n () => this.options.readOnly,\n // Do not check validations if component is not an input component.\n () => !this.hasInput,\n // Check to see if we are editing and if so, check component persistence.\n () => this.isValueHidden(),\n // Force valid if component is hidden.\n () => !this.visible,\n // Force valid if component is conditionally hidden.\n () => !this.checkCondition(row, data)\n ];\n return rules.some(pred => pred());\n }\n // Maintain reverse compatibility.\n whenReady() {\n console.warn('The whenReady() method has been deprecated. Please use the dataReady property instead.');\n return this.dataReady;\n }\n get dataReady() {\n return Promise.resolve();\n }\n /**\n * Prints out the value of this component as a string value.\n */\n asString(value) {\n value = value || this.getValue();\n return (Array.isArray(value) ? value : [value]).map(lodash_1.default.toString).join(', ');\n }\n /**\n * Return if the component is disabled.\n * @return {boolean}\n */\n get disabled() {\n return this._disabled || this.parentDisabled;\n }\n /**\n * Disable this component.\n *\n * @param {boolean} disabled\n */\n set disabled(disabled) {\n this._disabled = disabled;\n }\n setDisabled(element, disabled) {\n if (!element) {\n return;\n }\n element.disabled = disabled;\n if (disabled) {\n element.setAttribute('disabled', 'disabled');\n }\n else {\n element.removeAttribute('disabled');\n }\n }\n setLoading(element, loading) {\n if (!element || (element.loading === loading)) {\n return;\n }\n element.loading = loading;\n if (!element.loader && loading) {\n element.loader = this.ce('i', {\n class: `${this.iconClass('refresh', true)} button-icon-right`\n });\n }\n if (element.loader) {\n if (loading) {\n this.appendTo(element.loader, element);\n }\n else {\n this.removeChildFrom(element.loader, element);\n }\n }\n }\n selectOptions(select, tag, options, defaultValue) {\n lodash_1.default.each(options, (option) => {\n const attrs = {\n value: option.value\n };\n if (defaultValue !== undefined && (option.value === defaultValue)) {\n attrs.selected = 'selected';\n }\n const optionElement = this.ce('option', attrs);\n optionElement.appendChild(this.text(option.label));\n select.appendChild(optionElement);\n });\n }\n setSelectValue(select, value) {\n const options = select.querySelectorAll('option');\n lodash_1.default.each(options, (option) => {\n if (option.value === value) {\n option.setAttribute('selected', 'selected');\n }\n else {\n option.removeAttribute('selected');\n }\n });\n if (select.onchange) {\n select.onchange();\n }\n if (select.onselect) {\n select.onselect();\n }\n }\n getRelativePath(path) {\n const keyPart = `.${this.key}`;\n const thisPath = this.isInputComponent ? this.path\n : this.path.slice(0).replace(keyPart, '');\n return path.replace(thisPath, '');\n }\n clear() {\n this.detach();\n this.empty(this.getElement());\n }\n append(element) {\n this.appendTo(element, this.element);\n }\n prepend(element) {\n this.prependTo(element, this.element);\n }\n removeChild(element) {\n this.removeChildFrom(element, this.element);\n }\n detachLogic() {\n this.logic.forEach(logic => {\n if (logic.trigger.type === 'event') {\n const event = this.interpolate(logic.trigger.event);\n this.off(event); // only applies to callbacks on this component\n }\n });\n }\n attachLogic() {\n // Do not attach logic during builder mode.\n if (this.builderMode) {\n return;\n }\n this.logic.forEach((logic) => {\n if (logic.trigger.type === 'event') {\n const event = this.interpolate(logic.trigger.event);\n this.on(event, (...args) => {\n const newComponent = (0, utils_1.fastCloneDeep)(this.originalComponent);\n if (this.applyActions(newComponent, logic.actions, args)) {\n // If component definition changed, replace it.\n if (!lodash_1.default.isEqual(this.component, newComponent)) {\n this.component = newComponent;\n const visible = this.conditionallyVisible(null, null);\n const disabled = this.shouldDisabled;\n // Change states which won't be recalculated during redrawing\n if (this.visible !== visible) {\n this.visible = visible;\n }\n if (this.disabled !== disabled) {\n this.disabled = disabled;\n }\n this.redraw();\n }\n }\n }, true);\n }\n });\n }\n /**\n * Get the element information.\n */\n elementInfo() {\n const attributes = {\n name: this.options.name,\n type: this.component.inputType || 'text',\n class: 'form-control',\n lang: this.options.language\n };\n if (this.component.placeholder) {\n attributes.placeholder = this.t(this.component.placeholder, { _userInput: true });\n }\n if (this.component.tabindex) {\n attributes.tabindex = this.component.tabindex;\n }\n if (this.disabled) {\n attributes.disabled = 'disabled';\n }\n lodash_1.default.defaults(attributes, this.component.attributes);\n return {\n type: 'input',\n component: this.component,\n changeEvent: 'change',\n attr: attributes\n };\n }\n autofocus() {\n const hasAutofocus = this.component.autofocus && !this.builderMode && !this.options.preview;\n if (hasAutofocus) {\n this.on('render', () => this.focus(), true);\n }\n }\n scrollIntoView(element = this.element) {\n if (!element) {\n return;\n }\n const { left, top } = element.getBoundingClientRect();\n window.scrollTo(left + window.scrollX, top + window.scrollY);\n }\n focus(index) {\n var _a, _b;\n if ('beforeFocus' in this.parent) {\n this.parent.beforeFocus(this);\n }\n if ((_a = this.refs.input) === null || _a === void 0 ? void 0 : _a.length) {\n const focusingInput = typeof index === 'number' && this.refs.input[index]\n ? this.refs.input[index]\n : this.refs.input[this.refs.input.length - 1];\n if (((_b = this.component.widget) === null || _b === void 0 ? void 0 : _b.type) === 'calendar') {\n const sibling = focusingInput.nextSibling;\n if (sibling) {\n sibling.focus();\n }\n }\n else {\n focusingInput.focus();\n }\n }\n if (this.refs.openModal) {\n this.refs.openModal.focus();\n }\n if (this.parent.refs.openModal) {\n this.parent.refs.openModal.focus();\n }\n }\n /**\n * Get `Formio` instance for working with files\n */\n get fileService() {\n if (this.options.fileService) {\n return this.options.fileService;\n }\n if (this.options.formio) {\n return this.options.formio;\n }\n if (this.root && this.root.formio) {\n return this.root.formio;\n }\n const formio = new Formio_1.Formio();\n // If a form is loaded, then make sure to set the correct formUrl.\n if (this.root && this.root._form && this.root._form._id) {\n formio.formUrl = `${formio.projectUrl}/form/${this.root._form._id}`;\n }\n return formio;\n }\n resetCaches() { }\n get previewMode() {\n return false;\n }\n}\nexports[\"default\"] = Component;\nComponent.externalLibraries = {};\nComponent.requireLibrary = function (name, property, src, polling) {\n if (!Component.externalLibraries.hasOwnProperty(name)) {\n Component.externalLibraries[name] = {};\n Component.externalLibraries[name].ready = new Promise((resolve, reject) => {\n Component.externalLibraries[name].resolve = resolve;\n Component.externalLibraries[name].reject = reject;\n });\n const callbackName = `${name}Callback`;\n if (!polling && !window[callbackName]) {\n window[callbackName] = function () {\n this.resolve();\n }.bind(Component.externalLibraries[name]);\n }\n // See if the plugin already exists.\n const plugin = lodash_1.default.get(window, property);\n if (plugin) {\n Component.externalLibraries[name].resolve(plugin);\n }\n else {\n src = Array.isArray(src) ? src : [src];\n src.forEach((lib) => {\n let attrs = {};\n let elementType = '';\n if (typeof lib === 'string') {\n lib = {\n type: 'script',\n src: lib\n };\n }\n switch (lib.type) {\n case 'script':\n elementType = 'script';\n attrs = {\n src: lib.src,\n type: 'text/javascript',\n defer: true,\n async: true\n };\n break;\n case 'styles':\n elementType = 'link';\n attrs = {\n href: lib.src,\n rel: 'stylesheet'\n };\n break;\n }\n // Add the script to the top page.\n const script = document.createElement(elementType);\n for (const attr in attrs) {\n script.setAttribute(attr, attrs[attr]);\n }\n document.getElementsByTagName('head')[0].appendChild(script);\n });\n // if no callback is provided, then check periodically for the script.\n if (polling) {\n setTimeout(function checkLibrary() {\n const plugin = lodash_1.default.get(window, property);\n if (plugin) {\n Component.externalLibraries[name].resolve(plugin);\n }\n else {\n // check again after 200 ms.\n setTimeout(checkLibrary, 200);\n }\n }, 200);\n }\n }\n }\n return Component.externalLibraries[name].ready;\n};\nComponent.libraryReady = function (name) {\n if (Component.externalLibraries.hasOwnProperty(name) &&\n Component.externalLibraries[name].ready) {\n return Component.externalLibraries[name].ready;\n }\n return Promise.reject(`${name} library was not required.`);\n};\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/components/_classes/component/Component.js?");
5855
4535
 
5856
4536
  /***/ }),
5857
4537
 
@@ -6038,7 +4718,7 @@ eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {
6038
4718
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
6039
4719
 
6040
4720
  "use strict";
6041
- eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst lodash_1 = __importDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nconst Field_1 = __importDefault(__webpack_require__(/*! ../field/Field */ \"./lib/cjs/components/_classes/field/Field.js\"));\nconst Components_1 = __importDefault(__webpack_require__(/*! ../../Components */ \"./lib/cjs/components/Components.js\"));\nconst utils_1 = __webpack_require__(/*! ../../../utils/utils */ \"./lib/cjs/utils/utils.js\");\nconst core_1 = __webpack_require__(/*! @formio/core */ \"./node_modules/@formio/core/lib/index.js\");\nclass NestedComponent extends Field_1.default {\n static schema(...extend) {\n return Field_1.default.schema({\n tree: false,\n lazyLoad: false,\n }, ...extend);\n }\n constructor(component, options, data) {\n super(component, options, data);\n this.type = 'components';\n this._collapsed = !!this.component.collapsed;\n }\n get defaultSchema() {\n return NestedComponent.schema();\n }\n get schema() {\n const schema = super.schema;\n const components = lodash_1.default.uniqBy(this.getComponents(), 'component.key');\n schema.components = lodash_1.default.map(components, 'schema');\n return schema;\n }\n get collapsed() {\n return this._collapsed;\n }\n collapse(value) {\n const promise = this.redraw();\n if (!value) {\n this.checkValidity(this.data, !this.pristine);\n }\n return promise;\n }\n set collapsed(value) {\n this._collapsed = value;\n this.collapse(value);\n }\n set visible(value) {\n // DO NOT CALL super here. There is an issue where clearOnHide was getting triggered with\n // subcomponents because the \"parentVisible\" flag was set to false when it should really be\n // set to true.\n const visibilityChanged = this._visible !== value;\n this._visible = value;\n const isVisible = this.visible;\n const forceShow = this.shouldForceShow();\n const forceHide = this.shouldForceHide();\n this.components.forEach(component => {\n // Set the parent visibility first since we may have nested components within nested components\n // and they need to be able to determine their visibility based on the parent visibility.\n component.parentVisible = isVisible;\n const conditionallyVisible = component.conditionallyVisible();\n if (forceShow || conditionallyVisible) {\n component.visible = true;\n }\n else if (forceHide || !isVisible || !conditionallyVisible) {\n component.visible = false;\n }\n // If hiding a nested component, clear all errors below.\n if (!component.visible) {\n component.error = '';\n }\n });\n if (visibilityChanged) {\n this.clearOnHide();\n this.redraw();\n }\n }\n get visible() {\n return super.visible;\n }\n set parentVisible(value) {\n super.parentVisible = value;\n this.components.forEach(component => component.parentVisible = this.visible);\n }\n get parentVisible() {\n return super.parentVisible;\n }\n get disabled() {\n return super.disabled;\n }\n set disabled(disabled) {\n super.disabled = disabled;\n this.components.forEach((component) => component.parentDisabled = disabled);\n }\n set parentDisabled(value) {\n super.parentDisabled = value;\n this.components.forEach(component => {\n component.parentDisabled = this.disabled;\n });\n }\n get parentDisabled() {\n return super.parentDisabled;\n }\n get ready() {\n return Promise.all(this.getComponents().map(component => component.ready));\n }\n get currentForm() {\n return super.currentForm;\n }\n set currentForm(instance) {\n super.currentForm = instance;\n this.getComponents().forEach(component => {\n component.currentForm = instance;\n });\n }\n get rowIndex() {\n return this._rowIndex;\n }\n set rowIndex(value) {\n this._rowIndex = value;\n this.eachComponent((component) => {\n component.rowIndex = value;\n });\n }\n componentContext() {\n return this._data;\n }\n get data() {\n return this._data;\n }\n set data(value) {\n this._data = value;\n this.eachComponent((component) => {\n component.data = this.componentContext(component);\n });\n }\n getComponents() {\n return this.components || [];\n }\n /**\n * Perform a deep iteration over every component, including those\n * within other container based components.\n *\n * @param {function} fn - Called for every component.\n */\n everyComponent(fn, options) {\n const components = this.getComponents();\n lodash_1.default.each(components, (component, index) => {\n if (fn(component, components, index) === false) {\n return false;\n }\n if (typeof component.everyComponent === 'function') {\n if (component.everyComponent(fn, options) === false) {\n return false;\n }\n }\n });\n }\n hasComponent(component) {\n let result = false;\n this.everyComponent((comp) => {\n if (comp === component) {\n result = true;\n return false;\n }\n });\n return result;\n }\n flattenComponents() {\n const result = {};\n this.everyComponent((component) => {\n result[component.component.flattenAs || component.key] = component;\n });\n return result;\n }\n /**\n * Perform an iteration over each component within this container component.\n *\n * @param {function} fn - Called for each component\n */\n eachComponent(fn) {\n lodash_1.default.each(this.getComponents(), (component, index) => {\n if (fn(component, index) === false) {\n return false;\n }\n });\n }\n /**\n * Returns a component provided a key. This performs a deep search within the\n * component tree.\n *\n * @param {string} key - The key of the component to retrieve.\n * @param {function} fn - Called with the component once found.\n * @return {Object} - The component that is located.\n */\n getComponent(path, fn, originalPath) {\n originalPath = originalPath || (0, utils_1.getStringFromComponentPath)(path);\n if (this.componentsMap.hasOwnProperty(originalPath)) {\n if (fn) {\n return fn(this.componentsMap[originalPath]);\n }\n else {\n return this.componentsMap[originalPath];\n }\n }\n path = (0, utils_1.getArrayFromComponentPath)(path);\n const pathStr = originalPath;\n const newPath = lodash_1.default.clone(path);\n let key = newPath.shift();\n const remainingPath = newPath;\n let comp = null;\n let possibleComp = null;\n if (lodash_1.default.isNumber(key)) {\n key = remainingPath.shift();\n }\n if (!lodash_1.default.isString(key)) {\n return comp;\n }\n this.everyComponent((component, components) => {\n const matchPath = component.hasInput && component.path ? pathStr.includes(component.path) : true;\n if (component.component.key === key) {\n possibleComp = component;\n if (matchPath) {\n comp = component;\n if (remainingPath.length > 0 && 'getComponent' in component) {\n comp = component.getComponent(remainingPath, fn, originalPath);\n }\n else if (fn) {\n fn(component, components);\n }\n return false;\n }\n }\n });\n if (!comp) {\n comp = possibleComp;\n }\n return comp;\n }\n /**\n * Return a component provided the Id of the component.\n *\n * @param {string} id - The Id of the component.\n * @param {function} fn - Called with the component once it is retrieved.\n * @return {Object} - The component retrieved.\n */\n getComponentById(id, fn) {\n let comp = null;\n this.everyComponent((component, components) => {\n if (component.id === id) {\n comp = component;\n if (fn) {\n fn(component, components);\n }\n return false;\n }\n });\n return comp;\n }\n /**\n * Create a new component and add it to the components array.\n *\n * @param component\n * @param data\n */\n createComponent(component, options, data, before, replacedComp) {\n if (!component) {\n return;\n }\n options = options || this.options;\n data = data || this.data;\n options.parent = this;\n options.parentVisible = this.visible;\n options.root = (options === null || options === void 0 ? void 0 : options.root) || this.root || this;\n options.localRoot = this.localRoot;\n options.skipInit = true;\n if (!(options.display === 'pdf' && this.builderMode)) {\n component.id = (0, utils_1.getRandomComponentId)();\n }\n const comp = Components_1.default.create(component, options, data, true);\n comp.init();\n if (component.internal) {\n return comp;\n }\n if (before) {\n const index = lodash_1.default.findIndex(this.components, { id: before.id });\n if (index !== -1) {\n this.components.splice(index, 0, comp);\n }\n else {\n this.components.push(comp);\n }\n }\n else if (replacedComp) {\n const index = lodash_1.default.findIndex(this.components, { id: replacedComp.id });\n if (index !== -1) {\n this.components[index] = comp;\n }\n else {\n this.components.push(comp);\n }\n }\n else {\n this.components.push(comp);\n }\n return comp;\n }\n getContainer() {\n return this.element;\n }\n get componentComponents() {\n return this.component.components || [];\n }\n get nestedKey() {\n return `nested-${this.key}`;\n }\n get templateName() {\n return 'container';\n }\n init() {\n this.components = this.components || [];\n this.addComponents();\n return super.init();\n }\n /**\n *\n * @param element\n * @param data\n */\n addComponents(data, options) {\n data = data || this.data;\n this.components = this.components || [];\n options = options || this.options;\n if (options.components) {\n this.components = options.components;\n }\n else {\n const components = this.hook('addComponents', this.componentComponents, this) || [];\n components.forEach((component) => this.addComponent(component, data));\n }\n }\n /**\n * Add a new component to the components array.\n *\n * @param {Object} component - The component JSON schema to add.\n * @param {Object} data - The submission data object to house the data for this component.\n * @param {HTMLElement} before - A DOM element to insert this element before.\n * @return {Component} - The created component instance.\n */\n addComponent(component, data, before, noAdd) {\n data = data || this.data;\n this.components = this.components || [];\n component = this.hook('addComponent', component, data, before, noAdd);\n const comp = this.createComponent(component, this.options, data, before ? before : null);\n if (noAdd) {\n return comp;\n }\n return comp;\n }\n beforeFocus() {\n if (this.parent && 'beforeFocus' in this.parent) {\n this.parent.beforeFocus(this);\n }\n }\n render(children) {\n // If already rendering, don't re-render.\n return super.render(children || this.renderTemplate(this.templateName, {\n children: !this.visible ? '' : this.renderComponents(),\n nestedKey: this.nestedKey,\n collapsed: this.options.pdf ? false : this.collapsed,\n }));\n }\n renderComponents(components) {\n components = components || this.getComponents();\n const children = components.map(component => component.render());\n return this.renderTemplate('components', {\n children,\n components,\n });\n }\n attach(element) {\n const superPromise = super.attach(element);\n this.loadRefs(element, {\n header: 'single',\n collapsed: this.collapsed,\n [this.nestedKey]: 'single',\n });\n let childPromise = Promise.resolve();\n if (this.refs[this.nestedKey]) {\n childPromise = this.attachComponents(this.refs[this.nestedKey]);\n }\n if (!this.visible) {\n this.attachComponentsLogic();\n }\n if (this.component.collapsible && this.refs.header) {\n this.addEventListener(this.refs.header, 'click', () => {\n this.collapsed = !this.collapsed;\n });\n this.addEventListener(this.refs.header, 'keydown', (e) => {\n if (e.keyCode === 13 || e.keyCode === 32) {\n e.preventDefault();\n this.collapsed = !this.collapsed;\n }\n });\n }\n return Promise.all([\n superPromise,\n childPromise,\n ]);\n }\n attachComponentsLogic(components) {\n components = components || this.components;\n lodash_1.default.each(components, (comp) => {\n comp.attachLogic();\n if (lodash_1.default.isFunction(comp.attachComponentsLogic)) {\n comp.attachComponentsLogic();\n }\n });\n }\n attachComponents(element, components, container) {\n components = components || this.components;\n container = container || this.component.components;\n element = this.hook('attachComponents', element, components, container, this);\n if (!element) {\n // Return a non-resolving promise.\n return (new Promise(() => { }));\n }\n let index = 0;\n const promises = [];\n Array.prototype.slice.call(element.children).forEach(child => {\n if (!child.getAttribute('data-noattach') && components[index]) {\n promises.push(components[index].attach(child));\n index++;\n }\n });\n return Promise.all(promises);\n }\n /**\n * Remove a component from the components array and from the children object\n *\n * @param {Component} component - The component to remove from the components.\n * @param {Array<Component>} components - An array of components to remove this component from.\n */\n removeComponent(component, components, all = false) {\n components = components || this.components;\n component.destroy(all);\n lodash_1.default.remove(components, { id: component.id });\n if (this.componentsMap[component.path]) {\n delete this.componentsMap[component.path];\n }\n }\n /**\n * Removes a component provided the API key of that component.\n *\n * @param {string} key - The API key of the component to remove.\n * @param {function} fn - Called once the component is removed.\n * @return {null}\n */\n removeComponentByKey(key, fn) {\n const comp = this.getComponent(key, (component, components) => {\n this.removeComponent(component, components);\n if (fn) {\n fn(component, components);\n }\n });\n if (!comp) {\n if (fn) {\n fn(null);\n }\n return null;\n }\n }\n /**\n * Removes a component provided the Id of the component.\n *\n * @param {string} id - The Id of the component to remove.\n * @param {function} fn - Called when the component is removed.\n * @return {null}\n */\n removeComponentById(id, fn) {\n const comp = this.getComponentById(id, (component, components) => {\n this.removeComponent(component, components);\n if (fn) {\n fn(component, components);\n }\n });\n if (!comp) {\n if (fn) {\n fn(null);\n }\n return null;\n }\n }\n updateValue(value, flags = {}) {\n return this.components.reduce((changed, comp) => {\n return comp.updateValue(null, flags) || changed;\n }, super.updateValue(value, flags));\n }\n shouldSkipValidation(data, row, flags) {\n // Nested components with no input should not be validated.\n if (!this.component.input) {\n return true;\n }\n else {\n return super.shouldSkipValidation(data, row, flags);\n }\n }\n checkData(data, flags, row, components) {\n if (this.builderMode) {\n return true;\n }\n data = data || this.rootValue;\n flags = flags || {};\n row = row || this.data;\n components = components && lodash_1.default.isArray(components) ? components : this.getComponents();\n super.checkData(data, flags, row);\n components.forEach((comp) => comp.checkData(data, flags, row));\n }\n checkConditions(data, flags, row) {\n // check conditions of parent component first, because it may influence on visibility of it's children\n const check = super.checkConditions(data, flags, row);\n //row data of parent component not always corresponds to row of nested components, use comp.data as row data for children instead\n this.getComponents().forEach(comp => comp.checkConditions(data, flags, comp.data));\n return check;\n }\n clearOnHide(show) {\n super.clearOnHide(show);\n if (this.component.clearOnHide) {\n if (this.allowData && !this.hasValue()) {\n this.dataValue = this.defaultValue;\n }\n if (this.hasValue()) {\n this.restoreComponentsContext();\n }\n }\n this.getComponents().forEach(component => component.clearOnHide(show));\n }\n restoreComponentsContext() {\n this.getComponents().forEach((component) => component.data = this.dataValue);\n }\n /**\n * Allow components to hook into the next page trigger to perform their own logic.\n *\n * @return {*}\n */\n beforePage(next) {\n return Promise.all(this.getComponents().map((comp) => comp.beforePage(next)));\n }\n /**\n * Allow components to hook into the submission to provide their own async data.\n *\n * @return {*}\n */\n beforeSubmit() {\n return Promise.allSettled(this.getComponents().map((comp) => comp.beforeSubmit()));\n }\n calculateValue(data, flags, row) {\n // Do not iterate into children and calculateValues if this nested component is conditionally hidden.\n if (!this.conditionallyVisible()) {\n return false;\n }\n return this.getComponents().reduce((changed, comp) => comp.calculateValue(data, flags, row) || changed, super.calculateValue(data, flags, row));\n }\n isLastPage() {\n return this.pages.length - 1 === this.page;\n }\n isValid(data, dirty) {\n return this.getComponents().reduce((valid, comp) => comp.isValid(data, dirty) && valid, super.isValid(data, dirty));\n }\n validationProcessor({ scope, data, row, instance }, flags) {\n const { dirty } = flags;\n if (!instance) {\n return;\n }\n instance.checkComponentValidity(data, dirty, row, flags, scope.errors);\n if (instance.processOwnValidation) {\n scope.noRecurse = true;\n }\n }\n /**\n * Perform a validation on all child components of this nested component.\n * @param {*} components\n * @param {*} data\n * @param {*} flags\n * @returns\n */\n validateComponents(components, data, flags = {}) {\n components = components || this.component.components;\n data = data || this.rootValue;\n const { async, dirty, process } = flags;\n const processorContext = {\n process: process || 'unknown',\n components,\n instances: this.componentsMap,\n data: data,\n scope: { errors: [] },\n processors: [\n (context) => this.validationProcessor(context, flags),\n ({ instance, component, components }) => {\n // If we just validated the last component, and there are errors from our parent, then we need to show a model of those errors.\n if (instance &&\n instance.parent &&\n (component === components[components.length - 1]) &&\n instance.parent.componentModal) {\n instance.parent.checkModal(instance.parent.childErrors, dirty);\n }\n }\n ]\n };\n return async ? (0, core_1.process)(processorContext).then((scope) => scope.errors) : (0, core_1.processSync)(processorContext).errors;\n }\n /**\n * Validate a nested component with data, or its own internal data.\n * @param {*} data\n * @param {*} flags\n * @returns\n */\n validate(data, flags = {}) {\n data = data || this.rootValue;\n return this.validateComponents(this.getComponents().map((component) => component.component), data, flags);\n }\n checkComponentValidity(data, dirty, row, flags = {}, allErrors = []) {\n this.childErrors = [];\n return super.checkComponentValidity(data, dirty, row, flags, allErrors);\n }\n checkValidity(data, dirty, row, silentCheck, childErrors = []) {\n console.log('Deprecation warning: Component.checkValidity() will be deprecated in 6.x version of renderer. Use \"validate\" method instead.');\n childErrors.push(...this.validate(data, { dirty, silentCheck }));\n return this.checkComponentValidity(data, dirty, row, { dirty, silentCheck }, childErrors) && childErrors.length === 0;\n }\n checkAsyncValidity(data, dirty, row, silentCheck) {\n console.log('Deprecation warning: Component.checkAsyncValidity() will be deprecated in 6.x version of renderer.');\n return this.ready.then(() => {\n return this.validate(data, { dirty, silentCheck, async: true }).then((childErrors) => {\n return this.checkComponentValidity(data, dirty, row, { dirty, silentCheck, async: true }, childErrors).then((valid) => {\n return valid && childErrors.length === 0;\n });\n });\n });\n }\n setPristine(pristine) {\n super.setPristine(pristine);\n this.getComponents().forEach((comp) => comp.setPristine(pristine));\n }\n get isPristine() {\n return this.pristine && this.getComponents().every((c) => c.isPristine);\n }\n get isDirty() {\n return this.dirty && this.getComponents().every((c) => c.isDirty);\n }\n detach() {\n this.components.forEach(component => {\n component.detach();\n });\n super.detach();\n }\n clear() {\n this.components.forEach(component => {\n component.clear();\n });\n super.clear();\n }\n destroy(all = false) {\n this.destroyComponents(all);\n super.destroy(all);\n }\n destroyComponents(all = false) {\n const components = this.getComponents().slice();\n components.forEach((comp) => this.removeComponent(comp, this.components, all));\n this.components = [];\n }\n get visibleErrors() {\n return this.getComponents().reduce((errors, comp) => errors.concat(comp.visibleErrors || []), super.visibleErrors);\n }\n get errors() {\n const thisErrors = super.errors;\n return this.getComponents()\n .reduce((errors, comp) => errors.concat(comp.errors || []), thisErrors)\n .filter(err => err.level !== 'hidden');\n }\n getValue() {\n return this.data;\n }\n resetValue() {\n super.resetValue();\n this.getComponents().forEach((comp) => comp.resetValue());\n this.setPristine(true);\n }\n get dataReady() {\n return Promise.all(this.getComponents().map((component) => component.dataReady));\n }\n setNestedValue(component, value, flags = {}) {\n component._data = this.componentContext(component);\n if (component.type === 'button') {\n return false;\n }\n if (component.type === 'components') {\n if (component.tree && component.hasValue(value)) {\n return component.setValue(lodash_1.default.get(value, component.key), flags);\n }\n return component.setValue(value, flags);\n }\n else if (value && component.hasValue(value)) {\n return component.setValue(lodash_1.default.get(value, component.key), flags);\n }\n else if ((!this.rootPristine || component.visible) && component.shouldAddDefaultValue) {\n flags.noValidate = !flags.dirty;\n flags.resetValue = true;\n return component.setValue(component.defaultValue, flags);\n }\n }\n setValue(value, flags = {}) {\n if (!value) {\n return false;\n }\n return this.getComponents().reduce((changed, component) => {\n return this.setNestedValue(component, value, flags, changed) || changed;\n }, false);\n }\n get lazyLoad() {\n var _a;\n return (_a = this.component.lazyLoad) !== null && _a !== void 0 ? _a : false;\n }\n}\nexports[\"default\"] = NestedComponent;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/components/_classes/nested/NestedComponent.js?");
4721
+ eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst lodash_1 = __importDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nconst Field_1 = __importDefault(__webpack_require__(/*! ../field/Field */ \"./lib/cjs/components/_classes/field/Field.js\"));\nconst Components_1 = __importDefault(__webpack_require__(/*! ../../Components */ \"./lib/cjs/components/Components.js\"));\nconst utils_1 = __webpack_require__(/*! ../../../utils/utils */ \"./lib/cjs/utils/utils.js\");\nconst process_1 = __webpack_require__(/*! @formio/core/process */ \"./node_modules/@formio/core/lib/process/index.js\");\nclass NestedComponent extends Field_1.default {\n static schema(...extend) {\n return Field_1.default.schema({\n tree: false,\n lazyLoad: false,\n }, ...extend);\n }\n constructor(component, options, data) {\n super(component, options, data);\n this.type = 'components';\n this._collapsed = !!this.component.collapsed;\n }\n get defaultSchema() {\n return NestedComponent.schema();\n }\n get schema() {\n const schema = super.schema;\n const components = lodash_1.default.uniqBy(this.getComponents(), 'component.key');\n schema.components = lodash_1.default.map(components, 'schema');\n return schema;\n }\n get collapsed() {\n return this._collapsed;\n }\n collapse(value) {\n const promise = this.redraw();\n if (!value) {\n this.checkValidity(this.data, !this.pristine);\n }\n return promise;\n }\n set collapsed(value) {\n this._collapsed = value;\n this.collapse(value);\n }\n set visible(value) {\n // DO NOT CALL super here. There is an issue where clearOnHide was getting triggered with\n // subcomponents because the \"parentVisible\" flag was set to false when it should really be\n // set to true.\n const visibilityChanged = this._visible !== value;\n this._visible = value;\n const isVisible = this.visible;\n const forceShow = this.shouldForceShow();\n const forceHide = this.shouldForceHide();\n this.components.forEach(component => {\n // Set the parent visibility first since we may have nested components within nested components\n // and they need to be able to determine their visibility based on the parent visibility.\n component.parentVisible = isVisible;\n const conditionallyVisible = component.conditionallyVisible();\n if (forceShow || conditionallyVisible) {\n component.visible = true;\n }\n else if (forceHide || !isVisible || !conditionallyVisible) {\n component.visible = false;\n }\n // If hiding a nested component, clear all errors below.\n if (!component.visible) {\n component.error = '';\n }\n });\n if (visibilityChanged) {\n this.clearOnHide();\n this.redraw();\n }\n }\n get visible() {\n return super.visible;\n }\n set parentVisible(value) {\n super.parentVisible = value;\n this.components.forEach(component => component.parentVisible = this.visible);\n }\n get parentVisible() {\n return super.parentVisible;\n }\n get disabled() {\n return super.disabled;\n }\n set disabled(disabled) {\n super.disabled = disabled;\n this.components.forEach((component) => component.parentDisabled = disabled);\n }\n set parentDisabled(value) {\n super.parentDisabled = value;\n this.components.forEach(component => {\n component.parentDisabled = this.disabled;\n });\n }\n get parentDisabled() {\n return super.parentDisabled;\n }\n get ready() {\n return Promise.all(this.getComponents().map(component => component.ready));\n }\n get currentForm() {\n return super.currentForm;\n }\n set currentForm(instance) {\n super.currentForm = instance;\n this.getComponents().forEach(component => {\n component.currentForm = instance;\n });\n }\n get rowIndex() {\n return this._rowIndex;\n }\n set rowIndex(value) {\n this._rowIndex = value;\n this.eachComponent((component) => {\n component.rowIndex = value;\n });\n }\n componentContext() {\n return this._data;\n }\n get data() {\n return this._data;\n }\n set data(value) {\n this._data = value;\n this.eachComponent((component) => {\n component.data = this.componentContext(component);\n });\n }\n getComponents() {\n return this.components || [];\n }\n /**\n * Perform a deep iteration over every component, including those\n * within other container based components.\n *\n * @param {function} fn - Called for every component.\n */\n everyComponent(fn, options) {\n const components = this.getComponents();\n lodash_1.default.each(components, (component, index) => {\n if (fn(component, components, index) === false) {\n return false;\n }\n if (typeof component.everyComponent === 'function') {\n if (component.everyComponent(fn, options) === false) {\n return false;\n }\n }\n });\n }\n hasComponent(component) {\n let result = false;\n this.everyComponent((comp) => {\n if (comp === component) {\n result = true;\n return false;\n }\n });\n return result;\n }\n flattenComponents() {\n const result = {};\n this.everyComponent((component) => {\n result[component.component.flattenAs || component.key] = component;\n });\n return result;\n }\n /**\n * Perform an iteration over each component within this container component.\n *\n * @param {function} fn - Called for each component\n */\n eachComponent(fn) {\n lodash_1.default.each(this.getComponents(), (component, index) => {\n if (fn(component, index) === false) {\n return false;\n }\n });\n }\n /**\n * Returns a component provided a key. This performs a deep search within the\n * component tree.\n *\n * @param {string} key - The key of the component to retrieve.\n * @param {function} fn - Called with the component once found.\n * @return {Object} - The component that is located.\n */\n getComponent(path, fn, originalPath) {\n originalPath = originalPath || (0, utils_1.getStringFromComponentPath)(path);\n if (this.componentsMap.hasOwnProperty(originalPath)) {\n if (fn) {\n return fn(this.componentsMap[originalPath]);\n }\n else {\n return this.componentsMap[originalPath];\n }\n }\n path = (0, utils_1.getArrayFromComponentPath)(path);\n const pathStr = originalPath;\n const newPath = lodash_1.default.clone(path);\n let key = newPath.shift();\n const remainingPath = newPath;\n let comp = null;\n let possibleComp = null;\n if (lodash_1.default.isNumber(key)) {\n key = remainingPath.shift();\n }\n if (!lodash_1.default.isString(key)) {\n return comp;\n }\n this.everyComponent((component, components) => {\n const matchPath = component.hasInput && component.path ? pathStr.includes(component.path) : true;\n if (component.component.key === key) {\n possibleComp = component;\n if (matchPath) {\n comp = component;\n if (remainingPath.length > 0 && 'getComponent' in component) {\n comp = component.getComponent(remainingPath, fn, originalPath);\n }\n else if (fn) {\n fn(component, components);\n }\n return false;\n }\n }\n });\n if (!comp) {\n comp = possibleComp;\n }\n return comp;\n }\n /**\n * Return a component provided the Id of the component.\n *\n * @param {string} id - The Id of the component.\n * @param {function} fn - Called with the component once it is retrieved.\n * @return {Object} - The component retrieved.\n */\n getComponentById(id, fn) {\n let comp = null;\n this.everyComponent((component, components) => {\n if (component.id === id) {\n comp = component;\n if (fn) {\n fn(component, components);\n }\n return false;\n }\n });\n return comp;\n }\n /**\n * Create a new component and add it to the components array.\n *\n * @param component\n * @param data\n */\n createComponent(component, options, data, before, replacedComp) {\n if (!component) {\n return;\n }\n options = options || this.options;\n data = data || this.data;\n options.parent = this;\n options.parentVisible = this.visible;\n options.root = (options === null || options === void 0 ? void 0 : options.root) || this.root || this;\n options.localRoot = this.localRoot;\n options.skipInit = true;\n if (!(options.display === 'pdf' && this.builderMode)) {\n component.id = (0, utils_1.getRandomComponentId)();\n }\n const comp = Components_1.default.create(component, options, data, true);\n comp.init();\n if (component.internal) {\n return comp;\n }\n if (before) {\n const index = lodash_1.default.findIndex(this.components, { id: before.id });\n if (index !== -1) {\n this.components.splice(index, 0, comp);\n }\n else {\n this.components.push(comp);\n }\n }\n else if (replacedComp) {\n const index = lodash_1.default.findIndex(this.components, { id: replacedComp.id });\n if (index !== -1) {\n this.components[index] = comp;\n }\n else {\n this.components.push(comp);\n }\n }\n else {\n this.components.push(comp);\n }\n return comp;\n }\n getContainer() {\n return this.element;\n }\n get componentComponents() {\n return this.component.components || [];\n }\n get nestedKey() {\n return `nested-${this.key}`;\n }\n get templateName() {\n return 'container';\n }\n init() {\n this.components = this.components || [];\n this.addComponents();\n return super.init();\n }\n /**\n *\n * @param element\n * @param data\n */\n addComponents(data, options) {\n data = data || this.data;\n this.components = this.components || [];\n options = options || this.options;\n if (options.components) {\n this.components = options.components;\n }\n else {\n const components = this.hook('addComponents', this.componentComponents, this) || [];\n components.forEach((component) => this.addComponent(component, data));\n }\n }\n /**\n * Add a new component to the components array.\n *\n * @param {Object} component - The component JSON schema to add.\n * @param {Object} data - The submission data object to house the data for this component.\n * @param {HTMLElement} before - A DOM element to insert this element before.\n * @return {Component} - The created component instance.\n */\n addComponent(component, data, before, noAdd) {\n data = data || this.data;\n this.components = this.components || [];\n component = this.hook('addComponent', component, data, before, noAdd);\n const comp = this.createComponent(component, this.options, data, before ? before : null);\n if (noAdd) {\n return comp;\n }\n return comp;\n }\n beforeFocus() {\n if (this.parent && 'beforeFocus' in this.parent) {\n this.parent.beforeFocus(this);\n }\n }\n render(children) {\n // If already rendering, don't re-render.\n return super.render(children || this.renderTemplate(this.templateName, {\n children: !this.visible ? '' : this.renderComponents(),\n nestedKey: this.nestedKey,\n collapsed: this.options.pdf ? false : this.collapsed,\n }));\n }\n renderComponents(components) {\n components = components || this.getComponents();\n const children = components.map(component => component.render());\n return this.renderTemplate('components', {\n children,\n components,\n });\n }\n attach(element) {\n const superPromise = super.attach(element);\n this.loadRefs(element, {\n header: 'single',\n collapsed: this.collapsed,\n [this.nestedKey]: 'single',\n });\n let childPromise = Promise.resolve();\n if (this.refs[this.nestedKey]) {\n childPromise = this.attachComponents(this.refs[this.nestedKey]);\n }\n if (!this.visible) {\n this.attachComponentsLogic();\n }\n if (this.component.collapsible && this.refs.header) {\n this.addEventListener(this.refs.header, 'click', () => {\n this.collapsed = !this.collapsed;\n });\n this.addEventListener(this.refs.header, 'keydown', (e) => {\n if (e.keyCode === 13 || e.keyCode === 32) {\n e.preventDefault();\n this.collapsed = !this.collapsed;\n }\n });\n }\n return Promise.all([\n superPromise,\n childPromise,\n ]);\n }\n attachComponentsLogic(components) {\n components = components || this.components;\n lodash_1.default.each(components, (comp) => {\n comp.attachLogic();\n if (lodash_1.default.isFunction(comp.attachComponentsLogic)) {\n comp.attachComponentsLogic();\n }\n });\n }\n attachComponents(element, components, container) {\n components = components || this.components;\n container = container || this.component.components;\n element = this.hook('attachComponents', element, components, container, this);\n if (!element) {\n // Return a non-resolving promise.\n return (new Promise(() => { }));\n }\n let index = 0;\n const promises = [];\n Array.prototype.slice.call(element.children).forEach(child => {\n if (!child.getAttribute('data-noattach') && components[index]) {\n promises.push(components[index].attach(child));\n index++;\n }\n });\n return Promise.all(promises);\n }\n /**\n * Remove a component from the components array and from the children object\n *\n * @param {Component} component - The component to remove from the components.\n * @param {Array<Component>} components - An array of components to remove this component from.\n */\n removeComponent(component, components, all = false) {\n components = components || this.components;\n component.destroy(all);\n lodash_1.default.remove(components, { id: component.id });\n if (this.componentsMap[component.path]) {\n delete this.componentsMap[component.path];\n }\n }\n /**\n * Removes a component provided the API key of that component.\n *\n * @param {string} key - The API key of the component to remove.\n * @param {function} fn - Called once the component is removed.\n * @return {null}\n */\n removeComponentByKey(key, fn) {\n const comp = this.getComponent(key, (component, components) => {\n this.removeComponent(component, components);\n if (fn) {\n fn(component, components);\n }\n });\n if (!comp) {\n if (fn) {\n fn(null);\n }\n return null;\n }\n }\n /**\n * Removes a component provided the Id of the component.\n *\n * @param {string} id - The Id of the component to remove.\n * @param {function} fn - Called when the component is removed.\n * @return {null}\n */\n removeComponentById(id, fn) {\n const comp = this.getComponentById(id, (component, components) => {\n this.removeComponent(component, components);\n if (fn) {\n fn(component, components);\n }\n });\n if (!comp) {\n if (fn) {\n fn(null);\n }\n return null;\n }\n }\n updateValue(value, flags = {}) {\n return this.components.reduce((changed, comp) => {\n return comp.updateValue(null, flags) || changed;\n }, super.updateValue(value, flags));\n }\n shouldSkipValidation(data, row, flags) {\n // Nested components with no input should not be validated.\n if (!this.component.input) {\n return true;\n }\n else {\n return super.shouldSkipValidation(data, row, flags);\n }\n }\n checkData(data, flags, row, components) {\n if (this.builderMode) {\n return true;\n }\n data = data || this.rootValue;\n flags = flags || {};\n row = row || this.data;\n components = components && lodash_1.default.isArray(components) ? components : this.getComponents();\n super.checkData(data, flags, row);\n components.forEach((comp) => comp.checkData(data, flags, row));\n }\n checkConditions(data, flags, row) {\n // check conditions of parent component first, because it may influence on visibility of it's children\n const check = super.checkConditions(data, flags, row);\n //row data of parent component not always corresponds to row of nested components, use comp.data as row data for children instead\n this.getComponents().forEach(comp => comp.checkConditions(data, flags, comp.data));\n return check;\n }\n clearOnHide(show) {\n super.clearOnHide(show);\n if (this.component.clearOnHide) {\n if (this.allowData && !this.hasValue()) {\n this.dataValue = this.defaultValue;\n }\n if (this.hasValue()) {\n this.restoreComponentsContext();\n }\n }\n this.getComponents().forEach(component => component.clearOnHide(show));\n }\n restoreComponentsContext() {\n this.getComponents().forEach((component) => component.data = this.dataValue);\n }\n /**\n * Allow components to hook into the next page trigger to perform their own logic.\n *\n * @return {*}\n */\n beforePage(next) {\n return Promise.all(this.getComponents().map((comp) => comp.beforePage(next)));\n }\n /**\n * Allow components to hook into the submission to provide their own async data.\n *\n * @return {*}\n */\n beforeSubmit() {\n return Promise.allSettled(this.getComponents().map((comp) => comp.beforeSubmit()));\n }\n calculateValue(data, flags, row) {\n // Do not iterate into children and calculateValues if this nested component is conditionally hidden.\n if (!this.conditionallyVisible()) {\n return false;\n }\n return this.getComponents().reduce((changed, comp) => comp.calculateValue(data, flags, row) || changed, super.calculateValue(data, flags, row));\n }\n isLastPage() {\n return this.pages.length - 1 === this.page;\n }\n isValid(data, dirty) {\n return this.getComponents().reduce((valid, comp) => comp.isValid(data, dirty) && valid, super.isValid(data, dirty));\n }\n validationProcessor({ scope, data, row, instance }, flags) {\n const { dirty } = flags;\n if (!instance) {\n return;\n }\n instance.checkComponentValidity(data, dirty, row, flags, scope.errors);\n if (instance.processOwnValidation) {\n scope.noRecurse = true;\n }\n }\n /**\n * Perform a validation on all child components of this nested component.\n * @param {*} components\n * @param {*} data\n * @param {*} flags\n * @returns\n */\n validateComponents(components, data, flags = {}) {\n components = components || this.component.components;\n data = data || this.rootValue;\n const { async, dirty, process } = flags;\n const processorContext = {\n process: process || 'unknown',\n components,\n instances: this.componentsMap,\n data: data,\n scope: { errors: [] },\n processors: [\n (context) => this.validationProcessor(context, flags),\n ({ instance, component, components }) => {\n // If we just validated the last component, and there are errors from our parent, then we need to show a model of those errors.\n if (instance &&\n instance.parent &&\n (component === components[components.length - 1]) &&\n instance.parent.componentModal) {\n instance.parent.checkModal(instance.parent.childErrors, dirty);\n }\n }\n ]\n };\n return async ? (0, process_1.process)(processorContext).then((scope) => scope.errors) : (0, process_1.processSync)(processorContext).errors;\n }\n /**\n * Validate a nested component with data, or its own internal data.\n * @param {*} data\n * @param {*} flags\n * @returns\n */\n validate(data, flags = {}) {\n data = data || this.rootValue;\n return this.validateComponents(this.getComponents().map((component) => component.component), data, flags);\n }\n checkComponentValidity(data, dirty, row, flags = {}, allErrors = []) {\n this.childErrors = [];\n return super.checkComponentValidity(data, dirty, row, flags, allErrors);\n }\n checkValidity(data, dirty, row, silentCheck, childErrors = []) {\n console.log('Deprecation warning: Component.checkValidity() will be deprecated in 6.x version of renderer. Use \"validate\" method instead.');\n childErrors.push(...this.validate(data, { dirty, silentCheck }));\n return this.checkComponentValidity(data, dirty, row, { dirty, silentCheck }, childErrors) && childErrors.length === 0;\n }\n checkAsyncValidity(data, dirty, row, silentCheck) {\n console.log('Deprecation warning: Component.checkAsyncValidity() will be deprecated in 6.x version of renderer.');\n return this.ready.then(() => {\n return this.validate(data, { dirty, silentCheck, async: true }).then((childErrors) => {\n return this.checkComponentValidity(data, dirty, row, { dirty, silentCheck, async: true }, childErrors).then((valid) => {\n return valid && childErrors.length === 0;\n });\n });\n });\n }\n setPristine(pristine) {\n super.setPristine(pristine);\n this.getComponents().forEach((comp) => comp.setPristine(pristine));\n }\n get isPristine() {\n return this.pristine && this.getComponents().every((c) => c.isPristine);\n }\n get isDirty() {\n return this.dirty && this.getComponents().every((c) => c.isDirty);\n }\n detach() {\n this.components.forEach(component => {\n component.detach();\n });\n super.detach();\n }\n clear() {\n this.components.forEach(component => {\n component.clear();\n });\n super.clear();\n }\n destroy(all = false) {\n this.destroyComponents(all);\n super.destroy(all);\n }\n destroyComponents(all = false) {\n const components = this.getComponents().slice();\n components.forEach((comp) => this.removeComponent(comp, this.components, all));\n this.components = [];\n }\n get visibleErrors() {\n return this.getComponents().reduce((errors, comp) => errors.concat(comp.visibleErrors || []), super.visibleErrors);\n }\n get errors() {\n const thisErrors = super.errors;\n return this.getComponents()\n .reduce((errors, comp) => errors.concat(comp.errors || []), thisErrors)\n .filter(err => err.level !== 'hidden');\n }\n getValue() {\n return this.data;\n }\n resetValue() {\n super.resetValue();\n this.getComponents().forEach((comp) => comp.resetValue());\n this.setPristine(true);\n }\n get dataReady() {\n return Promise.all(this.getComponents().map((component) => component.dataReady));\n }\n setNestedValue(component, value, flags = {}) {\n component._data = this.componentContext(component);\n if (component.type === 'button') {\n return false;\n }\n if (component.type === 'components') {\n if (component.tree && component.hasValue(value)) {\n return component.setValue(lodash_1.default.get(value, component.key), flags);\n }\n return component.setValue(value, flags);\n }\n else if (value && component.hasValue(value)) {\n return component.setValue(lodash_1.default.get(value, component.key), flags);\n }\n else if ((!this.rootPristine || component.visible) && component.shouldAddDefaultValue) {\n flags.noValidate = !flags.dirty;\n flags.resetValue = true;\n return component.setValue(component.defaultValue, flags);\n }\n }\n setValue(value, flags = {}) {\n if (!value) {\n return false;\n }\n return this.getComponents().reduce((changed, component) => {\n return this.setNestedValue(component, value, flags, changed) || changed;\n }, false);\n }\n get lazyLoad() {\n var _a;\n return (_a = this.component.lazyLoad) !== null && _a !== void 0 ? _a : false;\n }\n}\nexports[\"default\"] = NestedComponent;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/components/_classes/nested/NestedComponent.js?");
6042
4722
 
6043
4723
  /***/ }),
6044
4724
 
@@ -6676,7 +5356,7 @@ eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {
6676
5356
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
6677
5357
 
6678
5358
  "use strict";
6679
- eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst lodash_1 = __importDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nconst core_1 = __webpack_require__(/*! @formio/core */ \"./node_modules/@formio/core/lib/index.js\");\nconst components_1 = __webpack_require__(/*! @formio/bootstrap/components */ \"./node_modules/@formio/bootstrap/lib/cjs/templates/components/index.js\");\nconst NestedArrayComponent_1 = __importDefault(__webpack_require__(/*! ../_classes/nestedarray/NestedArrayComponent */ \"./lib/cjs/components/_classes/nestedarray/NestedArrayComponent.js\"));\nconst Component_1 = __importDefault(__webpack_require__(/*! ../_classes/component/Component */ \"./lib/cjs/components/_classes/component/Component.js\"));\nconst Alert_1 = __importDefault(__webpack_require__(/*! ../alert/Alert */ \"./lib/cjs/components/alert/Alert.js\"));\nconst utils_1 = __webpack_require__(/*! ../../utils/utils */ \"./lib/cjs/utils/utils.js\");\nconst EditRowState = {\n New: 'new',\n Editing: 'editing',\n Saved: 'saved',\n Viewing: 'viewing',\n Removed: 'removed',\n Draft: 'draft',\n};\nclass EditGridComponent extends NestedArrayComponent_1.default {\n static schema(...extend) {\n return NestedArrayComponent_1.default.schema({\n type: 'editgrid',\n label: 'Edit Grid',\n key: 'editGrid',\n clearOnHide: true,\n input: true,\n tree: true,\n removeRow: 'Cancel',\n defaultOpen: false,\n openWhenEmpty: false,\n modal: false,\n components: [],\n inlineEdit: false,\n templates: {\n header: EditGridComponent.defaultHeaderTemplate,\n row: EditGridComponent.defaultRowTemplate,\n tableHeader: EditGridComponent.defaultTableHeaderTemplate,\n tableRow: EditGridComponent.defaultTableRowTemplate,\n footer: '',\n },\n }, ...extend);\n }\n static get builderInfo() {\n return {\n title: 'Edit Grid',\n icon: 'tasks',\n group: 'data',\n documentation: '/userguide/form-building/data-components#edit-grid',\n showPreview: false,\n weight: 30,\n schema: EditGridComponent.schema(),\n };\n }\n static get defaultHeaderTemplate() {\n return `<div class=\"row\">\n {% util.eachComponent(components, function(component) { %}\n {% if (displayValue(component)) { %}\n <div class=\"col-sm-2\">{{ t(component.label) }}</div>\n {% } %}\n {% }) %}\n </div>`;\n }\n static get defaultTableHeaderTemplate() {\n return `\n <tr>\n {% util.eachComponent(components, function(component) { %}\n {% if (!component.hasOwnProperty('tableView') || component.tableView) { %}\n <td class=\"editgrid-table-column\">{{ component.label }}</td>\n {% } %}\n {% }) %}\n {% if (!instance.options.readOnly && !instance.disabled) { %}\n <td class=\"editgrid-table-column\">Actions</td>\n {% } %}\n </tr>\n `;\n }\n static get defaultRowTemplate() {\n return `<div class=\"row\">\n {% util.eachComponent(components, function(component) { %}\n {% if (displayValue(component)) { %}\n <div class=\"col-sm-2\">\n {{ isVisibleInRow(component) ? getView(component, row[component.key]) : ''}}\n </div>\n {% } %}\n {% }) %}\n {% if (!instance.options.readOnly && !instance.disabled) { %}\n <div class=\"col-sm-2\">\n <div class=\"btn-group pull-right\">\n <button class=\"btn btn-default btn-light btn-sm editRow\"><i class=\"{{ iconClass('pen-fill') }}\"></i></button>\n {% if (!instance.hasRemoveButtons || instance.hasRemoveButtons()) { %}\n <button class=\"btn btn-danger btn-sm removeRow\"><i class=\"{{ iconClass('trash') }}\"></i></button>\n {% } %}\n </div>\n </div>\n {% } %}\n </div>`;\n }\n static get defaultTableRowTemplate() {\n return `\n {% util.eachComponent(components, function(component) { %}\n {% if (!component.hasOwnProperty('tableView') || component.tableView) { %}\n <td class=\"editgrid-table-column\">\n {{ getView(component, row[component.key]) }}\n </td>\n {% } %}\n {% }) %}\n {% if (!instance.options.readOnly && !instance.disabled) { %}\n <td class=\"editgrid-table-column\">\n <div class=\"btn-group\">\n <button class=\"btn btn-default btn-light btn-sm editRow\" aria-label=\"{{ t('Edit row') }}\"><i class=\"{{ iconClass('pen-fill') }}\"></i></button>\n {% if (!instance.hasRemoveButtons || instance.hasRemoveButtons()) { %}\n <button class=\"btn btn-danger btn-sm removeRow\" aria-label=\"{{ t('Remove row') }}\"><i class=\"{{ iconClass('trash') }}\"></i></button>\n {% } %}\n </div>\n </td>\n {% } %}\n `;\n }\n get defaultDialogTemplate() {\n return `\n <h3 ref=\"dialogHeader\">${this.t('Do you want to clear data?')}</h3>\n <div style=\"display:flex; justify-content: flex-end;\">\n <button ref=\"dialogCancelButton\" class=\"btn btn-secondary\" aria-label=\"${this.t('Cancel')}\">${this.t('Cancel')}</button>\n <button ref=\"dialogYesButton\" class=\"btn btn-danger\" aria-label=\"${this.t('Yes, delete it')}\">${this.t('Yes, delete it')}</button>\n </div>\n `;\n }\n get defaultRowTemplate() {\n return this.displayAsTable\n ? EditGridComponent.defaultTableRowTemplate\n : EditGridComponent.defaultRowTemplate;\n }\n get defaultHeaderTemplate() {\n return this.displayAsTable\n ? EditGridComponent.defaultTableHeaderTemplate\n : EditGridComponent.defaultHeaderTemplate;\n }\n get rowTemplate() {\n let rowTemplate;\n if (utils_1.Evaluator.noeval) {\n rowTemplate = this.displayAsTable ?\n components_1.editgrid.tableRow\n : components_1.editgrid.row;\n }\n else {\n rowTemplate = this.displayAsTable ?\n lodash_1.default.get(this.component, 'templates.tableRow', this.defaultRowTemplate)\n : lodash_1.default.get(this.component, 'templates.row', this.defaultRowTemplate);\n }\n return rowTemplate;\n }\n get headerTemplate() {\n let headerTemplate;\n if (utils_1.Evaluator.noeval) {\n headerTemplate = this.displayAsTable ?\n components_1.editgrid.tableHeader\n : components_1.editgrid.header;\n }\n else {\n headerTemplate = this.displayAsTable ?\n lodash_1.default.get(this.component, 'templates.tableHeader', this.defaultHeaderTemplate)\n : lodash_1.default.get(this.component, 'templates.header', this.defaultHeaderTemplate);\n }\n return headerTemplate;\n }\n /**\n * Returns true if the component has nested components which don't trigger changes on the root level\n */ //\n get hasScopedChildren() {\n return !this.inlineEditMode;\n }\n get defaultSchema() {\n return EditGridComponent.schema();\n }\n get emptyValue() {\n return [];\n }\n get editgridKey() {\n return `editgrid-${this.key}`;\n }\n get rowRef() {\n return `${this.editgridKey}-row`;\n }\n get rowElements() {\n return this.refs[this.rowRef];\n }\n get rowRefs() {\n return this.refs[`editgrid-${this.component.key}-row`];\n }\n get addRowRef() {\n return `${this.editgridKey}-addRow`;\n }\n get addRowElements() {\n return this.refs[this.addRowRef];\n }\n get saveRowRef() {\n return `${this.editgridKey}-saveRow`;\n }\n get saveRowElements() {\n return this.refs[this.saveRowRef];\n }\n get cancelRowRef() {\n return `${this.editgridKey}-cancelRow`;\n }\n get cancelRowElements() {\n return this.refs[this.cancelRowRef];\n }\n get inlineEditMode() {\n return this.component.inlineEdit;\n }\n get saveEditMode() {\n return !this.inlineEditMode;\n }\n get minLength() {\n return this.builderMode ? 0 : lodash_1.default.get(this.component, 'validate.minLength', 0);\n }\n get data() {\n return this._data;\n }\n get dataValue() {\n return super.dataValue || [];\n }\n set dataValue(value) {\n super.dataValue = value;\n }\n get displayAsTable() {\n return this.component.displayAsTable;\n }\n set data(value) {\n this._data = value;\n const data = this.dataValue;\n (this.editRows || []).forEach((row, index) => {\n if (!data[index] && row.state !== EditRowState.New) {\n data[index] = {};\n }\n const rowData = data[index] || {};\n row.data = rowData;\n row.components.forEach((component) => {\n component.data = rowData;\n });\n });\n }\n get iteratableRows() {\n return this.editRows;\n }\n get defaultValue() {\n const value = super.defaultValue;\n const defaultValue = Array.isArray(value) ? value : [];\n lodash_1.default.times(this.minLength - defaultValue.length, () => defaultValue.push({}));\n return defaultValue;\n }\n constructor(...args) {\n super(...args);\n this.type = 'editgrid';\n }\n hasRemoveButtons() {\n return !this.component.disableAddingRemovingRows &&\n !this.options.readOnly &&\n !this.disabled &&\n this.fullMode &&\n (this.dataValue.length > lodash_1.default.get(this.component, 'validate.minLength', 0));\n }\n init() {\n if (this.builderMode) {\n this.editRows = [];\n return super.init();\n }\n this.components = this.components || [];\n const dataValue = this.dataValue;\n const openWhenEmpty = !dataValue.length && this.component.openWhenEmpty;\n if (openWhenEmpty) {\n const dataObj = {};\n this.editRows = [];\n this.createRow(dataObj, 0);\n }\n else {\n this.editRows = dataValue.map((row, rowIndex) => ({\n components: this.lazyLoad ? [] : this.createRowComponents(row, rowIndex),\n data: row,\n state: EditRowState.Saved,\n backup: null,\n error: null,\n rowIndex,\n }));\n }\n this.prevHasAddButton = this.hasAddButton();\n this.checkData();\n this.setVariableTypeComponents();\n if (this.variableTypeComponentsIndexes.length) {\n lodash_1.default.each(this.editRows || [], (editRow, rowIndex) => this.checkRowVariableTypeComponents(editRow, rowIndex));\n }\n }\n checkRowVariableTypeComponents(editRow, rowIndex) {\n const rowComponents = editRow.components;\n if (lodash_1.default.some(this.variableTypeComponentsIndexes, (compIndex) => {\n const variableTypeComp = rowComponents[compIndex];\n return variableTypeComp.type !== variableTypeComp.component.type;\n })) {\n editRow.components = this.createRowComponents(editRow.data, rowIndex, true);\n }\n }\n setVariableTypeComponents() {\n //set components which type is changing within a row (e.g.,by mergeComponentSchema action)\n this.variableTypeComponentsIndexes = [];\n lodash_1.default.each(this.component.components, (comp, index) => {\n if (comp.typeChangeEnabled) {\n this.variableTypeComponentsIndexes.push(index);\n }\n });\n }\n isOpen(editRow) {\n return [EditRowState.New, EditRowState.Editing, EditRowState.Viewing].includes(editRow.state);\n }\n isComponentVisibleInSomeRow(component) {\n const rows = this.editRows;\n const savedStates = [EditRowState.Saved, EditRowState.Editing, EditRowState.Draft];\n const savedRows = rows.filter(row => lodash_1.default.includes(savedStates, row.state));\n this.visibleInHeader = this.visibleInHeader || [];\n const changeVisibleInHeader = (component, isVisible) => {\n if (!isVisible) {\n lodash_1.default.remove(this.visibleInHeader, (key) => key === component.key);\n }\n if (isVisible && !lodash_1.default.includes(this.visibleInHeader, component.key)) {\n this.visibleInHeader.push(component.key);\n }\n };\n if (lodash_1.default.isEmpty(rows)) {\n const rowComponents = this.createRowComponents({}, 0);\n let checkComponent;\n (0, utils_1.eachComponent)(rowComponents, (comp) => {\n if (comp.component.key === component.key) {\n checkComponent = comp;\n }\n comp.checkConditions();\n });\n const isVisible = checkComponent ? checkComponent.visible : true;\n [...this.components].forEach((comp) => this.removeComponent(comp, this.components));\n changeVisibleInHeader(component, isVisible);\n return isVisible;\n }\n const isOpenRowWhenEmpty = lodash_1.default.get(this.component, 'openWhenEmpty') && rows.length === 1 && rows[0].state === EditRowState.New;\n if (!lodash_1.default.isEmpty(rows) && lodash_1.default.isEmpty(savedRows) && !isOpenRowWhenEmpty) {\n return lodash_1.default.includes(this.visibleInHeader, component.key);\n }\n return lodash_1.default.some(isOpenRowWhenEmpty ? rows : savedRows, (row, index) => {\n const editingRow = row.state === EditRowState.Editing;\n let isVisible;\n if (!editingRow) {\n const flattenedComponents = this.flattenComponents(index);\n const instance = flattenedComponents[component.key];\n isVisible = instance ? instance.visible : true;\n changeVisibleInHeader(component, isVisible);\n }\n else {\n isVisible = lodash_1.default.includes(this.visibleInHeader, component.key);\n }\n return isVisible;\n });\n }\n render(children) {\n if (this.builderMode) {\n return super.render();\n }\n const dataValue = this.dataValue;\n const headerTemplate = this.headerTemplate;\n const t = this.t.bind(this);\n const templateName = this.displayAsTable ? 'editgridTable' : 'editgrid';\n return super.render(children || this.renderTemplate(templateName, {\n ref: {\n row: this.rowRef,\n addRow: this.addRowRef,\n saveRow: this.saveRowRef,\n cancelRow: this.cancelRowRef,\n },\n header: this.renderString(headerTemplate, {\n displayValue: (component) => this.displayComponentValue(component, true),\n components: this.component.components,\n value: dataValue,\n t\n }),\n footer: this.renderString(lodash_1.default.get(this.component, 'templates.footer'), {\n components: this.component.components,\n value: dataValue,\n t\n }),\n rows: this.editRows.map(this.renderRow.bind(this)),\n openRows: this.editRows.map((row) => this.isOpen(row)),\n errors: this.editRows.map((row) => row.error),\n hasAddButton: this.hasAddButton(),\n hasRemoveButtons: this.hasRemoveButtons(),\n }));\n }\n renderComponents(components) {\n components = components || this.getComponents();\n const children = components.map(component => component.render());\n const templateName = this.displayAsTable && this.prevHasAddButton ? 'tableComponents' : 'components';\n return this.renderTemplate(templateName, {\n children,\n components,\n });\n }\n attach(element) {\n if (this.builderMode) {\n return super.attach(element);\n }\n this.loadRefs(element, {\n [this.addRowRef]: 'multiple',\n [this.saveRowRef]: 'multiple',\n [this.cancelRowRef]: 'multiple',\n [this.rowRef]: 'multiple',\n });\n this.addRowElements.forEach((addButton) => {\n this.addEventListener(addButton, 'click', () => this.addRow());\n });\n let openRowCount = 0;\n this.rowElements.forEach((row, rowIndex) => {\n const editRow = this.editRows[rowIndex];\n if (editRow === null || editRow === void 0 ? void 0 : editRow.isRowSelected) {\n row.classList.add('selected');\n }\n if (this.isOpen(editRow)) {\n this.attachComponents(row, editRow.components);\n this.addEventListener(this.saveRowElements[openRowCount], 'click', () => this.saveRow(rowIndex, true));\n this.addEventListener(this.cancelRowElements[openRowCount], 'click', () => this.cancelRow(rowIndex));\n openRowCount++;\n }\n else {\n // Attach edit and remove button events.\n [\n {\n className: 'removeRow',\n event: 'click',\n action: () => this.removeRow(rowIndex, true),\n },\n {\n className: 'editRow',\n event: 'click',\n action: () => {\n this.editRow(rowIndex).then(() => {\n var _a;\n if (this.component.rowDrafts) {\n const errors = this.validateRow(editRow, false);\n const shouldShowRowErrorsAlert = this.component.modal && errors.length && ((_a = this.root) === null || _a === void 0 ? void 0 : _a.submitted);\n if (shouldShowRowErrorsAlert) {\n this.alert.showErrors(errors, false);\n editRow.alerts = true;\n }\n }\n });\n },\n },\n {\n className: 'row',\n event: 'click',\n action: () => {\n row.classList.toggle('selected');\n let eventName = 'editGridSelectRow';\n if (Array.from(row.classList).includes('selected')) {\n editRow.isRowSelected = true;\n }\n else {\n delete editRow.isRowSelected;\n eventName = 'editGridUnSelectRow';\n }\n this.emit(eventName, {\n component: this.component,\n data: this.dataValue[rowIndex]\n });\n },\n }\n ].forEach(({ className, event, action, }) => {\n const elements = row.getElementsByClassName(className);\n Array.prototype.forEach.call(elements, (element) => {\n if (this.options.readOnly && lodash_1.default.intersection(element.classList, ['editRow', 'removeRow']).length) {\n element.style.display = 'none';\n }\n else {\n this.addEventListener(element, event, action);\n }\n });\n });\n }\n });\n // Add open class to the element if any edit grid row is open\n if (openRowCount) {\n this.addClass(this.refs.component, `formio-component-${this.component.type}-row-open`);\n }\n else {\n this.removeClass(this.refs.component, `formio-component-${this.component.type}-row-open`);\n }\n const superAttach = super.attach(element);\n this.loadRefs(element, {\n messageContainer: 'single-scope',\n });\n return superAttach;\n }\n flattenRowDataValue(dataValue) {\n const flattened = {};\n Object.keys(dataValue).forEach((key) => {\n if (lodash_1.default.isObject(dataValue[key]) && !lodash_1.default.isNil(dataValue[key])) {\n Object.assign(flattened, this.flattenRowDataValue(dataValue[key]));\n }\n else {\n flattened[key] = dataValue[key];\n }\n });\n return flattened;\n }\n isComponentVisibleInRow(component, flattenedComponents) {\n const instance = flattenedComponents[component.key];\n return instance ? instance.visible : true;\n }\n displayComponentValue(component, header) {\n return !!((!component.hasOwnProperty('tableView') || component.tableView)\n && header ? this.isComponentVisibleInSomeRow(component) : lodash_1.default.includes(this.visibleInHeader, component.key));\n }\n renderRow(row, rowIndex) {\n const dataValue = this.dataValue;\n if (this.isOpen(row)) {\n return this.renderComponents(row.components);\n }\n else {\n const flattenedComponents = this.flattenComponents(rowIndex);\n const rowTemplate = this.rowTemplate;\n return this.renderString(rowTemplate, {\n row: dataValue[rowIndex] || {},\n data: this.data,\n rowIndex,\n components: this.component.components,\n flattenedComponents,\n displayValue: (component) => this.displayComponentValue(component),\n isVisibleInRow: (component) => this.isComponentVisibleInRow(component, flattenedComponents),\n getView: (component, data) => {\n var _a, _b;\n const instance = flattenedComponents[component.key];\n const view = instance ? instance.getView(data || instance.dataValue) : '';\n // If there is an html tag in view, don't allow it to be injected in template\n const htmlTagRegExp = new RegExp('<(.*?)>');\n return typeof view === 'string' && view.length && !((_a = instance.component) === null || _a === void 0 ? void 0 : _a.template) && htmlTagRegExp.test(view) && ((_b = instance.component) === null || _b === void 0 ? void 0 : _b.inputFormat) !== 'html'\n ? `<input type=\"text\" value=\"${view.replace(/\"/g, '&quot;')}\" readonly/>`\n : view;\n },\n state: this.editRows[rowIndex].state,\n t: this.t.bind(this)\n });\n }\n }\n eachComponent(fn, rowIndex) {\n lodash_1.default.each(this.getComponents(rowIndex), (component, index) => {\n if (fn(component, index) === false) {\n return false;\n }\n });\n }\n restoreComponentsContext() {\n this.getComponents().forEach((component) => {\n var _a;\n const rowData = this.dataValue[component.rowIndex];\n const editRowData = (_a = this.editRows[component.rowIndex]) === null || _a === void 0 ? void 0 : _a.data;\n component.data = rowData || editRowData;\n });\n }\n flattenComponents(rowIndex) {\n const result = {};\n this.everyComponent((component) => {\n result[component.component.flattenAs || component.key] = component;\n }, rowIndex);\n return result;\n }\n getComponents(rowIndex) {\n var _a;\n // Ensure editrows is set.\n this.editRows = this.editRows || [];\n return this.builderMode\n ? super.getComponents()\n : lodash_1.default.isNumber(rowIndex)\n ? (((_a = this.editRows[rowIndex]) === null || _a === void 0 ? void 0 : _a.components) || [])\n : this.editRows.reduce((result, row) => result.concat(row.components || []), []);\n }\n destroyComponents(all = false, rowIndex = 0) {\n if (this.builderMode) {\n return super.destroyComponents(all);\n }\n const components = this.getComponents(rowIndex).slice();\n components.forEach((comp) => this.removeComponent(comp, this.components, all));\n }\n createRow(dataObj, rowIndex) {\n const editRow = {\n components: this.createRowComponents(dataObj, rowIndex),\n data: dataObj,\n state: EditRowState.New,\n backup: null,\n error: null,\n rowIndex,\n };\n this.editRows.push(editRow);\n if (this.inlineEditMode) {\n this.dataValue.push(dataObj);\n }\n return editRow;\n }\n addRow() {\n if (this.options.readOnly) {\n return;\n }\n const dataObj = {};\n const rowIndex = this.editRows.length;\n const editRow = this.createRow(dataObj, rowIndex);\n if (this.inlineEditMode) {\n this.triggerChange();\n }\n this.emit('editGridAddRow', {\n component: this.component,\n row: editRow,\n });\n this.processRow('checkData', null, {}, editRow.data, editRow.components);\n if (this.component.modal) {\n this.addRowModal(rowIndex);\n }\n else {\n this.redraw();\n }\n return editRow;\n }\n addRowModal(rowIndex) {\n const modalContent = this.ce('div');\n const editRow = this.editRows[rowIndex];\n editRow.willBeSaved = false;\n const { components } = editRow;\n modalContent.innerHTML = this.renderComponents(components);\n const dialog = this.component.modal ? this.createModal(modalContent, {}, () => this.showDialog(rowIndex)) : undefined;\n dialog.classList.add(`editgrid-row-modal-${this.id}`);\n editRow.dialog = dialog;\n if (this.alert) {\n this.alert.clear();\n this.alert = null;\n }\n this.alert = new Alert_1.default(dialog.refs.dialogContents, this);\n this.addEventListener(dialog, 'close', () => {\n if (!editRow.willBeSaved) {\n if (this.editRows[rowIndex] && this.editRows[rowIndex].state !== EditRowState.New) {\n this.editRows[rowIndex].components.forEach((comp) => {\n comp.setPristine(true);\n });\n }\n this.cancelRow(rowIndex);\n }\n if (this.alert) {\n this.alert.clear();\n this.alert = null;\n }\n // Remove references to dialog elements to prevent possible in some cases memory leaks\n delete editRow.confirmationDialog;\n delete editRow.dialog;\n });\n dialog.refs.dialogContents.appendChild(this.ce('button', {\n class: 'btn btn-primary',\n onClick: () => {\n // After an attempt to save, all the components inside the row should become not pristine\n if (!this.component.rowDrafts) {\n editRow.components.forEach((comp) => comp.setPristine(false));\n }\n const errors = this.validateRow(editRow, true);\n if (!errors.length || this.component.rowDrafts) {\n editRow.willBeSaved = true;\n dialog.close();\n this.saveRow(rowIndex, true);\n }\n else {\n this.alert.showErrors(errors, false);\n editRow.alerts = true;\n }\n },\n }, this.component.saveRow || 'Save'));\n return this.attachComponents(modalContent, components);\n }\n showDialog(rowIndex) {\n const editRow = this.editRows[rowIndex];\n if (lodash_1.default.isEqual(editRow.backup, editRow.data)) {\n return Promise.resolve();\n }\n const wrapper = this.ce('div', { ref: 'confirmationDialog' });\n const dialogContent = this.component.dialogTemplate || this.defaultDialogTemplate;\n wrapper.innerHTML = dialogContent;\n wrapper.refs = {};\n this.loadRefs.call(wrapper, wrapper, {\n dialogHeader: 'single',\n dialogCancelButton: 'single',\n dialogYesButton: 'single',\n });\n const dialog = this.createModal(wrapper);\n dialog.classList.add(`editgrid-row-modal-confirmation-${this.id}`);\n const close = (event) => {\n event.preventDefault();\n dialog.close();\n };\n let dialogResult;\n const promise = new Promise((resolve, reject) => {\n dialogResult = { resolve, reject };\n });\n this.addEventListener(wrapper.refs.dialogYesButton, 'click', (event) => {\n close(event);\n dialogResult.resolve();\n });\n this.addEventListener(wrapper.refs.dialogCancelButton, 'click', (event) => {\n close(event);\n dialogResult.reject();\n });\n editRow.confirmationDialog = dialog;\n return promise;\n }\n editRow(rowIndex) {\n const editRow = this.editRows[rowIndex];\n const isAlreadyEditing = editRow.state === EditRowState.Editing || editRow.state === EditRowState.New;\n if (!editRow || isAlreadyEditing) {\n return Promise.resolve();\n }\n editRow.prevState = editRow.state;\n editRow.state = this.options.readOnly ? EditRowState.Viewing : EditRowState.Editing;\n if (this.lazyLoad && (editRow.components.length === 0)) {\n editRow.components = this.createRowComponents(editRow.data, rowIndex);\n }\n const dataSnapshot = (0, utils_1.fastCloneDeep)(editRow.data);\n if (this.inlineEditMode) {\n editRow.backup = dataSnapshot;\n }\n else {\n editRow.backup = (0, utils_1.fastCloneDeep)(editRow.data);\n editRow.data = dataSnapshot;\n this.restoreRowContext(editRow);\n }\n if (this.component.modal) {\n return this.addRowModal(rowIndex);\n }\n return this.redraw();\n }\n clearErrors(rowIndex) {\n const editRow = this.editRows[rowIndex];\n if (editRow && Array.isArray(editRow.components)) {\n editRow.components.forEach((comp) => {\n comp.setPristine(true);\n comp.setCustomValidity('');\n });\n }\n }\n cancelRow(rowIndex) {\n if (this.options.readOnly) {\n return;\n }\n const editRow = this.editRows[rowIndex];\n switch (editRow.state) {\n case EditRowState.New: {\n editRow.state = EditRowState.Removed;\n this.clearErrors(rowIndex);\n this.destroyComponents(false, rowIndex);\n if (this.inlineEditMode) {\n this.splice(rowIndex);\n }\n this.editRows.splice(rowIndex, 1);\n this.openWhenEmpty();\n break;\n }\n case EditRowState.Editing: {\n editRow.state = editRow.prevState;\n if (this.inlineEditMode) {\n this.dataValue[rowIndex] = editRow.backup;\n }\n editRow.data = editRow.backup;\n editRow.backup = null;\n this.restoreRowContext(editRow);\n this.clearErrors(rowIndex);\n break;\n }\n }\n this.emit('editGridCancelRow', {\n instance: this,\n component: this.component,\n editRow,\n });\n this.checkValidity(null, true);\n this.redraw();\n if (this.component.rowDrafts) {\n this.checkValidity(this.data, false);\n }\n }\n saveRow(rowIndex, modified) {\n var _a, _b;\n const editRow = this.editRows[rowIndex];\n if (this.options.readOnly) {\n return;\n }\n // After an attempt to save, all the components inside the row should become not pristine\n if (!this.component.rowDrafts) {\n editRow.components.forEach((comp) => comp.setPristine(false));\n }\n const errors = this.validateRow(editRow, true);\n if (!this.component.rowDrafts) {\n if (errors.length) {\n return false;\n }\n }\n if (this.saveEditMode) {\n const dataValue = this.dataValue;\n if ((_b = (_a = this.root) === null || _a === void 0 ? void 0 : _a.focusedComponent) === null || _b === void 0 ? void 0 : _b.component.typeChangeEnabled) {\n this.root.focusedComponent = null;\n }\n switch (editRow.state) {\n case EditRowState.New: {\n const newIndex = dataValue.length;\n dataValue.push(editRow.data);\n editRow.components.forEach(component => component.rowIndex = newIndex);\n if (rowIndex !== newIndex) {\n this.editRows.splice(rowIndex, 1);\n this.editRows.splice(newIndex, 0, editRow);\n }\n break;\n }\n case EditRowState.Editing: {\n dataValue[rowIndex] = editRow.data;\n break;\n }\n }\n }\n editRow.state = this.component.rowDrafts && errors.length ? EditRowState.Draft : EditRowState.Saved;\n editRow.backup = null;\n this.updateValue();\n this.emit('editGridSaveRow', {\n component: this.component,\n row: editRow.data,\n instance: this\n });\n this.triggerChange({ modified, noPristineChangeOnModified: modified && this.component.rowDrafts, isolateRow: true });\n if (this.component.rowDrafts) {\n editRow.components.forEach(comp => comp.setPristine(this.pristine));\n }\n this.checkValidity(null, true);\n this.redraw();\n if (editRow.alerts) {\n editRow.alerts = false;\n }\n return true;\n }\n beforeFocus(component) {\n if ('beforeFocus' in this.parent) {\n this.parent.beforeFocus(this);\n }\n const relativePath = this.getRelativePath(component.path);\n const arrayPath = (0, utils_1.getArrayFromComponentPath)(relativePath);\n const rowIndex = arrayPath[0];\n let rowToEditIndex = arrayPath[0];\n this.editRows.forEach((row, indexInArray) => {\n if (row.rowIndex === rowIndex) {\n rowToEditIndex = indexInArray;\n }\n });\n if (lodash_1.default.isNumber(rowToEditIndex)) {\n this.editRow(rowToEditIndex);\n }\n }\n updateComponentsRowIndex(components, rowIndex) {\n components.forEach((component, colIndex) => {\n component.rowIndex = rowIndex;\n component.row = `${rowIndex}-${colIndex}`;\n });\n }\n updateRowsComponents(rowIndex) {\n this.editRows.slice(rowIndex).forEach((row, index) => {\n this.updateComponentsRowIndex(row.components, rowIndex + index);\n });\n }\n baseRemoveRow(rowIndex) {\n const editRow = this.editRows[rowIndex];\n editRow.state = EditRowState.Removed;\n this.destroyComponents(false, rowIndex);\n return editRow;\n }\n removeRow(rowIndex, modified) {\n if (this.options.readOnly) {\n return;\n }\n this.clearErrors(rowIndex);\n this.baseRemoveRow(rowIndex);\n this.splice(rowIndex);\n this.emit('editGridDeleteRow', {\n index: rowIndex\n });\n this.editRows.splice(rowIndex, 1);\n this.openWhenEmpty();\n this.updateRowsComponents(rowIndex);\n this.updateValue();\n this.triggerChange({ modified, noPristineChangeOnModified: modified && this.component.rowDrafts, isolateRow: true });\n this.checkValidity(null, true);\n this.checkData();\n this.redraw();\n }\n createRowComponents(row, rowIndex, recreatePartially) {\n // Iterate through existing components and destroy the ones with the same rowIndex.\n if (this.components) {\n for (let i = 0; i < this.components.length; i++) {\n if (this.components[i].rowIndex === rowIndex) {\n this.components[i].destroy();\n this.components.splice(i, 1);\n }\n }\n }\n const currentRowComponents = lodash_1.default.get(this.editRows, `[${rowIndex}].components`, null);\n return this.component.components.map((col, colIndex) => {\n var _a;\n if (recreatePartially && currentRowComponents && this.variableTypeComponentsIndexes.length) {\n const currentComp = currentRowComponents[colIndex];\n const shouldRecreate = lodash_1.default.includes(this.variableTypeComponentsIndexes, colIndex) && (currentComp === null || currentComp === void 0 ? void 0 : currentComp.type) !== ((_a = currentComp === null || currentComp === void 0 ? void 0 : currentComp.component) === null || _a === void 0 ? void 0 : _a.type);\n if (!shouldRecreate) {\n return currentComp;\n }\n col = currentComp.component;\n }\n const column = lodash_1.default.clone(col);\n const options = lodash_1.default.clone(this.options);\n options.name += `[${rowIndex}]`;\n options.row = `${rowIndex}-${colIndex}`;\n options.onChange = (flags = {}, changed, modified) => {\n var _a, _b;\n if (((_a = changed.instance.root) === null || _a === void 0 ? void 0 : _a.id) && (((_b = this.root) === null || _b === void 0 ? void 0 : _b.id) !== changed.instance.root.id)) {\n changed.instance.root.triggerChange(flags, changed, modified);\n }\n else if (!this.component.modal) {\n this.triggerRootChange(flags, changed, modified);\n }\n if (this.inlineEditMode) {\n return;\n }\n const editRow = this.editRows[rowIndex];\n if (editRow) {\n this.processRow('checkData', null, Object.assign(Object.assign({}, flags), { changed }), editRow.data, editRow.components);\n this.validateRow(editRow, false);\n }\n if (this.variableTypeComponentsIndexes.length) {\n this.checkRowVariableTypeComponents(editRow, rowIndex);\n this.redraw();\n }\n };\n const comp = this.createComponent(lodash_1.default.assign({}, column, { row: options.row }), options, row, null, recreatePartially && currentRowComponents ? currentRowComponents[colIndex] : null);\n comp.rowIndex = rowIndex;\n comp.inEditGrid = true;\n return comp;\n });\n }\n hasOpenRows() {\n return this.editRows.some(row => this.isOpen(row));\n }\n getAttachedData(data = null) {\n const ourData = (0, utils_1.fastCloneDeep)(data || this._data || this.rootValue);\n lodash_1.default.set(ourData, this.key, this.editRows.map((row) => row.data));\n return ourData;\n }\n shouldValidateDraft(editRow) {\n var _a, _b;\n // Draft rows should be validated only when there was an attempt to submit a form\n return (editRow.state === EditRowState.Draft &&\n !this.pristine &&\n !((_a = this.root) === null || _a === void 0 ? void 0 : _a.pristine) &&\n !this.hasOpenRows()) ||\n ((_b = this.root) === null || _b === void 0 ? void 0 : _b.submitted);\n }\n shouldValidateRow(editRow, dirty) {\n return this.shouldValidateDraft(editRow) ||\n editRow.state === EditRowState.New ||\n editRow.state === EditRowState.Editing ||\n editRow.alerts ||\n dirty;\n }\n validateRow(editRow, dirty, forceSilentCheck) {\n var _a;\n editRow.errors = [];\n if (this.shouldValidateRow(editRow, dirty)) {\n const silentCheck = (this.component.rowDrafts && !this.shouldValidateDraft(editRow)) || forceSilentCheck;\n const rootValue = (0, utils_1.fastCloneDeep)(this.rootValue);\n const editGridValue = lodash_1.default.get(rootValue, this.path, []);\n editGridValue[editRow.rowIndex] = editRow.data;\n lodash_1.default.set(rootValue, this.path, editGridValue);\n editRow.errors = (0, core_1.processSync)({\n components: (0, utils_1.fastCloneDeep)(this.component.components).map((component) => {\n component.parentPath = `${this.path}[${editRow.rowIndex}]`;\n return component;\n }),\n data: rootValue,\n row: editRow.data,\n process: 'validateRow',\n instances: this.componentsMap,\n scope: { errors: [] },\n processors: [\n (context) => this.validationProcessor(context, { dirty, silentCheck })\n ]\n }).errors;\n }\n // TODO: this is essentially running its own custom validation and should be moved into a validation rule\n if (this.component.validate && this.component.validate.row) {\n const valid = this.evaluate(this.component.validate.row, {\n valid: (editRow.length === 0),\n row: editRow.data\n }, 'valid', true);\n if (valid.toString() !== 'true') {\n editRow.errors.push({\n type: 'error',\n rowError: true,\n message: valid.toString()\n });\n }\n if (valid === null) {\n editRow.errors.push({\n type: 'error',\n message: `Invalid row validation for ${this.key}`\n });\n }\n }\n if (!this.component.rowDrafts || ((_a = this.root) === null || _a === void 0 ? void 0 : _a.submitted)) {\n this.showRowErrorAlerts(editRow, editRow.errors);\n }\n return editRow.errors;\n }\n showRowErrorAlerts(editRow, errors) {\n if (editRow.alerts) {\n if (this.alert) {\n if (errors.length) {\n this.alert.showErrors(errors, false);\n editRow.alerts = true;\n }\n else {\n this.alert.clear();\n }\n }\n }\n }\n /**\n * Return that this component processes its own validation.\n */\n get processOwnValidation() {\n return true;\n }\n checkComponentValidity(data, dirty, row, options = {}, errors = []) {\n var _a, _b;\n const { silentCheck } = options;\n const superValid = super.checkComponentValidity(data, dirty, row, options, errors);\n // If super tells us that component invalid and there is no need to update alerts, just return false\n if (!superValid && (!this.alert && !this.hasOpenRows())) {\n return false;\n }\n let rowsEditing = false;\n const allRowErrors = [];\n this.editRows.forEach((editRow, index) => {\n // Trigger all errors on the row.\n const rowErrors = this.validateRow(editRow, dirty, silentCheck);\n errors.push(...rowErrors);\n allRowErrors.push(...rowErrors);\n if (this.rowRefs) {\n const rowContainer = this.rowRefs[index];\n if (rowContainer) {\n const errorContainer = rowContainer.querySelector('.editgrid-row-error');\n if (rowErrors.length && errorContainer && (!this.component.rowDrafts || this.shouldValidateDraft(editRow))) {\n const rowError = rowErrors.find(error => error.rowError);\n this.addClass(errorContainer, 'help-block');\n errorContainer.textContent = this.t(rowError ? rowError.message : this.errorMessage('invalidRowError'));\n }\n else if (errorContainer) {\n errorContainer.textContent = '';\n }\n }\n }\n // If this is a dirty check, and any rows are still editing, we need to throw validation error.\n rowsEditing |= (dirty && this.isOpen(editRow));\n });\n if (allRowErrors.length) {\n if (!silentCheck && (dirty || this.dirty) && (!this.component.rowDrafts || ((_a = this.root) === null || _a === void 0 ? void 0 : _a.submitted))) {\n this.setCustomValidity(this.t(this.errorMessage('invalidRowsError')), dirty);\n this.removeClass(this.element, 'has-error');\n }\n return false;\n }\n else if (rowsEditing && this.saveEditMode) {\n this.setCustomValidity(this.t(this.errorMessage('unsavedRowsError')), dirty);\n return false;\n }\n const message = this.invalid || this.invalidMessage(data, dirty);\n if (allRowErrors.length && ((_b = this.root) === null || _b === void 0 ? void 0 : _b.submitted) && !message) {\n this._errors = this.setCustomValidity(message, dirty);\n errors.push(...this._errors);\n this.root.showErrors([message]);\n }\n else {\n this._errors = this.setCustomValidity(message, dirty);\n errors.push(...this._errors);\n }\n return superValid;\n }\n setRowInvalid(ref, index) {\n const editRow = this.editRows[index];\n const errorContainer = ref.querySelector('.editgrid-row-error');\n if (errorContainer && (!this.component.rowDrafts || this.shouldValidateDraft(editRow))) {\n this.addClass(errorContainer, 'help-block');\n errorContainer.textContent = this.t(this.errorMessage('invalidRowError'));\n }\n else if (errorContainer) {\n errorContainer.textContent = '';\n }\n }\n changeState(changed, flags) {\n if (changed || (flags.resetValue && this.component.modalEdit)) {\n this.rebuild();\n }\n else {\n this.redraw();\n }\n }\n setValue(value, flags = {}) {\n if (!value) {\n value = this.defaultValue;\n }\n if (!Array.isArray(value)) {\n if (typeof value === 'object') {\n value = [value];\n }\n else {\n return false;\n }\n }\n const changed = this.hasChanged(value, this.dataValue);\n if (this.parent) {\n this.parent.checkComponentConditions();\n }\n this.dataValue = value;\n // Refresh editRow data when data changes.\n this.dataValue.forEach((row, rowIndex) => {\n const editRow = this.editRows[rowIndex];\n if (editRow) {\n editRow.data = row;\n this.restoreRowContext(editRow, flags);\n editRow.state = EditRowState.Saved;\n editRow.backup = null;\n editRow.errors = [];\n }\n else {\n this.editRows[rowIndex] = {\n components: this.lazyLoad ? [] : this.createRowComponents(row, rowIndex),\n data: row,\n state: EditRowState.Saved,\n backup: null,\n errors: [],\n };\n }\n });\n let { length: dataLength } = this.dataValue;\n // If the last row is a new row, then do not remove it.\n if (this.editRows[dataLength] && (this.editRows[dataLength].state === EditRowState.New)) {\n dataLength = (dataLength + 1);\n }\n this.editRows.slice(dataLength).forEach((editRow, index) => this.baseRemoveRow(dataLength + index));\n this.editRows = this.editRows.slice(0, dataLength);\n this.openWhenEmpty();\n this.updateOnChange(flags, changed);\n this.checkData();\n this.changeState(changed, flags);\n return changed;\n }\n openWhenEmpty() {\n const shouldBeOpened = !this.dataValue.length && this.component.openWhenEmpty;\n const hasNoRows = !this.editRows.length;\n if (hasNoRows && shouldBeOpened && !this.builderMode) {\n const dataObj = {};\n this.createRow(dataObj, 0);\n }\n }\n restoreRowContext(editRow, flags = {}) {\n editRow.components.forEach((component) => {\n component.data = editRow.data;\n this.setNestedValue(component, editRow.data, flags);\n });\n }\n emptyRows() {\n this.editRows.forEach((editRow, index) => this.destroyComponents(false, index));\n this.editRows = [];\n }\n resetValue() {\n super.resetValue();\n this.emptyRows();\n }\n}\nexports[\"default\"] = EditGridComponent;\nEditGridComponent.prototype.hasChanged = Component_1.default.prototype.hasChanged;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/components/editgrid/EditGrid.js?");
5359
+ eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst lodash_1 = __importDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nconst process_1 = __webpack_require__(/*! @formio/core/process */ \"./node_modules/@formio/core/lib/process/index.js\");\nconst components_1 = __webpack_require__(/*! @formio/bootstrap/components */ \"./node_modules/@formio/bootstrap/lib/cjs/templates/components/index.js\");\nconst NestedArrayComponent_1 = __importDefault(__webpack_require__(/*! ../_classes/nestedarray/NestedArrayComponent */ \"./lib/cjs/components/_classes/nestedarray/NestedArrayComponent.js\"));\nconst Component_1 = __importDefault(__webpack_require__(/*! ../_classes/component/Component */ \"./lib/cjs/components/_classes/component/Component.js\"));\nconst Alert_1 = __importDefault(__webpack_require__(/*! ../alert/Alert */ \"./lib/cjs/components/alert/Alert.js\"));\nconst utils_1 = __webpack_require__(/*! ../../utils/utils */ \"./lib/cjs/utils/utils.js\");\nconst EditRowState = {\n New: 'new',\n Editing: 'editing',\n Saved: 'saved',\n Viewing: 'viewing',\n Removed: 'removed',\n Draft: 'draft',\n};\nclass EditGridComponent extends NestedArrayComponent_1.default {\n static schema(...extend) {\n return NestedArrayComponent_1.default.schema({\n type: 'editgrid',\n label: 'Edit Grid',\n key: 'editGrid',\n clearOnHide: true,\n input: true,\n tree: true,\n removeRow: 'Cancel',\n defaultOpen: false,\n openWhenEmpty: false,\n modal: false,\n components: [],\n inlineEdit: false,\n templates: {\n header: EditGridComponent.defaultHeaderTemplate,\n row: EditGridComponent.defaultRowTemplate,\n tableHeader: EditGridComponent.defaultTableHeaderTemplate,\n tableRow: EditGridComponent.defaultTableRowTemplate,\n footer: '',\n },\n }, ...extend);\n }\n static get builderInfo() {\n return {\n title: 'Edit Grid',\n icon: 'tasks',\n group: 'data',\n documentation: '/userguide/form-building/data-components#edit-grid',\n showPreview: false,\n weight: 30,\n schema: EditGridComponent.schema(),\n };\n }\n static get defaultHeaderTemplate() {\n return `<div class=\"row\">\n {% util.eachComponent(components, function(component) { %}\n {% if (displayValue(component)) { %}\n <div class=\"col-sm-2\">{{ t(component.label) }}</div>\n {% } %}\n {% }) %}\n </div>`;\n }\n static get defaultTableHeaderTemplate() {\n return `\n <tr>\n {% util.eachComponent(components, function(component) { %}\n {% if (!component.hasOwnProperty('tableView') || component.tableView) { %}\n <td class=\"editgrid-table-column\">{{ component.label }}</td>\n {% } %}\n {% }) %}\n {% if (!instance.options.readOnly && !instance.disabled) { %}\n <td class=\"editgrid-table-column\">Actions</td>\n {% } %}\n </tr>\n `;\n }\n static get defaultRowTemplate() {\n return `<div class=\"row\">\n {% util.eachComponent(components, function(component) { %}\n {% if (displayValue(component)) { %}\n <div class=\"col-sm-2\">\n {{ isVisibleInRow(component) ? getView(component, row[component.key]) : ''}}\n </div>\n {% } %}\n {% }) %}\n {% if (!instance.options.readOnly && !instance.disabled) { %}\n <div class=\"col-sm-2\">\n <div class=\"btn-group pull-right\">\n <button class=\"btn btn-default btn-light btn-sm editRow\"><i class=\"{{ iconClass('pen-fill') }}\"></i></button>\n {% if (!instance.hasRemoveButtons || instance.hasRemoveButtons()) { %}\n <button class=\"btn btn-danger btn-sm removeRow\"><i class=\"{{ iconClass('trash') }}\"></i></button>\n {% } %}\n </div>\n </div>\n {% } %}\n </div>`;\n }\n static get defaultTableRowTemplate() {\n return `\n {% util.eachComponent(components, function(component) { %}\n {% if (!component.hasOwnProperty('tableView') || component.tableView) { %}\n <td class=\"editgrid-table-column\">\n {{ getView(component, row[component.key]) }}\n </td>\n {% } %}\n {% }) %}\n {% if (!instance.options.readOnly && !instance.disabled) { %}\n <td class=\"editgrid-table-column\">\n <div class=\"btn-group\">\n <button class=\"btn btn-default btn-light btn-sm editRow\" aria-label=\"{{ t('Edit row') }}\"><i class=\"{{ iconClass('pen-fill') }}\"></i></button>\n {% if (!instance.hasRemoveButtons || instance.hasRemoveButtons()) { %}\n <button class=\"btn btn-danger btn-sm removeRow\" aria-label=\"{{ t('Remove row') }}\"><i class=\"{{ iconClass('trash') }}\"></i></button>\n {% } %}\n </div>\n </td>\n {% } %}\n `;\n }\n get defaultDialogTemplate() {\n return `\n <h3 ref=\"dialogHeader\">${this.t('Do you want to clear data?')}</h3>\n <div style=\"display:flex; justify-content: flex-end;\">\n <button ref=\"dialogCancelButton\" class=\"btn btn-secondary\" aria-label=\"${this.t('Cancel')}\">${this.t('Cancel')}</button>\n <button ref=\"dialogYesButton\" class=\"btn btn-danger\" aria-label=\"${this.t('Yes, delete it')}\">${this.t('Yes, delete it')}</button>\n </div>\n `;\n }\n get defaultRowTemplate() {\n return this.displayAsTable\n ? EditGridComponent.defaultTableRowTemplate\n : EditGridComponent.defaultRowTemplate;\n }\n get defaultHeaderTemplate() {\n return this.displayAsTable\n ? EditGridComponent.defaultTableHeaderTemplate\n : EditGridComponent.defaultHeaderTemplate;\n }\n get rowTemplate() {\n let rowTemplate;\n if (utils_1.Evaluator.noeval) {\n rowTemplate = this.displayAsTable ?\n components_1.editgrid.tableRow\n : components_1.editgrid.row;\n }\n else {\n rowTemplate = this.displayAsTable ?\n lodash_1.default.get(this.component, 'templates.tableRow', this.defaultRowTemplate)\n : lodash_1.default.get(this.component, 'templates.row', this.defaultRowTemplate);\n }\n return rowTemplate;\n }\n get headerTemplate() {\n let headerTemplate;\n if (utils_1.Evaluator.noeval) {\n headerTemplate = this.displayAsTable ?\n components_1.editgrid.tableHeader\n : components_1.editgrid.header;\n }\n else {\n headerTemplate = this.displayAsTable ?\n lodash_1.default.get(this.component, 'templates.tableHeader', this.defaultHeaderTemplate)\n : lodash_1.default.get(this.component, 'templates.header', this.defaultHeaderTemplate);\n }\n return headerTemplate;\n }\n /**\n * Returns true if the component has nested components which don't trigger changes on the root level\n */ //\n get hasScopedChildren() {\n return !this.inlineEditMode;\n }\n get defaultSchema() {\n return EditGridComponent.schema();\n }\n get emptyValue() {\n return [];\n }\n get editgridKey() {\n return `editgrid-${this.key}`;\n }\n get rowRef() {\n return `${this.editgridKey}-row`;\n }\n get rowElements() {\n return this.refs[this.rowRef];\n }\n get rowRefs() {\n return this.refs[`editgrid-${this.component.key}-row`];\n }\n get addRowRef() {\n return `${this.editgridKey}-addRow`;\n }\n get addRowElements() {\n return this.refs[this.addRowRef];\n }\n get saveRowRef() {\n return `${this.editgridKey}-saveRow`;\n }\n get saveRowElements() {\n return this.refs[this.saveRowRef];\n }\n get cancelRowRef() {\n return `${this.editgridKey}-cancelRow`;\n }\n get cancelRowElements() {\n return this.refs[this.cancelRowRef];\n }\n get inlineEditMode() {\n return this.component.inlineEdit;\n }\n get saveEditMode() {\n return !this.inlineEditMode;\n }\n get minLength() {\n return this.builderMode ? 0 : lodash_1.default.get(this.component, 'validate.minLength', 0);\n }\n get data() {\n return this._data;\n }\n get dataValue() {\n return super.dataValue || [];\n }\n set dataValue(value) {\n super.dataValue = value;\n }\n get displayAsTable() {\n return this.component.displayAsTable;\n }\n set data(value) {\n this._data = value;\n const data = this.dataValue;\n (this.editRows || []).forEach((row, index) => {\n if (!data[index] && row.state !== EditRowState.New) {\n data[index] = {};\n }\n const rowData = data[index] || {};\n row.data = rowData;\n row.components.forEach((component) => {\n component.data = rowData;\n });\n });\n }\n get iteratableRows() {\n return this.editRows;\n }\n get defaultValue() {\n const value = super.defaultValue;\n const defaultValue = Array.isArray(value) ? value : [];\n lodash_1.default.times(this.minLength - defaultValue.length, () => defaultValue.push({}));\n return defaultValue;\n }\n constructor(...args) {\n super(...args);\n this.type = 'editgrid';\n }\n hasRemoveButtons() {\n return !this.component.disableAddingRemovingRows &&\n !this.options.readOnly &&\n !this.disabled &&\n this.fullMode &&\n (this.dataValue.length > lodash_1.default.get(this.component, 'validate.minLength', 0));\n }\n init() {\n if (this.builderMode) {\n this.editRows = [];\n return super.init();\n }\n this.components = this.components || [];\n const dataValue = this.dataValue;\n const openWhenEmpty = !dataValue.length && this.component.openWhenEmpty;\n if (openWhenEmpty) {\n const dataObj = {};\n this.editRows = [];\n this.createRow(dataObj, 0);\n }\n else {\n this.editRows = dataValue.map((row, rowIndex) => ({\n components: this.lazyLoad ? [] : this.createRowComponents(row, rowIndex),\n data: row,\n state: EditRowState.Saved,\n backup: null,\n error: null,\n rowIndex,\n }));\n }\n this.prevHasAddButton = this.hasAddButton();\n this.checkData();\n this.setVariableTypeComponents();\n if (this.variableTypeComponentsIndexes.length) {\n lodash_1.default.each(this.editRows || [], (editRow, rowIndex) => this.checkRowVariableTypeComponents(editRow, rowIndex));\n }\n }\n checkRowVariableTypeComponents(editRow, rowIndex) {\n const rowComponents = editRow.components;\n if (lodash_1.default.some(this.variableTypeComponentsIndexes, (compIndex) => {\n const variableTypeComp = rowComponents[compIndex];\n return variableTypeComp.type !== variableTypeComp.component.type;\n })) {\n editRow.components = this.createRowComponents(editRow.data, rowIndex, true);\n }\n }\n setVariableTypeComponents() {\n //set components which type is changing within a row (e.g.,by mergeComponentSchema action)\n this.variableTypeComponentsIndexes = [];\n lodash_1.default.each(this.component.components, (comp, index) => {\n if (comp.typeChangeEnabled) {\n this.variableTypeComponentsIndexes.push(index);\n }\n });\n }\n isOpen(editRow) {\n return [EditRowState.New, EditRowState.Editing, EditRowState.Viewing].includes(editRow.state);\n }\n isComponentVisibleInSomeRow(component) {\n const rows = this.editRows;\n const savedStates = [EditRowState.Saved, EditRowState.Editing, EditRowState.Draft];\n const savedRows = rows.filter(row => lodash_1.default.includes(savedStates, row.state));\n this.visibleInHeader = this.visibleInHeader || [];\n const changeVisibleInHeader = (component, isVisible) => {\n if (!isVisible) {\n lodash_1.default.remove(this.visibleInHeader, (key) => key === component.key);\n }\n if (isVisible && !lodash_1.default.includes(this.visibleInHeader, component.key)) {\n this.visibleInHeader.push(component.key);\n }\n };\n if (lodash_1.default.isEmpty(rows)) {\n const rowComponents = this.createRowComponents({}, 0);\n let checkComponent;\n (0, utils_1.eachComponent)(rowComponents, (comp) => {\n if (comp.component.key === component.key) {\n checkComponent = comp;\n }\n comp.checkConditions();\n });\n const isVisible = checkComponent ? checkComponent.visible : true;\n [...this.components].forEach((comp) => this.removeComponent(comp, this.components));\n changeVisibleInHeader(component, isVisible);\n return isVisible;\n }\n const isOpenRowWhenEmpty = lodash_1.default.get(this.component, 'openWhenEmpty') && rows.length === 1 && rows[0].state === EditRowState.New;\n if (!lodash_1.default.isEmpty(rows) && lodash_1.default.isEmpty(savedRows) && !isOpenRowWhenEmpty) {\n return lodash_1.default.includes(this.visibleInHeader, component.key);\n }\n return lodash_1.default.some(isOpenRowWhenEmpty ? rows : savedRows, (row, index) => {\n const editingRow = row.state === EditRowState.Editing;\n let isVisible;\n if (!editingRow) {\n const flattenedComponents = this.flattenComponents(index);\n const instance = flattenedComponents[component.key];\n isVisible = instance ? instance.visible : true;\n changeVisibleInHeader(component, isVisible);\n }\n else {\n isVisible = lodash_1.default.includes(this.visibleInHeader, component.key);\n }\n return isVisible;\n });\n }\n render(children) {\n if (this.builderMode) {\n return super.render();\n }\n const dataValue = this.dataValue;\n const headerTemplate = this.headerTemplate;\n const t = this.t.bind(this);\n const templateName = this.displayAsTable ? 'editgridTable' : 'editgrid';\n return super.render(children || this.renderTemplate(templateName, {\n ref: {\n row: this.rowRef,\n addRow: this.addRowRef,\n saveRow: this.saveRowRef,\n cancelRow: this.cancelRowRef,\n },\n header: this.renderString(headerTemplate, {\n displayValue: (component) => this.displayComponentValue(component, true),\n components: this.component.components,\n value: dataValue,\n t\n }),\n footer: this.renderString(lodash_1.default.get(this.component, 'templates.footer'), {\n components: this.component.components,\n value: dataValue,\n t\n }),\n rows: this.editRows.map(this.renderRow.bind(this)),\n openRows: this.editRows.map((row) => this.isOpen(row)),\n errors: this.editRows.map((row) => row.error),\n hasAddButton: this.hasAddButton(),\n hasRemoveButtons: this.hasRemoveButtons(),\n }));\n }\n renderComponents(components) {\n components = components || this.getComponents();\n const children = components.map(component => component.render());\n const templateName = this.displayAsTable && this.prevHasAddButton ? 'tableComponents' : 'components';\n return this.renderTemplate(templateName, {\n children,\n components,\n });\n }\n attach(element) {\n if (this.builderMode) {\n return super.attach(element);\n }\n this.loadRefs(element, {\n [this.addRowRef]: 'multiple',\n [this.saveRowRef]: 'multiple',\n [this.cancelRowRef]: 'multiple',\n [this.rowRef]: 'multiple',\n });\n this.addRowElements.forEach((addButton) => {\n this.addEventListener(addButton, 'click', () => this.addRow());\n });\n let openRowCount = 0;\n this.rowElements.forEach((row, rowIndex) => {\n const editRow = this.editRows[rowIndex];\n if (editRow === null || editRow === void 0 ? void 0 : editRow.isRowSelected) {\n row.classList.add('selected');\n }\n if (this.isOpen(editRow)) {\n this.attachComponents(row, editRow.components);\n this.addEventListener(this.saveRowElements[openRowCount], 'click', () => this.saveRow(rowIndex, true));\n this.addEventListener(this.cancelRowElements[openRowCount], 'click', () => this.cancelRow(rowIndex));\n openRowCount++;\n }\n else {\n // Attach edit and remove button events.\n [\n {\n className: 'removeRow',\n event: 'click',\n action: () => this.removeRow(rowIndex, true),\n },\n {\n className: 'editRow',\n event: 'click',\n action: () => {\n this.editRow(rowIndex).then(() => {\n var _a;\n if (this.component.rowDrafts) {\n const errors = this.validateRow(editRow, false);\n const shouldShowRowErrorsAlert = this.component.modal && errors.length && ((_a = this.root) === null || _a === void 0 ? void 0 : _a.submitted);\n if (shouldShowRowErrorsAlert) {\n this.alert.showErrors(errors, false);\n editRow.alerts = true;\n }\n }\n });\n },\n },\n {\n className: 'row',\n event: 'click',\n action: () => {\n row.classList.toggle('selected');\n let eventName = 'editGridSelectRow';\n if (Array.from(row.classList).includes('selected')) {\n editRow.isRowSelected = true;\n }\n else {\n delete editRow.isRowSelected;\n eventName = 'editGridUnSelectRow';\n }\n this.emit(eventName, {\n component: this.component,\n data: this.dataValue[rowIndex]\n });\n },\n }\n ].forEach(({ className, event, action, }) => {\n const elements = row.getElementsByClassName(className);\n Array.prototype.forEach.call(elements, (element) => {\n if (this.options.readOnly && lodash_1.default.intersection(element.classList, ['editRow', 'removeRow']).length) {\n element.style.display = 'none';\n }\n else {\n this.addEventListener(element, event, action);\n }\n });\n });\n }\n });\n // Add open class to the element if any edit grid row is open\n if (openRowCount) {\n this.addClass(this.refs.component, `formio-component-${this.component.type}-row-open`);\n }\n else {\n this.removeClass(this.refs.component, `formio-component-${this.component.type}-row-open`);\n }\n const superAttach = super.attach(element);\n this.loadRefs(element, {\n messageContainer: 'single-scope',\n });\n return superAttach;\n }\n flattenRowDataValue(dataValue) {\n const flattened = {};\n Object.keys(dataValue).forEach((key) => {\n if (lodash_1.default.isObject(dataValue[key]) && !lodash_1.default.isNil(dataValue[key])) {\n Object.assign(flattened, this.flattenRowDataValue(dataValue[key]));\n }\n else {\n flattened[key] = dataValue[key];\n }\n });\n return flattened;\n }\n isComponentVisibleInRow(component, flattenedComponents) {\n const instance = flattenedComponents[component.key];\n return instance ? instance.visible : true;\n }\n displayComponentValue(component, header) {\n return !!((!component.hasOwnProperty('tableView') || component.tableView)\n && header ? this.isComponentVisibleInSomeRow(component) : lodash_1.default.includes(this.visibleInHeader, component.key));\n }\n renderRow(row, rowIndex) {\n const dataValue = this.dataValue;\n if (this.isOpen(row)) {\n return this.renderComponents(row.components);\n }\n else {\n const flattenedComponents = this.flattenComponents(rowIndex);\n const rowTemplate = this.rowTemplate;\n return this.renderString(rowTemplate, {\n row: dataValue[rowIndex] || {},\n data: this.data,\n rowIndex,\n components: this.component.components,\n flattenedComponents,\n displayValue: (component) => this.displayComponentValue(component),\n isVisibleInRow: (component) => this.isComponentVisibleInRow(component, flattenedComponents),\n getView: (component, data) => {\n var _a, _b;\n const instance = flattenedComponents[component.key];\n const view = instance ? instance.getView(data || instance.dataValue) : '';\n // If there is an html tag in view, don't allow it to be injected in template\n const htmlTagRegExp = new RegExp('<(.*?)>');\n return typeof view === 'string' && view.length && !((_a = instance.component) === null || _a === void 0 ? void 0 : _a.template) && htmlTagRegExp.test(view) && ((_b = instance.component) === null || _b === void 0 ? void 0 : _b.inputFormat) !== 'html'\n ? `<input type=\"text\" value=\"${view.replace(/\"/g, '&quot;')}\" readonly/>`\n : view;\n },\n state: this.editRows[rowIndex].state,\n t: this.t.bind(this)\n });\n }\n }\n eachComponent(fn, rowIndex) {\n lodash_1.default.each(this.getComponents(rowIndex), (component, index) => {\n if (fn(component, index) === false) {\n return false;\n }\n });\n }\n restoreComponentsContext() {\n this.getComponents().forEach((component) => {\n var _a;\n const rowData = this.dataValue[component.rowIndex];\n const editRowData = (_a = this.editRows[component.rowIndex]) === null || _a === void 0 ? void 0 : _a.data;\n component.data = rowData || editRowData;\n });\n }\n flattenComponents(rowIndex) {\n const result = {};\n this.everyComponent((component) => {\n result[component.component.flattenAs || component.key] = component;\n }, rowIndex);\n return result;\n }\n getComponents(rowIndex) {\n var _a;\n // Ensure editrows is set.\n this.editRows = this.editRows || [];\n return this.builderMode\n ? super.getComponents()\n : lodash_1.default.isNumber(rowIndex)\n ? (((_a = this.editRows[rowIndex]) === null || _a === void 0 ? void 0 : _a.components) || [])\n : this.editRows.reduce((result, row) => result.concat(row.components || []), []);\n }\n destroyComponents(all = false, rowIndex = 0) {\n if (this.builderMode) {\n return super.destroyComponents(all);\n }\n const components = this.getComponents(rowIndex).slice();\n components.forEach((comp) => this.removeComponent(comp, this.components, all));\n }\n createRow(dataObj, rowIndex) {\n const editRow = {\n components: this.createRowComponents(dataObj, rowIndex),\n data: dataObj,\n state: EditRowState.New,\n backup: null,\n error: null,\n rowIndex,\n };\n this.editRows.push(editRow);\n if (this.inlineEditMode) {\n this.dataValue.push(dataObj);\n }\n return editRow;\n }\n addRow() {\n if (this.options.readOnly) {\n return;\n }\n const dataObj = {};\n const rowIndex = this.editRows.length;\n const editRow = this.createRow(dataObj, rowIndex);\n if (this.inlineEditMode) {\n this.triggerChange();\n }\n this.emit('editGridAddRow', {\n component: this.component,\n row: editRow,\n });\n this.processRow('checkData', null, {}, editRow.data, editRow.components);\n if (this.component.modal) {\n this.addRowModal(rowIndex);\n }\n else {\n this.redraw();\n }\n return editRow;\n }\n addRowModal(rowIndex) {\n const modalContent = this.ce('div');\n const editRow = this.editRows[rowIndex];\n editRow.willBeSaved = false;\n const { components } = editRow;\n modalContent.innerHTML = this.renderComponents(components);\n const dialog = this.component.modal ? this.createModal(modalContent, {}, () => this.showDialog(rowIndex)) : undefined;\n dialog.classList.add(`editgrid-row-modal-${this.id}`);\n editRow.dialog = dialog;\n if (this.alert) {\n this.alert.clear();\n this.alert = null;\n }\n this.alert = new Alert_1.default(dialog.refs.dialogContents, this);\n this.addEventListener(dialog, 'close', () => {\n if (!editRow.willBeSaved) {\n if (this.editRows[rowIndex] && this.editRows[rowIndex].state !== EditRowState.New) {\n this.editRows[rowIndex].components.forEach((comp) => {\n comp.setPristine(true);\n });\n }\n this.cancelRow(rowIndex);\n }\n if (this.alert) {\n this.alert.clear();\n this.alert = null;\n }\n // Remove references to dialog elements to prevent possible in some cases memory leaks\n delete editRow.confirmationDialog;\n delete editRow.dialog;\n });\n dialog.refs.dialogContents.appendChild(this.ce('button', {\n class: 'btn btn-primary',\n onClick: () => {\n // After an attempt to save, all the components inside the row should become not pristine\n if (!this.component.rowDrafts) {\n editRow.components.forEach((comp) => comp.setPristine(false));\n }\n const errors = this.validateRow(editRow, true);\n if (!errors.length || this.component.rowDrafts) {\n editRow.willBeSaved = true;\n dialog.close();\n this.saveRow(rowIndex, true);\n }\n else {\n this.alert.showErrors(errors, false);\n editRow.alerts = true;\n }\n },\n }, this.component.saveRow || 'Save'));\n return this.attachComponents(modalContent, components);\n }\n showDialog(rowIndex) {\n const editRow = this.editRows[rowIndex];\n if (lodash_1.default.isEqual(editRow.backup, editRow.data)) {\n return Promise.resolve();\n }\n const wrapper = this.ce('div', { ref: 'confirmationDialog' });\n const dialogContent = this.component.dialogTemplate || this.defaultDialogTemplate;\n wrapper.innerHTML = dialogContent;\n wrapper.refs = {};\n this.loadRefs.call(wrapper, wrapper, {\n dialogHeader: 'single',\n dialogCancelButton: 'single',\n dialogYesButton: 'single',\n });\n const dialog = this.createModal(wrapper);\n dialog.classList.add(`editgrid-row-modal-confirmation-${this.id}`);\n const close = (event) => {\n event.preventDefault();\n dialog.close();\n };\n let dialogResult;\n const promise = new Promise((resolve, reject) => {\n dialogResult = { resolve, reject };\n });\n this.addEventListener(wrapper.refs.dialogYesButton, 'click', (event) => {\n close(event);\n dialogResult.resolve();\n });\n this.addEventListener(wrapper.refs.dialogCancelButton, 'click', (event) => {\n close(event);\n dialogResult.reject();\n });\n editRow.confirmationDialog = dialog;\n return promise;\n }\n editRow(rowIndex) {\n const editRow = this.editRows[rowIndex];\n const isAlreadyEditing = editRow.state === EditRowState.Editing || editRow.state === EditRowState.New;\n if (!editRow || isAlreadyEditing) {\n return Promise.resolve();\n }\n editRow.prevState = editRow.state;\n editRow.state = this.options.readOnly ? EditRowState.Viewing : EditRowState.Editing;\n if (this.lazyLoad && (editRow.components.length === 0)) {\n editRow.components = this.createRowComponents(editRow.data, rowIndex);\n }\n const dataSnapshot = (0, utils_1.fastCloneDeep)(editRow.data);\n if (this.inlineEditMode) {\n editRow.backup = dataSnapshot;\n }\n else {\n editRow.backup = (0, utils_1.fastCloneDeep)(editRow.data);\n editRow.data = dataSnapshot;\n this.restoreRowContext(editRow);\n }\n if (this.component.modal) {\n return this.addRowModal(rowIndex);\n }\n return this.redraw();\n }\n clearErrors(rowIndex) {\n const editRow = this.editRows[rowIndex];\n if (editRow && Array.isArray(editRow.components)) {\n editRow.components.forEach((comp) => {\n comp.setPristine(true);\n comp.setCustomValidity('');\n });\n }\n }\n cancelRow(rowIndex) {\n if (this.options.readOnly) {\n return;\n }\n const editRow = this.editRows[rowIndex];\n switch (editRow.state) {\n case EditRowState.New: {\n editRow.state = EditRowState.Removed;\n this.clearErrors(rowIndex);\n this.destroyComponents(false, rowIndex);\n if (this.inlineEditMode) {\n this.splice(rowIndex);\n }\n this.editRows.splice(rowIndex, 1);\n this.openWhenEmpty();\n break;\n }\n case EditRowState.Editing: {\n editRow.state = editRow.prevState;\n if (this.inlineEditMode) {\n this.dataValue[rowIndex] = editRow.backup;\n }\n editRow.data = editRow.backup;\n editRow.backup = null;\n this.restoreRowContext(editRow);\n this.clearErrors(rowIndex);\n break;\n }\n }\n this.emit('editGridCancelRow', {\n instance: this,\n component: this.component,\n editRow,\n });\n this.checkValidity(null, true);\n this.redraw();\n if (this.component.rowDrafts) {\n this.checkValidity(this.data, false);\n }\n }\n saveRow(rowIndex, modified) {\n var _a, _b;\n const editRow = this.editRows[rowIndex];\n if (this.options.readOnly) {\n return;\n }\n // After an attempt to save, all the components inside the row should become not pristine\n if (!this.component.rowDrafts) {\n editRow.components.forEach((comp) => comp.setPristine(false));\n }\n const errors = this.validateRow(editRow, true);\n if (!this.component.rowDrafts) {\n if (errors.length) {\n return false;\n }\n }\n if (this.saveEditMode) {\n const dataValue = this.dataValue;\n if ((_b = (_a = this.root) === null || _a === void 0 ? void 0 : _a.focusedComponent) === null || _b === void 0 ? void 0 : _b.component.typeChangeEnabled) {\n this.root.focusedComponent = null;\n }\n switch (editRow.state) {\n case EditRowState.New: {\n const newIndex = dataValue.length;\n dataValue.push(editRow.data);\n editRow.components.forEach(component => component.rowIndex = newIndex);\n if (rowIndex !== newIndex) {\n this.editRows.splice(rowIndex, 1);\n this.editRows.splice(newIndex, 0, editRow);\n }\n break;\n }\n case EditRowState.Editing: {\n dataValue[rowIndex] = editRow.data;\n break;\n }\n }\n }\n editRow.state = this.component.rowDrafts && errors.length ? EditRowState.Draft : EditRowState.Saved;\n editRow.backup = null;\n this.updateValue();\n this.emit('editGridSaveRow', {\n component: this.component,\n row: editRow.data,\n instance: this\n });\n this.triggerChange({ modified, noPristineChangeOnModified: modified && this.component.rowDrafts, isolateRow: true });\n if (this.component.rowDrafts) {\n editRow.components.forEach(comp => comp.setPristine(this.pristine));\n }\n this.checkValidity(null, true);\n this.redraw();\n if (editRow.alerts) {\n editRow.alerts = false;\n }\n return true;\n }\n beforeFocus(component) {\n if ('beforeFocus' in this.parent) {\n this.parent.beforeFocus(this);\n }\n const relativePath = this.getRelativePath(component.path);\n const arrayPath = (0, utils_1.getArrayFromComponentPath)(relativePath);\n const rowIndex = arrayPath[0];\n let rowToEditIndex = arrayPath[0];\n this.editRows.forEach((row, indexInArray) => {\n if (row.rowIndex === rowIndex) {\n rowToEditIndex = indexInArray;\n }\n });\n if (lodash_1.default.isNumber(rowToEditIndex)) {\n this.editRow(rowToEditIndex);\n }\n }\n updateComponentsRowIndex(components, rowIndex) {\n components.forEach((component, colIndex) => {\n component.rowIndex = rowIndex;\n component.row = `${rowIndex}-${colIndex}`;\n });\n }\n updateRowsComponents(rowIndex) {\n this.editRows.slice(rowIndex).forEach((row, index) => {\n this.updateComponentsRowIndex(row.components, rowIndex + index);\n });\n }\n baseRemoveRow(rowIndex) {\n const editRow = this.editRows[rowIndex];\n editRow.state = EditRowState.Removed;\n this.destroyComponents(false, rowIndex);\n return editRow;\n }\n removeRow(rowIndex, modified) {\n if (this.options.readOnly) {\n return;\n }\n this.clearErrors(rowIndex);\n this.baseRemoveRow(rowIndex);\n this.splice(rowIndex);\n this.emit('editGridDeleteRow', {\n index: rowIndex\n });\n this.editRows.splice(rowIndex, 1);\n this.openWhenEmpty();\n this.updateRowsComponents(rowIndex);\n this.updateValue();\n this.triggerChange({ modified, noPristineChangeOnModified: modified && this.component.rowDrafts, isolateRow: true });\n this.checkValidity(null, true);\n this.checkData();\n this.redraw();\n }\n createRowComponents(row, rowIndex, recreatePartially) {\n // Iterate through existing components and destroy the ones with the same rowIndex.\n if (this.components) {\n for (let i = 0; i < this.components.length; i++) {\n if (this.components[i].rowIndex === rowIndex) {\n this.components[i].destroy();\n this.components.splice(i, 1);\n }\n }\n }\n const currentRowComponents = lodash_1.default.get(this.editRows, `[${rowIndex}].components`, null);\n return this.component.components.map((col, colIndex) => {\n var _a;\n if (recreatePartially && currentRowComponents && this.variableTypeComponentsIndexes.length) {\n const currentComp = currentRowComponents[colIndex];\n const shouldRecreate = lodash_1.default.includes(this.variableTypeComponentsIndexes, colIndex) && (currentComp === null || currentComp === void 0 ? void 0 : currentComp.type) !== ((_a = currentComp === null || currentComp === void 0 ? void 0 : currentComp.component) === null || _a === void 0 ? void 0 : _a.type);\n if (!shouldRecreate) {\n return currentComp;\n }\n col = currentComp.component;\n }\n const column = lodash_1.default.clone(col);\n const options = lodash_1.default.clone(this.options);\n options.name += `[${rowIndex}]`;\n options.row = `${rowIndex}-${colIndex}`;\n options.onChange = (flags = {}, changed, modified) => {\n var _a, _b;\n if (((_a = changed.instance.root) === null || _a === void 0 ? void 0 : _a.id) && (((_b = this.root) === null || _b === void 0 ? void 0 : _b.id) !== changed.instance.root.id)) {\n changed.instance.root.triggerChange(flags, changed, modified);\n }\n else if (!this.component.modal) {\n this.triggerRootChange(flags, changed, modified);\n }\n if (this.inlineEditMode) {\n return;\n }\n const editRow = this.editRows[rowIndex];\n if (editRow) {\n this.processRow('checkData', null, Object.assign(Object.assign({}, flags), { changed }), editRow.data, editRow.components);\n this.validateRow(editRow, false);\n }\n if (this.variableTypeComponentsIndexes.length) {\n this.checkRowVariableTypeComponents(editRow, rowIndex);\n this.redraw();\n }\n };\n const comp = this.createComponent(lodash_1.default.assign({}, column, { row: options.row }), options, row, null, recreatePartially && currentRowComponents ? currentRowComponents[colIndex] : null);\n comp.rowIndex = rowIndex;\n comp.inEditGrid = true;\n return comp;\n });\n }\n hasOpenRows() {\n return this.editRows.some(row => this.isOpen(row));\n }\n getAttachedData(data = null) {\n const ourData = (0, utils_1.fastCloneDeep)(data || this._data || this.rootValue);\n lodash_1.default.set(ourData, this.key, this.editRows.map((row) => row.data));\n return ourData;\n }\n shouldValidateDraft(editRow) {\n var _a, _b;\n // Draft rows should be validated only when there was an attempt to submit a form\n return (editRow.state === EditRowState.Draft &&\n !this.pristine &&\n !((_a = this.root) === null || _a === void 0 ? void 0 : _a.pristine) &&\n !this.hasOpenRows()) ||\n ((_b = this.root) === null || _b === void 0 ? void 0 : _b.submitted);\n }\n shouldValidateRow(editRow, dirty) {\n return this.shouldValidateDraft(editRow) ||\n editRow.state === EditRowState.New ||\n editRow.state === EditRowState.Editing ||\n editRow.alerts ||\n dirty;\n }\n validateRow(editRow, dirty, forceSilentCheck) {\n var _a;\n editRow.errors = [];\n if (this.shouldValidateRow(editRow, dirty)) {\n const silentCheck = (this.component.rowDrafts && !this.shouldValidateDraft(editRow)) || forceSilentCheck;\n const rootValue = (0, utils_1.fastCloneDeep)(this.rootValue);\n const editGridValue = lodash_1.default.get(rootValue, this.path, []);\n editGridValue[editRow.rowIndex] = editRow.data;\n lodash_1.default.set(rootValue, this.path, editGridValue);\n editRow.errors = (0, process_1.processSync)({\n components: (0, utils_1.fastCloneDeep)(this.component.components).map((component) => {\n component.parentPath = `${this.path}[${editRow.rowIndex}]`;\n return component;\n }),\n data: rootValue,\n row: editRow.data,\n process: 'validateRow',\n instances: this.componentsMap,\n scope: { errors: [] },\n processors: [\n (context) => this.validationProcessor(context, { dirty, silentCheck })\n ]\n }).errors;\n }\n // TODO: this is essentially running its own custom validation and should be moved into a validation rule\n if (this.component.validate && this.component.validate.row) {\n const valid = this.evaluate(this.component.validate.row, {\n valid: (editRow.length === 0),\n row: editRow.data\n }, 'valid', true);\n if (valid.toString() !== 'true') {\n editRow.errors.push({\n type: 'error',\n rowError: true,\n message: valid.toString()\n });\n }\n if (valid === null) {\n editRow.errors.push({\n type: 'error',\n message: `Invalid row validation for ${this.key}`\n });\n }\n }\n if (!this.component.rowDrafts || ((_a = this.root) === null || _a === void 0 ? void 0 : _a.submitted)) {\n this.showRowErrorAlerts(editRow, editRow.errors);\n }\n return editRow.errors;\n }\n showRowErrorAlerts(editRow, errors) {\n if (editRow.alerts) {\n if (this.alert) {\n if (errors.length) {\n this.alert.showErrors(errors, false);\n editRow.alerts = true;\n }\n else {\n this.alert.clear();\n }\n }\n }\n }\n /**\n * Return that this component processes its own validation.\n */\n get processOwnValidation() {\n return true;\n }\n checkComponentValidity(data, dirty, row, options = {}, errors = []) {\n var _a, _b;\n const { silentCheck } = options;\n const superValid = super.checkComponentValidity(data, dirty, row, options, errors);\n // If super tells us that component invalid and there is no need to update alerts, just return false\n if (!superValid && (!this.alert && !this.hasOpenRows())) {\n return false;\n }\n let rowsEditing = false;\n const allRowErrors = [];\n this.editRows.forEach((editRow, index) => {\n // Trigger all errors on the row.\n const rowErrors = this.validateRow(editRow, dirty, silentCheck);\n errors.push(...rowErrors);\n allRowErrors.push(...rowErrors);\n if (this.rowRefs) {\n const rowContainer = this.rowRefs[index];\n if (rowContainer) {\n const errorContainer = rowContainer.querySelector('.editgrid-row-error');\n if (rowErrors.length && errorContainer && (!this.component.rowDrafts || this.shouldValidateDraft(editRow))) {\n const rowError = rowErrors.find(error => error.rowError);\n this.addClass(errorContainer, 'help-block');\n errorContainer.textContent = this.t(rowError ? rowError.message : this.errorMessage('invalidRowError'));\n }\n else if (errorContainer) {\n errorContainer.textContent = '';\n }\n }\n }\n // If this is a dirty check, and any rows are still editing, we need to throw validation error.\n rowsEditing |= (dirty && this.isOpen(editRow));\n });\n if (allRowErrors.length) {\n if (!silentCheck && (dirty || this.dirty) && (!this.component.rowDrafts || ((_a = this.root) === null || _a === void 0 ? void 0 : _a.submitted))) {\n this.setCustomValidity(this.t(this.errorMessage('invalidRowsError')), dirty);\n this.removeClass(this.element, 'has-error');\n }\n return false;\n }\n else if (rowsEditing && this.saveEditMode) {\n this.setCustomValidity(this.t(this.errorMessage('unsavedRowsError')), dirty);\n return false;\n }\n const message = this.invalid || this.invalidMessage(data, dirty);\n if (allRowErrors.length && ((_b = this.root) === null || _b === void 0 ? void 0 : _b.submitted) && !message) {\n this._errors = this.setCustomValidity(message, dirty);\n errors.push(...this._errors);\n this.root.showErrors([message]);\n }\n else {\n this._errors = this.setCustomValidity(message, dirty);\n errors.push(...this._errors);\n }\n return superValid;\n }\n setRowInvalid(ref, index) {\n const editRow = this.editRows[index];\n const errorContainer = ref.querySelector('.editgrid-row-error');\n if (errorContainer && (!this.component.rowDrafts || this.shouldValidateDraft(editRow))) {\n this.addClass(errorContainer, 'help-block');\n errorContainer.textContent = this.t(this.errorMessage('invalidRowError'));\n }\n else if (errorContainer) {\n errorContainer.textContent = '';\n }\n }\n changeState(changed, flags) {\n if (changed || (flags.resetValue && this.component.modalEdit)) {\n this.rebuild();\n }\n else {\n this.redraw();\n }\n }\n setValue(value, flags = {}) {\n if (!value) {\n value = this.defaultValue;\n }\n if (!Array.isArray(value)) {\n if (typeof value === 'object') {\n value = [value];\n }\n else {\n return false;\n }\n }\n const changed = this.hasChanged(value, this.dataValue);\n if (this.parent) {\n this.parent.checkComponentConditions();\n }\n this.dataValue = value;\n // Refresh editRow data when data changes.\n this.dataValue.forEach((row, rowIndex) => {\n const editRow = this.editRows[rowIndex];\n if (editRow) {\n editRow.data = row;\n this.restoreRowContext(editRow, flags);\n editRow.state = EditRowState.Saved;\n editRow.backup = null;\n editRow.errors = [];\n }\n else {\n this.editRows[rowIndex] = {\n components: this.lazyLoad ? [] : this.createRowComponents(row, rowIndex),\n data: row,\n state: EditRowState.Saved,\n backup: null,\n errors: [],\n };\n }\n });\n let { length: dataLength } = this.dataValue;\n // If the last row is a new row, then do not remove it.\n if (this.editRows[dataLength] && (this.editRows[dataLength].state === EditRowState.New)) {\n dataLength = (dataLength + 1);\n }\n this.editRows.slice(dataLength).forEach((editRow, index) => this.baseRemoveRow(dataLength + index));\n this.editRows = this.editRows.slice(0, dataLength);\n this.openWhenEmpty();\n this.updateOnChange(flags, changed);\n this.checkData();\n this.changeState(changed, flags);\n return changed;\n }\n openWhenEmpty() {\n const shouldBeOpened = !this.dataValue.length && this.component.openWhenEmpty;\n const hasNoRows = !this.editRows.length;\n if (hasNoRows && shouldBeOpened && !this.builderMode) {\n const dataObj = {};\n this.createRow(dataObj, 0);\n }\n }\n restoreRowContext(editRow, flags = {}) {\n editRow.components.forEach((component) => {\n component.data = editRow.data;\n this.setNestedValue(component, editRow.data, flags);\n });\n }\n emptyRows() {\n this.editRows.forEach((editRow, index) => this.destroyComponents(false, index));\n this.editRows = [];\n }\n resetValue() {\n super.resetValue();\n this.emptyRows();\n }\n}\nexports[\"default\"] = EditGridComponent;\nEditGridComponent.prototype.hasChanged = Component_1.default.prototype.hasChanged;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/components/editgrid/EditGrid.js?");
6680
5360
 
6681
5361
  /***/ }),
6682
5362
 
@@ -7919,7 +6599,7 @@ eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {
7919
6599
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
7920
6600
 
7921
6601
  "use strict";
7922
- eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Licenses = exports.Formio = exports.Form = exports.Utils = exports.Templates = exports.Widgets = exports.Providers = exports.Displays = exports.Components = exports.useModule = exports.registerModule = void 0;\nconst lodash_1 = __importDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nconst Formio_1 = __webpack_require__(/*! ./Formio */ \"./lib/cjs/Formio.js\");\nObject.defineProperty(exports, \"Formio\", ({ enumerable: true, get: function () { return Formio_1.Formio; } }));\nconst components_1 = __importDefault(__webpack_require__(/*! ./components */ \"./lib/cjs/components/index.js\"));\nconst Components_1 = __importDefault(__webpack_require__(/*! ./components/Components */ \"./lib/cjs/components/Components.js\"));\nexports.Components = Components_1.default;\nconst Displays_1 = __importDefault(__webpack_require__(/*! ./displays/Displays */ \"./lib/cjs/displays/Displays.js\"));\nexports.Displays = Displays_1.default;\nconst Templates_1 = __importDefault(__webpack_require__(/*! ./templates/Templates */ \"./lib/cjs/templates/Templates.js\"));\nexports.Templates = Templates_1.default;\nconst providers_1 = __importDefault(__webpack_require__(/*! ./providers */ \"./lib/cjs/providers/index.js\"));\nexports.Providers = providers_1.default;\nconst widgets_1 = __importDefault(__webpack_require__(/*! ./widgets */ \"./lib/cjs/widgets/index.js\"));\nexports.Widgets = widgets_1.default;\nconst Form_1 = __importDefault(__webpack_require__(/*! ./Form */ \"./lib/cjs/Form.js\"));\nexports.Form = Form_1.default;\nconst utils_1 = __importDefault(__webpack_require__(/*! ./utils */ \"./lib/cjs/utils/index.js\"));\nexports.Utils = utils_1.default;\nconst Evaluator_1 = __importDefault(__webpack_require__(/*! ./utils/Evaluator */ \"./lib/cjs/utils/Evaluator.js\"));\nconst licenses_1 = __importDefault(__webpack_require__(/*! ./licenses */ \"./lib/cjs/licenses/index.js\"));\nexports.Licenses = licenses_1.default;\nFormio_1.Formio.loadModules = (path = `${Formio_1.Formio.getApiUrl()}/externalModules.js`, name = 'externalModules') => {\n Formio_1.Formio.requireLibrary(name, name, path, true)\n .then((modules) => {\n Formio_1.Formio.use(modules);\n });\n};\n// This is needed to maintain correct imports using the \"dist\" file.\nFormio_1.Formio.Components = Components_1.default;\nFormio_1.Formio.Templates = Templates_1.default;\nFormio_1.Formio.Utils = utils_1.default;\nFormio_1.Formio.Form = Form_1.default;\nFormio_1.Formio.Displays = Displays_1.default;\nFormio_1.Formio.Providers = providers_1.default;\nFormio_1.Formio.Widgets = widgets_1.default;\nFormio_1.Formio.Evaluator = Evaluator_1.default;\nFormio_1.Formio.AllComponents = components_1.default;\nFormio_1.Formio.Licenses = licenses_1.default;\n// This is strange, but is needed for \"premium\" components to import correctly.\nFormio_1.Formio.Formio = Formio_1.Formio;\nFormio_1.Formio.Components.setComponents(components_1.default);\n/**\n * Register a module\n * @param {*} plugin\n * @returns\n */\nfunction registerModule(mod, defaultFn = null, options = {}) {\n // Sanity check.\n if (typeof mod !== 'object') {\n return;\n }\n for (const key of Object.keys(mod)) {\n const current = mod.framework || Formio_1.Formio.Templates.framework || 'bootstrap';\n switch (key) {\n case 'options':\n Formio_1.Formio.options = lodash_1.default.merge(Formio_1.Formio.options, mod.options);\n break;\n case 'templates':\n for (const framework of Object.keys(mod.templates)) {\n Formio_1.Formio.Templates.extendTemplate(framework, mod.templates[framework]);\n }\n if (mod.templates[current]) {\n Formio_1.Formio.Templates.current = mod.templates[current];\n }\n break;\n case 'components':\n Formio_1.Formio.Components.setComponents(mod.components);\n break;\n case 'framework':\n Formio_1.Formio.Templates.framework = mod.framework;\n break;\n case 'fetch':\n for (const name of Object.keys(mod.fetch)) {\n Formio_1.Formio.registerPlugin(mod.fetch[name], name);\n }\n break;\n case 'providers':\n for (const type of Object.keys(mod.providers)) {\n Formio_1.Formio.Providers.addProviders(type, mod.providers[type]);\n }\n break;\n case 'displays':\n Formio_1.Formio.Displays.addDisplays(mod.displays);\n break;\n case 'evaluator':\n Formio_1.Formio.Evaluator.registerEvaluator(mod.evaluator);\n break;\n case 'library':\n options.license\n ? Formio_1.Formio.Licenses.addLicense(mod.library, options.license)\n : Formio_1.Formio.Licenses.removeLicense(mod.library);\n break;\n default:\n if (defaultFn) {\n if (!defaultFn(key, mod)) {\n console.warn('Unknown module option', key);\n }\n break;\n }\n console.log('Unknown module option', key);\n }\n }\n}\nexports.registerModule = registerModule;\nfunction useModule(defaultFn = null) {\n return (plugins, options = {}) => {\n plugins = lodash_1.default.isArray(plugins) ? plugins : [plugins];\n plugins.forEach((plugin) => {\n if (Array.isArray(plugin)) {\n plugin.forEach(p => registerModule(p, defaultFn, options));\n }\n else {\n registerModule(plugin, defaultFn, options);\n }\n });\n };\n}\nexports.useModule = useModule;\n/**\n * Allows passing in plugins as an array of plugins or a single plugin.\n *\n * Formio.plugins(plugin1, options);\n * Formio.plugins([plugin1, plugin2, etc], options);\n */\nFormio_1.Formio.use = useModule();\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/formio.form.js?");
6602
+ eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Licenses = exports.Formio = exports.Form = exports.Utils = exports.Templates = exports.Widgets = exports.Providers = exports.Displays = exports.Components = exports.useModule = exports.registerModule = void 0;\nconst lodash_1 = __importDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nconst Formio_1 = __webpack_require__(/*! ./Formio */ \"./lib/cjs/Formio.js\");\nObject.defineProperty(exports, \"Formio\", ({ enumerable: true, get: function () { return Formio_1.Formio; } }));\nconst components_1 = __importDefault(__webpack_require__(/*! ./components */ \"./lib/cjs/components/index.js\"));\nconst Components_1 = __importDefault(__webpack_require__(/*! ./components/Components */ \"./lib/cjs/components/Components.js\"));\nexports.Components = Components_1.default;\nconst Displays_1 = __importDefault(__webpack_require__(/*! ./displays/Displays */ \"./lib/cjs/displays/Displays.js\"));\nexports.Displays = Displays_1.default;\nconst Templates_1 = __importDefault(__webpack_require__(/*! ./templates/Templates */ \"./lib/cjs/templates/Templates.js\"));\nexports.Templates = Templates_1.default;\nconst providers_1 = __importDefault(__webpack_require__(/*! ./providers */ \"./lib/cjs/providers/index.js\"));\nexports.Providers = providers_1.default;\nconst widgets_1 = __importDefault(__webpack_require__(/*! ./widgets */ \"./lib/cjs/widgets/index.js\"));\nexports.Widgets = widgets_1.default;\nconst Form_1 = __importDefault(__webpack_require__(/*! ./Form */ \"./lib/cjs/Form.js\"));\nexports.Form = Form_1.default;\nconst utils_1 = __importDefault(__webpack_require__(/*! ./utils */ \"./lib/cjs/utils/index.js\"));\nexports.Utils = utils_1.default;\nconst Evaluator_1 = __importDefault(__webpack_require__(/*! ./utils/Evaluator */ \"./lib/cjs/utils/Evaluator.js\"));\nconst licenses_1 = __importDefault(__webpack_require__(/*! ./licenses */ \"./lib/cjs/licenses/index.js\"));\nexports.Licenses = licenses_1.default;\nFormio_1.Formio.loadModules = (path = `${Formio_1.Formio.getApiUrl()}/externalModules.js`, name = 'externalModules') => {\n Formio_1.Formio.requireLibrary(name, name, path, true)\n .then((modules) => {\n Formio_1.Formio.use(modules);\n });\n};\n// This is needed to maintain correct imports using the \"dist\" file.\nFormio_1.Formio.isRenderer = true;\nFormio_1.Formio.Components = Components_1.default;\nFormio_1.Formio.Templates = Templates_1.default;\nFormio_1.Formio.Utils = utils_1.default;\nFormio_1.Formio.Form = Form_1.default;\nFormio_1.Formio.Displays = Displays_1.default;\nFormio_1.Formio.Providers = providers_1.default;\nFormio_1.Formio.Widgets = widgets_1.default;\nFormio_1.Formio.Evaluator = Evaluator_1.default;\nFormio_1.Formio.AllComponents = components_1.default;\nFormio_1.Formio.Licenses = licenses_1.default;\n// This is strange, but is needed for \"premium\" components to import correctly.\nFormio_1.Formio.Formio = Formio_1.Formio;\nFormio_1.Formio.Components.setComponents(components_1.default);\n/**\n * Register a module\n * @param {*} plugin\n * @returns\n */\nfunction registerModule(mod, defaultFn = null, options = {}) {\n // Sanity check.\n if (typeof mod !== 'object') {\n return;\n }\n for (const key of Object.keys(mod)) {\n const current = mod.framework || Formio_1.Formio.Templates.framework || 'bootstrap';\n switch (key) {\n case 'options':\n Formio_1.Formio.options = lodash_1.default.merge(Formio_1.Formio.options, mod.options);\n break;\n case 'templates':\n for (const framework of Object.keys(mod.templates)) {\n Formio_1.Formio.Templates.extendTemplate(framework, mod.templates[framework]);\n }\n if (mod.templates[current]) {\n Formio_1.Formio.Templates.current = mod.templates[current];\n }\n break;\n case 'components':\n Formio_1.Formio.Components.setComponents(mod.components);\n break;\n case 'framework':\n Formio_1.Formio.Templates.framework = mod.framework;\n break;\n case 'fetch':\n for (const name of Object.keys(mod.fetch)) {\n Formio_1.Formio.registerPlugin(mod.fetch[name], name);\n }\n break;\n case 'providers':\n for (const type of Object.keys(mod.providers)) {\n Formio_1.Formio.Providers.addProviders(type, mod.providers[type]);\n }\n break;\n case 'displays':\n Formio_1.Formio.Displays.addDisplays(mod.displays);\n break;\n case 'evaluator':\n Formio_1.Formio.Evaluator.registerEvaluator(mod.evaluator);\n break;\n case 'library':\n options.license\n ? Formio_1.Formio.Licenses.addLicense(mod.library, options.license)\n : Formio_1.Formio.Licenses.removeLicense(mod.library);\n break;\n default:\n if (defaultFn) {\n if (!defaultFn(key, mod)) {\n console.warn('Unknown module option', key);\n }\n break;\n }\n console.log('Unknown module option', key);\n }\n }\n}\nexports.registerModule = registerModule;\nfunction useModule(defaultFn = null) {\n return (plugins, options = {}) => {\n plugins = lodash_1.default.isArray(plugins) ? plugins : [plugins];\n plugins.forEach((plugin) => {\n if (Array.isArray(plugin)) {\n plugin.forEach(p => registerModule(p, defaultFn, options));\n }\n else {\n registerModule(plugin, defaultFn, options);\n }\n });\n };\n}\nexports.useModule = useModule;\n/**\n * Allows passing in plugins as an array of plugins or a single plugin.\n *\n * Formio.plugins(plugin1, options);\n * Formio.plugins([plugin1, plugin2, etc], options);\n */\nFormio_1.Formio.use = useModule();\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/formio.form.js?");
7923
6603
 
7924
6604
  /***/ }),
7925
6605
 
@@ -7941,7 +6621,7 @@ eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {
7941
6621
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
7942
6622
 
7943
6623
  "use strict";
7944
- eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Formio = exports.Builders = exports.FormBuilder = void 0;\nconst FormBuilder_1 = __importDefault(__webpack_require__(/*! ./FormBuilder */ \"./lib/cjs/FormBuilder.js\"));\nexports.FormBuilder = FormBuilder_1.default;\nconst Builders_1 = __importDefault(__webpack_require__(/*! ./builders/Builders */ \"./lib/cjs/builders/Builders.js\"));\nexports.Builders = Builders_1.default;\nconst formio_form_1 = __webpack_require__(/*! ./formio.form */ \"./lib/cjs/formio.form.js\");\nObject.defineProperty(exports, \"Formio\", ({ enumerable: true, get: function () { return formio_form_1.Formio; } }));\nformio_form_1.Formio.Builders = Builders_1.default;\nformio_form_1.Formio.use = (0, formio_form_1.useModule)((key, mod) => {\n if (key === 'builders') {\n formio_form_1.Formio.Builders.addBuilders(mod.builders);\n return true;\n }\n return false;\n});\n__exportStar(__webpack_require__(/*! ./formio.form */ \"./lib/cjs/formio.form.js\"), exports);\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/index.js?");
6624
+ eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Formio = exports.Builders = exports.FormBuilder = void 0;\nconst FormBuilder_1 = __importDefault(__webpack_require__(/*! ./FormBuilder */ \"./lib/cjs/FormBuilder.js\"));\nexports.FormBuilder = FormBuilder_1.default;\nconst Builders_1 = __importDefault(__webpack_require__(/*! ./builders/Builders */ \"./lib/cjs/builders/Builders.js\"));\nexports.Builders = Builders_1.default;\nconst formio_form_1 = __webpack_require__(/*! ./formio.form */ \"./lib/cjs/formio.form.js\");\nObject.defineProperty(exports, \"Formio\", ({ enumerable: true, get: function () { return formio_form_1.Formio; } }));\nformio_form_1.Formio.Builders = Builders_1.default;\nformio_form_1.Formio.isBuilder = true;\nformio_form_1.Formio.use = (0, formio_form_1.useModule)((key, mod) => {\n if (key === 'builders') {\n formio_form_1.Formio.Builders.addBuilders(mod.builders);\n return true;\n }\n return false;\n});\n__exportStar(__webpack_require__(/*! ./formio.form */ \"./lib/cjs/formio.form.js\"), exports);\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/index.js?");
7945
6625
 
7946
6626
  /***/ }),
7947
6627
 
@@ -8183,7 +6863,7 @@ eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {
8183
6863
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
8184
6864
 
8185
6865
  "use strict";
8186
- eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst lodash_1 = __importDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nconst index_1 = __importDefault(__webpack_require__(/*! ./index */ \"./lib/cjs/templates/index.js\"));\nclass Templates {\n static get templates() {\n if (!Templates._templates) {\n Templates._templates = index_1.default;\n }\n return Templates._templates;\n }\n static addTemplate(name, template) {\n Templates.templates[name] = template;\n }\n static extendTemplate(name, template) {\n Templates.templates[name] = lodash_1.default.merge({}, Templates.templates[name], template);\n }\n static setTemplate(name, template) {\n Templates.addTemplate(name, template);\n }\n static set current(templates) {\n const defaultTemplates = Templates.current;\n Templates._current = lodash_1.default.merge({}, defaultTemplates, templates);\n }\n static get current() {\n if (Templates._current) {\n return Templates._current;\n }\n return Templates.defaultTemplates;\n }\n static get defaultTemplates() {\n return Templates.templates.hasOwnProperty('bootstrap') ? Templates.templates.bootstrap : {};\n }\n static set framework(framework) {\n if (Templates.templates.hasOwnProperty(framework)) {\n Templates._framework = framework;\n Templates._current = Templates.templates[framework];\n }\n }\n static get framework() {\n return Templates._framework;\n }\n}\nexports[\"default\"] = Templates;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/templates/Templates.js?");
6866
+ eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst index_1 = __importDefault(__webpack_require__(/*! ./index */ \"./lib/cjs/templates/index.js\"));\nconst template_1 = __webpack_require__(/*! @formio/core/template */ \"./node_modules/@formio/core/lib/template/index.js\");\ntemplate_1.Template.addTemplates(index_1.default);\ntemplate_1.Template.defaultTemplates = index_1.default.bootstrap;\nexports[\"default\"] = template_1.Template;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/templates/Templates.js?");
8187
6867
 
8188
6868
  /***/ }),
8189
6869
 
@@ -8491,7 +7171,7 @@ eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {
8491
7171
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
8492
7172
 
8493
7173
  "use strict";
8494
- eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst FormioUtils = __importStar(__webpack_require__(/*! ./utils */ \"./lib/cjs/utils/utils.js\"));\nif (typeof __webpack_require__.g === 'object') {\n __webpack_require__.g.FormioUtils = FormioUtils;\n}\nexports[\"default\"] = FormioUtils;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/utils/index.js?");
7174
+ eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Utils = void 0;\nconst FormioUtils = __importStar(__webpack_require__(/*! ./utils */ \"./lib/cjs/utils/utils.js\"));\nexports.Utils = FormioUtils;\nif (typeof __webpack_require__.g === 'object') {\n __webpack_require__.g.FormioUtils = FormioUtils;\n}\nexports[\"default\"] = FormioUtils;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/utils/index.js?");
8495
7175
 
8496
7176
  /***/ }),
8497
7177
 
@@ -8965,7 +7645,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
8965
7645
  \******************************************************************************************/
8966
7646
  /***/ (function(__unused_webpack_module, exports) {
8967
7647
 
8968
- eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '<table class=\"table datagrid-table table-bordered\\n ' +\n((__t = ( ctx.component.striped ? 'table-striped' : '')) == null ? '' : __t) +\n'\\n ' +\n((__t = ( ctx.component.hover ? 'table-hover' : '')) == null ? '' : __t) +\n'\\n ' +\n((__t = ( ctx.component.condensed ? 'table-sm' : '')) == null ? '' : __t) +\n'\\n \" ';\n if (ctx.component.layoutFixed) { ;\n__p += 'style=\"table-layout: fixed;\"';\n } ;\n__p += '>\\n ';\n if (ctx.hasHeader) { ;\n__p += '\\n <thead>\\n <tr>\\n ';\n if (ctx.component.reorder) { ;\n__p += '<th></th>';\n } ;\n__p += '\\n ';\n ctx.columns.forEach(function(col) { ;\n__p += '\\n <th class=\"' +\n((__t = (col.validate && col.validate.required ? 'field-required' : '')) == null ? '' : __t) +\n'\">\\n ' +\n((__t = ( col.hideLabel ? '' : ctx.t(col.label || col.title, { _userInput: true }) )) == null ? '' : __t) +\n'\\n ';\n if (col.tooltip) { ;\n__p += ' <i ref=\"tooltip\" tabindex=\"0\" data-title=\"' +\n((__t = (col.tooltip)) == null ? '' : __t) +\n'\" class=\"' +\n((__t = (ctx.iconClass('question-sign'))) == null ? '' : __t) +\n' text-muted\" data-tooltip=\"' +\n((__t = (col.tooltip)) == null ? '' : __t) +\n'\"></i>';\n } ;\n__p += '\\n </th>\\n ';\n }) ;\n__p += '\\n ';\n if (ctx.hasExtraColumn) { ;\n__p += '\\n <th>\\n <span class=\"visually-hidden\">' +\n((__t = ( ctx.t('Add/Remove') )) == null ? '' : __t) +\n'</span>\\n ';\n if (!ctx.builder && ctx.hasAddButton && ctx.hasTopSubmit) { ;\n__p += '\\n <button class=\"btn btn-primary formio-button-add-row\" ref=\"' +\n((__t = (ctx.datagridKey)) == null ? '' : __t) +\n'-addRow\" tabindex=\"' +\n((__t = (ctx.tabIndex)) == null ? '' : __t) +\n'\">\\n <i class=\"' +\n((__t = (ctx.iconClass('plus'))) == null ? '' : __t) +\n'\"></i>' +\n((__t = (ctx.t(ctx.component.addAnother || 'Add Another', { _userInput: true }))) == null ? '' : __t) +\n'\\n </button>\\n ';\n } ;\n__p += '\\n </th>\\n ';\n } ;\n__p += '\\n </tr>\\n </thead>\\n ';\n } ;\n__p += '\\n <tbody ref=\"' +\n((__t = (ctx.datagridKey)) == null ? '' : __t) +\n'-tbody\" data-key=\"' +\n((__t = (ctx.datagridKey)) == null ? '' : __t) +\n'\">\\n ';\n ctx.rows.forEach(function(row, index) { ;\n__p += '\\n ';\n if (ctx.hasGroups && ctx.groups[index]) { ;\n__p += '\\n <tr ref=\"' +\n((__t = (ctx.datagridKey)) == null ? '' : __t) +\n'-group-header\" class=\"datagrid-group-header' +\n((__t = (ctx.hasToggle ? ' clickable' : '')) == null ? '' : __t) +\n'\">\\n <td\\n ref=\"' +\n((__t = (ctx.datagridKey)) == null ? '' : __t) +\n'-group-label\"\\n colspan=\"' +\n((__t = (ctx.numColumns)) == null ? '' : __t) +\n'\"\\n class=\"datagrid-group-label\">' +\n((__t = (ctx.groups[index].label)) == null ? '' : __t) +\n'</td>\\n </tr>\\n ';\n } ;\n__p += '\\n <tr ref=\"' +\n((__t = (ctx.datagridKey)) == null ? '' : __t) +\n'-row\">\\n ';\n if (ctx.component.reorder) { ;\n__p += '\\n <td>\\n <button type=\"button\" class=\"formio-drag-button btn btn-default bi bi-list\" data-key=\"' +\n((__t = (ctx.datagridKey)) == null ? '' : __t) +\n'\"></button>\\n </td>\\n ';\n } ;\n__p += '\\n ';\n ctx.columns.forEach(function(col) { ;\n__p += '\\n <td ref=\"' +\n((__t = (ctx.datagridKey)) == null ? '' : __t) +\n'\" ';\n if (col.key && col.overlay && col.overlay.width) { ;\n__p += ' style=\"width: ' +\n((__t = (col.overlay.width + 'px')) == null ? '' : __t) +\n'\"';\n } ;\n__p += ' >\\n ' +\n((__t = (row[col.key])) == null ? '' : __t) +\n'\\n </td>\\n ';\n }) ;\n__p += '\\n ';\n if (ctx.hasExtraColumn) { ;\n__p += '\\n ';\n if (ctx.hasRemoveButtons) { ;\n__p += '\\n <td>\\n <button type=\"button\" class=\"btn btn-secondary formio-button-remove-row\" ref=\"' +\n((__t = (ctx.datagridKey)) == null ? '' : __t) +\n'-removeRow\" tabindex=\"' +\n((__t = (ctx.tabIndex)) == null ? '' : __t) +\n'\" aria-label=\"' +\n((__t = (ctx.t('remove'))) == null ? '' : __t) +\n'\">\\n <i class=\"' +\n((__t = (ctx.iconClass('remove-circle'))) == null ? '' : __t) +\n'\"></i>\\n </button>\\n </td>\\n ';\n } ;\n__p += '\\n ';\n if (ctx.canAddColumn) { ;\n__p += '\\n <td ref=\"' +\n((__t = (ctx.key)) == null ? '' : __t) +\n'-container\">\\n ' +\n((__t = (ctx.placeholder)) == null ? '' : __t) +\n'\\n </td>\\n ';\n } ;\n__p += '\\n ';\n } ;\n__p += '\\n </tr>\\n ';\n }) ;\n__p += '\\n </tbody>\\n ';\n if (!ctx.builder && ctx.hasAddButton && ctx.hasBottomSubmit) { ;\n__p += '\\n <tfoot>\\n <tr>\\n <td colspan=\"' +\n((__t = (ctx.component.layoutFixed ? ctx.numColumns : ctx.numColumns + 1)) == null ? '' : __t) +\n'\">\\n <button class=\"btn btn-primary formio-button-add-row\" ref=\"' +\n((__t = (ctx.datagridKey)) == null ? '' : __t) +\n'-addRow\" tabindex=\"' +\n((__t = (ctx.tabIndex)) == null ? '' : __t) +\n'\">\\n <i class=\"' +\n((__t = (ctx.iconClass('plus'))) == null ? '' : __t) +\n'\"></i> ' +\n((__t = (ctx.t(ctx.component.addAnother || 'Add Another', { _userInput: true }))) == null ? '' : __t) +\n'\\n </button>\\n </td>\\n </tr>\\n </tfoot>\\n ';\n } ;\n__p += '\\n</table>\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/bootstrap/lib/cjs/templates/bootstrap5/datagrid/form.ejs.js?");
7648
+ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '<table class=\"table datagrid-table table-bordered\\n ' +\n((__t = ( ctx.component.striped ? 'table-striped' : '')) == null ? '' : __t) +\n'\\n ' +\n((__t = ( ctx.component.hover ? 'table-hover' : '')) == null ? '' : __t) +\n'\\n ' +\n((__t = ( ctx.component.condensed ? 'table-sm' : '')) == null ? '' : __t) +\n'\\n \" ';\n if (ctx.component.layoutFixed) { ;\n__p += 'style=\"table-layout: fixed;\"';\n } ;\n__p += '>\\n ';\n if (ctx.hasHeader) { ;\n__p += '\\n <thead>\\n <tr>\\n ';\n if (ctx.component.reorder) { ;\n__p += '<th></th>';\n } ;\n__p += '\\n ';\n ctx.columns.forEach(function(col) { ;\n__p += '\\n <th class=\"' +\n((__t = (col.validate && col.validate.required ? 'field-required' : '')) == null ? '' : __t) +\n'\">\\n ' +\n((__t = ( col.hideLabel ? '' : ctx.t(col.label || col.title, { _userInput: true }) )) == null ? '' : __t) +\n'\\n ';\n if (col.tooltip) { ;\n__p += ' <i ref=\"tooltip\" tabindex=\"0\" data-title=\"' +\n((__t = (col.tooltip)) == null ? '' : __t) +\n'\" class=\"' +\n((__t = (ctx.iconClass('question-sign'))) == null ? '' : __t) +\n' text-muted\" data-tooltip=\"' +\n((__t = (col.tooltip)) == null ? '' : __t) +\n'\"></i>';\n } ;\n__p += '\\n </th>\\n ';\n }) ;\n__p += '\\n ';\n if (ctx.hasExtraColumn) { ;\n__p += '\\n <th>\\n <span class=\"visually-hidden\">' +\n((__t = ( ctx.t('Add/Remove') )) == null ? '' : __t) +\n'</span>\\n ';\n if (!ctx.builder && ctx.hasAddButton && ctx.hasTopSubmit) { ;\n__p += '\\n <button class=\"btn btn-primary formio-button-add-row\" ref=\"' +\n((__t = (ctx.datagridKey)) == null ? '' : __t) +\n'-addRow\" tabindex=\"' +\n((__t = (ctx.tabIndex)) == null ? '' : __t) +\n'\">\\n <i class=\"' +\n((__t = (ctx.iconClass('plus'))) == null ? '' : __t) +\n'\"></i>' +\n((__t = (ctx.t(ctx.component.addAnother || 'Add Another', { _userInput: true }))) == null ? '' : __t) +\n'\\n </button>\\n ';\n } ;\n__p += '\\n </th>\\n ';\n } ;\n__p += '\\n </tr>\\n </thead>\\n ';\n } ;\n__p += '\\n <tbody ref=\"' +\n((__t = (ctx.datagridKey)) == null ? '' : __t) +\n'-tbody\" data-key=\"' +\n((__t = (ctx.datagridKey)) == null ? '' : __t) +\n'\">\\n ';\n ctx.rows.forEach(function(row, index) { ;\n__p += '\\n ';\n if (ctx.hasGroups && ctx.groups[index]) { ;\n__p += '\\n <tr ref=\"' +\n((__t = (ctx.datagridKey)) == null ? '' : __t) +\n'-group-header\" class=\"datagrid-group-header' +\n((__t = (ctx.hasToggle ? ' clickable' : '')) == null ? '' : __t) +\n'\">\\n <td\\n ref=\"' +\n((__t = (ctx.datagridKey)) == null ? '' : __t) +\n'-group-label\"\\n colspan=\"' +\n((__t = (ctx.numColumns)) == null ? '' : __t) +\n'\"\\n class=\"datagrid-group-label\">' +\n((__t = (ctx.groups[index].label)) == null ? '' : __t) +\n'</td>\\n </tr>\\n ';\n } ;\n__p += '\\n <tr ref=\"' +\n((__t = (ctx.datagridKey)) == null ? '' : __t) +\n'-row\">\\n ';\n if (ctx.component.reorder) { ;\n__p += '\\n <td>\\n <button type=\"button\" class=\"formio-drag-button btn btn-default bi bi-list\" data-key=\"' +\n((__t = (ctx.datagridKey)) == null ? '' : __t) +\n'\"></button>\\n </td>\\n ';\n } ;\n__p += '\\n ';\n ctx.columns.forEach(function(col) { ;\n__p += '\\n <td ref=\"' +\n((__t = (ctx.datagridKey)) == null ? '' : __t) +\n'\" ';\n if (col.key && col.overlay && col.overlay.width) { ;\n__p += ' style=\"width: ' +\n((__t = (col.overlay.width + 'px')) == null ? '' : __t) +\n'\"';\n } ;\n__p += ' >\\n ' +\n((__t = (row[col.key])) == null ? '' : __t) +\n'\\n </td>\\n ';\n }) ;\n__p += '\\n ';\n if (ctx.hasExtraColumn) { ;\n__p += '\\n ';\n if (ctx.hasRemoveButtons) { ;\n__p += '\\n <td>\\n <button type=\"button\" class=\"btn btn-secondary formio-button-remove-row\" ref=\"' +\n((__t = (ctx.datagridKey)) == null ? '' : __t) +\n'-removeRow\" tabindex=\"' +\n((__t = (ctx.tabIndex)) == null ? '' : __t) +\n'\" aria-label=\"' +\n((__t = (ctx.t('remove'))) == null ? '' : __t) +\n'\">\\n <i class=\"' +\n((__t = (ctx.iconClass('remove-circle'))) == null ? '' : __t) +\n'\"></i>\\n </button>\\n </td>\\n ';\n } ;\n__p += '\\n ';\n if (ctx.canAddColumn) { ;\n__p += '\\n <td ref=\"' +\n((__t = (ctx.key)) == null ? '' : __t) +\n'-container\" class=\"col-md-3\">\\n ' +\n((__t = (ctx.placeholder)) == null ? '' : __t) +\n'\\n </td>\\n ';\n } ;\n__p += '\\n ';\n } ;\n__p += '\\n </tr>\\n ';\n }) ;\n__p += '\\n </tbody>\\n ';\n if (!ctx.builder && ctx.hasAddButton && ctx.hasBottomSubmit) { ;\n__p += '\\n <tfoot>\\n <tr>\\n <td colspan=\"' +\n((__t = (ctx.component.layoutFixed ? ctx.numColumns : ctx.numColumns + 1)) == null ? '' : __t) +\n'\">\\n <button class=\"btn btn-primary formio-button-add-row\" ref=\"' +\n((__t = (ctx.datagridKey)) == null ? '' : __t) +\n'-addRow\" tabindex=\"' +\n((__t = (ctx.tabIndex)) == null ? '' : __t) +\n'\">\\n <i class=\"' +\n((__t = (ctx.iconClass('plus'))) == null ? '' : __t) +\n'\"></i> ' +\n((__t = (ctx.t(ctx.component.addAnother || 'Add Another', { _userInput: true }))) == null ? '' : __t) +\n'\\n </button>\\n </td>\\n </tr>\\n </tfoot>\\n ';\n } ;\n__p += '\\n</table>\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/bootstrap/lib/cjs/templates/bootstrap5/datagrid/form.ejs.js?");
8969
7649
 
8970
7650
  /***/ }),
8971
7651
 
@@ -9121,7 +7801,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\ncons
9121
7801
  \****************************************************************************************/
9122
7802
  /***/ (function(__unused_webpack_module, exports) {
9123
7803
 
9124
- eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '<div class=\"field-wrapper\\n ' +\n((__t = (ctx.isRightPosition ? 'field-wrapper--reverse' : '')) == null ? '' : __t) +\n'\">\\n ';\n if (!ctx.label.hidden) { ;\n__p += '\\n <div class=\"field-label\\n ' +\n((__t = (ctx.isRightAlign ? 'field-label--right' : '')) == null ? '' : __t) +\n'\"\\n style=\"' +\n((__t = (ctx.labelStyles)) == null ? '' : __t) +\n'\">\\n ' +\n((__t = ( ctx.labelMarkup )) == null ? '' : __t) +\n'\\n </div>\\n ';\n } ;\n__p += '\\n\\n ';\n if (ctx.label.hidden && ctx.label.className && ctx.component.validate.required) { ;\n__p += '\\n <div class=\"field-label\\n ' +\n((__t = (ctx.isRightAlign ? 'field-label--right' : '')) == null ? '' : __t) +\n'\"\\n style=\"' +\n((__t = (ctx.labelStyles)) == null ? '' : __t) +\n'\">\\n <label class=\"' +\n((__t = (ctx.label.className)) == null ? '' : __t) +\n'\"></label>\\n </div>\\n ';\n } ;\n__p += '\\n\\n <div class=\"field-content\" style=\"' +\n((__t = (ctx.contentStyles)) == null ? '' : __t) +\n'\">\\n ' +\n((__t = (ctx.element)) == null ? '' : __t) +\n'\\n </div>\\n</div>\\n\\n';\n if (ctx.component.description) { ;\n__p += '\\n <div class=\"form-text text-muted\">' +\n((__t = (ctx.t(ctx.component.description, { _userInput: true }))) == null ? '' : __t) +\n'</div>\\n';\n } ;\n__p += '\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/bootstrap/lib/cjs/templates/bootstrap5/field/align.ejs.js?");
7804
+ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '<div class=\"field-wrapper flex-fill\\n ' +\n((__t = (ctx.isRightPosition ? 'field-wrapper--reverse' : '')) == null ? '' : __t) +\n'\">\\n ';\n if (!ctx.label.hidden) { ;\n__p += '\\n <div class=\"field-label\\n ' +\n((__t = (ctx.isRightAlign ? 'field-label--right' : '')) == null ? '' : __t) +\n'\"\\n style=\"' +\n((__t = (ctx.labelStyles)) == null ? '' : __t) +\n'\">\\n ' +\n((__t = ( ctx.labelMarkup )) == null ? '' : __t) +\n'\\n </div>\\n ';\n } ;\n__p += '\\n\\n ';\n if (ctx.label.hidden && ctx.label.className && ctx.component.validate.required) { ;\n__p += '\\n <div class=\"field-label\\n ' +\n((__t = (ctx.isRightAlign ? 'field-label--right' : '')) == null ? '' : __t) +\n'\"\\n style=\"' +\n((__t = (ctx.labelStyles)) == null ? '' : __t) +\n'\">\\n <label class=\"' +\n((__t = (ctx.label.className)) == null ? '' : __t) +\n'\"></label>\\n </div>\\n ';\n } ;\n__p += '\\n\\n <div class=\"field-content\" style=\"' +\n((__t = (ctx.contentStyles)) == null ? '' : __t) +\n'\">\\n ' +\n((__t = (ctx.element)) == null ? '' : __t) +\n'\\n </div>\\n</div>\\n\\n';\n if (ctx.component.description) { ;\n__p += '\\n <div class=\"form-text text-muted\">' +\n((__t = (ctx.t(ctx.component.description, { _userInput: true }))) == null ? '' : __t) +\n'</div>\\n';\n } ;\n__p += '\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/bootstrap/lib/cjs/templates/bootstrap5/field/align.ejs.js?");
9125
7805
 
9126
7806
  /***/ }),
9127
7807
 
@@ -10108,6 +8788,17 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
10108
8788
 
10109
8789
  /***/ }),
10110
8790
 
8791
+ /***/ "./lib/cjs/Embed.js":
8792
+ /*!**************************!*\
8793
+ !*** ./lib/cjs/Embed.js ***!
8794
+ \**************************/
8795
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
8796
+
8797
+ "use strict";
8798
+ eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.FormBuilder = exports.Form = exports.Formio = void 0;\nconst CDN_js_1 = __importDefault(__webpack_require__(/*! ./CDN.js */ \"./lib/cjs/CDN.js\"));\nclass Formio {\n static setBaseUrl(url, norecurse = false) {\n Formio.baseUrl = url;\n if (!norecurse && Formio.FormioClass) {\n Formio.FormioClass.setBaseUrl(url);\n }\n }\n static setApiUrl(url, norecurse = false) {\n Formio.baseUrl = url;\n if (!norecurse && Formio.FormioClass) {\n Formio.FormioClass.setApiUrl(url);\n }\n }\n static setProjectUrl(url, norecurse = false) {\n Formio.projectUrl = url;\n if (!norecurse && Formio.FormioClass) {\n Formio.FormioClass.setProjectUrl(url);\n }\n }\n static setAppUrl(url, norecurse = false) {\n Formio.projectUrl = url;\n if (!norecurse && Formio.FormioClass) {\n Formio.FormioClass.setAppUrl(url);\n }\n }\n static setPathType(type, norecurse = false) {\n Formio.pathType = type;\n if (!norecurse && Formio.FormioClass) {\n Formio.FormioClass.setPathType(type);\n }\n }\n static debug(...args) {\n if (Formio.config.debug) {\n console.log(...args);\n }\n }\n static clearCache() {\n if (Formio.FormioClass) {\n Formio.FormioClass.clearCache();\n }\n }\n static global(prop, flag = '') {\n const globalValue = window[prop];\n if (flag && globalValue && !globalValue[flag]) {\n return null;\n }\n Formio.debug(`Getting global ${prop}`, globalValue);\n return globalValue;\n }\n static use(module) {\n if (Formio.FormioClass && Formio.FormioClass.isRenderer) {\n Formio.FormioClass.use(module);\n }\n else {\n Formio.modules.push(module);\n }\n }\n static createElement(type, attrs, children) {\n const element = document.createElement(type);\n Object.keys(attrs).forEach(key => {\n element.setAttribute(key, attrs[key]);\n });\n (children || []).forEach(child => {\n element.appendChild(Formio.createElement(child.tag, child.attrs, child.children));\n });\n return element;\n }\n static addScript(wrapper, src, name, flag = '') {\n return __awaiter(this, void 0, void 0, function* () {\n if (!src) {\n return Promise.resolve();\n }\n if (typeof src !== 'string' && src.length) {\n return Promise.all(src.map(ref => Formio.addScript(wrapper, ref)));\n }\n if (name && Formio.global(name, flag)) {\n Formio.debug(`${name} already loaded.`);\n return Promise.resolve(Formio.global(name));\n }\n Formio.debug('Adding Script', src);\n wrapper.appendChild(Formio.createElement('script', {\n src\n }));\n if (!name) {\n return Promise.resolve();\n }\n return new Promise((resolve) => {\n Formio.debug(`Waiting to load ${name}`);\n const wait = setInterval(() => {\n if (Formio.global(name, flag)) {\n clearInterval(wait);\n Formio.debug(`${name} loaded.`);\n resolve(Formio.global(name));\n }\n }, 100);\n });\n });\n }\n static addStyles(wrapper, href) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!href) {\n return;\n }\n if (typeof href !== 'string' && href.length) {\n href.forEach(ref => Formio.addStyles(wrapper, ref));\n return;\n }\n Formio.debug('Adding Styles', href);\n wrapper.appendChild(Formio.createElement('link', {\n rel: 'stylesheet',\n href\n }));\n });\n }\n static submitDone(instance, submission) {\n return __awaiter(this, void 0, void 0, function* () {\n Formio.debug('Submision Complete', submission);\n const successMessage = (Formio.config.success || '').toString();\n if (successMessage && successMessage.toLowerCase() !== 'false' && instance.element) {\n instance.element.innerHTML = `<div class=\"alert-success\" role=\"alert\">${successMessage}</div>`;\n }\n let returnUrl = Formio.config.redirect;\n // Allow form based configuration for return url.\n if (!returnUrl &&\n (instance._form &&\n instance._form.settings &&\n (instance._form.settings.returnUrl ||\n instance._form.settings.redirect))) {\n Formio.debug('Return url found in form configuration');\n returnUrl = instance._form.settings.returnUrl || instance._form.settings.redirect;\n }\n if (returnUrl) {\n const formSrc = instance.formio ? instance.formio.formUrl : '';\n const hasQuery = !!returnUrl.match(/\\?/);\n const isOrigin = returnUrl.indexOf(location.origin) === 0;\n returnUrl += hasQuery ? '&' : '?';\n returnUrl += `sub=${submission._id}`;\n if (!isOrigin && formSrc) {\n returnUrl += `&form=${encodeURIComponent(formSrc)}`;\n }\n Formio.debug('Return URL', returnUrl);\n window.location.href = returnUrl;\n if (isOrigin) {\n window.location.reload();\n }\n }\n });\n }\n // Return the full script if the builder is being used.\n static formioScript(script, builder) {\n if (Formio.fullAdded || builder) {\n Formio.fullAdded = true;\n return script.replace('formio.form', 'formio.full');\n }\n return script;\n }\n // eslint-disable-next-line max-statements\n static init(element, options = {}, builder = false) {\n return __awaiter(this, void 0, void 0, function* () {\n Formio.cdn = new CDN_js_1.default(Formio.config.cdn, Formio.config.cdnUrls || {});\n Formio.config.libs = Formio.config.libs || {\n uswds: {\n fa: true,\n js: `${Formio.cdn.uswds}/uswds.min.js`,\n css: `${Formio.cdn.uswds}/uswds.min.css`,\n },\n fontawesome: {\n css: `${Formio.cdn['font-awesome']}/css/font-awesome.min.css`\n },\n bootstrap: {\n css: `${Formio.cdn.bootstrap}/css/bootstrap.min.css`\n }\n };\n const id = Formio.config.id || `formio-${Math.random().toString(36).substring(7)}`;\n // Create a new wrapper and add the element inside of a new wrapper.\n let wrapper = Formio.createElement('div', {\n 'id': `\"${id}-wrapper\"`\n });\n element.parentNode.insertBefore(wrapper, element);\n // If we include the libraries, then we will attempt to run this in shadow dom.\n if (Formio.config.includeLibs && (typeof wrapper.attachShadow === 'function') && !Formio.config.premium) {\n wrapper = wrapper.attachShadow({\n mode: 'open'\n });\n options.shadowRoot = wrapper;\n }\n element.parentNode.removeChild(element);\n wrapper.appendChild(element);\n // Load the renderer styles.\n yield Formio.addStyles(wrapper, Formio.config.embedCSS || `${Formio.cdn.js}/formio.embed.css`);\n // Add a loader.\n wrapper.appendChild(Formio.createElement('div', {\n 'class': 'formio-loader'\n }, [{\n tag: 'div',\n attrs: {\n class: 'loader-wrapper'\n },\n children: [{\n tag: 'div',\n attrs: {\n class: 'loader text-center'\n }\n }]\n }]));\n const renderer = Formio.config.debug ? 'formio.form' : 'formio.form.min';\n Formio.FormioClass = yield Formio.addScript(wrapper, Formio.formioScript(Formio.config.script || `${Formio.cdn.js}/${renderer}.js`, builder), 'Formio', builder ? 'isBuilder' : 'isRenderer');\n Formio.FormioClass.setBaseUrl(options.baseUrl || Formio.baseUrl || Formio.config.base);\n Formio.FormioClass.setProjectUrl(options.projectUrl || Formio.projectUrl || Formio.config.project);\n Formio.FormioClass.language = Formio.language;\n Formio.modules.forEach((module) => {\n Formio.FormioClass.use(module);\n });\n if (Formio.icons) {\n Formio.FormioClass.icons = Formio.icons;\n }\n if (Formio.pathType) {\n Formio.FormioClass.setPathType(Formio.pathType);\n }\n // Add premium modules\n if (Formio.global('premium')) {\n Formio.debug('Using premium module.');\n Formio.FormioClass.use(Formio.global('premium'));\n }\n if (Formio.global('vpat')) {\n Formio.debug('Using vpat module.');\n Formio.FormioClass.use(Formio.global('vpat'));\n }\n if (Formio.config.template) {\n if (Formio.config.includeLibs) {\n yield Formio.addStyles(wrapper, Formio.config.libs[Formio.config.template].css);\n yield Formio.addScript(wrapper, Formio.config.libs[Formio.config.template].js);\n if (Formio.config.libs[Formio.config.template].fa) {\n yield Formio.addStyles(wrapper, Formio.config.libs.fontawesome.css);\n }\n }\n if (Formio.cdn[Formio.config.template]) {\n const templateSrc = `${Formio.cdn[Formio.config.template]}/${Formio.config.template}.min`;\n yield Formio.addStyles(wrapper, `${templateSrc}.css`);\n Formio.debug(`Using ${Formio.config.template}`);\n Formio.FormioClass.use(yield Formio.addScript(wrapper, `${templateSrc}.js`, Formio.config.template));\n }\n }\n else if (Formio.global('uswds')) {\n Formio.debug('Using uswds module.');\n Formio.FormioClass.use(Formio.global('uswds'));\n }\n // Default bootstrap + fontawesome.\n else if (Formio.config.includeLibs) {\n yield Formio.addStyles(wrapper, Formio.config.libs.fontawesome.css);\n yield Formio.addStyles(wrapper, Formio.config.libs.bootstrap.css);\n }\n if (Formio.config.premium) {\n yield Formio.addStyles(wrapper, Formio.config.premium.css);\n Formio.debug('Using premium');\n Formio.FormioClass.use(yield Formio.addScript(wrapper, Formio.config.premium.js, 'premium'));\n }\n yield Formio.addStyles(wrapper, Formio.formioScript(Formio.config.style || `${Formio.cdn.js}/${renderer}.css`, builder));\n if (Formio.config.before) {\n yield Formio.config.before(Formio.FormioClass, element, Formio.config);\n }\n Formio.FormioClass.license = true;\n Formio._formioReady(Formio.FormioClass);\n return wrapper;\n });\n }\n static createForm(element, form, options = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const wrapper = yield Formio.init(element, options);\n return Formio.FormioClass.createForm(element, form, Object.assign(Object.assign({}, options), { noLoader: true })).then((instance) => {\n Formio.debug('Form created', instance);\n // Remove the loader.\n Formio.debug('Removing loader');\n wrapper.removeChild(wrapper.querySelector('.formio-loader'));\n // Set the default submission data.\n if (Formio.config.submission) {\n Formio.debug('Setting submission', Formio.config.submission);\n instance.submission = Formio.config.submission;\n }\n // Allow them to provide additional configs.\n Formio.debug('Triggering embed event');\n Formio.FormioClass.events.emit('formEmbedded', instance);\n // Trigger the after handler.\n if (Formio.config.after) {\n Formio.debug('Calling ready callback');\n Formio.config.after(instance, Formio.config);\n }\n return instance;\n });\n });\n }\n static builder(element, form, options = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const wrapper = yield Formio.init(element, options, true);\n return Formio.FormioClass.builder(element, form, options).then((instance) => {\n Formio.debug('Builder created', instance);\n Formio.debug('Removing loader');\n wrapper.removeChild(wrapper.querySelector('.formio-loader'));\n Formio.debug('Triggering embed event');\n Formio.FormioClass.events.emit('builderEmbedded', instance);\n if (Formio.config.after) {\n Formio.debug('Calling ready callback');\n Formio.config.after(instance, Formio.config);\n }\n return instance;\n });\n });\n }\n}\nFormio.FormioClass = null;\nFormio.config = {};\nFormio.cdn = new CDN_js_1.default();\nFormio.modules = [];\nFormio.icons = '';\nFormio.formioReady = new Promise((ready, reject) => {\n Formio._formioReady = ready;\n Formio._formioReadyReject = reject;\n});\nFormio.version = '5.0.0-rc.30';\nexports.Formio = Formio;\nclass Form {\n constructor(element, form, options) {\n this.form = form;\n this.element = element;\n this.options = options || {};\n this.init();\n this.instance = {\n proxy: true,\n ready: this.ready,\n destroy: () => { }\n };\n }\n init() {\n this.element.innerHTML = '';\n this.ready = this.create().then((instance) => {\n this.instance = instance;\n this.form = instance.form;\n return instance;\n });\n }\n create() {\n return Formio.createForm(this.element, this.form, this.options);\n }\n setDisplay(display) {\n if (this.instance.proxy) {\n return this.ready;\n }\n this.form.display = display;\n this.init();\n return this.ready;\n }\n}\nexports.Form = Form;\nclass FormBuilder extends Form {\n create() {\n return Formio.builder(this.element, this.form, this.options);\n }\n}\nexports.FormBuilder = FormBuilder;\nFormio.Form = Form;\nFormio.FormBuilder = FormBuilder;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/Embed.js?");
8799
+
8800
+ /***/ }),
8801
+
10111
8802
  /***/ "./lib/cjs/Formio.js":
10112
8803
  /*!***************************!*\
10113
8804
  !*** ./lib/cjs/Formio.js ***!
@@ -10115,7 +8806,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
10115
8806
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
10116
8807
 
10117
8808
  "use strict";
10118
- eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Formio = void 0;\nconst core_1 = __webpack_require__(/*! @formio/core */ \"./node_modules/@formio/core/lib/index.js\");\nObject.defineProperty(exports, \"Formio\", ({ enumerable: true, get: function () { return core_1.Formio; } }));\nconst CDN_1 = __importDefault(__webpack_require__(/*! ./CDN */ \"./lib/cjs/CDN.js\"));\nconst providers_1 = __importDefault(__webpack_require__(/*! ./providers */ \"./lib/cjs/providers/index.js\"));\ncore_1.Formio.cdn = new CDN_1.default();\ncore_1.Formio.Providers = providers_1.default;\ncore_1.Formio.version = '5.0.0-rc.28';\nconst isNil = (val) => val === null || val === undefined;\ncore_1.Formio.prototype.uploadFile = function (storage, file, fileName, dir, progressCallback, url, options, fileKey, groupPermissions, groupId, uploadStartCallback, abortCallback) {\n const requestArgs = {\n provider: storage,\n method: 'upload',\n file: file,\n fileName: fileName,\n dir: dir\n };\n fileKey = fileKey || 'file';\n const request = core_1.Formio.pluginWait('preRequest', requestArgs)\n .then(() => {\n return core_1.Formio.pluginGet('fileRequest', requestArgs)\n .then((result) => {\n if (storage && isNil(result)) {\n const Provider = providers_1.default.getProvider('storage', storage);\n if (Provider) {\n const provider = new Provider(this);\n if (uploadStartCallback) {\n uploadStartCallback();\n }\n return provider.uploadFile(file, fileName, dir, progressCallback, url, options, fileKey, groupPermissions, groupId, abortCallback);\n }\n else {\n throw ('Storage provider not found');\n }\n }\n return result || { url: '' };\n });\n });\n return core_1.Formio.pluginAlter('wrapFileRequestPromise', request, requestArgs);\n};\ncore_1.Formio.prototype.downloadFile = function (file, options) {\n const requestArgs = {\n method: 'download',\n file: file\n };\n const request = core_1.Formio.pluginWait('preRequest', requestArgs)\n .then(() => {\n return core_1.Formio.pluginGet('fileRequest', requestArgs)\n .then((result) => {\n if (file.storage && isNil(result)) {\n const Provider = providers_1.default.getProvider('storage', file.storage);\n if (Provider) {\n const provider = new Provider(this);\n return provider.downloadFile(file, options);\n }\n else {\n throw ('Storage provider not found');\n }\n }\n return result || { url: '' };\n });\n });\n return core_1.Formio.pluginAlter('wrapFileRequestPromise', request, requestArgs);\n};\ncore_1.Formio.prototype.deleteFile = function (file, options) {\n const requestArgs = {\n method: 'delete',\n file: file\n };\n const request = core_1.Formio.pluginWait('preRequest', requestArgs)\n .then(() => {\n return core_1.Formio.pluginGet('fileRequest', requestArgs)\n .then((result) => {\n if (file.storage && isNil(result)) {\n const Provider = providers_1.default.getProvider('storage', file.storage);\n if (Provider) {\n const provider = new Provider(this);\n return provider.deleteFile(file, options);\n }\n else {\n throw ('Storage provider not found');\n }\n }\n return result || { url: '' };\n });\n });\n return core_1.Formio.pluginAlter('wrapFileRequestPromise', request, requestArgs);\n};\n// For reverse compatability.\ncore_1.Formio.Promise = Promise;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/Formio.js?");
8809
+ eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Formio = void 0;\nconst sdk_1 = __webpack_require__(/*! @formio/core/sdk */ \"./node_modules/@formio/core/lib/sdk/index.js\");\nObject.defineProperty(exports, \"Formio\", ({ enumerable: true, get: function () { return sdk_1.Formio; } }));\nconst Embed_1 = __webpack_require__(/*! ./Embed */ \"./lib/cjs/Embed.js\");\nconst CDN_1 = __importDefault(__webpack_require__(/*! ./CDN */ \"./lib/cjs/CDN.js\"));\nconst providers_1 = __importDefault(__webpack_require__(/*! ./providers */ \"./lib/cjs/providers/index.js\"));\nsdk_1.Formio.cdn = new CDN_1.default();\nsdk_1.Formio.Providers = providers_1.default;\nsdk_1.Formio.version = '5.0.0-rc.30';\nconst isNil = (val) => val === null || val === undefined;\nsdk_1.Formio.prototype.uploadFile = function (storage, file, fileName, dir, progressCallback, url, options, fileKey, groupPermissions, groupId, uploadStartCallback, abortCallback, multipartOptions) {\n const requestArgs = {\n provider: storage,\n method: 'upload',\n file: file,\n fileName: fileName,\n dir: dir\n };\n fileKey = fileKey || 'file';\n const request = sdk_1.Formio.pluginWait('preRequest', requestArgs)\n .then(() => {\n return sdk_1.Formio.pluginGet('fileRequest', requestArgs)\n .then((result) => {\n if (storage && isNil(result)) {\n const Provider = providers_1.default.getProvider('storage', storage);\n if (Provider) {\n const provider = new Provider(this);\n if (uploadStartCallback) {\n uploadStartCallback();\n }\n return provider.uploadFile(file, fileName, dir, progressCallback, url, options, fileKey, groupPermissions, groupId, abortCallback, multipartOptions);\n }\n else {\n throw ('Storage provider not found');\n }\n }\n return result || { url: '' };\n });\n });\n return sdk_1.Formio.pluginAlter('wrapFileRequestPromise', request, requestArgs);\n};\nsdk_1.Formio.prototype.downloadFile = function (file, options) {\n const requestArgs = {\n method: 'download',\n file: file\n };\n const request = sdk_1.Formio.pluginWait('preRequest', requestArgs)\n .then(() => {\n return sdk_1.Formio.pluginGet('fileRequest', requestArgs)\n .then((result) => {\n if (file.storage && isNil(result)) {\n const Provider = providers_1.default.getProvider('storage', file.storage);\n if (Provider) {\n const provider = new Provider(this);\n return provider.downloadFile(file, options);\n }\n else {\n throw ('Storage provider not found');\n }\n }\n return result || { url: '' };\n });\n });\n return sdk_1.Formio.pluginAlter('wrapFileRequestPromise', request, requestArgs);\n};\nsdk_1.Formio.prototype.deleteFile = function (file, options) {\n const requestArgs = {\n method: 'delete',\n file: file\n };\n const request = sdk_1.Formio.pluginWait('preRequest', requestArgs)\n .then(() => {\n return sdk_1.Formio.pluginGet('fileRequest', requestArgs)\n .then((result) => {\n if (file.storage && isNil(result)) {\n const Provider = providers_1.default.getProvider('storage', file.storage);\n if (Provider) {\n const provider = new Provider(this);\n return provider.deleteFile(file, options);\n }\n else {\n throw ('Storage provider not found');\n }\n }\n return result || { url: '' };\n });\n });\n return sdk_1.Formio.pluginAlter('wrapFileRequestPromise', request, requestArgs);\n};\n// For reverse compatability.\nsdk_1.Formio.Promise = Promise;\nsdk_1.Formio.formioReady = Embed_1.Formio.formioReady;\nsdk_1.Formio.config = Embed_1.Formio.config;\nsdk_1.Formio.builder = Embed_1.Formio.builder;\nsdk_1.Formio.Form = Embed_1.Formio.Form;\nsdk_1.Formio.FormBuilder = Embed_1.Formio.FormBuilder;\nsdk_1.Formio.use = Embed_1.Formio.use;\nsdk_1.Formio.createForm = Embed_1.Formio.createForm;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/Formio.js?");
10119
8810
 
10120
8811
  /***/ }),
10121
8812