From ef19e00bca86c64ba6d81bd9cb79227d48300f20 Mon Sep 17 00:00:00 2001 From: Travis Tidwell Date: Thu, 15 Dec 2022 22:04:33 -0500 Subject: [PATCH] Updated build --- Changelog.md | 2 +- dist/formio.contrib.js | 6 +- dist/formio.contrib.min.js | 2 +- dist/formio.contrib.min.js.LICENSE.txt | 4 +- dist/formio.embed.min.js.LICENSE.txt | 2 +- dist/formio.form.js | 8 +- dist/formio.form.min.js | 2 +- dist/formio.form.min.js.LICENSE.txt | 4 +- dist/formio.full.js | 8 +- dist/formio.full.min.js | 2 +- dist/formio.full.min.js.LICENSE.txt | 4 +- dist/formio.js | 4 +- dist/formio.min.js | 2 +- dist/formio.min.js.LICENSE.txt | 4 +- dist/formio.utils.js | 2 +- dist/formio.utils.min.js | 2 +- dist/formio.utils.min.js.LICENSE.txt | 4 +- .../components/datetime/DateTime.js.json | 10529 +++++++--------- .../DateTime.js~DateTimeComponent.html | 119 +- docs/coverage.json | 25 +- .../src/components/datetime/DateTime.js.html | 8 - docs/index.json | 2305 ++-- docs/script/search_index.js | 6 - docs/source.html | 124 +- package.json | 2 +- resources/latest.json | 73 +- yarn.lock | 12 +- 27 files changed, 5744 insertions(+), 7521 deletions(-) diff --git a/Changelog.md b/Changelog.md index 58dcd565df..23bd28e351 100644 --- a/Changelog.md +++ b/Changelog.md @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -## [Unreleased: 4.14.11-rc.14] +## 4.14.11-rc.14 ### Fixed - FIO-6005: Fixing multiple issues with DateTime not showing correct timezones. diff --git a/dist/formio.contrib.js b/dist/formio.contrib.js index 4466e447ce..c694c96fe7 100644 --- a/dist/formio.contrib.js +++ b/dist/formio.contrib.js @@ -59,7 +59,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = exports.GlobalFormio = void 0;\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.match.js */ \"./node_modules/core-js/modules/es.string.match.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.search.js */ \"./node_modules/core-js/modules/es.string.search.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.split.js */ \"./node_modules/core-js/modules/es.string.split.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.constructor.js */ \"./node_modules/core-js/modules/es.regexp.constructor.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.assign.js */ \"./node_modules/core-js/modules/es.object.assign.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.sort.js */ \"./node_modules/core-js/modules/es.array.sort.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\n\nvar _fetchPonyfill2 = _interopRequireDefault(__webpack_require__(/*! fetch-ponyfill */ \"./node_modules/fetch-ponyfill/build/fetch-browser.js\"));\n\nvar _EventEmitter = _interopRequireDefault(__webpack_require__(/*! ./EventEmitter */ \"./lib/EventEmitter.js\"));\n\nvar _browserCookies = _interopRequireDefault(__webpack_require__(/*! browser-cookies */ \"./node_modules/browser-cookies/src/browser-cookies.js\"));\n\nvar _providers = _interopRequireDefault(__webpack_require__(/*! ./providers */ \"./lib/providers/index.js\"));\n\nvar _intersection2 = _interopRequireDefault(__webpack_require__(/*! lodash/intersection */ \"./node_modules/lodash/intersection.js\"));\n\nvar _get2 = _interopRequireDefault(__webpack_require__(/*! lodash/get */ \"./node_modules/lodash/get.js\"));\n\nvar _cloneDeep2 = _interopRequireDefault(__webpack_require__(/*! lodash/cloneDeep */ \"./node_modules/lodash/cloneDeep.js\"));\n\nvar _defaults2 = _interopRequireDefault(__webpack_require__(/*! lodash/defaults */ \"./node_modules/lodash/defaults.js\"));\n\nvar _utils = __webpack_require__(/*! ./utils/utils */ \"./lib/utils/utils.js\");\n\nvar _jwtDecode = _interopRequireDefault(__webpack_require__(/*! jwt-decode */ \"./node_modules/jwt-decode/build/jwt-decode.esm.js\"));\n\n__webpack_require__(/*! ./polyfills */ \"./lib/polyfills/index.js\");\n\nvar _CDN = _interopRequireDefault(__webpack_require__(/*! ./CDN */ \"./lib/CDN.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nvar _fetchPonyfill = (0, _fetchPonyfill2.default)({\n Promise: _nativePromiseOnly.default\n}),\n fetch = _fetchPonyfill.fetch,\n Headers = _fetchPonyfill.Headers;\n\nvar isBoolean = function isBoolean(val) {\n return _typeof(val) === _typeof(true);\n};\n\nvar isNil = function isNil(val) {\n return val === null || val === undefined;\n};\n\nvar isObject = function isObject(val) {\n return val && _typeof(val) === 'object';\n};\n\nfunction cloneResponse(response) {\n var copy = (0, _cloneDeep2.default)(response);\n\n if (Array.isArray(response)) {\n copy.skip = response.skip;\n copy.limit = response.limit;\n copy.serverCount = response.serverCount;\n }\n\n return copy;\n}\n/**\n * The Formio interface class.\n *\n * let formio = new Formio('https://examples.form.io/example');\n */\n\n\nvar Formio = /*#__PURE__*/function () {\n /* eslint-disable max-statements */\n function Formio(path) {\n var _this = this;\n\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n _classCallCheck(this, Formio);\n\n // Ensure we have an instance of Formio.\n if (!(this instanceof Formio)) {\n return new Formio(path);\n } // Initialize our variables.\n\n\n this.base = '';\n this.projectsUrl = '';\n this.projectUrl = '';\n this.projectId = '';\n this.roleUrl = '';\n this.rolesUrl = '';\n this.roleId = '';\n this.formUrl = '';\n this.formsUrl = '';\n this.formId = '';\n this.submissionsUrl = '';\n this.submissionUrl = '';\n this.submissionId = '';\n this.actionsUrl = '';\n this.actionId = '';\n this.actionUrl = '';\n this.vsUrl = '';\n this.vId = '';\n this.vUrl = '';\n this.query = ''; // Store the original path and options.\n\n this.path = path;\n this.options = options;\n\n if (options.useSessionToken) {\n Formio.useSessionToken(options);\n }\n\n if (options.hasOwnProperty('base')) {\n this.base = options.base;\n } else if (Formio.baseUrl) {\n this.base = Formio.baseUrl;\n } else if (typeof window !== 'undefined') {\n this.base = window.location.href.match(/http[s]?:\\/\\/api./)[0];\n }\n\n if (!path) {\n // Allow user to create new projects if this was instantiated without\n // a url\n this.projectUrl = Formio.projectUrl || \"\".concat(this.base, \"/project\");\n this.projectsUrl = \"\".concat(this.base, \"/project\");\n this.projectId = false;\n this.query = '';\n return;\n }\n\n if (options.hasOwnProperty('project')) {\n this.projectUrl = options.project;\n }\n\n var project = this.projectUrl || Formio.projectUrl;\n var projectRegEx = /(^|\\/)(project)($|\\/[^/]+)/;\n var isProjectUrl = path.search(projectRegEx) !== -1; // The baseURL is the same as the projectUrl, and does not contain \"/project/MONGO_ID\" in\n // its domain. This is almost certainly against the Open Source server.\n\n if (project && this.base === project && !isProjectUrl) {\n this.noProject = true;\n this.projectUrl = this.base;\n } // Normalize to an absolute path.\n\n\n if (path.indexOf('http') !== 0 && path.indexOf('//') !== 0) {\n path = this.base + path;\n }\n\n var hostparts = this.getUrlParts(path);\n var parts = [];\n var hostName = hostparts[1] + hostparts[2];\n path = hostparts.length > 3 ? hostparts[3] : '';\n var queryparts = path.split('?');\n\n if (queryparts.length > 1) {\n path = queryparts[0];\n this.query = \"?\".concat(queryparts[1]);\n } // Register a specific path.\n\n\n var registerPath = function registerPath(name, base) {\n _this[\"\".concat(name, \"sUrl\")] = \"\".concat(base, \"/\").concat(name);\n var regex = new RegExp(\"/\".concat(name, \"/([^/]+)\"));\n\n if (path.search(regex) !== -1) {\n parts = path.match(regex);\n _this[\"\".concat(name, \"Url\")] = parts ? base + parts[0] : '';\n _this[\"\".concat(name, \"Id\")] = parts.length > 1 ? parts[1] : '';\n base += parts[0];\n }\n\n return base;\n }; // Register an array of items.\n\n\n var registerItems = function registerItems(items, base, staticBase) {\n for (var i in items) {\n if (items.hasOwnProperty(i)) {\n var item = items[i];\n\n if (Array.isArray(item)) {\n registerItems(item, base, true);\n } else {\n var newBase = registerPath(item, base);\n base = staticBase ? base : newBase;\n }\n }\n }\n };\n\n if (!this.projectUrl || this.projectUrl === this.base) {\n // If a project uses Subdirectories path type, we need to specify a projectUrl\n if (!this.projectUrl && !isProjectUrl && Formio.pathType === 'Subdirectories') {\n var regex = \"^\".concat(hostName.replace(/\\//g, '\\\\/'), \".[^/]+\");\n var match = project.match(new RegExp(regex));\n this.projectUrl = match ? match[0] : hostName;\n } else {\n this.projectUrl = hostName;\n }\n } // Check if we have a specified path type.\n\n\n var isNotSubdomainType = false;\n\n if (Formio.pathType) {\n isNotSubdomainType = Formio.pathType !== 'Subdomains';\n }\n\n if (!this.noProject) {\n // Determine the projectUrl and projectId\n if (isProjectUrl) {\n // Get project id as project/:projectId.\n registerItems(['project'], hostName);\n path = path.replace(projectRegEx, '');\n } else if (hostName === this.base) {\n // Get project id as first part of path (subdirectory).\n if (hostparts.length > 3 && path.split('/').length > 1) {\n var isFile = path.match(/.json/);\n var pathParts = path.split('/');\n\n if (isFile) {\n this.projectUrl = hostName;\n } else {\n pathParts.shift(); // Throw away the first /.\n\n this.projectId = pathParts.shift();\n path = \"/\".concat(pathParts.join('/'));\n this.projectUrl = \"\".concat(hostName, \"/\").concat(this.projectId);\n }\n }\n } else {\n // Get project id from subdomain.\n if (hostparts.length > 2 && (hostparts[2].split('.').length > 2 || hostName.includes('localhost')) && !isNotSubdomainType) {\n this.projectUrl = hostName;\n this.projectId = hostparts[2].split('.')[0];\n }\n }\n\n this.projectsUrl = this.projectsUrl || \"\".concat(this.base, \"/project\");\n } // Configure Role urls and role ids.\n\n\n registerItems(['role'], this.projectUrl); // Configure Form urls and form ids.\n\n if (/(^|\\/)(form)($|\\/)/.test(path)) {\n registerItems(['form', ['submission', 'action', 'v']], this.projectUrl);\n } else {\n var subRegEx = new RegExp('/(submission|action|v)($|/.*)');\n var subs = path.match(subRegEx);\n this.pathType = subs && subs.length > 1 ? subs[1] : '';\n path = path.replace(subRegEx, '');\n path = path.replace(/\\/$/, '');\n this.formsUrl = \"\".concat(this.projectUrl, \"/form\");\n this.formUrl = path ? this.projectUrl + path : '';\n this.formId = path.replace(/^\\/+|\\/+$/g, '');\n var items = ['submission', 'action', 'v'];\n\n for (var i in items) {\n if (items.hasOwnProperty(i)) {\n var item = items[i];\n this[\"\".concat(item, \"sUrl\")] = \"\".concat(this.projectUrl + path, \"/\").concat(item);\n\n if (this.pathType === item && subs.length > 2 && subs[2]) {\n this[\"\".concat(item, \"Id\")] = subs[2].replace(/^\\/+|\\/+$/g, '');\n this[\"\".concat(item, \"Url\")] = this.projectUrl + path + subs[0];\n }\n }\n }\n } // Set the app url if it is not set.\n\n\n if (!Formio.projectUrlSet) {\n Formio.projectUrl = this.projectUrl;\n }\n }\n /* eslint-enable max-statements */\n\n\n _createClass(Formio, [{\n key: \"delete\",\n value: function _delete(type, opts) {\n var _id = \"\".concat(type, \"Id\");\n\n var _url = \"\".concat(type, \"Url\");\n\n if (!this[_id]) {\n return _nativePromiseOnly.default.reject('Nothing to delete');\n }\n\n Formio.cache = {};\n return this.makeRequest(type, this[_url], 'delete', null, opts);\n }\n }, {\n key: \"index\",\n value: function index(type, query, opts) {\n var _url = \"\".concat(type, \"Url\");\n\n query = query || '';\n\n if (query && isObject(query)) {\n query = \"?\".concat(Formio.serialize(query.params));\n }\n\n return this.makeRequest(type, this[_url] + query, 'get', null, opts);\n }\n }, {\n key: \"save\",\n value: function save(type, data, opts) {\n var _id = \"\".concat(type, \"Id\");\n\n var _url = \"\".concat(type, \"Url\");\n\n var method = this[_id] || data._id ? 'put' : 'post';\n var reqUrl = this[_id] ? this[_url] : this[\"\".concat(type, \"sUrl\")];\n\n if (!this[_id] && data._id && method === 'put' && !reqUrl.includes(data._id)) {\n reqUrl += \"/\".concat(data._id);\n }\n\n Formio.cache = {};\n return this.makeRequest(type, reqUrl + this.query, method, data, opts);\n }\n }, {\n key: \"load\",\n value: function load(type, query, opts) {\n var _id = \"\".concat(type, \"Id\");\n\n var _url = \"\".concat(type, \"Url\");\n\n if (query && isObject(query)) {\n query = Formio.serialize(query.params);\n }\n\n if (query) {\n query = this.query ? \"\".concat(this.query, \"&\").concat(query) : \"?\".concat(query);\n } else {\n query = this.query;\n }\n\n if (!this[_id]) {\n return _nativePromiseOnly.default.reject(\"Missing \".concat(_id));\n }\n\n var url = this[_url] + query;\n\n if (type === 'form' && !isNaN(parseInt(this.vId)) && parseInt(this.vId) !== 0) {\n url += url.match(/\\?/) ? '&' : '?';\n url += \"formRevision=\".concat(this.vId);\n }\n\n return this.makeRequest(type, url, 'get', null, opts);\n }\n }, {\n key: \"makeRequest\",\n value: function makeRequest() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return Formio.makeRequest.apply(Formio, [this].concat(args));\n }\n }, {\n key: \"loadProject\",\n value: function loadProject(query, opts) {\n return this.load('project', query, opts);\n }\n }, {\n key: \"saveProject\",\n value: function saveProject(data, opts) {\n return this.save('project', data, opts);\n }\n }, {\n key: \"deleteProject\",\n value: function deleteProject(opts) {\n return this.delete('project', opts);\n }\n }, {\n key: \"loadRole\",\n value: function loadRole(opts) {\n return this.load('role', null, opts);\n }\n }, {\n key: \"saveRole\",\n value: function saveRole(data, opts) {\n return this.save('role', data, opts);\n }\n }, {\n key: \"deleteRole\",\n value: function deleteRole(opts) {\n return this.delete('role', opts);\n }\n }, {\n key: \"loadRoles\",\n value: function loadRoles(opts) {\n return this.index('roles', null, opts);\n }\n }, {\n key: \"loadForm\",\n value: function loadForm(query, opts) {\n var _this2 = this;\n\n return this.load('form', query, opts).then(function (currentForm) {\n // Check to see if there isn't a number in vId.\n if (!currentForm.revisions || isNaN(parseInt(_this2.vId))) {\n return currentForm;\n } // If a submission already exists but form is marked to load current version of form.\n\n\n if (currentForm.revisions === 'current' && _this2.submissionId) {\n return currentForm;\n } // eslint-disable-next-line eqeqeq\n\n\n if (currentForm._vid == _this2.vId || currentForm.revisionId === _this2.vId) {\n return currentForm;\n } // If they specified a revision form, load the revised form components.\n\n\n if (query && isObject(query)) {\n query = Formio.serialize(query.params);\n }\n\n if (query) {\n query = _this2.query ? \"\".concat(_this2.query, \"&\").concat(query) : \"?\".concat(query);\n } else {\n query = _this2.query;\n }\n\n return _this2.makeRequest('form', _this2.vUrl + query, 'get', null, opts).then(function (revisionForm) {\n currentForm._vid = revisionForm._vid;\n currentForm.components = revisionForm.components;\n currentForm.settings = revisionForm.settings;\n currentForm.revisionId = revisionForm.revisionId; // Using object.assign so we don't cross polinate multiple form loads.\n\n return Object.assign({}, currentForm);\n }) // If we couldn't load the revision, just return the original form.\n .catch(function () {\n return Object.assign({}, currentForm);\n });\n });\n }\n }, {\n key: \"saveForm\",\n value: function saveForm(data, opts) {\n return this.save('form', data, opts);\n }\n }, {\n key: \"deleteForm\",\n value: function deleteForm(opts) {\n return this.delete('form', opts);\n }\n }, {\n key: \"loadForms\",\n value: function loadForms(query, opts) {\n return this.index('forms', query, opts);\n }\n }, {\n key: \"loadSubmission\",\n value: function loadSubmission(query, opts) {\n var _this3 = this;\n\n return this.load('submission', query, opts).then(function (submission) {\n _this3.vId = submission._frid || submission._fvid;\n _this3.vUrl = \"\".concat(_this3.formUrl, \"/v/\").concat(_this3.vId);\n return submission;\n });\n }\n }, {\n key: \"saveSubmission\",\n value: function saveSubmission(data, opts) {\n if (!isNaN(parseInt(this.vId))) {\n data._fvid = this.vId;\n }\n\n return this.save('submission', data, opts);\n }\n }, {\n key: \"deleteSubmission\",\n value: function deleteSubmission(opts) {\n return this.delete('submission', opts);\n }\n }, {\n key: \"loadSubmissions\",\n value: function loadSubmissions(query, opts) {\n return this.index('submissions', query, opts);\n }\n }, {\n key: \"loadAction\",\n value: function loadAction(query, opts) {\n return this.load('action', query, opts);\n }\n }, {\n key: \"saveAction\",\n value: function saveAction(data, opts) {\n return this.save('action', data, opts);\n }\n }, {\n key: \"deleteAction\",\n value: function deleteAction(opts) {\n return this.delete('action', opts);\n }\n }, {\n key: \"loadActions\",\n value: function loadActions(query, opts) {\n return this.index('actions', query, opts);\n }\n }, {\n key: \"availableActions\",\n value: function availableActions() {\n return this.makeRequest('availableActions', \"\".concat(this.formUrl, \"/actions\"));\n }\n }, {\n key: \"actionInfo\",\n value: function actionInfo(name) {\n return this.makeRequest('actionInfo', \"\".concat(this.formUrl, \"/actions/\").concat(name));\n }\n }, {\n key: \"isObjectId\",\n value: function isObjectId(id) {\n var checkForHexRegExp = new RegExp('^[0-9a-fA-F]{24}$');\n return checkForHexRegExp.test(id);\n }\n }, {\n key: \"getProjectId\",\n value: function getProjectId() {\n if (!this.projectId) {\n return _nativePromiseOnly.default.resolve('');\n }\n\n if (this.isObjectId(this.projectId)) {\n return _nativePromiseOnly.default.resolve(this.projectId);\n } else {\n return this.loadProject().then(function (project) {\n return project._id;\n });\n }\n }\n }, {\n key: \"getFormId\",\n value: function getFormId() {\n if (!this.formId) {\n return _nativePromiseOnly.default.resolve('');\n }\n\n if (this.isObjectId(this.formId)) {\n return _nativePromiseOnly.default.resolve(this.formId);\n } else {\n return this.loadForm().then(function (form) {\n return form._id;\n });\n }\n }\n }, {\n key: \"currentUser\",\n value: function currentUser(options) {\n return Formio.currentUser(this, options);\n }\n }, {\n key: \"accessInfo\",\n value: function accessInfo() {\n return Formio.accessInfo(this);\n }\n /**\n * Returns the JWT token for this instance.\n *\n * @return {*}\n */\n\n }, {\n key: \"getToken\",\n value: function getToken(options) {\n return Formio.getToken(Object.assign({\n formio: this\n }, this.options, options));\n }\n /**\n * Sets the JWT token for this instance.\n *\n * @return {*}\n */\n\n }, {\n key: \"setToken\",\n value: function setToken(token, options) {\n return Formio.setToken(token, Object.assign({\n formio: this\n }, this.options, options));\n }\n /**\n * Returns a temporary authentication token for single purpose token generation.\n */\n\n }, {\n key: \"getTempToken\",\n value: function getTempToken(expire, allowed, options) {\n var token = Formio.getToken(options);\n\n if (!token) {\n return _nativePromiseOnly.default.reject('You must be authenticated to generate a temporary auth token.');\n }\n\n var authUrl = Formio.authUrl || this.projectUrl;\n return this.makeRequest('tempToken', \"\".concat(authUrl, \"/token\"), 'GET', null, {\n ignoreCache: true,\n header: new Headers({\n 'x-expire': expire,\n 'x-allow': allowed\n })\n });\n }\n /**\n * Get a download url for a submission PDF of this submission.\n *\n * @return {*}\n */\n\n }, {\n key: \"getDownloadUrl\",\n value: function getDownloadUrl(form) {\n var _this4 = this;\n\n if (!this.submissionId) {\n return _nativePromiseOnly.default.resolve('');\n }\n\n if (!form) {\n // Make sure to load the form first.\n return this.loadForm().then(function (_form) {\n if (!_form) {\n return '';\n }\n\n return _this4.getDownloadUrl(_form);\n });\n }\n\n var apiUrl = \"/project/\".concat(form.project);\n apiUrl += \"/form/\".concat(form._id);\n apiUrl += \"/submission/\".concat(this.submissionId);\n var postfix = form.submissionRevisions && form.settings.changeLog ? '/download/changelog' : '/download';\n apiUrl += postfix;\n var download = this.base + apiUrl;\n return new _nativePromiseOnly.default(function (resolve, reject) {\n _this4.getTempToken(3600, \"GET:\".concat(apiUrl)).then(function (tempToken) {\n download += \"?token=\".concat(tempToken.key);\n resolve(download);\n }, function () {\n resolve(download);\n }).catch(reject);\n });\n }\n }, {\n key: \"uploadFile\",\n value: function uploadFile(storage, file, fileName, dir, progressCallback, url, options, fileKey, groupPermissions, groupId, uploadStartCallback, abortCallback) {\n var _this5 = this;\n\n var requestArgs = {\n provider: storage,\n method: 'upload',\n file: file,\n fileName: fileName,\n dir: dir\n };\n fileKey = fileKey || 'file';\n var request = Formio.pluginWait('preRequest', requestArgs).then(function () {\n return Formio.pluginGet('fileRequest', requestArgs).then(function (result) {\n if (storage && isNil(result)) {\n var Provider = _providers.default.getProvider('storage', storage);\n\n if (Provider) {\n var provider = new Provider(_this5);\n\n if (uploadStartCallback) {\n uploadStartCallback();\n }\n\n return provider.uploadFile(file, fileName, dir, progressCallback, url, options, fileKey, groupPermissions, groupId, abortCallback);\n } else {\n throw 'Storage provider not found';\n }\n }\n\n return result || {\n url: ''\n };\n });\n });\n return Formio.pluginAlter('wrapFileRequestPromise', request, requestArgs);\n }\n }, {\n key: \"downloadFile\",\n value: function downloadFile(file, options) {\n var _this6 = this;\n\n var requestArgs = {\n method: 'download',\n file: file\n };\n var request = Formio.pluginWait('preRequest', requestArgs).then(function () {\n return Formio.pluginGet('fileRequest', requestArgs).then(function (result) {\n if (file.storage && isNil(result)) {\n var Provider = _providers.default.getProvider('storage', file.storage);\n\n if (Provider) {\n var provider = new Provider(_this6);\n return provider.downloadFile(file, options);\n } else {\n throw 'Storage provider not found';\n }\n }\n\n return result || {\n url: ''\n };\n });\n });\n return Formio.pluginAlter('wrapFileRequestPromise', request, requestArgs);\n }\n }, {\n key: \"deleteFile\",\n value: function deleteFile(file, options) {\n var _this7 = this;\n\n var requestArgs = {\n method: 'delete',\n file: file\n };\n var request = Formio.pluginWait('preRequest', requestArgs).then(function () {\n return Formio.pluginGet('fileRequest', requestArgs).then(function (result) {\n if (file.storage && isNil(result)) {\n var Provider = _providers.default.getProvider('storage', file.storage);\n\n if (Provider) {\n var provider = new Provider(_this7);\n return provider.deleteFile(file, options);\n } else {\n throw 'Storage provider not found';\n }\n }\n\n return result || {\n url: ''\n };\n });\n });\n return Formio.pluginAlter('wrapFileRequestPromise', request, requestArgs);\n }\n /**\n * Returns the user permissions to a form and submission.\n *\n * @param user - The user or current user if undefined. For anonymous, use \"null\"\n * @param form - The form or current form if undefined. For no form check, use \"null\"\n * @param submission - The submisison or \"index\" if undefined.\n *\n * @return {create: boolean, read: boolean, edit: boolean, delete: boolean}\n */\n\n }, {\n key: \"userPermissions\",\n value: function userPermissions(user, form, submission) {\n return _nativePromiseOnly.default.all([form !== undefined ? _nativePromiseOnly.default.resolve(form) : this.loadForm(), user !== undefined ? _nativePromiseOnly.default.resolve(user) : this.currentUser(), submission !== undefined || !this.submissionId ? _nativePromiseOnly.default.resolve(submission) : this.loadSubmission(), this.accessInfo()]).then(function (results) {\n var form = results.shift();\n var user = results.shift() || {\n _id: false,\n roles: []\n };\n var submission = results.shift();\n var access = results.shift();\n var permMap = {\n create: 'create',\n read: 'read',\n update: 'edit',\n delete: 'delete'\n };\n var perms = {\n user: user,\n form: form,\n access: access,\n create: false,\n read: false,\n edit: false,\n delete: false\n };\n\n for (var roleName in access.roles) {\n if (access.roles.hasOwnProperty(roleName)) {\n var role = access.roles[roleName];\n\n if (role.default && user._id === false) {\n // User is anonymous. Add the anonymous role.\n user.roles.push(role._id);\n } else if (role.admin && user.roles.indexOf(role._id) !== -1) {\n perms.create = true;\n perms.read = true;\n perms.delete = true;\n perms.edit = true;\n return perms;\n }\n }\n }\n\n if (form && form.submissionAccess) {\n for (var i = 0; i < form.submissionAccess.length; i++) {\n var permission = form.submissionAccess[i];\n\n var _permission$type$spli = permission.type.split('_'),\n _permission$type$spli2 = _slicedToArray(_permission$type$spli, 2),\n perm = _permission$type$spli2[0],\n scope = _permission$type$spli2[1];\n\n if (['create', 'read', 'update', 'delete'].includes(perm)) {\n if ((0, _intersection2.default)(permission.roles, user.roles).length) {\n perms[permMap[perm]] = scope === 'all' || !submission || user._id === submission.owner;\n }\n }\n }\n } // check for Group Permissions\n\n\n if (submission) {\n // we would anyway need to loop through components for create permission, so we'll do that for all of them\n (0, _utils.eachComponent)(form.components, function (component, path) {\n if (component && component.defaultPermission) {\n var value = (0, _get2.default)(submission.data, path); // make it work for single-select Group and multi-select Group\n\n var groups = Array.isArray(value) ? value : [value];\n groups.forEach(function (group) {\n if (group && group._id && // group id is present\n user.roles.indexOf(group._id) > -1 // user has group id in his roles\n ) {\n if (component.defaultPermission === 'read') {\n perms[permMap.read] = true;\n }\n\n if (component.defaultPermission === 'create') {\n perms[permMap.create] = true;\n perms[permMap.read] = true;\n }\n\n if (component.defaultPermission === 'write') {\n perms[permMap.create] = true;\n perms[permMap.read] = true;\n perms[permMap.update] = true;\n }\n\n if (component.defaultPermission === 'admin') {\n perms[permMap.create] = true;\n perms[permMap.read] = true;\n perms[permMap.update] = true;\n perms[permMap.delete] = true;\n }\n }\n });\n }\n });\n }\n\n return perms;\n });\n }\n /**\n * Determine if the current user can submit a form.\n * @return {*}\n */\n\n }, {\n key: \"canSubmit\",\n value: function canSubmit() {\n var _this8 = this;\n\n return this.userPermissions().then(function (perms) {\n // If there is user and they cannot create, then check anonymous user permissions.\n if (!perms.create && Formio.getUser()) {\n return _this8.userPermissions(null).then(function (anonPerms) {\n if (anonPerms.create) {\n Formio.setUser(null);\n return true;\n }\n\n return false;\n });\n }\n\n return perms.create;\n });\n }\n }, {\n key: \"getUrlParts\",\n value: function getUrlParts(url) {\n return Formio.getUrlParts(url, this);\n }\n }], [{\n key: \"useSessionToken\",\n value: function useSessionToken(options) {\n var tokenName = \"\".concat(options.namespace || Formio.namespace || 'formio', \"Token\");\n var token = localStorage.getItem(tokenName);\n\n if (token) {\n localStorage.removeItem(tokenName);\n sessionStorage.setItem(tokenName, token);\n }\n\n var userName = \"\".concat(options.namespace || Formio.namespace || 'formio', \"User\");\n var user = localStorage.getItem(userName);\n\n if (user) {\n localStorage.removeItem(userName);\n sessionStorage.setItem(userName, user);\n }\n\n localStorage.setItem('useSessionToken', true);\n }\n }, {\n key: \"loadProjects\",\n value: function loadProjects(query, opts) {\n query = query || '';\n\n if (isObject(query)) {\n query = \"?\".concat(Formio.serialize(query.params));\n }\n\n return Formio.makeStaticRequest(\"\".concat(Formio.baseUrl, \"/project\").concat(query), 'GET', null, opts);\n }\n }, {\n key: \"getUrlParts\",\n value: function getUrlParts(url, formio) {\n var base = formio && formio.base ? formio.base : Formio.baseUrl;\n var regex = '^(http[s]?:\\\\/\\\\/)';\n\n if (base && url.indexOf(base) === 0) {\n regex += \"(\".concat(base.replace(/^http[s]?:\\/\\//, ''), \")\");\n } else {\n regex += '([^/]+)';\n }\n\n regex += '($|\\\\/.*)';\n return url.match(new RegExp(regex));\n }\n }, {\n key: \"serialize\",\n value: function serialize(obj, _interpolate) {\n var str = [];\n\n var interpolate = function interpolate(item) {\n return _interpolate ? _interpolate(item) : item;\n };\n\n for (var p in obj) {\n if (obj.hasOwnProperty(p)) {\n str.push(\"\".concat(encodeURIComponent(p), \"=\").concat(encodeURIComponent(interpolate(obj[p]))));\n }\n }\n\n return str.join('&');\n }\n }, {\n key: \"getRequestArgs\",\n value: function getRequestArgs(formio, type, url, method, data, opts) {\n method = (method || 'GET').toUpperCase();\n\n if (!opts || !isObject(opts)) {\n opts = {};\n }\n\n var requestArgs = {\n url: url,\n method: method,\n data: data || null,\n opts: opts\n };\n\n if (type) {\n requestArgs.type = type;\n }\n\n if (formio) {\n requestArgs.formio = formio;\n }\n\n return requestArgs;\n }\n }, {\n key: \"makeStaticRequest\",\n value: function makeStaticRequest(url, method, data, opts) {\n var requestArgs = Formio.getRequestArgs(null, '', url, method, data, opts);\n var request = Formio.pluginWait('preRequest', requestArgs).then(function () {\n return Formio.pluginGet('staticRequest', requestArgs).then(function (result) {\n if (isNil(result)) {\n return Formio.request(requestArgs.url, requestArgs.method, requestArgs.data, requestArgs.opts.header, requestArgs.opts);\n }\n\n return result;\n });\n });\n return Formio.pluginAlter('wrapStaticRequestPromise', request, requestArgs);\n }\n }, {\n key: \"makeRequest\",\n value: function makeRequest(formio, type, url, method, data, opts) {\n if (!formio) {\n return Formio.makeStaticRequest(url, method, data, opts);\n }\n\n var requestArgs = Formio.getRequestArgs(formio, type, url, method, data, opts);\n requestArgs.opts = requestArgs.opts || {};\n requestArgs.opts.formio = formio; //for Formio requests default Accept and Content-type headers\n\n if (!requestArgs.opts.headers) {\n requestArgs.opts.headers = {};\n }\n\n requestArgs.opts.headers = (0, _defaults2.default)(requestArgs.opts.headers, {\n 'Accept': 'application/json',\n 'Content-type': 'application/json'\n });\n var request = Formio.pluginWait('preRequest', requestArgs).then(function () {\n return Formio.pluginGet('request', requestArgs).then(function (result) {\n if (isNil(result)) {\n return Formio.request(requestArgs.url, requestArgs.method, requestArgs.data, requestArgs.opts.header, requestArgs.opts);\n }\n\n return result;\n });\n });\n return Formio.pluginAlter('wrapRequestPromise', request, requestArgs);\n }\n }, {\n key: \"request\",\n value: function request(url, method, data, header, opts) {\n if (!url) {\n return _nativePromiseOnly.default.reject('No url provided');\n }\n\n var _Formio = Formio;\n method = (method || 'GET').toUpperCase(); // For reverse compatibility, if they provided the ignoreCache parameter,\n // then change it back to the options format where that is a parameter.\n\n if (isBoolean(opts)) {\n opts = {\n ignoreCache: opts\n };\n }\n\n if (!opts || !isObject(opts)) {\n opts = {};\n } // Generate a cachekey.\n\n\n var cacheKey = btoa(encodeURI(url)); // Get the cached promise to save multiple loads.\n\n if (!opts.ignoreCache && method === 'GET' && _Formio.cache.hasOwnProperty(cacheKey)) {\n return _nativePromiseOnly.default.resolve(cloneResponse(_Formio.cache[cacheKey]));\n } // Set up and fetch request\n\n\n var headers = header || new Headers(opts.headers || {\n 'Accept': 'application/json',\n 'Content-type': 'application/json'\n });\n\n var token = _Formio.getToken(opts);\n\n if (token && !opts.noToken) {\n headers.append('x-jwt-token', token);\n } // The fetch-ponyfill can't handle a proper Headers class anymore. Change it back to an object.\n\n\n var headerObj = {};\n headers.forEach(function (value, name) {\n headerObj[name] = value;\n });\n var options = {\n method: method,\n headers: headerObj,\n mode: 'cors'\n };\n\n if (data) {\n options.body = JSON.stringify(data);\n } // Allow plugins to alter the options.\n\n\n options = _Formio.pluginAlter('requestOptions', options, url);\n\n if (options.namespace || _Formio.namespace) {\n opts.namespace = options.namespace || _Formio.namespace;\n }\n\n var requestToken = options.headers['x-jwt-token'];\n\n var result = _Formio.pluginAlter('wrapFetchRequestPromise', _Formio.fetch(url, options), {\n url: url,\n method: method,\n data: data,\n opts: opts\n }).then(function (response) {\n // Allow plugins to respond.\n response = _Formio.pluginAlter('requestResponse', response, _Formio, data);\n\n if (!response.ok) {\n if (response.status === 440) {\n _Formio.setToken(null, opts);\n\n _Formio.events.emit('formio.sessionExpired', response.body);\n } else if (response.status === 401) {\n _Formio.events.emit('formio.unauthorized', response.body);\n } else if (response.status === 416) {\n _Formio.events.emit('formio.rangeIsNotSatisfiable', response.body);\n } else if (response.status === 504) {\n return _nativePromiseOnly.default.reject(new Error('Network request failed'));\n } // Parse and return the error as a rejected promise to reject this promise\n\n\n return (response.headers.get('content-type').includes('application/json') ? response.json() : response.text()).then(function (error) {\n return _nativePromiseOnly.default.reject(error);\n });\n } // Handle fetch results\n\n\n var token = response.headers.get('x-jwt-token'); // In some strange cases, the fetch library will return an x-jwt-token without sending\n // one to the server. This has even been debugged on the server to verify that no token\n // was introduced with the request, but the response contains a token. This is an Invalid\n // case where we do not send an x-jwt-token and get one in return for any GET request.\n\n var tokenIntroduced = false;\n\n if (method === 'GET' && !requestToken && token && !opts.external && !url.includes('token=') && !url.includes('x-jwt-token=')) {\n console.warn('Token was introduced in request.');\n tokenIntroduced = true;\n }\n\n if (response.status >= 200 && response.status < 300 && token && token !== '' && !tokenIntroduced) {\n _Formio.setToken(token, opts);\n } // 204 is no content. Don't try to .json() it.\n\n\n if (response.status === 204) {\n return {};\n }\n\n var getResult = response.headers.get('content-type').includes('application/json') ? response.json() : response.text();\n return getResult.then(function (result) {\n // Add some content-range metadata to the result here\n var range = response.headers.get('content-range');\n\n if (range && isObject(result)) {\n range = range.split('/');\n\n if (range[0] !== '*') {\n var skipLimit = range[0].split('-');\n result.skip = Number(skipLimit[0]);\n result.limit = skipLimit[1] - skipLimit[0] + 1;\n }\n\n result.serverCount = range[1] === '*' ? range[1] : Number(range[1]);\n }\n\n if (!opts.getHeaders) {\n return result;\n }\n\n var headers = {};\n response.headers.forEach(function (item, key) {\n headers[key] = item;\n }); // Return the result with the headers.\n\n return {\n result: result,\n headers: headers\n };\n });\n }).then(function (result) {\n if (opts.getHeaders) {\n return result;\n } // Cache the response.\n\n\n if (method === 'GET') {\n _Formio.cache[cacheKey] = result;\n }\n\n return cloneResponse(result);\n }).catch(function (err) {\n if (err === 'Bad Token') {\n _Formio.setToken(null, opts);\n\n _Formio.events.emit('formio.badToken', err);\n }\n\n if (err.message) {\n err = new Error(\"Could not connect to API server (\".concat(err.message, \"): \").concat(url));\n err.networkError = true;\n }\n\n if (method === 'GET') {\n delete _Formio.cache[cacheKey];\n }\n\n return _nativePromiseOnly.default.reject(err);\n });\n\n return result;\n } // Needed to maintain reverse compatability...\n\n }, {\n key: \"token\",\n get: function get() {\n if (!Formio.tokens) {\n Formio.tokens = {};\n }\n\n return Formio.tokens.formioToken || '';\n } // Needed to maintain reverse compatability...\n ,\n set: function set(token) {\n if (!Formio.tokens) {\n Formio.tokens = {};\n }\n\n Formio.tokens.formioToken = token || '';\n }\n }, {\n key: \"setToken\",\n value: function setToken() {\n var token = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var opts = arguments.length > 1 ? arguments[1] : undefined;\n token = token || '';\n opts = typeof opts === 'string' ? {\n namespace: opts\n } : opts || {};\n var tokenName = \"\".concat(opts.namespace || Formio.namespace || 'formio', \"Token\");\n\n if (!Formio.tokens) {\n Formio.tokens = {};\n }\n\n var storage = localStorage.getItem('useSessionToken') ? sessionStorage : localStorage;\n\n if (!token) {\n if (!opts.fromUser) {\n opts.fromToken = true;\n Formio.setUser(null, opts);\n } // iOS in private browse mode will throw an error but we can't detect ahead of time that we are in private mode.\n\n\n try {\n storage.removeItem(tokenName);\n } catch (err) {\n _browserCookies.default.erase(tokenName, {\n path: '/'\n });\n }\n\n Formio.tokens[tokenName] = token;\n return _nativePromiseOnly.default.resolve(null);\n }\n\n if (Formio.tokens[tokenName] !== token) {\n Formio.tokens[tokenName] = token; // iOS in private browse mode will throw an error but we can't detect ahead of time that we are in private mode.\n\n try {\n storage.setItem(tokenName, token);\n } catch (err) {\n _browserCookies.default.set(tokenName, token, {\n path: '/'\n });\n }\n } // Return or updates the current user\n\n\n return this.currentUserResolved ? Formio.currentUser(opts.formio, opts) : _nativePromiseOnly.default.resolve(null);\n }\n }, {\n key: \"getToken\",\n value: function getToken(options) {\n options = typeof options === 'string' ? {\n namespace: options\n } : options || {};\n var tokenName = \"\".concat(options.namespace || Formio.namespace || 'formio', \"Token\");\n var decodedTokenName = options.decode ? \"\".concat(tokenName, \"Decoded\") : tokenName;\n\n if (!Formio.tokens) {\n Formio.tokens = {};\n }\n\n if (Formio.tokens[decodedTokenName]) {\n return Formio.tokens[decodedTokenName];\n }\n\n try {\n var token = localStorage.getItem('useSessionToken') ? sessionStorage.getItem(tokenName) : localStorage.getItem(tokenName);\n Formio.tokens[tokenName] = token || '';\n\n if (options.decode) {\n Formio.tokens[decodedTokenName] = Formio.tokens[tokenName] ? (0, _jwtDecode.default)(Formio.tokens[tokenName]) : {};\n return Formio.tokens[decodedTokenName];\n }\n\n return Formio.tokens[tokenName];\n } catch (e) {\n Formio.tokens[tokenName] = _browserCookies.default.get(tokenName);\n return Formio.tokens[tokenName];\n }\n }\n }, {\n key: \"setUser\",\n value: function setUser(user) {\n var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var userName = \"\".concat(opts.namespace || Formio.namespace || 'formio', \"User\");\n var storage = localStorage.getItem('useSessionToken') ? sessionStorage : localStorage;\n\n if (!user) {\n if (!opts.fromToken) {\n opts.fromUser = true;\n Formio.setToken(null, opts);\n } // Emit an event on the cleared user.\n\n\n Formio.events.emit('formio.user', null); // iOS in private browse mode will throw an error but we can't detect ahead of time that we are in private mode.\n\n try {\n return storage.removeItem(userName);\n } catch (err) {\n return _browserCookies.default.erase(userName, {\n path: '/'\n });\n }\n } // iOS in private browse mode will throw an error but we can't detect ahead of time that we are in private mode.\n\n\n try {\n storage.setItem(userName, JSON.stringify(user));\n } catch (err) {\n _browserCookies.default.set(userName, JSON.stringify(user), {\n path: '/'\n });\n } // Emit an event on the authenticated user.\n\n\n Formio.events.emit('formio.user', user);\n }\n }, {\n key: \"getUser\",\n value: function getUser(options) {\n options = options || {};\n var userName = \"\".concat(options.namespace || Formio.namespace || 'formio', \"User\");\n\n try {\n return JSON.parse((localStorage.getItem('useSessionToken') ? sessionStorage : localStorage).getItem(userName) || null);\n } catch (e) {\n return JSON.parse(_browserCookies.default.get(userName));\n }\n }\n }, {\n key: \"setBaseUrl\",\n value: function setBaseUrl(url) {\n Formio.baseUrl = url;\n\n if (!Formio.projectUrlSet) {\n Formio.projectUrl = url;\n }\n }\n }, {\n key: \"getBaseUrl\",\n value: function getBaseUrl() {\n return Formio.baseUrl;\n }\n }, {\n key: \"setApiUrl\",\n value: function setApiUrl(url) {\n return Formio.setBaseUrl(url);\n }\n }, {\n key: \"getApiUrl\",\n value: function getApiUrl() {\n return Formio.getBaseUrl();\n }\n }, {\n key: \"setAppUrl\",\n value: function setAppUrl(url) {\n console.warn('Formio.setAppUrl() is deprecated. Use Formio.setProjectUrl instead.');\n Formio.projectUrl = url;\n Formio.projectUrlSet = true;\n }\n }, {\n key: \"setProjectUrl\",\n value: function setProjectUrl(url) {\n Formio.projectUrl = url;\n Formio.projectUrlSet = true;\n }\n }, {\n key: \"setAuthUrl\",\n value: function setAuthUrl(url) {\n Formio.authUrl = url;\n }\n }, {\n key: \"getAppUrl\",\n value: function getAppUrl() {\n console.warn('Formio.getAppUrl() is deprecated. Use Formio.getProjectUrl instead.');\n return Formio.projectUrl;\n }\n }, {\n key: \"getProjectUrl\",\n value: function getProjectUrl() {\n return Formio.projectUrl;\n }\n }, {\n key: \"clearCache\",\n value: function clearCache() {\n Formio.cache = {};\n }\n }, {\n key: \"noop\",\n value: function noop() {}\n }, {\n key: \"identity\",\n value: function identity(value) {\n return value;\n }\n }, {\n key: \"deregisterPlugin\",\n value: function deregisterPlugin(plugin) {\n var beforeLength = Formio.plugins.length;\n Formio.plugins = Formio.plugins.filter(function (p) {\n if (p !== plugin && p.__name !== plugin) {\n return true;\n }\n\n (p.deregister || Formio.noop).call(plugin, Formio);\n return false;\n });\n return beforeLength !== Formio.plugins.length;\n }\n }, {\n key: \"registerPlugin\",\n value: function registerPlugin(plugin, name) {\n var __Formio = Formio;\n\n __Formio.plugins.push(plugin);\n\n __Formio.plugins.sort(function (a, b) {\n return (b.priority || 0) - (a.priority || 0);\n });\n\n plugin.__name = name;\n\n (plugin.init || __Formio.noop).call(plugin, __Formio);\n }\n }, {\n key: \"getPlugin\",\n value: function getPlugin(name) {\n var _iterator = _createForOfIteratorHelper(Formio.plugins),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var plugin = _step.value;\n\n if (plugin.__name === name) {\n return plugin;\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return null;\n }\n }, {\n key: \"pluginWait\",\n value: function pluginWait(pluginFn) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n return _nativePromiseOnly.default.all(Formio.plugins.map(function (plugin) {\n var _ref;\n\n return (_ref = plugin[pluginFn] || Formio.noop).call.apply(_ref, [plugin].concat(args));\n }));\n }\n }, {\n key: \"pluginGet\",\n value: function pluginGet(pluginFn) {\n for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n args[_key3 - 1] = arguments[_key3];\n }\n\n var callPlugin = function callPlugin(index) {\n var _ref2;\n\n var plugin = Formio.plugins[index];\n\n if (!plugin) {\n return _nativePromiseOnly.default.resolve(null);\n }\n\n return _nativePromiseOnly.default.resolve((_ref2 = plugin[pluginFn] || Formio.noop).call.apply(_ref2, [plugin].concat(args))).then(function (result) {\n if (!isNil(result)) {\n return result;\n }\n\n return callPlugin(index + 1);\n });\n };\n\n return callPlugin(0);\n }\n }, {\n key: \"pluginAlter\",\n value: function pluginAlter(pluginFn, value) {\n for (var _len4 = arguments.length, args = new Array(_len4 > 2 ? _len4 - 2 : 0), _key4 = 2; _key4 < _len4; _key4++) {\n args[_key4 - 2] = arguments[_key4];\n }\n\n return Formio.plugins.reduce(function (value, plugin) {\n return (plugin[pluginFn] || Formio.identity).apply(void 0, [value].concat(args));\n }, value);\n }\n }, {\n key: \"accessInfo\",\n value: function accessInfo(formio) {\n var projectUrl = formio ? formio.projectUrl : Formio.projectUrl;\n return Formio.makeRequest(formio, 'accessInfo', \"\".concat(projectUrl, \"/access\"));\n }\n }, {\n key: \"projectRoles\",\n value: function projectRoles(formio) {\n var projectUrl = formio ? formio.projectUrl : Formio.projectUrl;\n return Formio.makeRequest(formio, 'projectRoles', \"\".concat(projectUrl, \"/role\"));\n }\n }, {\n key: \"currentUser\",\n value: function currentUser(formio, options) {\n var _this9 = this;\n\n var authUrl = Formio.authUrl;\n\n if (!authUrl) {\n authUrl = formio ? formio.projectUrl : Formio.projectUrl || Formio.baseUrl;\n }\n\n authUrl += '/current';\n var user = Formio.getUser(options);\n\n if (user) {\n return Formio.pluginAlter('wrapStaticRequestPromise', _nativePromiseOnly.default.resolve(user), {\n url: authUrl,\n method: 'GET',\n options: options\n });\n }\n\n var token = Formio.getToken(options);\n\n if ((!options || !options.external) && !token) {\n return Formio.pluginAlter('wrapStaticRequestPromise', _nativePromiseOnly.default.resolve(null), {\n url: authUrl,\n method: 'GET',\n options: options\n });\n }\n\n authUrl = \"\".concat(Formio.baseUrl, \"/current\");\n this.currentUserResolved = false;\n return Formio.makeRequest(formio, 'currentUser', authUrl, 'GET', null, options).then(function (response) {\n _this9.currentUserResolved = true;\n Formio.setUser(response, options);\n return response;\n });\n }\n }, {\n key: \"logout\",\n value: function logout(formio, options) {\n options = options || {};\n options.formio = formio;\n var projectUrl = Formio.authUrl ? Formio.authUrl : formio ? formio.projectUrl : Formio.baseUrl;\n\n var logout = function logout() {\n Formio.setToken(null, options);\n Formio.setUser(null, options);\n Formio.clearCache();\n localStorage.removeItem('useSessionToken');\n };\n\n return Formio.makeRequest(formio, 'logout', \"\".concat(projectUrl, \"/logout\")).then(function (result) {\n logout();\n return result;\n }).catch(function (err) {\n logout();\n throw err;\n });\n }\n }, {\n key: \"pageQuery\",\n value: function pageQuery() {\n var pageQuery = {};\n pageQuery.paths = [];\n var hashes = location.hash.substr(1).replace(/\\?/g, '&').split('&');\n var parts = [];\n location.search.substr(1).split('&').forEach(function (item) {\n parts = item.split('=');\n\n if (parts.length > 1) {\n pageQuery[parts[0]] = parts[1] && decodeURIComponent(parts[1]);\n }\n });\n hashes.forEach(function (item) {\n parts = item.split('=');\n\n if (parts.length > 1) {\n pageQuery[parts[0]] = parts[1] && decodeURIComponent(parts[1]);\n } else if (item.indexOf('/') === 0) {\n pageQuery.paths = item.substr(1).split('/');\n }\n });\n return pageQuery;\n }\n }, {\n key: \"oAuthCurrentUser\",\n value: function oAuthCurrentUser(formio, token) {\n return Formio.currentUser(formio, {\n external: true,\n headers: {\n Authorization: \"Bearer \".concat(token)\n }\n });\n }\n }, {\n key: \"samlInit\",\n value: function samlInit(options) {\n options = options || {};\n var query = Formio.pageQuery();\n\n if (query.saml) {\n Formio.setUser(null);\n var retVal = Formio.setToken(query.saml);\n var uri = window.location.toString();\n uri = uri.substring(0, uri.indexOf('?'));\n\n if (window.location.hash) {\n uri += window.location.hash;\n }\n\n window.history.replaceState({}, document.title, uri);\n return retVal;\n } // Set the relay if not provided.\n\n\n if (!options.relay) {\n options.relay = window.location.href;\n } // go to the saml sso endpoint for this project.\n\n\n var authUrl = Formio.authUrl || Formio.projectUrl;\n window.location.href = \"\".concat(authUrl, \"/saml/sso?relay=\").concat(encodeURI(options.relay));\n return false;\n }\n }, {\n key: \"oktaInit\",\n value: function oktaInit(options) {\n options = options || {};\n\n if ((typeof OktaAuth === \"undefined\" ? \"undefined\" : _typeof(OktaAuth)) !== undefined) {\n options.OktaAuth = OktaAuth;\n }\n\n if (_typeof(options.OktaAuth) === undefined) {\n var errorMessage = 'Cannot find OktaAuth. Please include the Okta JavaScript SDK within your application. See https://developer.okta.com/code/javascript/okta_auth_sdk for an example.';\n console.warn(errorMessage);\n return _nativePromiseOnly.default.reject(errorMessage);\n }\n\n return new _nativePromiseOnly.default(function (resolve, reject) {\n var Okta = options.OktaAuth;\n delete options.OktaAuth;\n var authClient = new Okta(options);\n authClient.tokenManager.get('accessToken').then(function (accessToken) {\n if (accessToken) {\n resolve(Formio.oAuthCurrentUser(options.formio, accessToken.accessToken));\n } else if (location.hash) {\n authClient.token.parseFromUrl().then(function (token) {\n authClient.tokenManager.add('accessToken', token);\n resolve(Formio.oAuthCurrentUser(options.formio, token.accessToken));\n }).catch(function (err) {\n console.warn(err);\n reject(err);\n });\n } else {\n authClient.token.getWithRedirect({\n responseType: 'token',\n scopes: options.scopes\n });\n resolve(false);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n }\n }, {\n key: \"ssoInit\",\n value: function ssoInit(type, options) {\n switch (type) {\n case 'saml':\n return Formio.samlInit(options);\n\n case 'okta':\n return Formio.oktaInit(options);\n\n default:\n console.warn('Unknown SSO type');\n return _nativePromiseOnly.default.reject('Unknown SSO type');\n }\n }\n }, {\n key: \"requireLibrary\",\n value: function requireLibrary(name, property, src, polling, onload) {\n if (!Formio.libraries.hasOwnProperty(name)) {\n Formio.libraries[name] = {};\n Formio.libraries[name].ready = new _nativePromiseOnly.default(function (resolve, reject) {\n Formio.libraries[name].resolve = resolve;\n Formio.libraries[name].reject = reject;\n });\n var callbackName = \"\".concat(name, \"Callback\");\n\n if (!polling && !window[callbackName]) {\n window[callbackName] = function () {\n return Formio.libraries[name].resolve();\n };\n } // See if the plugin already exists.\n\n\n var plugin = (0, _get2.default)(window, property);\n\n if (plugin) {\n Formio.libraries[name].resolve(plugin);\n } else {\n src = Array.isArray(src) ? src : [src];\n src.forEach(function (lib) {\n var attrs = {};\n var elementType = '';\n\n if (typeof lib === 'string') {\n lib = {\n type: 'script',\n src: lib\n };\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 referrerpolicy: 'origin'\n };\n break;\n\n case 'styles':\n elementType = 'link';\n attrs = {\n href: lib.src,\n rel: 'stylesheet'\n };\n break;\n } // Add the script to the top of the page.\n\n\n var element = document.createElement(elementType);\n\n if (element.setAttribute) {\n for (var attr in attrs) {\n element.setAttribute(attr, attrs[attr]);\n }\n }\n\n if (onload) {\n element.addEventListener('load', function () {\n Formio.libraries[name].loaded = true;\n onload(Formio.libraries[name].ready);\n });\n }\n\n var _document = document,\n head = _document.head;\n\n if (head) {\n head.appendChild(element);\n }\n }); // if no callback is provided, then check periodically for the script.\n\n if (polling) {\n var interval = setInterval(function () {\n var plugin = (0, _get2.default)(window, property);\n\n if (plugin) {\n clearInterval(interval);\n Formio.libraries[name].resolve(plugin);\n }\n }, 200);\n }\n }\n }\n\n var lib = Formio.libraries[name];\n return onload && lib.loaded ? onload(lib.ready) : lib.ready;\n }\n }, {\n key: \"libraryReady\",\n value: function libraryReady(name) {\n if (Formio.libraries.hasOwnProperty(name) && Formio.libraries[name].ready) {\n return Formio.libraries[name].ready;\n }\n\n return _nativePromiseOnly.default.reject(\"\".concat(name, \" library was not required.\"));\n }\n }, {\n key: \"addToGlobal\",\n value: function addToGlobal(global) {\n if (_typeof(global) === 'object' && !global.Formio) {\n global.Formio = Formio;\n }\n }\n }, {\n key: \"setPathType\",\n value: function setPathType(type) {\n if (typeof type === 'string') {\n Formio.pathType = type;\n }\n }\n }, {\n key: \"getPathType\",\n value: function getPathType() {\n return Formio.pathType;\n }\n }, {\n key: \"rulesEntities\",\n get: function get() {\n return {\n ValueSources: Formio.ValueSources,\n Conjunctions: Formio.Conjunctions,\n Operators: Formio.Operators,\n Transformers: Formio.Transformers,\n QuickRules: Formio.QuickRules,\n Rules: Formio.Rules\n };\n }\n }, {\n key: \"GlobalFormio\",\n get: function get() {\n if (typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.Formio) {\n return __webpack_require__.g.Formio;\n } else if (typeof window !== 'undefined' && window.Formio) {\n return window.Formio;\n }\n\n return Formio;\n }\n }]);\n\n return Formio;\n}(); // Define all the static properties.\n\n\n_defineProperty(Formio, \"currentUserResolved\", true);\n\nFormio.libraries = {};\nFormio.Promise = _nativePromiseOnly.default;\nFormio.fetch = fetch;\nFormio.Headers = Headers;\nFormio.baseUrl = 'https://api.form.io';\nFormio.projectUrl = Formio.baseUrl;\nFormio.authUrl = '';\nFormio.projectUrlSet = false;\nFormio.plugins = [];\nFormio.cache = {};\nFormio.Providers = _providers.default;\nFormio.version = '4.14.11-rc.13';\nFormio.pathType = '';\nFormio.events = new _EventEmitter.default();\nFormio.cdn = new _CDN.default();\n\nif (typeof __webpack_require__.g !== 'undefined') {\n Formio.addToGlobal(__webpack_require__.g);\n}\n\nif (typeof window !== 'undefined') {\n Formio.addToGlobal(window);\n}\n\nvar GlobalFormio = Formio.GlobalFormio;\nexports.GlobalFormio = GlobalFormio;\nvar _default = Formio;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/Formio.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = exports.GlobalFormio = void 0;\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.match.js */ \"./node_modules/core-js/modules/es.string.match.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.search.js */ \"./node_modules/core-js/modules/es.string.search.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.split.js */ \"./node_modules/core-js/modules/es.string.split.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.constructor.js */ \"./node_modules/core-js/modules/es.regexp.constructor.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.assign.js */ \"./node_modules/core-js/modules/es.object.assign.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.sort.js */ \"./node_modules/core-js/modules/es.array.sort.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\n\nvar _fetchPonyfill2 = _interopRequireDefault(__webpack_require__(/*! fetch-ponyfill */ \"./node_modules/fetch-ponyfill/build/fetch-browser.js\"));\n\nvar _EventEmitter = _interopRequireDefault(__webpack_require__(/*! ./EventEmitter */ \"./lib/EventEmitter.js\"));\n\nvar _browserCookies = _interopRequireDefault(__webpack_require__(/*! browser-cookies */ \"./node_modules/browser-cookies/src/browser-cookies.js\"));\n\nvar _providers = _interopRequireDefault(__webpack_require__(/*! ./providers */ \"./lib/providers/index.js\"));\n\nvar _intersection2 = _interopRequireDefault(__webpack_require__(/*! lodash/intersection */ \"./node_modules/lodash/intersection.js\"));\n\nvar _get2 = _interopRequireDefault(__webpack_require__(/*! lodash/get */ \"./node_modules/lodash/get.js\"));\n\nvar _cloneDeep2 = _interopRequireDefault(__webpack_require__(/*! lodash/cloneDeep */ \"./node_modules/lodash/cloneDeep.js\"));\n\nvar _defaults2 = _interopRequireDefault(__webpack_require__(/*! lodash/defaults */ \"./node_modules/lodash/defaults.js\"));\n\nvar _utils = __webpack_require__(/*! ./utils/utils */ \"./lib/utils/utils.js\");\n\nvar _jwtDecode = _interopRequireDefault(__webpack_require__(/*! jwt-decode */ \"./node_modules/jwt-decode/build/jwt-decode.esm.js\"));\n\n__webpack_require__(/*! ./polyfills */ \"./lib/polyfills/index.js\");\n\nvar _CDN = _interopRequireDefault(__webpack_require__(/*! ./CDN */ \"./lib/CDN.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nvar _fetchPonyfill = (0, _fetchPonyfill2.default)({\n Promise: _nativePromiseOnly.default\n}),\n fetch = _fetchPonyfill.fetch,\n Headers = _fetchPonyfill.Headers;\n\nvar isBoolean = function isBoolean(val) {\n return _typeof(val) === _typeof(true);\n};\n\nvar isNil = function isNil(val) {\n return val === null || val === undefined;\n};\n\nvar isObject = function isObject(val) {\n return val && _typeof(val) === 'object';\n};\n\nfunction cloneResponse(response) {\n var copy = (0, _cloneDeep2.default)(response);\n\n if (Array.isArray(response)) {\n copy.skip = response.skip;\n copy.limit = response.limit;\n copy.serverCount = response.serverCount;\n }\n\n return copy;\n}\n/**\n * The Formio interface class.\n *\n * let formio = new Formio('https://examples.form.io/example');\n */\n\n\nvar Formio = /*#__PURE__*/function () {\n /* eslint-disable max-statements */\n function Formio(path) {\n var _this = this;\n\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n _classCallCheck(this, Formio);\n\n // Ensure we have an instance of Formio.\n if (!(this instanceof Formio)) {\n return new Formio(path);\n } // Initialize our variables.\n\n\n this.base = '';\n this.projectsUrl = '';\n this.projectUrl = '';\n this.projectId = '';\n this.roleUrl = '';\n this.rolesUrl = '';\n this.roleId = '';\n this.formUrl = '';\n this.formsUrl = '';\n this.formId = '';\n this.submissionsUrl = '';\n this.submissionUrl = '';\n this.submissionId = '';\n this.actionsUrl = '';\n this.actionId = '';\n this.actionUrl = '';\n this.vsUrl = '';\n this.vId = '';\n this.vUrl = '';\n this.query = ''; // Store the original path and options.\n\n this.path = path;\n this.options = options;\n\n if (options.useSessionToken) {\n Formio.useSessionToken(options);\n }\n\n if (options.hasOwnProperty('base')) {\n this.base = options.base;\n } else if (Formio.baseUrl) {\n this.base = Formio.baseUrl;\n } else if (typeof window !== 'undefined') {\n this.base = window.location.href.match(/http[s]?:\\/\\/api./)[0];\n }\n\n if (!path) {\n // Allow user to create new projects if this was instantiated without\n // a url\n this.projectUrl = Formio.projectUrl || \"\".concat(this.base, \"/project\");\n this.projectsUrl = \"\".concat(this.base, \"/project\");\n this.projectId = false;\n this.query = '';\n return;\n }\n\n if (options.hasOwnProperty('project')) {\n this.projectUrl = options.project;\n }\n\n var project = this.projectUrl || Formio.projectUrl;\n var projectRegEx = /(^|\\/)(project)($|\\/[^/]+)/;\n var isProjectUrl = path.search(projectRegEx) !== -1; // The baseURL is the same as the projectUrl, and does not contain \"/project/MONGO_ID\" in\n // its domain. This is almost certainly against the Open Source server.\n\n if (project && this.base === project && !isProjectUrl) {\n this.noProject = true;\n this.projectUrl = this.base;\n } // Normalize to an absolute path.\n\n\n if (path.indexOf('http') !== 0 && path.indexOf('//') !== 0) {\n path = this.base + path;\n }\n\n var hostparts = this.getUrlParts(path);\n var parts = [];\n var hostName = hostparts[1] + hostparts[2];\n path = hostparts.length > 3 ? hostparts[3] : '';\n var queryparts = path.split('?');\n\n if (queryparts.length > 1) {\n path = queryparts[0];\n this.query = \"?\".concat(queryparts[1]);\n } // Register a specific path.\n\n\n var registerPath = function registerPath(name, base) {\n _this[\"\".concat(name, \"sUrl\")] = \"\".concat(base, \"/\").concat(name);\n var regex = new RegExp(\"/\".concat(name, \"/([^/]+)\"));\n\n if (path.search(regex) !== -1) {\n parts = path.match(regex);\n _this[\"\".concat(name, \"Url\")] = parts ? base + parts[0] : '';\n _this[\"\".concat(name, \"Id\")] = parts.length > 1 ? parts[1] : '';\n base += parts[0];\n }\n\n return base;\n }; // Register an array of items.\n\n\n var registerItems = function registerItems(items, base, staticBase) {\n for (var i in items) {\n if (items.hasOwnProperty(i)) {\n var item = items[i];\n\n if (Array.isArray(item)) {\n registerItems(item, base, true);\n } else {\n var newBase = registerPath(item, base);\n base = staticBase ? base : newBase;\n }\n }\n }\n };\n\n if (!this.projectUrl || this.projectUrl === this.base) {\n // If a project uses Subdirectories path type, we need to specify a projectUrl\n if (!this.projectUrl && !isProjectUrl && Formio.pathType === 'Subdirectories') {\n var regex = \"^\".concat(hostName.replace(/\\//g, '\\\\/'), \".[^/]+\");\n var match = project.match(new RegExp(regex));\n this.projectUrl = match ? match[0] : hostName;\n } else {\n this.projectUrl = hostName;\n }\n } // Check if we have a specified path type.\n\n\n var isNotSubdomainType = false;\n\n if (Formio.pathType) {\n isNotSubdomainType = Formio.pathType !== 'Subdomains';\n }\n\n if (!this.noProject) {\n // Determine the projectUrl and projectId\n if (isProjectUrl) {\n // Get project id as project/:projectId.\n registerItems(['project'], hostName);\n path = path.replace(projectRegEx, '');\n } else if (hostName === this.base) {\n // Get project id as first part of path (subdirectory).\n if (hostparts.length > 3 && path.split('/').length > 1) {\n var isFile = path.match(/.json/);\n var pathParts = path.split('/');\n\n if (isFile) {\n this.projectUrl = hostName;\n } else {\n pathParts.shift(); // Throw away the first /.\n\n this.projectId = pathParts.shift();\n path = \"/\".concat(pathParts.join('/'));\n this.projectUrl = \"\".concat(hostName, \"/\").concat(this.projectId);\n }\n }\n } else {\n // Get project id from subdomain.\n if (hostparts.length > 2 && (hostparts[2].split('.').length > 2 || hostName.includes('localhost')) && !isNotSubdomainType) {\n this.projectUrl = hostName;\n this.projectId = hostparts[2].split('.')[0];\n }\n }\n\n this.projectsUrl = this.projectsUrl || \"\".concat(this.base, \"/project\");\n } // Configure Role urls and role ids.\n\n\n registerItems(['role'], this.projectUrl); // Configure Form urls and form ids.\n\n if (/(^|\\/)(form)($|\\/)/.test(path)) {\n registerItems(['form', ['submission', 'action', 'v']], this.projectUrl);\n } else {\n var subRegEx = new RegExp('/(submission|action|v)($|/.*)');\n var subs = path.match(subRegEx);\n this.pathType = subs && subs.length > 1 ? subs[1] : '';\n path = path.replace(subRegEx, '');\n path = path.replace(/\\/$/, '');\n this.formsUrl = \"\".concat(this.projectUrl, \"/form\");\n this.formUrl = path ? this.projectUrl + path : '';\n this.formId = path.replace(/^\\/+|\\/+$/g, '');\n var items = ['submission', 'action', 'v'];\n\n for (var i in items) {\n if (items.hasOwnProperty(i)) {\n var item = items[i];\n this[\"\".concat(item, \"sUrl\")] = \"\".concat(this.projectUrl + path, \"/\").concat(item);\n\n if (this.pathType === item && subs.length > 2 && subs[2]) {\n this[\"\".concat(item, \"Id\")] = subs[2].replace(/^\\/+|\\/+$/g, '');\n this[\"\".concat(item, \"Url\")] = this.projectUrl + path + subs[0];\n }\n }\n }\n } // Set the app url if it is not set.\n\n\n if (!Formio.projectUrlSet) {\n Formio.projectUrl = this.projectUrl;\n }\n }\n /* eslint-enable max-statements */\n\n\n _createClass(Formio, [{\n key: \"delete\",\n value: function _delete(type, opts) {\n var _id = \"\".concat(type, \"Id\");\n\n var _url = \"\".concat(type, \"Url\");\n\n if (!this[_id]) {\n return _nativePromiseOnly.default.reject('Nothing to delete');\n }\n\n Formio.cache = {};\n return this.makeRequest(type, this[_url], 'delete', null, opts);\n }\n }, {\n key: \"index\",\n value: function index(type, query, opts) {\n var _url = \"\".concat(type, \"Url\");\n\n query = query || '';\n\n if (query && isObject(query)) {\n query = \"?\".concat(Formio.serialize(query.params));\n }\n\n return this.makeRequest(type, this[_url] + query, 'get', null, opts);\n }\n }, {\n key: \"save\",\n value: function save(type, data, opts) {\n var _id = \"\".concat(type, \"Id\");\n\n var _url = \"\".concat(type, \"Url\");\n\n var method = this[_id] || data._id ? 'put' : 'post';\n var reqUrl = this[_id] ? this[_url] : this[\"\".concat(type, \"sUrl\")];\n\n if (!this[_id] && data._id && method === 'put' && !reqUrl.includes(data._id)) {\n reqUrl += \"/\".concat(data._id);\n }\n\n Formio.cache = {};\n return this.makeRequest(type, reqUrl + this.query, method, data, opts);\n }\n }, {\n key: \"load\",\n value: function load(type, query, opts) {\n var _id = \"\".concat(type, \"Id\");\n\n var _url = \"\".concat(type, \"Url\");\n\n if (query && isObject(query)) {\n query = Formio.serialize(query.params);\n }\n\n if (query) {\n query = this.query ? \"\".concat(this.query, \"&\").concat(query) : \"?\".concat(query);\n } else {\n query = this.query;\n }\n\n if (!this[_id]) {\n return _nativePromiseOnly.default.reject(\"Missing \".concat(_id));\n }\n\n var url = this[_url] + query;\n\n if (type === 'form' && !isNaN(parseInt(this.vId)) && parseInt(this.vId) !== 0) {\n url += url.match(/\\?/) ? '&' : '?';\n url += \"formRevision=\".concat(this.vId);\n }\n\n return this.makeRequest(type, url, 'get', null, opts);\n }\n }, {\n key: \"makeRequest\",\n value: function makeRequest() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return Formio.makeRequest.apply(Formio, [this].concat(args));\n }\n }, {\n key: \"loadProject\",\n value: function loadProject(query, opts) {\n return this.load('project', query, opts);\n }\n }, {\n key: \"saveProject\",\n value: function saveProject(data, opts) {\n return this.save('project', data, opts);\n }\n }, {\n key: \"deleteProject\",\n value: function deleteProject(opts) {\n return this.delete('project', opts);\n }\n }, {\n key: \"loadRole\",\n value: function loadRole(opts) {\n return this.load('role', null, opts);\n }\n }, {\n key: \"saveRole\",\n value: function saveRole(data, opts) {\n return this.save('role', data, opts);\n }\n }, {\n key: \"deleteRole\",\n value: function deleteRole(opts) {\n return this.delete('role', opts);\n }\n }, {\n key: \"loadRoles\",\n value: function loadRoles(opts) {\n return this.index('roles', null, opts);\n }\n }, {\n key: \"loadForm\",\n value: function loadForm(query, opts) {\n var _this2 = this;\n\n return this.load('form', query, opts).then(function (currentForm) {\n // Check to see if there isn't a number in vId.\n if (!currentForm.revisions || isNaN(parseInt(_this2.vId))) {\n return currentForm;\n } // If a submission already exists but form is marked to load current version of form.\n\n\n if (currentForm.revisions === 'current' && _this2.submissionId) {\n return currentForm;\n } // eslint-disable-next-line eqeqeq\n\n\n if (currentForm._vid == _this2.vId || currentForm.revisionId === _this2.vId) {\n return currentForm;\n } // If they specified a revision form, load the revised form components.\n\n\n if (query && isObject(query)) {\n query = Formio.serialize(query.params);\n }\n\n if (query) {\n query = _this2.query ? \"\".concat(_this2.query, \"&\").concat(query) : \"?\".concat(query);\n } else {\n query = _this2.query;\n }\n\n return _this2.makeRequest('form', _this2.vUrl + query, 'get', null, opts).then(function (revisionForm) {\n currentForm._vid = revisionForm._vid;\n currentForm.components = revisionForm.components;\n currentForm.settings = revisionForm.settings;\n currentForm.revisionId = revisionForm.revisionId; // Using object.assign so we don't cross polinate multiple form loads.\n\n return Object.assign({}, currentForm);\n }) // If we couldn't load the revision, just return the original form.\n .catch(function () {\n return Object.assign({}, currentForm);\n });\n });\n }\n }, {\n key: \"saveForm\",\n value: function saveForm(data, opts) {\n return this.save('form', data, opts);\n }\n }, {\n key: \"deleteForm\",\n value: function deleteForm(opts) {\n return this.delete('form', opts);\n }\n }, {\n key: \"loadForms\",\n value: function loadForms(query, opts) {\n return this.index('forms', query, opts);\n }\n }, {\n key: \"loadSubmission\",\n value: function loadSubmission(query, opts) {\n var _this3 = this;\n\n return this.load('submission', query, opts).then(function (submission) {\n _this3.vId = submission._frid || submission._fvid;\n _this3.vUrl = \"\".concat(_this3.formUrl, \"/v/\").concat(_this3.vId);\n return submission;\n });\n }\n }, {\n key: \"saveSubmission\",\n value: function saveSubmission(data, opts) {\n if (!isNaN(parseInt(this.vId))) {\n data._fvid = this.vId;\n }\n\n return this.save('submission', data, opts);\n }\n }, {\n key: \"deleteSubmission\",\n value: function deleteSubmission(opts) {\n return this.delete('submission', opts);\n }\n }, {\n key: \"loadSubmissions\",\n value: function loadSubmissions(query, opts) {\n return this.index('submissions', query, opts);\n }\n }, {\n key: \"loadAction\",\n value: function loadAction(query, opts) {\n return this.load('action', query, opts);\n }\n }, {\n key: \"saveAction\",\n value: function saveAction(data, opts) {\n return this.save('action', data, opts);\n }\n }, {\n key: \"deleteAction\",\n value: function deleteAction(opts) {\n return this.delete('action', opts);\n }\n }, {\n key: \"loadActions\",\n value: function loadActions(query, opts) {\n return this.index('actions', query, opts);\n }\n }, {\n key: \"availableActions\",\n value: function availableActions() {\n return this.makeRequest('availableActions', \"\".concat(this.formUrl, \"/actions\"));\n }\n }, {\n key: \"actionInfo\",\n value: function actionInfo(name) {\n return this.makeRequest('actionInfo', \"\".concat(this.formUrl, \"/actions/\").concat(name));\n }\n }, {\n key: \"isObjectId\",\n value: function isObjectId(id) {\n var checkForHexRegExp = new RegExp('^[0-9a-fA-F]{24}$');\n return checkForHexRegExp.test(id);\n }\n }, {\n key: \"getProjectId\",\n value: function getProjectId() {\n if (!this.projectId) {\n return _nativePromiseOnly.default.resolve('');\n }\n\n if (this.isObjectId(this.projectId)) {\n return _nativePromiseOnly.default.resolve(this.projectId);\n } else {\n return this.loadProject().then(function (project) {\n return project._id;\n });\n }\n }\n }, {\n key: \"getFormId\",\n value: function getFormId() {\n if (!this.formId) {\n return _nativePromiseOnly.default.resolve('');\n }\n\n if (this.isObjectId(this.formId)) {\n return _nativePromiseOnly.default.resolve(this.formId);\n } else {\n return this.loadForm().then(function (form) {\n return form._id;\n });\n }\n }\n }, {\n key: \"currentUser\",\n value: function currentUser(options) {\n return Formio.currentUser(this, options);\n }\n }, {\n key: \"accessInfo\",\n value: function accessInfo() {\n return Formio.accessInfo(this);\n }\n /**\n * Returns the JWT token for this instance.\n *\n * @return {*}\n */\n\n }, {\n key: \"getToken\",\n value: function getToken(options) {\n return Formio.getToken(Object.assign({\n formio: this\n }, this.options, options));\n }\n /**\n * Sets the JWT token for this instance.\n *\n * @return {*}\n */\n\n }, {\n key: \"setToken\",\n value: function setToken(token, options) {\n return Formio.setToken(token, Object.assign({\n formio: this\n }, this.options, options));\n }\n /**\n * Returns a temporary authentication token for single purpose token generation.\n */\n\n }, {\n key: \"getTempToken\",\n value: function getTempToken(expire, allowed, options) {\n var token = Formio.getToken(options);\n\n if (!token) {\n return _nativePromiseOnly.default.reject('You must be authenticated to generate a temporary auth token.');\n }\n\n var authUrl = Formio.authUrl || this.projectUrl;\n return this.makeRequest('tempToken', \"\".concat(authUrl, \"/token\"), 'GET', null, {\n ignoreCache: true,\n header: new Headers({\n 'x-expire': expire,\n 'x-allow': allowed\n })\n });\n }\n /**\n * Get a download url for a submission PDF of this submission.\n *\n * @return {*}\n */\n\n }, {\n key: \"getDownloadUrl\",\n value: function getDownloadUrl(form) {\n var _this4 = this;\n\n if (!this.submissionId) {\n return _nativePromiseOnly.default.resolve('');\n }\n\n if (!form) {\n // Make sure to load the form first.\n return this.loadForm().then(function (_form) {\n if (!_form) {\n return '';\n }\n\n return _this4.getDownloadUrl(_form);\n });\n }\n\n var apiUrl = \"/project/\".concat(form.project);\n apiUrl += \"/form/\".concat(form._id);\n apiUrl += \"/submission/\".concat(this.submissionId);\n var postfix = form.submissionRevisions && form.settings.changeLog ? '/download/changelog' : '/download';\n apiUrl += postfix;\n var download = this.base + apiUrl;\n return new _nativePromiseOnly.default(function (resolve, reject) {\n _this4.getTempToken(3600, \"GET:\".concat(apiUrl)).then(function (tempToken) {\n download += \"?token=\".concat(tempToken.key);\n resolve(download);\n }, function () {\n resolve(download);\n }).catch(reject);\n });\n }\n }, {\n key: \"uploadFile\",\n value: function uploadFile(storage, file, fileName, dir, progressCallback, url, options, fileKey, groupPermissions, groupId, uploadStartCallback, abortCallback) {\n var _this5 = this;\n\n var requestArgs = {\n provider: storage,\n method: 'upload',\n file: file,\n fileName: fileName,\n dir: dir\n };\n fileKey = fileKey || 'file';\n var request = Formio.pluginWait('preRequest', requestArgs).then(function () {\n return Formio.pluginGet('fileRequest', requestArgs).then(function (result) {\n if (storage && isNil(result)) {\n var Provider = _providers.default.getProvider('storage', storage);\n\n if (Provider) {\n var provider = new Provider(_this5);\n\n if (uploadStartCallback) {\n uploadStartCallback();\n }\n\n return provider.uploadFile(file, fileName, dir, progressCallback, url, options, fileKey, groupPermissions, groupId, abortCallback);\n } else {\n throw 'Storage provider not found';\n }\n }\n\n return result || {\n url: ''\n };\n });\n });\n return Formio.pluginAlter('wrapFileRequestPromise', request, requestArgs);\n }\n }, {\n key: \"downloadFile\",\n value: function downloadFile(file, options) {\n var _this6 = this;\n\n var requestArgs = {\n method: 'download',\n file: file\n };\n var request = Formio.pluginWait('preRequest', requestArgs).then(function () {\n return Formio.pluginGet('fileRequest', requestArgs).then(function (result) {\n if (file.storage && isNil(result)) {\n var Provider = _providers.default.getProvider('storage', file.storage);\n\n if (Provider) {\n var provider = new Provider(_this6);\n return provider.downloadFile(file, options);\n } else {\n throw 'Storage provider not found';\n }\n }\n\n return result || {\n url: ''\n };\n });\n });\n return Formio.pluginAlter('wrapFileRequestPromise', request, requestArgs);\n }\n }, {\n key: \"deleteFile\",\n value: function deleteFile(file, options) {\n var _this7 = this;\n\n var requestArgs = {\n method: 'delete',\n file: file\n };\n var request = Formio.pluginWait('preRequest', requestArgs).then(function () {\n return Formio.pluginGet('fileRequest', requestArgs).then(function (result) {\n if (file.storage && isNil(result)) {\n var Provider = _providers.default.getProvider('storage', file.storage);\n\n if (Provider) {\n var provider = new Provider(_this7);\n return provider.deleteFile(file, options);\n } else {\n throw 'Storage provider not found';\n }\n }\n\n return result || {\n url: ''\n };\n });\n });\n return Formio.pluginAlter('wrapFileRequestPromise', request, requestArgs);\n }\n /**\n * Returns the user permissions to a form and submission.\n *\n * @param user - The user or current user if undefined. For anonymous, use \"null\"\n * @param form - The form or current form if undefined. For no form check, use \"null\"\n * @param submission - The submisison or \"index\" if undefined.\n *\n * @return {create: boolean, read: boolean, edit: boolean, delete: boolean}\n */\n\n }, {\n key: \"userPermissions\",\n value: function userPermissions(user, form, submission) {\n return _nativePromiseOnly.default.all([form !== undefined ? _nativePromiseOnly.default.resolve(form) : this.loadForm(), user !== undefined ? _nativePromiseOnly.default.resolve(user) : this.currentUser(), submission !== undefined || !this.submissionId ? _nativePromiseOnly.default.resolve(submission) : this.loadSubmission(), this.accessInfo()]).then(function (results) {\n var form = results.shift();\n var user = results.shift() || {\n _id: false,\n roles: []\n };\n var submission = results.shift();\n var access = results.shift();\n var permMap = {\n create: 'create',\n read: 'read',\n update: 'edit',\n delete: 'delete'\n };\n var perms = {\n user: user,\n form: form,\n access: access,\n create: false,\n read: false,\n edit: false,\n delete: false\n };\n\n for (var roleName in access.roles) {\n if (access.roles.hasOwnProperty(roleName)) {\n var role = access.roles[roleName];\n\n if (role.default && user._id === false) {\n // User is anonymous. Add the anonymous role.\n user.roles.push(role._id);\n } else if (role.admin && user.roles.indexOf(role._id) !== -1) {\n perms.create = true;\n perms.read = true;\n perms.delete = true;\n perms.edit = true;\n return perms;\n }\n }\n }\n\n if (form && form.submissionAccess) {\n for (var i = 0; i < form.submissionAccess.length; i++) {\n var permission = form.submissionAccess[i];\n\n var _permission$type$spli = permission.type.split('_'),\n _permission$type$spli2 = _slicedToArray(_permission$type$spli, 2),\n perm = _permission$type$spli2[0],\n scope = _permission$type$spli2[1];\n\n if (['create', 'read', 'update', 'delete'].includes(perm)) {\n if ((0, _intersection2.default)(permission.roles, user.roles).length) {\n perms[permMap[perm]] = scope === 'all' || !submission || user._id === submission.owner;\n }\n }\n }\n } // check for Group Permissions\n\n\n if (submission) {\n // we would anyway need to loop through components for create permission, so we'll do that for all of them\n (0, _utils.eachComponent)(form.components, function (component, path) {\n if (component && component.defaultPermission) {\n var value = (0, _get2.default)(submission.data, path); // make it work for single-select Group and multi-select Group\n\n var groups = Array.isArray(value) ? value : [value];\n groups.forEach(function (group) {\n if (group && group._id && // group id is present\n user.roles.indexOf(group._id) > -1 // user has group id in his roles\n ) {\n if (component.defaultPermission === 'read') {\n perms[permMap.read] = true;\n }\n\n if (component.defaultPermission === 'create') {\n perms[permMap.create] = true;\n perms[permMap.read] = true;\n }\n\n if (component.defaultPermission === 'write') {\n perms[permMap.create] = true;\n perms[permMap.read] = true;\n perms[permMap.update] = true;\n }\n\n if (component.defaultPermission === 'admin') {\n perms[permMap.create] = true;\n perms[permMap.read] = true;\n perms[permMap.update] = true;\n perms[permMap.delete] = true;\n }\n }\n });\n }\n });\n }\n\n return perms;\n });\n }\n /**\n * Determine if the current user can submit a form.\n * @return {*}\n */\n\n }, {\n key: \"canSubmit\",\n value: function canSubmit() {\n var _this8 = this;\n\n return this.userPermissions().then(function (perms) {\n // If there is user and they cannot create, then check anonymous user permissions.\n if (!perms.create && Formio.getUser()) {\n return _this8.userPermissions(null).then(function (anonPerms) {\n if (anonPerms.create) {\n Formio.setUser(null);\n return true;\n }\n\n return false;\n });\n }\n\n return perms.create;\n });\n }\n }, {\n key: \"getUrlParts\",\n value: function getUrlParts(url) {\n return Formio.getUrlParts(url, this);\n }\n }], [{\n key: \"useSessionToken\",\n value: function useSessionToken(options) {\n var tokenName = \"\".concat(options.namespace || Formio.namespace || 'formio', \"Token\");\n var token = localStorage.getItem(tokenName);\n\n if (token) {\n localStorage.removeItem(tokenName);\n sessionStorage.setItem(tokenName, token);\n }\n\n var userName = \"\".concat(options.namespace || Formio.namespace || 'formio', \"User\");\n var user = localStorage.getItem(userName);\n\n if (user) {\n localStorage.removeItem(userName);\n sessionStorage.setItem(userName, user);\n }\n\n localStorage.setItem('useSessionToken', true);\n }\n }, {\n key: \"loadProjects\",\n value: function loadProjects(query, opts) {\n query = query || '';\n\n if (isObject(query)) {\n query = \"?\".concat(Formio.serialize(query.params));\n }\n\n return Formio.makeStaticRequest(\"\".concat(Formio.baseUrl, \"/project\").concat(query), 'GET', null, opts);\n }\n }, {\n key: \"getUrlParts\",\n value: function getUrlParts(url, formio) {\n var base = formio && formio.base ? formio.base : Formio.baseUrl;\n var regex = '^(http[s]?:\\\\/\\\\/)';\n\n if (base && url.indexOf(base) === 0) {\n regex += \"(\".concat(base.replace(/^http[s]?:\\/\\//, ''), \")\");\n } else {\n regex += '([^/]+)';\n }\n\n regex += '($|\\\\/.*)';\n return url.match(new RegExp(regex));\n }\n }, {\n key: \"serialize\",\n value: function serialize(obj, _interpolate) {\n var str = [];\n\n var interpolate = function interpolate(item) {\n return _interpolate ? _interpolate(item) : item;\n };\n\n for (var p in obj) {\n if (obj.hasOwnProperty(p)) {\n str.push(\"\".concat(encodeURIComponent(p), \"=\").concat(encodeURIComponent(interpolate(obj[p]))));\n }\n }\n\n return str.join('&');\n }\n }, {\n key: \"getRequestArgs\",\n value: function getRequestArgs(formio, type, url, method, data, opts) {\n method = (method || 'GET').toUpperCase();\n\n if (!opts || !isObject(opts)) {\n opts = {};\n }\n\n var requestArgs = {\n url: url,\n method: method,\n data: data || null,\n opts: opts\n };\n\n if (type) {\n requestArgs.type = type;\n }\n\n if (formio) {\n requestArgs.formio = formio;\n }\n\n return requestArgs;\n }\n }, {\n key: \"makeStaticRequest\",\n value: function makeStaticRequest(url, method, data, opts) {\n var requestArgs = Formio.getRequestArgs(null, '', url, method, data, opts);\n var request = Formio.pluginWait('preRequest', requestArgs).then(function () {\n return Formio.pluginGet('staticRequest', requestArgs).then(function (result) {\n if (isNil(result)) {\n return Formio.request(requestArgs.url, requestArgs.method, requestArgs.data, requestArgs.opts.header, requestArgs.opts);\n }\n\n return result;\n });\n });\n return Formio.pluginAlter('wrapStaticRequestPromise', request, requestArgs);\n }\n }, {\n key: \"makeRequest\",\n value: function makeRequest(formio, type, url, method, data, opts) {\n if (!formio) {\n return Formio.makeStaticRequest(url, method, data, opts);\n }\n\n var requestArgs = Formio.getRequestArgs(formio, type, url, method, data, opts);\n requestArgs.opts = requestArgs.opts || {};\n requestArgs.opts.formio = formio; //for Formio requests default Accept and Content-type headers\n\n if (!requestArgs.opts.headers) {\n requestArgs.opts.headers = {};\n }\n\n requestArgs.opts.headers = (0, _defaults2.default)(requestArgs.opts.headers, {\n 'Accept': 'application/json',\n 'Content-type': 'application/json'\n });\n var request = Formio.pluginWait('preRequest', requestArgs).then(function () {\n return Formio.pluginGet('request', requestArgs).then(function (result) {\n if (isNil(result)) {\n return Formio.request(requestArgs.url, requestArgs.method, requestArgs.data, requestArgs.opts.header, requestArgs.opts);\n }\n\n return result;\n });\n });\n return Formio.pluginAlter('wrapRequestPromise', request, requestArgs);\n }\n }, {\n key: \"request\",\n value: function request(url, method, data, header, opts) {\n if (!url) {\n return _nativePromiseOnly.default.reject('No url provided');\n }\n\n var _Formio = Formio;\n method = (method || 'GET').toUpperCase(); // For reverse compatibility, if they provided the ignoreCache parameter,\n // then change it back to the options format where that is a parameter.\n\n if (isBoolean(opts)) {\n opts = {\n ignoreCache: opts\n };\n }\n\n if (!opts || !isObject(opts)) {\n opts = {};\n } // Generate a cachekey.\n\n\n var cacheKey = btoa(encodeURI(url)); // Get the cached promise to save multiple loads.\n\n if (!opts.ignoreCache && method === 'GET' && _Formio.cache.hasOwnProperty(cacheKey)) {\n return _nativePromiseOnly.default.resolve(cloneResponse(_Formio.cache[cacheKey]));\n } // Set up and fetch request\n\n\n var headers = header || new Headers(opts.headers || {\n 'Accept': 'application/json',\n 'Content-type': 'application/json'\n });\n\n var token = _Formio.getToken(opts);\n\n if (token && !opts.noToken) {\n headers.append('x-jwt-token', token);\n } // The fetch-ponyfill can't handle a proper Headers class anymore. Change it back to an object.\n\n\n var headerObj = {};\n headers.forEach(function (value, name) {\n headerObj[name] = value;\n });\n var options = {\n method: method,\n headers: headerObj,\n mode: 'cors'\n };\n\n if (data) {\n options.body = JSON.stringify(data);\n } // Allow plugins to alter the options.\n\n\n options = _Formio.pluginAlter('requestOptions', options, url);\n\n if (options.namespace || _Formio.namespace) {\n opts.namespace = options.namespace || _Formio.namespace;\n }\n\n var requestToken = options.headers['x-jwt-token'];\n\n var result = _Formio.pluginAlter('wrapFetchRequestPromise', _Formio.fetch(url, options), {\n url: url,\n method: method,\n data: data,\n opts: opts\n }).then(function (response) {\n // Allow plugins to respond.\n response = _Formio.pluginAlter('requestResponse', response, _Formio, data);\n\n if (!response.ok) {\n if (response.status === 440) {\n _Formio.setToken(null, opts);\n\n _Formio.events.emit('formio.sessionExpired', response.body);\n } else if (response.status === 401) {\n _Formio.events.emit('formio.unauthorized', response.body);\n } else if (response.status === 416) {\n _Formio.events.emit('formio.rangeIsNotSatisfiable', response.body);\n } else if (response.status === 504) {\n return _nativePromiseOnly.default.reject(new Error('Network request failed'));\n } // Parse and return the error as a rejected promise to reject this promise\n\n\n return (response.headers.get('content-type').includes('application/json') ? response.json() : response.text()).then(function (error) {\n return _nativePromiseOnly.default.reject(error);\n });\n } // Handle fetch results\n\n\n var token = response.headers.get('x-jwt-token'); // In some strange cases, the fetch library will return an x-jwt-token without sending\n // one to the server. This has even been debugged on the server to verify that no token\n // was introduced with the request, but the response contains a token. This is an Invalid\n // case where we do not send an x-jwt-token and get one in return for any GET request.\n\n var tokenIntroduced = false;\n\n if (method === 'GET' && !requestToken && token && !opts.external && !url.includes('token=') && !url.includes('x-jwt-token=')) {\n console.warn('Token was introduced in request.');\n tokenIntroduced = true;\n }\n\n if (response.status >= 200 && response.status < 300 && token && token !== '' && !tokenIntroduced) {\n _Formio.setToken(token, opts);\n } // 204 is no content. Don't try to .json() it.\n\n\n if (response.status === 204) {\n return {};\n }\n\n var getResult = response.headers.get('content-type').includes('application/json') ? response.json() : response.text();\n return getResult.then(function (result) {\n // Add some content-range metadata to the result here\n var range = response.headers.get('content-range');\n\n if (range && isObject(result)) {\n range = range.split('/');\n\n if (range[0] !== '*') {\n var skipLimit = range[0].split('-');\n result.skip = Number(skipLimit[0]);\n result.limit = skipLimit[1] - skipLimit[0] + 1;\n }\n\n result.serverCount = range[1] === '*' ? range[1] : Number(range[1]);\n }\n\n if (!opts.getHeaders) {\n return result;\n }\n\n var headers = {};\n response.headers.forEach(function (item, key) {\n headers[key] = item;\n }); // Return the result with the headers.\n\n return {\n result: result,\n headers: headers\n };\n });\n }).then(function (result) {\n if (opts.getHeaders) {\n return result;\n } // Cache the response.\n\n\n if (method === 'GET') {\n _Formio.cache[cacheKey] = result;\n }\n\n return cloneResponse(result);\n }).catch(function (err) {\n if (err === 'Bad Token') {\n _Formio.setToken(null, opts);\n\n _Formio.events.emit('formio.badToken', err);\n }\n\n if (err.message) {\n err = new Error(\"Could not connect to API server (\".concat(err.message, \"): \").concat(url));\n err.networkError = true;\n }\n\n if (method === 'GET') {\n delete _Formio.cache[cacheKey];\n }\n\n return _nativePromiseOnly.default.reject(err);\n });\n\n return result;\n } // Needed to maintain reverse compatability...\n\n }, {\n key: \"token\",\n get: function get() {\n if (!Formio.tokens) {\n Formio.tokens = {};\n }\n\n return Formio.tokens.formioToken || '';\n } // Needed to maintain reverse compatability...\n ,\n set: function set(token) {\n if (!Formio.tokens) {\n Formio.tokens = {};\n }\n\n Formio.tokens.formioToken = token || '';\n }\n }, {\n key: \"setToken\",\n value: function setToken() {\n var token = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var opts = arguments.length > 1 ? arguments[1] : undefined;\n token = token || '';\n opts = typeof opts === 'string' ? {\n namespace: opts\n } : opts || {};\n var tokenName = \"\".concat(opts.namespace || Formio.namespace || 'formio', \"Token\");\n\n if (!Formio.tokens) {\n Formio.tokens = {};\n }\n\n var storage = localStorage.getItem('useSessionToken') ? sessionStorage : localStorage;\n\n if (!token) {\n if (!opts.fromUser) {\n opts.fromToken = true;\n Formio.setUser(null, opts);\n } // iOS in private browse mode will throw an error but we can't detect ahead of time that we are in private mode.\n\n\n try {\n storage.removeItem(tokenName);\n } catch (err) {\n _browserCookies.default.erase(tokenName, {\n path: '/'\n });\n }\n\n Formio.tokens[tokenName] = token;\n return _nativePromiseOnly.default.resolve(null);\n }\n\n if (Formio.tokens[tokenName] !== token) {\n Formio.tokens[tokenName] = token; // iOS in private browse mode will throw an error but we can't detect ahead of time that we are in private mode.\n\n try {\n storage.setItem(tokenName, token);\n } catch (err) {\n _browserCookies.default.set(tokenName, token, {\n path: '/'\n });\n }\n } // Return or updates the current user\n\n\n return this.currentUserResolved ? Formio.currentUser(opts.formio, opts) : _nativePromiseOnly.default.resolve(null);\n }\n }, {\n key: \"getToken\",\n value: function getToken(options) {\n options = typeof options === 'string' ? {\n namespace: options\n } : options || {};\n var tokenName = \"\".concat(options.namespace || Formio.namespace || 'formio', \"Token\");\n var decodedTokenName = options.decode ? \"\".concat(tokenName, \"Decoded\") : tokenName;\n\n if (!Formio.tokens) {\n Formio.tokens = {};\n }\n\n if (Formio.tokens[decodedTokenName]) {\n return Formio.tokens[decodedTokenName];\n }\n\n try {\n var token = localStorage.getItem('useSessionToken') ? sessionStorage.getItem(tokenName) : localStorage.getItem(tokenName);\n Formio.tokens[tokenName] = token || '';\n\n if (options.decode) {\n Formio.tokens[decodedTokenName] = Formio.tokens[tokenName] ? (0, _jwtDecode.default)(Formio.tokens[tokenName]) : {};\n return Formio.tokens[decodedTokenName];\n }\n\n return Formio.tokens[tokenName];\n } catch (e) {\n Formio.tokens[tokenName] = _browserCookies.default.get(tokenName);\n return Formio.tokens[tokenName];\n }\n }\n }, {\n key: \"setUser\",\n value: function setUser(user) {\n var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var userName = \"\".concat(opts.namespace || Formio.namespace || 'formio', \"User\");\n var storage = localStorage.getItem('useSessionToken') ? sessionStorage : localStorage;\n\n if (!user) {\n if (!opts.fromToken) {\n opts.fromUser = true;\n Formio.setToken(null, opts);\n } // Emit an event on the cleared user.\n\n\n Formio.events.emit('formio.user', null); // iOS in private browse mode will throw an error but we can't detect ahead of time that we are in private mode.\n\n try {\n return storage.removeItem(userName);\n } catch (err) {\n return _browserCookies.default.erase(userName, {\n path: '/'\n });\n }\n } // iOS in private browse mode will throw an error but we can't detect ahead of time that we are in private mode.\n\n\n try {\n storage.setItem(userName, JSON.stringify(user));\n } catch (err) {\n _browserCookies.default.set(userName, JSON.stringify(user), {\n path: '/'\n });\n } // Emit an event on the authenticated user.\n\n\n Formio.events.emit('formio.user', user);\n }\n }, {\n key: \"getUser\",\n value: function getUser(options) {\n options = options || {};\n var userName = \"\".concat(options.namespace || Formio.namespace || 'formio', \"User\");\n\n try {\n return JSON.parse((localStorage.getItem('useSessionToken') ? sessionStorage : localStorage).getItem(userName) || null);\n } catch (e) {\n return JSON.parse(_browserCookies.default.get(userName));\n }\n }\n }, {\n key: \"setBaseUrl\",\n value: function setBaseUrl(url) {\n Formio.baseUrl = url;\n\n if (!Formio.projectUrlSet) {\n Formio.projectUrl = url;\n }\n }\n }, {\n key: \"getBaseUrl\",\n value: function getBaseUrl() {\n return Formio.baseUrl;\n }\n }, {\n key: \"setApiUrl\",\n value: function setApiUrl(url) {\n return Formio.setBaseUrl(url);\n }\n }, {\n key: \"getApiUrl\",\n value: function getApiUrl() {\n return Formio.getBaseUrl();\n }\n }, {\n key: \"setAppUrl\",\n value: function setAppUrl(url) {\n console.warn('Formio.setAppUrl() is deprecated. Use Formio.setProjectUrl instead.');\n Formio.projectUrl = url;\n Formio.projectUrlSet = true;\n }\n }, {\n key: \"setProjectUrl\",\n value: function setProjectUrl(url) {\n Formio.projectUrl = url;\n Formio.projectUrlSet = true;\n }\n }, {\n key: \"setAuthUrl\",\n value: function setAuthUrl(url) {\n Formio.authUrl = url;\n }\n }, {\n key: \"getAppUrl\",\n value: function getAppUrl() {\n console.warn('Formio.getAppUrl() is deprecated. Use Formio.getProjectUrl instead.');\n return Formio.projectUrl;\n }\n }, {\n key: \"getProjectUrl\",\n value: function getProjectUrl() {\n return Formio.projectUrl;\n }\n }, {\n key: \"clearCache\",\n value: function clearCache() {\n Formio.cache = {};\n }\n }, {\n key: \"noop\",\n value: function noop() {}\n }, {\n key: \"identity\",\n value: function identity(value) {\n return value;\n }\n }, {\n key: \"deregisterPlugin\",\n value: function deregisterPlugin(plugin) {\n var beforeLength = Formio.plugins.length;\n Formio.plugins = Formio.plugins.filter(function (p) {\n if (p !== plugin && p.__name !== plugin) {\n return true;\n }\n\n (p.deregister || Formio.noop).call(plugin, Formio);\n return false;\n });\n return beforeLength !== Formio.plugins.length;\n }\n }, {\n key: \"registerPlugin\",\n value: function registerPlugin(plugin, name) {\n var __Formio = Formio;\n\n __Formio.plugins.push(plugin);\n\n __Formio.plugins.sort(function (a, b) {\n return (b.priority || 0) - (a.priority || 0);\n });\n\n plugin.__name = name;\n\n (plugin.init || __Formio.noop).call(plugin, __Formio);\n }\n }, {\n key: \"getPlugin\",\n value: function getPlugin(name) {\n var _iterator = _createForOfIteratorHelper(Formio.plugins),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var plugin = _step.value;\n\n if (plugin.__name === name) {\n return plugin;\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return null;\n }\n }, {\n key: \"pluginWait\",\n value: function pluginWait(pluginFn) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n return _nativePromiseOnly.default.all(Formio.plugins.map(function (plugin) {\n var _ref;\n\n return (_ref = plugin[pluginFn] || Formio.noop).call.apply(_ref, [plugin].concat(args));\n }));\n }\n }, {\n key: \"pluginGet\",\n value: function pluginGet(pluginFn) {\n for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n args[_key3 - 1] = arguments[_key3];\n }\n\n var callPlugin = function callPlugin(index) {\n var _ref2;\n\n var plugin = Formio.plugins[index];\n\n if (!plugin) {\n return _nativePromiseOnly.default.resolve(null);\n }\n\n return _nativePromiseOnly.default.resolve((_ref2 = plugin[pluginFn] || Formio.noop).call.apply(_ref2, [plugin].concat(args))).then(function (result) {\n if (!isNil(result)) {\n return result;\n }\n\n return callPlugin(index + 1);\n });\n };\n\n return callPlugin(0);\n }\n }, {\n key: \"pluginAlter\",\n value: function pluginAlter(pluginFn, value) {\n for (var _len4 = arguments.length, args = new Array(_len4 > 2 ? _len4 - 2 : 0), _key4 = 2; _key4 < _len4; _key4++) {\n args[_key4 - 2] = arguments[_key4];\n }\n\n return Formio.plugins.reduce(function (value, plugin) {\n return (plugin[pluginFn] || Formio.identity).apply(void 0, [value].concat(args));\n }, value);\n }\n }, {\n key: \"accessInfo\",\n value: function accessInfo(formio) {\n var projectUrl = formio ? formio.projectUrl : Formio.projectUrl;\n return Formio.makeRequest(formio, 'accessInfo', \"\".concat(projectUrl, \"/access\"));\n }\n }, {\n key: \"projectRoles\",\n value: function projectRoles(formio) {\n var projectUrl = formio ? formio.projectUrl : Formio.projectUrl;\n return Formio.makeRequest(formio, 'projectRoles', \"\".concat(projectUrl, \"/role\"));\n }\n }, {\n key: \"currentUser\",\n value: function currentUser(formio, options) {\n var _this9 = this;\n\n var authUrl = Formio.authUrl;\n\n if (!authUrl) {\n authUrl = formio ? formio.projectUrl : Formio.projectUrl || Formio.baseUrl;\n }\n\n authUrl += '/current';\n var user = Formio.getUser(options);\n\n if (user) {\n return Formio.pluginAlter('wrapStaticRequestPromise', _nativePromiseOnly.default.resolve(user), {\n url: authUrl,\n method: 'GET',\n options: options\n });\n }\n\n var token = Formio.getToken(options);\n\n if ((!options || !options.external) && !token) {\n return Formio.pluginAlter('wrapStaticRequestPromise', _nativePromiseOnly.default.resolve(null), {\n url: authUrl,\n method: 'GET',\n options: options\n });\n }\n\n authUrl = \"\".concat(Formio.baseUrl, \"/current\");\n this.currentUserResolved = false;\n return Formio.makeRequest(formio, 'currentUser', authUrl, 'GET', null, options).then(function (response) {\n _this9.currentUserResolved = true;\n Formio.setUser(response, options);\n return response;\n });\n }\n }, {\n key: \"logout\",\n value: function logout(formio, options) {\n options = options || {};\n options.formio = formio;\n var projectUrl = Formio.authUrl ? Formio.authUrl : formio ? formio.projectUrl : Formio.baseUrl;\n\n var logout = function logout() {\n Formio.setToken(null, options);\n Formio.setUser(null, options);\n Formio.clearCache();\n localStorage.removeItem('useSessionToken');\n };\n\n return Formio.makeRequest(formio, 'logout', \"\".concat(projectUrl, \"/logout\")).then(function (result) {\n logout();\n return result;\n }).catch(function (err) {\n logout();\n throw err;\n });\n }\n }, {\n key: \"pageQuery\",\n value: function pageQuery() {\n var pageQuery = {};\n pageQuery.paths = [];\n var hashes = location.hash.substr(1).replace(/\\?/g, '&').split('&');\n var parts = [];\n location.search.substr(1).split('&').forEach(function (item) {\n parts = item.split('=');\n\n if (parts.length > 1) {\n pageQuery[parts[0]] = parts[1] && decodeURIComponent(parts[1]);\n }\n });\n hashes.forEach(function (item) {\n parts = item.split('=');\n\n if (parts.length > 1) {\n pageQuery[parts[0]] = parts[1] && decodeURIComponent(parts[1]);\n } else if (item.indexOf('/') === 0) {\n pageQuery.paths = item.substr(1).split('/');\n }\n });\n return pageQuery;\n }\n }, {\n key: \"oAuthCurrentUser\",\n value: function oAuthCurrentUser(formio, token) {\n return Formio.currentUser(formio, {\n external: true,\n headers: {\n Authorization: \"Bearer \".concat(token)\n }\n });\n }\n }, {\n key: \"samlInit\",\n value: function samlInit(options) {\n options = options || {};\n var query = Formio.pageQuery();\n\n if (query.saml) {\n Formio.setUser(null);\n var retVal = Formio.setToken(query.saml);\n var uri = window.location.toString();\n uri = uri.substring(0, uri.indexOf('?'));\n\n if (window.location.hash) {\n uri += window.location.hash;\n }\n\n window.history.replaceState({}, document.title, uri);\n return retVal;\n } // Set the relay if not provided.\n\n\n if (!options.relay) {\n options.relay = window.location.href;\n } // go to the saml sso endpoint for this project.\n\n\n var authUrl = Formio.authUrl || Formio.projectUrl;\n window.location.href = \"\".concat(authUrl, \"/saml/sso?relay=\").concat(encodeURI(options.relay));\n return false;\n }\n }, {\n key: \"oktaInit\",\n value: function oktaInit(options) {\n options = options || {};\n\n if ((typeof OktaAuth === \"undefined\" ? \"undefined\" : _typeof(OktaAuth)) !== undefined) {\n options.OktaAuth = OktaAuth;\n }\n\n if (_typeof(options.OktaAuth) === undefined) {\n var errorMessage = 'Cannot find OktaAuth. Please include the Okta JavaScript SDK within your application. See https://developer.okta.com/code/javascript/okta_auth_sdk for an example.';\n console.warn(errorMessage);\n return _nativePromiseOnly.default.reject(errorMessage);\n }\n\n return new _nativePromiseOnly.default(function (resolve, reject) {\n var Okta = options.OktaAuth;\n delete options.OktaAuth;\n var authClient = new Okta(options);\n authClient.tokenManager.get('accessToken').then(function (accessToken) {\n if (accessToken) {\n resolve(Formio.oAuthCurrentUser(options.formio, accessToken.accessToken));\n } else if (location.hash) {\n authClient.token.parseFromUrl().then(function (token) {\n authClient.tokenManager.add('accessToken', token);\n resolve(Formio.oAuthCurrentUser(options.formio, token.accessToken));\n }).catch(function (err) {\n console.warn(err);\n reject(err);\n });\n } else {\n authClient.token.getWithRedirect({\n responseType: 'token',\n scopes: options.scopes\n });\n resolve(false);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n }\n }, {\n key: \"ssoInit\",\n value: function ssoInit(type, options) {\n switch (type) {\n case 'saml':\n return Formio.samlInit(options);\n\n case 'okta':\n return Formio.oktaInit(options);\n\n default:\n console.warn('Unknown SSO type');\n return _nativePromiseOnly.default.reject('Unknown SSO type');\n }\n }\n }, {\n key: \"requireLibrary\",\n value: function requireLibrary(name, property, src, polling, onload) {\n if (!Formio.libraries.hasOwnProperty(name)) {\n Formio.libraries[name] = {};\n Formio.libraries[name].ready = new _nativePromiseOnly.default(function (resolve, reject) {\n Formio.libraries[name].resolve = resolve;\n Formio.libraries[name].reject = reject;\n });\n var callbackName = \"\".concat(name, \"Callback\");\n\n if (!polling && !window[callbackName]) {\n window[callbackName] = function () {\n return Formio.libraries[name].resolve();\n };\n } // See if the plugin already exists.\n\n\n var plugin = (0, _get2.default)(window, property);\n\n if (plugin) {\n Formio.libraries[name].resolve(plugin);\n } else {\n src = Array.isArray(src) ? src : [src];\n src.forEach(function (lib) {\n var attrs = {};\n var elementType = '';\n\n if (typeof lib === 'string') {\n lib = {\n type: 'script',\n src: lib\n };\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 referrerpolicy: 'origin'\n };\n break;\n\n case 'styles':\n elementType = 'link';\n attrs = {\n href: lib.src,\n rel: 'stylesheet'\n };\n break;\n } // Add the script to the top of the page.\n\n\n var element = document.createElement(elementType);\n\n if (element.setAttribute) {\n for (var attr in attrs) {\n element.setAttribute(attr, attrs[attr]);\n }\n }\n\n if (onload) {\n element.addEventListener('load', function () {\n Formio.libraries[name].loaded = true;\n onload(Formio.libraries[name].ready);\n });\n }\n\n var _document = document,\n head = _document.head;\n\n if (head) {\n head.appendChild(element);\n }\n }); // if no callback is provided, then check periodically for the script.\n\n if (polling) {\n var interval = setInterval(function () {\n var plugin = (0, _get2.default)(window, property);\n\n if (plugin) {\n clearInterval(interval);\n Formio.libraries[name].resolve(plugin);\n }\n }, 200);\n }\n }\n }\n\n var lib = Formio.libraries[name];\n return onload && lib.loaded ? onload(lib.ready) : lib.ready;\n }\n }, {\n key: \"libraryReady\",\n value: function libraryReady(name) {\n if (Formio.libraries.hasOwnProperty(name) && Formio.libraries[name].ready) {\n return Formio.libraries[name].ready;\n }\n\n return _nativePromiseOnly.default.reject(\"\".concat(name, \" library was not required.\"));\n }\n }, {\n key: \"addToGlobal\",\n value: function addToGlobal(global) {\n if (_typeof(global) === 'object' && !global.Formio) {\n global.Formio = Formio;\n }\n }\n }, {\n key: \"setPathType\",\n value: function setPathType(type) {\n if (typeof type === 'string') {\n Formio.pathType = type;\n }\n }\n }, {\n key: \"getPathType\",\n value: function getPathType() {\n return Formio.pathType;\n }\n }, {\n key: \"rulesEntities\",\n get: function get() {\n return {\n ValueSources: Formio.ValueSources,\n Conjunctions: Formio.Conjunctions,\n Operators: Formio.Operators,\n Transformers: Formio.Transformers,\n QuickRules: Formio.QuickRules,\n Rules: Formio.Rules\n };\n }\n }, {\n key: \"GlobalFormio\",\n get: function get() {\n if (typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.Formio) {\n return __webpack_require__.g.Formio;\n } else if (typeof window !== 'undefined' && window.Formio) {\n return window.Formio;\n }\n\n return Formio;\n }\n }]);\n\n return Formio;\n}(); // Define all the static properties.\n\n\n_defineProperty(Formio, \"currentUserResolved\", true);\n\nFormio.libraries = {};\nFormio.Promise = _nativePromiseOnly.default;\nFormio.fetch = fetch;\nFormio.Headers = Headers;\nFormio.baseUrl = 'https://api.form.io';\nFormio.projectUrl = Formio.baseUrl;\nFormio.authUrl = '';\nFormio.projectUrlSet = false;\nFormio.plugins = [];\nFormio.cache = {};\nFormio.Providers = _providers.default;\nFormio.version = '4.14.11-rc.14';\nFormio.pathType = '';\nFormio.events = new _EventEmitter.default();\nFormio.cdn = new _CDN.default();\n\nif (typeof __webpack_require__.g !== 'undefined') {\n Formio.addToGlobal(__webpack_require__.g);\n}\n\nif (typeof window !== 'undefined') {\n Formio.addToGlobal(window);\n}\n\nvar GlobalFormio = Formio.GlobalFormio;\nexports.GlobalFormio = GlobalFormio;\nvar _default = Formio;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/Formio.js?"); /***/ }), @@ -2653,7 +2653,7 @@ eval("\n\nvar custom = __webpack_require__(/*! ./Custom */ \"./lib/validator/rul /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.set.js */ \"./node_modules/core-js/modules/es.reflect.set.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.split.js */ \"./node_modules/core-js/modules/es.string.split.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.match.js */ \"./node_modules/core-js/modules/es.string.match.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.find.js */ \"./node_modules/core-js/modules/es.array.find.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _Formio = __webpack_require__(/*! ../Formio */ \"./lib/Formio.js\");\n\nvar _InputWidget2 = _interopRequireDefault(__webpack_require__(/*! ./InputWidget */ \"./lib/widgets/InputWidget.js\"));\n\nvar _utils = __webpack_require__(/*! ../utils/utils */ \"./lib/utils/utils.js\");\n\nvar _moment = _interopRequireDefault(__webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\"));\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction set(target, property, value, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.set) { set = Reflect.set; } else { set = function set(target, property, value, receiver) { var base = _superPropBase(target, property); var desc; if (base) { desc = Object.getOwnPropertyDescriptor(base, property); if (desc.set) { desc.set.call(receiver, value); return true; } else if (!desc.writable) { return false; } } desc = Object.getOwnPropertyDescriptor(receiver, property); if (desc) { if (!desc.writable) { return false; } desc.value = value; Object.defineProperty(receiver, property, desc); } else { _defineProperty(receiver, property, value); } return true; }; } return set(target, property, value, receiver); }\n\nfunction _set(target, property, value, receiver, isStrict) { var s = set(target, property, value, receiver || target); if (!s && isStrict) { throw new Error('failed to set property'); } return value; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar DEFAULT_FORMAT = 'yyyy-MM-dd hh:mm a';\nvar ISO_8601_FORMAT = 'yyyy-MM-ddTHH:mm:ssZ';\nvar isIEBrowser = (0, _utils.getBrowserInfo)().ie;\n\nvar CalendarWidget = /*#__PURE__*/function (_InputWidget) {\n _inherits(CalendarWidget, _InputWidget);\n\n var _super = _createSuper(CalendarWidget);\n\n /* eslint-enable camelcase */\n function CalendarWidget(settings, component, instance, index) {\n var _this;\n\n _classCallCheck(this, CalendarWidget);\n\n _this = _super.call(this, settings, component, instance, index); // Change the format to map to the settings.\n\n if (_this.settings.noCalendar) {\n _this.settings.format = _this.settings.format.replace(/yyyy-MM-dd /g, '');\n }\n\n if (!_this.settings.enableTime) {\n _this.settings.format = _this.settings.format.replace(/ hh:mm a$/g, '');\n } else if (_this.settings.time_24hr) {\n _this.settings.format = _this.settings.format.replace(/hh:mm a$/g, 'HH:mm');\n }\n\n _this.zoneLoading = false;\n _this.timezonesUrl = \"\".concat(_Formio.GlobalFormio.cdn['moment-timezone'], \"/data/packed/latest.json\");\n return _this;\n }\n /**\n * Load the timezones.\n *\n * @return {boolean} TRUE if the zones are loading, FALSE otherwise.\n */\n\n\n _createClass(CalendarWidget, [{\n key: \"loadZones\",\n value: function loadZones() {\n var _this2 = this;\n\n var timezone = this.timezone;\n\n if (this.zoneLoading) {\n return true;\n }\n\n if (!(0, _utils.zonesLoaded)() && (0, _utils.shouldLoadZones)(timezone)) {\n this.zoneLoading = true;\n (0, _utils.loadZones)(this.timezonesUrl, timezone).then(function () {\n _this2.zoneLoading = false;\n\n _this2.emit('redraw');\n }); // Return zones are loading.\n\n return true;\n } // Zones are already loaded.\n\n\n return false;\n }\n }, {\n key: \"attach\",\n value: function attach(input) {\n var _this3 = this,\n _this$component$short;\n\n var superAttach = _get(_getPrototypeOf(CalendarWidget.prototype), \"attach\", this).call(this, input);\n\n var dateFormatInfo = (0, _utils.getLocaleDateFormatInfo)(this.settings.language);\n this.defaultFormat = {\n date: dateFormatInfo.dayFirst ? 'd/m/Y ' : 'm/d/Y ',\n time: 'G:i K'\n };\n this.closedOn = 0;\n this.valueFormat = this.settings.saveAs === 'date' ? ISO_8601_FORMAT : this.settings.dateFormat || ISO_8601_FORMAT;\n this.valueMomentFormat = (0, _utils.convertFormatToMoment)(this.valueFormat);\n var isReadOnly = this.settings.readOnly;\n this.settings.minDate = isReadOnly ? null : (0, _utils.getDateSetting)(this.settings.minDate);\n this.settings.maxDate = isReadOnly ? null : (0, _utils.getDateSetting)(this.settings.maxDate);\n this.settings.disable = this.disabledDates;\n this.settings.disableWeekends ? this.settings.disable.push(this.disableWeekends) : '';\n this.settings.disableWeekdays ? this.settings.disable.push(this.disableWeekdays) : '';\n this.settings.disableFunction ? this.settings.disable.push(this.disableFunction) : '';\n this.settings.wasDefaultValueChanged = false;\n this.settings.defaultValue = '';\n this.settings.manualInputValue = '';\n this.settings.isManuallyOverriddenValue = false;\n this.settings.currentValue = '';\n this.settings.altFormat = (0, _utils.convertFormatToFlatpickr)(this.settings.format);\n this.settings.dateFormat = (0, _utils.convertFormatToFlatpickr)(this.settings.dateFormat);\n this.settings.position = 'auto center';\n\n this.settings.onChange = function () {\n if (_this3.settings.allowInput) {\n if (_this3.settings.isManuallyOverriddenValue && _this3.settings.enableTime) {\n _this3.calendar._input.value = _this3.settings.manualInputValue;\n } else {\n _this3.settings.manualInputValue = '';\n }\n\n _this3.settings.isManuallyOverriddenValue = false;\n }\n\n _this3.emit('update');\n };\n\n this.settings.onOpen = function () {\n return _this3.hook('onCalendarOpen');\n };\n\n this.settings.onClose = function () {\n _this3.hook('onCalendarClose');\n\n _this3.closedOn = Date.now();\n\n if (_this3.settings.allowInput && _this3.settings.enableTime) {\n _this3.calendar._input.value = _this3.settings.manualInputValue || _this3.calendar._input.value;\n _this3.settings.isManuallyOverriddenValue = false;\n\n _this3.emit('update');\n }\n\n if (_this3.settings.wasDefaultValueChanged) {\n _this3.calendar._input.value = _this3.settings.defaultValue;\n _this3.settings.wasDefaultValueChanged = false;\n }\n\n if (_this3.calendar) {\n _this3.emit('blur');\n }\n };\n\n _Formio.GlobalFormio.requireLibrary('flatpickr-css', 'flatpickr', [{\n type: 'styles',\n src: \"\".concat(_Formio.GlobalFormio.cdn['flatpickr-formio'], \"/flatpickr.min.css\")\n }], true);\n\n if (this.component.shortcutButtons) {\n this.component.shortcutButtons = this.component.shortcutButtons.filter(function (btn) {\n return btn.label && btn.onClick;\n });\n }\n\n if ((_this$component$short = this.component.shortcutButtons) !== null && _this$component$short !== void 0 && _this$component$short.length) {\n _Formio.GlobalFormio.requireLibrary('shortcut-buttons-flatpickr-css', 'ShortcutButtonsPlugin', [{\n type: 'styles',\n src: \"\".concat(_Formio.GlobalFormio.cdn['shortcut-buttons-flatpickr'], \"/themes/light.min.css\")\n }], true);\n }\n\n return superAttach.then(function () {\n var _this3$component$shor;\n\n if ((_this3$component$shor = _this3.component.shortcutButtons) !== null && _this3$component$shor !== void 0 && _this3$component$shor.length) {\n return _Formio.GlobalFormio.requireLibrary('shortcut-buttons-flatpickr', 'ShortcutButtonsPlugin', \"\".concat(_Formio.GlobalFormio.cdn['shortcut-buttons-flatpickr'], \"/shortcut-buttons-flatpickr.min.js\"), true);\n }\n }).then(function (ShortcutButtonsPlugin) {\n return _Formio.GlobalFormio.requireLibrary('flatpickr', 'flatpickr', \"\".concat(_Formio.GlobalFormio.cdn['flatpickr-formio'], \"/flatpickr.min.js\"), true).then(function (Flatpickr) {\n var _this3$component$shor2;\n\n if ((_this3$component$shor2 = _this3.component.shortcutButtons) !== null && _this3$component$shor2 !== void 0 && _this3$component$shor2.length && ShortcutButtonsPlugin) {\n _this3.initShortcutButtonsPlugin(ShortcutButtonsPlugin);\n }\n\n _this3.settings.formatDate = _this3.getFlatpickrFormatDate(Flatpickr);\n\n if (_this3._input) {\n var locale = _this3.settings.locale;\n\n if (locale && locale.length >= 2 && locale !== 'en') {\n return _Formio.GlobalFormio.requireLibrary(\"flatpickr-\".concat(locale), \"flatpickr-\".concat(locale), \"\".concat(_Formio.GlobalFormio.cdn.flatpickr, \"/l10n/\").concat(locale, \".min.js\"), false, function () {\n return _this3.initFlatpickr(Flatpickr);\n });\n } else {\n _this3.initFlatpickr(Flatpickr);\n }\n }\n });\n }).catch(function (err) {\n console.warn(err);\n });\n }\n }, {\n key: \"disableWeekends\",\n get: function get() {\n return function (date) {\n return date.getDay() === 0 || date.getDay() === 6;\n };\n }\n }, {\n key: \"disableWeekdays\",\n get: function get() {\n var _this4 = this;\n\n return function (date) {\n return !_this4.disableWeekends(date);\n };\n }\n }, {\n key: \"disableFunction\",\n get: function get() {\n var _this5 = this;\n\n return function (date) {\n return _this5.evaluate(\"return \".concat(_this5.settings.disableFunction), {\n date: date\n });\n };\n }\n }, {\n key: \"defineTimezone\",\n value: function defineTimezone() {\n if (!this.componentInstance.attached && this.componentInstance.submissionTimezone) {\n return this.componentInstance.submissionTimezone;\n }\n\n if (this.settings.timezone) {\n return this.settings.timezone;\n }\n\n if (this.settings.displayInTimezone === 'submission' && this.settings.submissionTimezone) {\n return this.settings.submissionTimezone;\n }\n\n if (this.settings.displayInTimezone === 'utc') {\n return 'UTC';\n } // Return current timezone if none are provided.\n\n\n return (0, _utils.currentTimezone)();\n }\n }, {\n key: \"timezone\",\n get: function get() {\n return this.defineTimezone();\n }\n }, {\n key: \"defaultSettings\",\n get: function get() {\n return CalendarWidget.defaultSettings;\n }\n }, {\n key: \"addSuffix\",\n value: function addSuffix(suffix) {\n var _this6 = this;\n\n this.addEventListener(suffix, 'click', function () {\n setTimeout(function () {\n if (_this6.calendar) {\n if (!_this6.calendar.isOpen && Date.now() - _this6.closedOn > 200) {\n _this6.calendar.open();\n } else if (_this6.calendar.isOpen) {\n _this6.calendar.close();\n }\n }\n }, 0);\n });\n return suffix;\n }\n }, {\n key: \"disabled\",\n set: function set(disabled) {\n _set(_getPrototypeOf(CalendarWidget.prototype), \"disabled\", disabled, this, true);\n\n if (this.calendar) {\n if (disabled) {\n this.calendar._input.setAttribute('disabled', 'disabled');\n } else {\n this.calendar._input.removeAttribute('disabled');\n }\n\n this.calendar.close();\n this.calendar.redraw();\n }\n }\n }, {\n key: \"input\",\n get: function get() {\n return this.calendar ? this.calendar.altInput : null;\n }\n }, {\n key: \"disabledDates\",\n get: function get() {\n if (this.settings.disabledDates) {\n var disabledDates = this.settings.disabledDates.split(',');\n return disabledDates.map(function (item) {\n var dateMask = /\\d{4}-\\d{2}-\\d{2}/g;\n var dates = item.match(dateMask);\n\n if (dates && dates.length) {\n return dates.length === 1 ? item.match(dateMask)[0] : {\n from: item.match(dateMask)[0],\n to: item.match(dateMask)[1]\n };\n }\n });\n }\n\n return [];\n }\n }, {\n key: \"localeFormat\",\n get: function get() {\n var format = '';\n\n if (this.settings.enableDate) {\n format += this.defaultFormat.date;\n }\n\n if (this.settings.enableTime) {\n format += this.defaultFormat.time;\n }\n\n return format;\n }\n }, {\n key: \"dateTimeFormat\",\n get: function get() {\n return this.settings.useLocaleSettings ? this.localeFormat : (0, _utils.convertFormatToFlatpickr)(this.dateFormat);\n }\n }, {\n key: \"dateFormat\",\n get: function get() {\n return _lodash.default.get(this.settings, 'format', DEFAULT_FORMAT);\n }\n /**\n * Return the date value.\n *\n * @param date\n * @param format\n * @return {string}\n */\n\n }, {\n key: \"getDateValue\",\n value: function getDateValue(date, format, useTimezone) {\n if (useTimezone) {\n return (0, _utils.momentDate)(date, this.valueFormat, this.timezone).format((0, _utils.convertFormatToMoment)(format));\n }\n\n return (0, _moment.default)(date).format((0, _utils.convertFormatToMoment)(format));\n }\n /**\n * Return the value of the selected date.\n *\n * @return {*}\n */\n\n }, {\n key: \"getValue\",\n value: function getValue() {\n // Standard output format.\n if (!this.calendar) {\n return _get(_getPrototypeOf(CalendarWidget.prototype), \"getValue\", this).call(this);\n } // Get the selected dates from the calendar widget.\n\n\n var dates = this.calendar.selectedDates;\n\n if (!dates || !dates.length) {\n return _get(_getPrototypeOf(CalendarWidget.prototype), \"getValue\", this).call(this);\n }\n\n if (!(dates[0] instanceof Date)) {\n return 'Invalid Date';\n }\n\n return this.getDateValue(dates[0], this.valueFormat, this.settings.saveAs === 'date');\n }\n }, {\n key: \"isValueISO8601\",\n value: function isValueISO8601(value) {\n return value && typeof value === 'string' && value.match(/-[0-9]{2}T[0-9]{2}:/);\n }\n /**\n * Set the selected date value.\n *\n * @param value\n */\n\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n var saveAsText = this.settings.saveAs === 'text';\n\n if (!this.calendar) {\n value = value ? (0, _utils.formatDate)(this.timezonesUrl, value, (0, _utils.convertFormatToMoment)(this.settings.format), this.timezone, (0, _utils.convertFormatToMoment)(this.valueMomentFormat)) : value;\n return _get(_getPrototypeOf(CalendarWidget.prototype), \"setValue\", this).call(this, value);\n }\n\n var zonesLoading = this.loadZones();\n\n if (this.isValueISO8601(value)) {\n this.calendar.setDate(value, false);\n } else if (value) {\n if (!saveAsText && this.settings.readOnly && !zonesLoading) {\n this.calendar.setDate((0, _utils.momentDate)(value, this.valueFormat, this.timezone).toDate(), false);\n } else {\n this.calendar.setDate((0, _moment.default)(value, this.valueMomentFormat).toDate(), false);\n }\n } else {\n this.calendar.clear(false);\n }\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value, format) {\n var inputFormat = format || this.dateFormat;\n var valueFormat = this.calendar ? this.valueFormat : this.settings.dateFormat;\n\n if (this.settings.saveAs === 'text' && this.componentInstance.parent && !this.settings.readOnly) {\n return (0, _moment.default)(value, (0, _utils.convertFormatToMoment)(valueFormat)).format((0, _utils.convertFormatToMoment)(valueFormat));\n }\n\n return (0, _utils.formatDate)(this.timezonesUrl, value, inputFormat, this.timezone, (0, _utils.convertFormatToMoment)(valueFormat));\n }\n }, {\n key: \"setErrorClasses\",\n value: function setErrorClasses(hasErrors) {\n if (!this.input) {\n return;\n }\n\n if (hasErrors) {\n this.addClass(this.input, 'is-invalid');\n this.input.setAttribute('aria-invalid', 'true');\n } else {\n this.removeClass(this.input, 'is-invalid');\n this.input.setAttribute('aria-invalid', 'false');\n }\n }\n }, {\n key: \"validationValue\",\n value: function validationValue(value) {\n if (typeof value === 'string') {\n return new Date(value);\n }\n\n return value.map(function (val) {\n return new Date(val);\n });\n }\n }, {\n key: \"isCalendarElement\",\n value: function isCalendarElement(element) {\n var _this$calendar, _this$calendar$config, _this$calendar$config2, _this$calendar2, _this$calendar2$calen;\n\n if (!element) {\n return true;\n }\n\n if ((_this$calendar = this.calendar) !== null && _this$calendar !== void 0 && (_this$calendar$config = _this$calendar.config) !== null && _this$calendar$config !== void 0 && (_this$calendar$config2 = _this$calendar$config.appendTo) !== null && _this$calendar$config2 !== void 0 && _this$calendar$config2.contains(element)) {\n return true;\n }\n\n return (_this$calendar2 = this.calendar) === null || _this$calendar2 === void 0 ? void 0 : (_this$calendar2$calen = _this$calendar2.calendarContainer) === null || _this$calendar2$calen === void 0 ? void 0 : _this$calendar2$calen.contains(element);\n }\n }, {\n key: \"initFlatpickr\",\n value: function initFlatpickr(Flatpickr) {\n var _this7 = this;\n\n var dateValue = this._input.value; // Create a new flatpickr.\n\n this.calendar = new Flatpickr(this._input, _objectSpread(_objectSpread({}, this.settings), {}, {\n disableMobile: true\n }));\n\n if (dateValue) {\n if (this.isValueISO8601(dateValue)) {\n this.calendar.setDate((0, _moment.default)(dateValue).toDate(), false, this.settings.altFormat);\n } else {\n this.calendar.setDate((0, _moment.default)(dateValue, (0, _utils.convertFormatToMoment)(this.dateFormat)).toDate(), false, this.settings.altFormat);\n }\n }\n\n this.calendar.altInput.addEventListener('input', function (event) {\n if (_this7.settings.allowInput && _this7.settings.currentValue !== event.target.value) {\n _this7.settings.manualInputValue = event.target.value;\n _this7.settings.isManuallyOverriddenValue = true;\n _this7.settings.currentValue = event.target.value;\n }\n\n if (event.target.value === '' && _this7.calendar.selectedDates.length > 0) {\n _this7.settings.wasDefaultValueChanged = true;\n _this7.settings.defaultValue = event.target.value;\n\n _this7.calendar.clear();\n } else {\n _this7.settings.wasDefaultValueChanged = false;\n }\n });\n var excludedFromMaskFormats = ['MMMM'];\n\n if (!this.settings.readOnly && !_lodash.default.some(excludedFromMaskFormats, function (format) {\n return _lodash.default.includes(_this7.settings.format, format);\n })) {\n // Enforce the input mask of the format.\n this.setInputMask(this.calendar._input, (0, _utils.convertFormatToMask)(this.settings.format));\n } // Fixes an issue with IE11 where value is set only after the second click\n // TODO: Remove when the issue is solved in the flatpickr library\n\n\n if (isIEBrowser) {\n // Remove the original blur listener, because value will be set to empty since relatedTarget is null in IE11\n var originalBlurListener = this.calendar._handlers.find(function (_ref) {\n var event = _ref.event,\n element = _ref.element;\n return event === 'blur' && element === _this7.calendar._input;\n });\n\n this.calendar._input.removeEventListener('blur', originalBlurListener.handler); // Add the same event listener as in the original library, but with workaround for IE11 issue\n\n\n this.addEventListener(this.calendar._input, 'blur', function (event) {\n var activeElement = _this7.settings.shadowRoot ? _this7.settings.shadowRoot.activeElement : document.activeElement;\n var relatedTarget = event.relatedTarget ? event.relatedTarget : activeElement;\n var isInput = event.target === _this7.calendar._input;\n\n if (isInput && !_this7.isCalendarElement(relatedTarget)) {\n _this7.calendar.setDate(_this7.calendar._input.value, true, event.target === _this7.calendar.altInput ? _this7.calendar.config.altFormat : _this7.calendar.config.dateFormat);\n }\n });\n } // Make sure we commit the value after a blur event occurs.\n\n\n this.addEventListener(this.calendar._input, 'blur', function (event) {\n var activeElement = _this7.settings.shadowRoot ? _this7.settings.shadowRoot.activeElement : document.activeElement;\n var relatedTarget = event.relatedTarget ? event.relatedTarget : activeElement;\n\n if (!(isIEBrowser && !relatedTarget) && !_this7.isCalendarElement(relatedTarget)) {\n var inputValue = _this7.calendar.input.value;\n\n var _dateValue = inputValue ? (0, _moment.default)(_this7.calendar.input.value, (0, _utils.convertFormatToMoment)(_this7.valueFormat)).toDate() : inputValue;\n\n _this7.calendar.setDate(_dateValue, true, _this7.settings.altFormat);\n } else if (!_this7.calendar.input.value && _this7.calendar.config.noCalendar) {\n var _this7$calendar, _this7$calendar$confi, _this7$calendar2, _this7$calendar2$conf;\n\n var value = (0, _moment.default)({\n hour: (_this7$calendar = _this7.calendar) === null || _this7$calendar === void 0 ? void 0 : (_this7$calendar$confi = _this7$calendar.config) === null || _this7$calendar$confi === void 0 ? void 0 : _this7$calendar$confi.defaultHour,\n minute: (_this7$calendar2 = _this7.calendar) === null || _this7$calendar2 === void 0 ? void 0 : (_this7$calendar2$conf = _this7$calendar2.config) === null || _this7$calendar2$conf === void 0 ? void 0 : _this7$calendar2$conf.defaultMinute\n }).toDate();\n\n _this7.calendar.setDate(value, true, _this7.settings.format);\n }\n }); // FJS-1103: When hit the enter button, the field not saving the year correctly\n\n this.addEventListener(this.calendar.altInput, 'keydown', function (event) {\n if (event.keyCode === 13) {\n if (_this7.calendar.isOpen) {\n _this7.calendar.close();\n\n event.stopPropagation();\n }\n }\n });\n }\n }, {\n key: \"initShortcutButtonsPlugin\",\n value: function initShortcutButtonsPlugin(ShortcutButtonsPlugin) {\n var _this8 = this;\n\n this.settings.plugins = [// eslint-disable-next-line new-cap\n ShortcutButtonsPlugin({\n button: this.component.shortcutButtons.map(function (btn) {\n return {\n label: btn.label,\n attributes: btn.attribute\n };\n }),\n onClick: function onClick(index) {\n var getValue = _this8.component.shortcutButtons[index].onClick;\n\n var date = _this8.evaluate(getValue, {\n date: new Date()\n }, 'date');\n\n _this8.calendar.setDate(date, true);\n }\n })];\n }\n }, {\n key: \"getFlatpickrFormatDate\",\n value: function getFlatpickrFormatDate(Flatpickr) {\n var _this9 = this;\n\n return function (date, format) {\n // Only format this if this is the altFormat and the form is readOnly.\n if (_this9.settings.readOnly && format === _this9.settings.altFormat && _this9.settings.submissionTimezone === _this9.timezone) {\n if (_this9.loadZones()) {\n return Flatpickr.formatDate(date, format);\n }\n\n var currentValue = new Date(_this9.getValue());\n\n if (currentValue.toString() === date.toString()) {\n var compValue = _this9.componentInstance.dataValue;\n\n if (Array.isArray(compValue)) {\n compValue = compValue[_this9.valueIndex];\n }\n\n return (0, _utils.formatOffset)(_this9.timezonesUrl, Flatpickr.formatDate.bind(Flatpickr), new Date(compValue), format, _this9.timezone);\n }\n\n return (0, _utils.formatOffset)(_this9.timezonesUrl, Flatpickr.formatDate.bind(Flatpickr), date, format, _this9.timezone);\n }\n\n return Flatpickr.formatDate(date, format);\n };\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n _get(_getPrototypeOf(CalendarWidget.prototype), \"destroy\", this).call(this);\n\n if (this.calendar) {\n this.calendar.destroy();\n }\n }\n }], [{\n key: \"defaultSettings\",\n get:\n /* eslint-disable camelcase */\n function get() {\n return {\n type: 'calendar',\n altInput: true,\n allowInput: true,\n clickOpens: true,\n enableDate: true,\n enableTime: true,\n mode: 'single',\n noCalendar: false,\n format: DEFAULT_FORMAT,\n dateFormat: ISO_8601_FORMAT,\n useLocaleSettings: false,\n language: 'us-en',\n hourIncrement: 1,\n minuteIncrement: 5,\n time_24hr: false,\n saveAs: 'date',\n displayInTimezone: '',\n timezone: '',\n disable: [],\n minDate: '',\n maxDate: ''\n };\n }\n }]);\n\n return CalendarWidget;\n}(_InputWidget2.default);\n\nexports[\"default\"] = CalendarWidget;\n\n//# sourceURL=webpack://Formio/./lib/widgets/CalendarWidget.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.set.js */ \"./node_modules/core-js/modules/es.reflect.set.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.split.js */ \"./node_modules/core-js/modules/es.string.split.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.match.js */ \"./node_modules/core-js/modules/es.string.match.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.find.js */ \"./node_modules/core-js/modules/es.array.find.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _Formio = __webpack_require__(/*! ../Formio */ \"./lib/Formio.js\");\n\nvar _InputWidget2 = _interopRequireDefault(__webpack_require__(/*! ./InputWidget */ \"./lib/widgets/InputWidget.js\"));\n\nvar _utils = __webpack_require__(/*! ../utils/utils */ \"./lib/utils/utils.js\");\n\nvar _moment = _interopRequireDefault(__webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\"));\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction set(target, property, value, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.set) { set = Reflect.set; } else { set = function set(target, property, value, receiver) { var base = _superPropBase(target, property); var desc; if (base) { desc = Object.getOwnPropertyDescriptor(base, property); if (desc.set) { desc.set.call(receiver, value); return true; } else if (!desc.writable) { return false; } } desc = Object.getOwnPropertyDescriptor(receiver, property); if (desc) { if (!desc.writable) { return false; } desc.value = value; Object.defineProperty(receiver, property, desc); } else { _defineProperty(receiver, property, value); } return true; }; } return set(target, property, value, receiver); }\n\nfunction _set(target, property, value, receiver, isStrict) { var s = set(target, property, value, receiver || target); if (!s && isStrict) { throw new Error('failed to set property'); } return value; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar DEFAULT_FORMAT = 'yyyy-MM-dd hh:mm a';\nvar ISO_8601_FORMAT = 'yyyy-MM-ddTHH:mm:ssZ';\nvar isIEBrowser = (0, _utils.getBrowserInfo)().ie;\n\nvar CalendarWidget = /*#__PURE__*/function (_InputWidget) {\n _inherits(CalendarWidget, _InputWidget);\n\n var _super = _createSuper(CalendarWidget);\n\n /* eslint-enable camelcase */\n function CalendarWidget(settings, component, instance, index) {\n var _this;\n\n _classCallCheck(this, CalendarWidget);\n\n _this = _super.call(this, settings, component, instance, index); // Change the format to map to the settings.\n\n if (_this.settings.noCalendar) {\n _this.settings.format = _this.settings.format.replace(/yyyy-MM-dd /g, '');\n }\n\n if (!_this.settings.enableTime) {\n _this.settings.format = _this.settings.format.replace(/ hh:mm a$/g, '');\n } else if (_this.settings.time_24hr) {\n _this.settings.format = _this.settings.format.replace(/hh:mm a$/g, 'HH:mm');\n }\n\n _this.zoneLoading = false;\n _this.timezonesUrl = \"\".concat(_Formio.GlobalFormio.cdn['moment-timezone'], \"/data/packed/latest.json\");\n return _this;\n }\n /**\n * Load the timezones.\n *\n * @return {boolean} TRUE if the zones are loading, FALSE otherwise.\n */\n\n\n _createClass(CalendarWidget, [{\n key: \"loadZones\",\n value: function loadZones() {\n var _this2 = this;\n\n var timezone = this.timezone;\n\n if (this.zoneLoading) {\n return true;\n }\n\n if (!(0, _utils.zonesLoaded)() && (0, _utils.shouldLoadZones)(timezone)) {\n this.zoneLoading = true;\n (0, _utils.loadZones)(this.timezonesUrl, timezone).then(function () {\n _this2.zoneLoading = false;\n\n _this2.emit('redraw');\n }); // Return zones are loading.\n\n return true;\n } // Zones are already loaded.\n\n\n return false;\n }\n }, {\n key: \"attach\",\n value: function attach(input) {\n var _this3 = this,\n _this$component$short;\n\n var superAttach = _get(_getPrototypeOf(CalendarWidget.prototype), \"attach\", this).call(this, input);\n\n var dateFormatInfo = (0, _utils.getLocaleDateFormatInfo)(this.settings.language);\n this.defaultFormat = {\n date: dateFormatInfo.dayFirst ? 'd/m/Y ' : 'm/d/Y ',\n time: 'G:i K'\n };\n this.closedOn = 0;\n this.valueFormat = this.settings.saveAs === 'date' ? ISO_8601_FORMAT : this.settings.dateFormat || ISO_8601_FORMAT;\n this.valueMomentFormat = (0, _utils.convertFormatToMoment)(this.valueFormat);\n var isReadOnly = this.settings.readOnly;\n this.settings.minDate = isReadOnly ? null : (0, _utils.getDateSetting)(this.settings.minDate);\n this.settings.maxDate = isReadOnly ? null : (0, _utils.getDateSetting)(this.settings.maxDate);\n this.settings.disable = this.disabledDates;\n this.settings.disableWeekends ? this.settings.disable.push(this.disableWeekends) : '';\n this.settings.disableWeekdays ? this.settings.disable.push(this.disableWeekdays) : '';\n this.settings.disableFunction ? this.settings.disable.push(this.disableFunction) : '';\n this.settings.wasDefaultValueChanged = false;\n this.settings.defaultValue = '';\n this.settings.manualInputValue = '';\n this.settings.isManuallyOverriddenValue = false;\n this.settings.currentValue = '';\n this.settings.altFormat = (0, _utils.convertFormatToFlatpickr)(this.settings.format);\n this.settings.dateFormat = (0, _utils.convertFormatToFlatpickr)(this.settings.dateFormat);\n this.settings.position = 'auto center';\n\n this.settings.onChange = function () {\n if (_this3.settings.allowInput) {\n if (_this3.settings.isManuallyOverriddenValue && _this3.settings.enableTime) {\n _this3.calendar._input.value = _this3.settings.manualInputValue;\n } else {\n _this3.settings.manualInputValue = '';\n }\n\n _this3.settings.isManuallyOverriddenValue = false;\n }\n\n _this3.emit('update');\n };\n\n this.settings.onOpen = function () {\n return _this3.hook('onCalendarOpen');\n };\n\n this.settings.onClose = function () {\n _this3.hook('onCalendarClose');\n\n _this3.closedOn = Date.now();\n\n if (_this3.settings.allowInput && _this3.settings.enableTime) {\n _this3.calendar._input.value = _this3.settings.manualInputValue || _this3.calendar._input.value;\n _this3.settings.isManuallyOverriddenValue = false;\n\n _this3.emit('update');\n }\n\n if (_this3.settings.wasDefaultValueChanged) {\n _this3.calendar._input.value = _this3.settings.defaultValue;\n _this3.settings.wasDefaultValueChanged = false;\n }\n\n if (_this3.calendar) {\n _this3.emit('blur');\n }\n };\n\n _Formio.GlobalFormio.requireLibrary('flatpickr-css', 'flatpickr', [{\n type: 'styles',\n src: \"\".concat(_Formio.GlobalFormio.cdn['flatpickr-formio'], \"/flatpickr.min.css\")\n }], true);\n\n if (this.component.shortcutButtons) {\n this.component.shortcutButtons = this.component.shortcutButtons.filter(function (btn) {\n return btn.label && btn.onClick;\n });\n }\n\n if ((_this$component$short = this.component.shortcutButtons) !== null && _this$component$short !== void 0 && _this$component$short.length) {\n _Formio.GlobalFormio.requireLibrary('shortcut-buttons-flatpickr-css', 'ShortcutButtonsPlugin', [{\n type: 'styles',\n src: \"\".concat(_Formio.GlobalFormio.cdn['shortcut-buttons-flatpickr'], \"/themes/light.min.css\")\n }], true);\n }\n\n return superAttach.then(function () {\n var _this3$component$shor;\n\n if ((_this3$component$shor = _this3.component.shortcutButtons) !== null && _this3$component$shor !== void 0 && _this3$component$shor.length) {\n return _Formio.GlobalFormio.requireLibrary('shortcut-buttons-flatpickr', 'ShortcutButtonsPlugin', \"\".concat(_Formio.GlobalFormio.cdn['shortcut-buttons-flatpickr'], \"/shortcut-buttons-flatpickr.min.js\"), true);\n }\n }).then(function (ShortcutButtonsPlugin) {\n return _Formio.GlobalFormio.requireLibrary('flatpickr', 'flatpickr', \"\".concat(_Formio.GlobalFormio.cdn['flatpickr-formio'], \"/flatpickr.min.js\"), true).then(function (Flatpickr) {\n var _this3$component$shor2;\n\n if ((_this3$component$shor2 = _this3.component.shortcutButtons) !== null && _this3$component$shor2 !== void 0 && _this3$component$shor2.length && ShortcutButtonsPlugin) {\n _this3.initShortcutButtonsPlugin(ShortcutButtonsPlugin);\n }\n\n _this3.settings.formatDate = _this3.getFlatpickrFormatDate(Flatpickr);\n\n if (_this3._input) {\n var locale = _this3.settings.locale;\n\n if (locale && locale.length >= 2 && locale !== 'en') {\n return _Formio.GlobalFormio.requireLibrary(\"flatpickr-\".concat(locale), \"flatpickr-\".concat(locale), \"\".concat(_Formio.GlobalFormio.cdn.flatpickr, \"/l10n/\").concat(locale, \".min.js\"), false, function () {\n return _this3.initFlatpickr(Flatpickr);\n });\n } else {\n _this3.initFlatpickr(Flatpickr);\n }\n }\n });\n }).catch(function (err) {\n console.warn(err);\n });\n }\n }, {\n key: \"disableWeekends\",\n get: function get() {\n return function (date) {\n return date.getDay() === 0 || date.getDay() === 6;\n };\n }\n }, {\n key: \"disableWeekdays\",\n get: function get() {\n var _this4 = this;\n\n return function (date) {\n return !_this4.disableWeekends(date);\n };\n }\n }, {\n key: \"disableFunction\",\n get: function get() {\n var _this5 = this;\n\n return function (date) {\n return _this5.evaluate(\"return \".concat(_this5.settings.disableFunction), {\n date: date\n });\n };\n }\n }, {\n key: \"defineTimezone\",\n value: function defineTimezone() {\n if (this.settings.timezone) {\n return this.settings.timezone;\n }\n\n if (this.settings.displayInTimezone === 'submission') {\n return this.componentInstance.submissionTimezone;\n }\n\n if (this.settings.displayInTimezone === 'utc') {\n return 'UTC';\n } // Return current timezone if none are provided.\n\n\n return (0, _utils.currentTimezone)();\n }\n }, {\n key: \"timezone\",\n get: function get() {\n return this.defineTimezone();\n }\n }, {\n key: \"defaultSettings\",\n get: function get() {\n return CalendarWidget.defaultSettings;\n }\n }, {\n key: \"addSuffix\",\n value: function addSuffix(suffix) {\n var _this6 = this;\n\n this.addEventListener(suffix, 'click', function () {\n setTimeout(function () {\n if (_this6.calendar) {\n if (!_this6.calendar.isOpen && Date.now() - _this6.closedOn > 200) {\n _this6.calendar.open();\n } else if (_this6.calendar.isOpen) {\n _this6.calendar.close();\n }\n }\n }, 0);\n });\n return suffix;\n }\n }, {\n key: \"disabled\",\n set: function set(disabled) {\n _set(_getPrototypeOf(CalendarWidget.prototype), \"disabled\", disabled, this, true);\n\n if (this.calendar) {\n if (disabled) {\n this.calendar._input.setAttribute('disabled', 'disabled');\n } else {\n this.calendar._input.removeAttribute('disabled');\n }\n\n this.calendar.close();\n this.calendar.redraw();\n }\n }\n }, {\n key: \"input\",\n get: function get() {\n return this.calendar ? this.calendar.altInput : null;\n }\n }, {\n key: \"disabledDates\",\n get: function get() {\n if (this.settings.disabledDates) {\n var disabledDates = this.settings.disabledDates.split(',');\n return disabledDates.map(function (item) {\n var dateMask = /\\d{4}-\\d{2}-\\d{2}/g;\n var dates = item.match(dateMask);\n\n if (dates && dates.length) {\n return dates.length === 1 ? item.match(dateMask)[0] : {\n from: item.match(dateMask)[0],\n to: item.match(dateMask)[1]\n };\n }\n });\n }\n\n return [];\n }\n }, {\n key: \"localeFormat\",\n get: function get() {\n var format = '';\n\n if (this.settings.enableDate) {\n format += this.defaultFormat.date;\n }\n\n if (this.settings.enableTime) {\n format += this.defaultFormat.time;\n }\n\n return format;\n }\n }, {\n key: \"dateTimeFormat\",\n get: function get() {\n return this.settings.useLocaleSettings ? this.localeFormat : (0, _utils.convertFormatToFlatpickr)(this.dateFormat);\n }\n }, {\n key: \"dateFormat\",\n get: function get() {\n return _lodash.default.get(this.settings, 'format', DEFAULT_FORMAT);\n }\n /**\n * Return the date value.\n *\n * @param date\n * @param format\n * @return {string}\n */\n\n }, {\n key: \"getDateValue\",\n value: function getDateValue(date, format, useTimezone) {\n if (useTimezone) {\n return (0, _utils.momentDate)(date, this.valueFormat, this.timezone).format((0, _utils.convertFormatToMoment)(format));\n }\n\n return (0, _moment.default)(date).format((0, _utils.convertFormatToMoment)(format));\n }\n /**\n * Return the value of the selected date.\n *\n * @return {*}\n */\n\n }, {\n key: \"getValue\",\n value: function getValue() {\n // Standard output format.\n if (!this.calendar) {\n return _get(_getPrototypeOf(CalendarWidget.prototype), \"getValue\", this).call(this);\n } // Get the selected dates from the calendar widget.\n\n\n var dates = this.calendar.selectedDates;\n\n if (!dates || !dates.length) {\n return _get(_getPrototypeOf(CalendarWidget.prototype), \"getValue\", this).call(this);\n }\n\n if (!(dates[0] instanceof Date)) {\n return 'Invalid Date';\n }\n\n return this.getDateValue(dates[0], this.valueFormat, this.settings.saveAs === 'date');\n }\n }, {\n key: \"isValueISO8601\",\n value: function isValueISO8601(value) {\n return value && typeof value === 'string' && value.match(/-[0-9]{2}T[0-9]{2}:/);\n }\n /**\n * Set the selected date value.\n *\n * @param value\n */\n\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n var saveAsText = this.settings.saveAs === 'text';\n\n if (!this.calendar) {\n value = value ? (0, _utils.formatDate)(this.timezonesUrl, value, (0, _utils.convertFormatToMoment)(this.settings.format), this.timezone, (0, _utils.convertFormatToMoment)(this.valueMomentFormat)) : value;\n return _get(_getPrototypeOf(CalendarWidget.prototype), \"setValue\", this).call(this, value);\n }\n\n var zonesLoading = this.loadZones();\n\n if (value) {\n if (!saveAsText && this.settings.readOnly && !zonesLoading) {\n this.calendar.setDate((0, _utils.momentDate)(value, this.valueFormat, this.timezone).format(), false);\n } else if (this.isValueISO8601(value)) {\n this.calendar.setDate(value, false);\n } else {\n this.calendar.setDate((0, _moment.default)(value, this.valueMomentFormat).toDate(), false);\n }\n } else {\n this.calendar.clear(false);\n }\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value, format) {\n var inputFormat = format || this.dateFormat;\n var valueFormat = this.calendar ? this.valueFormat : this.settings.dateFormat;\n\n if (this.settings.saveAs === 'text' && this.componentInstance.parent && !this.settings.readOnly) {\n return (0, _moment.default)(value, (0, _utils.convertFormatToMoment)(valueFormat)).format((0, _utils.convertFormatToMoment)(valueFormat));\n }\n\n return (0, _utils.formatDate)(this.timezonesUrl, value, inputFormat, this.timezone, (0, _utils.convertFormatToMoment)(valueFormat));\n }\n }, {\n key: \"setErrorClasses\",\n value: function setErrorClasses(hasErrors) {\n if (!this.input) {\n return;\n }\n\n if (hasErrors) {\n this.addClass(this.input, 'is-invalid');\n this.input.setAttribute('aria-invalid', 'true');\n } else {\n this.removeClass(this.input, 'is-invalid');\n this.input.setAttribute('aria-invalid', 'false');\n }\n }\n }, {\n key: \"validationValue\",\n value: function validationValue(value) {\n if (typeof value === 'string') {\n return new Date(value);\n }\n\n return value.map(function (val) {\n return new Date(val);\n });\n }\n }, {\n key: \"isCalendarElement\",\n value: function isCalendarElement(element) {\n var _this$calendar, _this$calendar$config, _this$calendar$config2, _this$calendar2, _this$calendar2$calen;\n\n if (!element) {\n return true;\n }\n\n if ((_this$calendar = this.calendar) !== null && _this$calendar !== void 0 && (_this$calendar$config = _this$calendar.config) !== null && _this$calendar$config !== void 0 && (_this$calendar$config2 = _this$calendar$config.appendTo) !== null && _this$calendar$config2 !== void 0 && _this$calendar$config2.contains(element)) {\n return true;\n }\n\n return (_this$calendar2 = this.calendar) === null || _this$calendar2 === void 0 ? void 0 : (_this$calendar2$calen = _this$calendar2.calendarContainer) === null || _this$calendar2$calen === void 0 ? void 0 : _this$calendar2$calen.contains(element);\n }\n }, {\n key: \"initFlatpickr\",\n value: function initFlatpickr(Flatpickr) {\n var _this7 = this;\n\n // Create a new flatpickr.\n this.calendar = new Flatpickr(this._input, _objectSpread(_objectSpread({}, this.settings), {}, {\n disableMobile: true\n }));\n this.calendar.altInput.addEventListener('input', function (event) {\n if (_this7.settings.allowInput && _this7.settings.currentValue !== event.target.value) {\n _this7.settings.manualInputValue = event.target.value;\n _this7.settings.isManuallyOverriddenValue = true;\n _this7.settings.currentValue = event.target.value;\n }\n\n if (event.target.value === '' && _this7.calendar.selectedDates.length > 0) {\n _this7.settings.wasDefaultValueChanged = true;\n _this7.settings.defaultValue = event.target.value;\n\n _this7.calendar.clear();\n } else {\n _this7.settings.wasDefaultValueChanged = false;\n }\n });\n var excludedFromMaskFormats = ['MMMM'];\n\n if (!this.settings.readOnly && !_lodash.default.some(excludedFromMaskFormats, function (format) {\n return _lodash.default.includes(_this7.settings.format, format);\n })) {\n // Enforce the input mask of the format.\n this.setInputMask(this.calendar._input, (0, _utils.convertFormatToMask)(this.settings.format));\n } // Fixes an issue with IE11 where value is set only after the second click\n // TODO: Remove when the issue is solved in the flatpickr library\n\n\n if (isIEBrowser) {\n // Remove the original blur listener, because value will be set to empty since relatedTarget is null in IE11\n var originalBlurListener = this.calendar._handlers.find(function (_ref) {\n var event = _ref.event,\n element = _ref.element;\n return event === 'blur' && element === _this7.calendar._input;\n });\n\n this.calendar._input.removeEventListener('blur', originalBlurListener.handler); // Add the same event listener as in the original library, but with workaround for IE11 issue\n\n\n this.addEventListener(this.calendar._input, 'blur', function (event) {\n var activeElement = _this7.settings.shadowRoot ? _this7.settings.shadowRoot.activeElement : document.activeElement;\n var relatedTarget = event.relatedTarget ? event.relatedTarget : activeElement;\n var isInput = event.target === _this7.calendar._input;\n\n if (isInput && !_this7.isCalendarElement(relatedTarget)) {\n _this7.calendar.setDate(_this7.calendar._input.value, true, event.target === _this7.calendar.altInput ? _this7.calendar.config.altFormat : _this7.calendar.config.dateFormat);\n }\n });\n } // Make sure we commit the value after a blur event occurs.\n\n\n this.addEventListener(this.calendar._input, 'blur', function (event) {\n var activeElement = _this7.settings.shadowRoot ? _this7.settings.shadowRoot.activeElement : document.activeElement;\n var relatedTarget = event.relatedTarget ? event.relatedTarget : activeElement;\n\n if (!(isIEBrowser && !relatedTarget) && !_this7.isCalendarElement(relatedTarget)) {\n var inputValue = _this7.calendar.input.value;\n var dateValue = inputValue ? (0, _moment.default)(_this7.calendar.input.value, (0, _utils.convertFormatToMoment)(_this7.valueFormat)).toDate() : inputValue;\n\n _this7.calendar.setDate(dateValue, true, _this7.settings.altFormat);\n } else if (!_this7.calendar.input.value && _this7.calendar.config.noCalendar) {\n var _this7$calendar, _this7$calendar$confi, _this7$calendar2, _this7$calendar2$conf;\n\n var value = (0, _moment.default)({\n hour: (_this7$calendar = _this7.calendar) === null || _this7$calendar === void 0 ? void 0 : (_this7$calendar$confi = _this7$calendar.config) === null || _this7$calendar$confi === void 0 ? void 0 : _this7$calendar$confi.defaultHour,\n minute: (_this7$calendar2 = _this7.calendar) === null || _this7$calendar2 === void 0 ? void 0 : (_this7$calendar2$conf = _this7$calendar2.config) === null || _this7$calendar2$conf === void 0 ? void 0 : _this7$calendar2$conf.defaultMinute\n }).toDate();\n\n _this7.calendar.setDate(value, true, _this7.settings.format);\n }\n }); // FJS-1103: When hit the enter button, the field not saving the year correctly\n\n this.addEventListener(this.calendar.altInput, 'keydown', function (event) {\n if (event.keyCode === 13) {\n if (_this7.calendar.isOpen) {\n _this7.calendar.close();\n\n event.stopPropagation();\n }\n }\n }); // Restore the calendar value from the component value.\n\n this.setValue(this.componentValue);\n }\n }, {\n key: \"initShortcutButtonsPlugin\",\n value: function initShortcutButtonsPlugin(ShortcutButtonsPlugin) {\n var _this8 = this;\n\n this.settings.plugins = [// eslint-disable-next-line new-cap\n ShortcutButtonsPlugin({\n button: this.component.shortcutButtons.map(function (btn) {\n return {\n label: btn.label,\n attributes: btn.attribute\n };\n }),\n onClick: function onClick(index) {\n var getValue = _this8.component.shortcutButtons[index].onClick;\n\n var date = _this8.evaluate(getValue, {\n date: new Date()\n }, 'date');\n\n _this8.calendar.setDate(date, true);\n }\n })];\n }\n }, {\n key: \"componentValue\",\n get: function get() {\n var compValue = this.componentInstance.dataValue;\n\n if (Array.isArray(compValue)) {\n compValue = compValue[this.valueIndex];\n }\n\n return compValue;\n }\n }, {\n key: \"getFlatpickrFormatDate\",\n value: function getFlatpickrFormatDate(Flatpickr) {\n var _this9 = this;\n\n return function (date, format) {\n // Only format this if this is the altFormat and the form is readOnly.\n if (_this9.settings.readOnly && format === _this9.settings.altFormat) {\n if (_this9.loadZones()) {\n return Flatpickr.formatDate(date, format);\n }\n\n var currentValue = new Date(_this9.getValue());\n\n if (currentValue.toString() === date.toString()) {\n return (0, _utils.formatOffset)(_this9.timezonesUrl, Flatpickr.formatDate.bind(Flatpickr), new Date(_this9.componentValue), format, _this9.timezone);\n }\n\n return (0, _utils.formatOffset)(_this9.timezonesUrl, Flatpickr.formatDate.bind(Flatpickr), date, format, _this9.timezone);\n }\n\n return Flatpickr.formatDate(date, format);\n };\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n _get(_getPrototypeOf(CalendarWidget.prototype), \"destroy\", this).call(this);\n\n if (this.calendar) {\n this.calendar.destroy();\n }\n }\n }], [{\n key: \"defaultSettings\",\n get:\n /* eslint-disable camelcase */\n function get() {\n return {\n type: 'calendar',\n altInput: true,\n allowInput: true,\n clickOpens: true,\n enableDate: true,\n enableTime: true,\n mode: 'single',\n noCalendar: false,\n format: DEFAULT_FORMAT,\n dateFormat: ISO_8601_FORMAT,\n useLocaleSettings: false,\n language: 'us-en',\n hourIncrement: 1,\n minuteIncrement: 5,\n time_24hr: false,\n saveAs: 'date',\n displayInTimezone: '',\n timezone: '',\n disable: [],\n minDate: '',\n maxDate: ''\n };\n }\n }]);\n\n return CalendarWidget;\n}(_InputWidget2.default);\n\nexports[\"default\"] = CalendarWidget;\n\n//# sourceURL=webpack://Formio/./lib/widgets/CalendarWidget.js?"); /***/ }), @@ -9870,7 +9870,7 @@ eval("var baseToString = __webpack_require__(/*! ./_baseToString */ \"./node_mod \*********************************************************/ /***/ (function(module, exports, __webpack_require__) { -eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;//! moment-timezone.js\n//! version : 0.5.37\n//! Copyright (c) JS Foundation and other contributors\n//! license : MIT\n//! github.com/moment/moment-timezone\n\n(function (root, factory) {\n\t\"use strict\";\n\n\t/*global define*/\n\tif ( true && module.exports) {\n\t\tmodule.exports = factory(__webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\")); // Node\n\t} else if (true) {\n\t\t!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); // AMD\n\t} else {}\n}(this, function (moment) {\n\t\"use strict\";\n\n\t// Resolves es6 module loading issue\n\tif (moment.version === undefined && moment.default) {\n\t\tmoment = moment.default;\n\t}\n\n\t// Do not load moment-timezone a second time.\n\t// if (moment.tz !== undefined) {\n\t// \tlogError('Moment Timezone ' + moment.tz.version + ' was already loaded ' + (moment.tz.dataVersion ? 'with data from ' : 'without any data') + moment.tz.dataVersion);\n\t// \treturn moment;\n\t// }\n\n\tvar VERSION = \"0.5.37\",\n\t\tzones = {},\n\t\tlinks = {},\n\t\tcountries = {},\n\t\tnames = {},\n\t\tguesses = {},\n\t\tcachedGuess;\n\n\tif (!moment || typeof moment.version !== 'string') {\n\t\tlogError('Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/');\n\t}\n\n\tvar momentVersion = moment.version.split('.'),\n\t\tmajor = +momentVersion[0],\n\t\tminor = +momentVersion[1];\n\n\t// Moment.js version check\n\tif (major < 2 || (major === 2 && minor < 6)) {\n\t\tlogError('Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js ' + moment.version + '. See momentjs.com');\n\t}\n\n\t/************************************\n\t\tUnpacking\n\t************************************/\n\n\tfunction charCodeToInt(charCode) {\n\t\tif (charCode > 96) {\n\t\t\treturn charCode - 87;\n\t\t} else if (charCode > 64) {\n\t\t\treturn charCode - 29;\n\t\t}\n\t\treturn charCode - 48;\n\t}\n\n\tfunction unpackBase60(string) {\n\t\tvar i = 0,\n\t\t\tparts = string.split('.'),\n\t\t\twhole = parts[0],\n\t\t\tfractional = parts[1] || '',\n\t\t\tmultiplier = 1,\n\t\t\tnum,\n\t\t\tout = 0,\n\t\t\tsign = 1;\n\n\t\t// handle negative numbers\n\t\tif (string.charCodeAt(0) === 45) {\n\t\t\ti = 1;\n\t\t\tsign = -1;\n\t\t}\n\n\t\t// handle digits before the decimal\n\t\tfor (i; i < whole.length; i++) {\n\t\t\tnum = charCodeToInt(whole.charCodeAt(i));\n\t\t\tout = 60 * out + num;\n\t\t}\n\n\t\t// handle digits after the decimal\n\t\tfor (i = 0; i < fractional.length; i++) {\n\t\t\tmultiplier = multiplier / 60;\n\t\t\tnum = charCodeToInt(fractional.charCodeAt(i));\n\t\t\tout += num * multiplier;\n\t\t}\n\n\t\treturn out * sign;\n\t}\n\n\tfunction arrayToInt (array) {\n\t\tfor (var i = 0; i < array.length; i++) {\n\t\t\tarray[i] = unpackBase60(array[i]);\n\t\t}\n\t}\n\n\tfunction intToUntil (array, length) {\n\t\tfor (var i = 0; i < length; i++) {\n\t\t\tarray[i] = Math.round((array[i - 1] || 0) + (array[i] * 60000)); // minutes to milliseconds\n\t\t}\n\n\t\tarray[length - 1] = Infinity;\n\t}\n\n\tfunction mapIndices (source, indices) {\n\t\tvar out = [], i;\n\n\t\tfor (i = 0; i < indices.length; i++) {\n\t\t\tout[i] = source[indices[i]];\n\t\t}\n\n\t\treturn out;\n\t}\n\n\tfunction unpack (string) {\n\t\tvar data = string.split('|'),\n\t\t\toffsets = data[2].split(' '),\n\t\t\tindices = data[3].split(''),\n\t\t\tuntils = data[4].split(' ');\n\n\t\tarrayToInt(offsets);\n\t\tarrayToInt(indices);\n\t\tarrayToInt(untils);\n\n\t\tintToUntil(untils, indices.length);\n\n\t\treturn {\n\t\t\tname : data[0],\n\t\t\tabbrs : mapIndices(data[1].split(' '), indices),\n\t\t\toffsets : mapIndices(offsets, indices),\n\t\t\tuntils : untils,\n\t\t\tpopulation : data[5] | 0\n\t\t};\n\t}\n\n\t/************************************\n\t\tZone object\n\t************************************/\n\n\tfunction Zone (packedString) {\n\t\tif (packedString) {\n\t\t\tthis._set(unpack(packedString));\n\t\t}\n\t}\n\n\tZone.prototype = {\n\t\t_set : function (unpacked) {\n\t\t\tthis.name = unpacked.name;\n\t\t\tthis.abbrs = unpacked.abbrs;\n\t\t\tthis.untils = unpacked.untils;\n\t\t\tthis.offsets = unpacked.offsets;\n\t\t\tthis.population = unpacked.population;\n\t\t},\n\n\t\t_index : function (timestamp) {\n\t\t\tvar target = +timestamp,\n\t\t\t\tuntils = this.untils,\n\t\t\t\ti;\n\n\t\t\tfor (i = 0; i < untils.length; i++) {\n\t\t\t\tif (target < untils[i]) {\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tcountries : function () {\n\t\t\tvar zone_name = this.name;\n\t\t\treturn Object.keys(countries).filter(function (country_code) {\n\t\t\t\treturn countries[country_code].zones.indexOf(zone_name) !== -1;\n\t\t\t});\n\t\t},\n\n\t\tparse : function (timestamp) {\n\t\t\tvar target = +timestamp,\n\t\t\t\toffsets = this.offsets,\n\t\t\t\tuntils = this.untils,\n\t\t\t\tmax = untils.length - 1,\n\t\t\t\toffset, offsetNext, offsetPrev, i;\n\n\t\t\tfor (i = 0; i < max; i++) {\n\t\t\t\toffset = offsets[i];\n\t\t\t\toffsetNext = offsets[i + 1];\n\t\t\t\toffsetPrev = offsets[i ? i - 1 : i];\n\n\t\t\t\tif (offset < offsetNext && tz.moveAmbiguousForward) {\n\t\t\t\t\toffset = offsetNext;\n\t\t\t\t} else if (offset > offsetPrev && tz.moveInvalidForward) {\n\t\t\t\t\toffset = offsetPrev;\n\t\t\t\t}\n\n\t\t\t\tif (target < untils[i] - (offset * 60000)) {\n\t\t\t\t\treturn offsets[i];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn offsets[max];\n\t\t},\n\n\t\tabbr : function (mom) {\n\t\t\treturn this.abbrs[this._index(mom)];\n\t\t},\n\n\t\toffset : function (mom) {\n\t\t\tlogError(\"zone.offset has been deprecated in favor of zone.utcOffset\");\n\t\t\treturn this.offsets[this._index(mom)];\n\t\t},\n\n\t\tutcOffset : function (mom) {\n\t\t\treturn this.offsets[this._index(mom)];\n\t\t}\n\t};\n\n\t/************************************\n\t\tCountry object\n\t************************************/\n\n\tfunction Country (country_name, zone_names) {\n\t\tthis.name = country_name;\n\t\tthis.zones = zone_names;\n\t}\n\n\t/************************************\n\t\tCurrent Timezone\n\t************************************/\n\n\tfunction OffsetAt(at) {\n\t\tvar timeString = at.toTimeString();\n\t\tvar abbr = timeString.match(/\\([a-z ]+\\)/i);\n\t\tif (abbr && abbr[0]) {\n\t\t\t// 17:56:31 GMT-0600 (CST)\n\t\t\t// 17:56:31 GMT-0600 (Central Standard Time)\n\t\t\tabbr = abbr[0].match(/[A-Z]/g);\n\t\t\tabbr = abbr ? abbr.join('') : undefined;\n\t\t} else {\n\t\t\t// 17:56:31 CST\n\t\t\t// 17:56:31 GMT+0800 (台北標準時間)\n\t\t\tabbr = timeString.match(/[A-Z]{3,5}/g);\n\t\t\tabbr = abbr ? abbr[0] : undefined;\n\t\t}\n\n\t\tif (abbr === 'GMT') {\n\t\t\tabbr = undefined;\n\t\t}\n\n\t\tthis.at = +at;\n\t\tthis.abbr = abbr;\n\t\tthis.offset = at.getTimezoneOffset();\n\t}\n\n\tfunction ZoneScore(zone) {\n\t\tthis.zone = zone;\n\t\tthis.offsetScore = 0;\n\t\tthis.abbrScore = 0;\n\t}\n\n\tZoneScore.prototype.scoreOffsetAt = function (offsetAt) {\n\t\tthis.offsetScore += Math.abs(this.zone.utcOffset(offsetAt.at) - offsetAt.offset);\n\t\tif (this.zone.abbr(offsetAt.at).replace(/[^A-Z]/g, '') !== offsetAt.abbr) {\n\t\t\tthis.abbrScore++;\n\t\t}\n\t};\n\n\tfunction findChange(low, high) {\n\t\tvar mid, diff;\n\n\t\twhile ((diff = ((high.at - low.at) / 12e4 | 0) * 6e4)) {\n\t\t\tmid = new OffsetAt(new Date(low.at + diff));\n\t\t\tif (mid.offset === low.offset) {\n\t\t\t\tlow = mid;\n\t\t\t} else {\n\t\t\t\thigh = mid;\n\t\t\t}\n\t\t}\n\n\t\treturn low;\n\t}\n\n\tfunction userOffsets() {\n\t\tvar startYear = new Date().getFullYear() - 2,\n\t\t\tlast = new OffsetAt(new Date(startYear, 0, 1)),\n\t\t\toffsets = [last],\n\t\t\tchange, next, i;\n\n\t\tfor (i = 1; i < 48; i++) {\n\t\t\tnext = new OffsetAt(new Date(startYear, i, 1));\n\t\t\tif (next.offset !== last.offset) {\n\t\t\t\tchange = findChange(last, next);\n\t\t\t\toffsets.push(change);\n\t\t\t\toffsets.push(new OffsetAt(new Date(change.at + 6e4)));\n\t\t\t}\n\t\t\tlast = next;\n\t\t}\n\n\t\tfor (i = 0; i < 4; i++) {\n\t\t\toffsets.push(new OffsetAt(new Date(startYear + i, 0, 1)));\n\t\t\toffsets.push(new OffsetAt(new Date(startYear + i, 6, 1)));\n\t\t}\n\n\t\treturn offsets;\n\t}\n\n\tfunction sortZoneScores (a, b) {\n\t\tif (a.offsetScore !== b.offsetScore) {\n\t\t\treturn a.offsetScore - b.offsetScore;\n\t\t}\n\t\tif (a.abbrScore !== b.abbrScore) {\n\t\t\treturn a.abbrScore - b.abbrScore;\n\t\t}\n\t\tif (a.zone.population !== b.zone.population) {\n\t\t\treturn b.zone.population - a.zone.population;\n\t\t}\n\t\treturn b.zone.name.localeCompare(a.zone.name);\n\t}\n\n\tfunction addToGuesses (name, offsets) {\n\t\tvar i, offset;\n\t\tarrayToInt(offsets);\n\t\tfor (i = 0; i < offsets.length; i++) {\n\t\t\toffset = offsets[i];\n\t\t\tguesses[offset] = guesses[offset] || {};\n\t\t\tguesses[offset][name] = true;\n\t\t}\n\t}\n\n\tfunction guessesForUserOffsets (offsets) {\n\t\tvar offsetsLength = offsets.length,\n\t\t\tfilteredGuesses = {},\n\t\t\tout = [],\n\t\t\ti, j, guessesOffset;\n\n\t\tfor (i = 0; i < offsetsLength; i++) {\n\t\t\tguessesOffset = guesses[offsets[i].offset] || {};\n\t\t\tfor (j in guessesOffset) {\n\t\t\t\tif (guessesOffset.hasOwnProperty(j)) {\n\t\t\t\t\tfilteredGuesses[j] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (i in filteredGuesses) {\n\t\t\tif (filteredGuesses.hasOwnProperty(i)) {\n\t\t\t\tout.push(names[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn out;\n\t}\n\n\tfunction rebuildGuess () {\n\n\t\t// use Intl API when available and returning valid time zone\n\t\ttry {\n\t\t\tvar intlName = Intl.DateTimeFormat().resolvedOptions().timeZone;\n\t\t\tif (intlName && intlName.length > 3) {\n\t\t\t\tvar name = names[normalizeName(intlName)];\n\t\t\t\tif (name) {\n\t\t\t\t\treturn name;\n\t\t\t\t}\n\t\t\t\tlogError(\"Moment Timezone found \" + intlName + \" from the Intl api, but did not have that data loaded.\");\n\t\t\t}\n\t\t} catch (e) {\n\t\t\t// Intl unavailable, fall back to manual guessing.\n\t\t}\n\n\t\tvar offsets = userOffsets(),\n\t\t\toffsetsLength = offsets.length,\n\t\t\tguesses = guessesForUserOffsets(offsets),\n\t\t\tzoneScores = [],\n\t\t\tzoneScore, i, j;\n\n\t\tfor (i = 0; i < guesses.length; i++) {\n\t\t\tzoneScore = new ZoneScore(getZone(guesses[i]), offsetsLength);\n\t\t\tfor (j = 0; j < offsetsLength; j++) {\n\t\t\t\tzoneScore.scoreOffsetAt(offsets[j]);\n\t\t\t}\n\t\t\tzoneScores.push(zoneScore);\n\t\t}\n\n\t\tzoneScores.sort(sortZoneScores);\n\n\t\treturn zoneScores.length > 0 ? zoneScores[0].zone.name : undefined;\n\t}\n\n\tfunction guess (ignoreCache) {\n\t\tif (!cachedGuess || ignoreCache) {\n\t\t\tcachedGuess = rebuildGuess();\n\t\t}\n\t\treturn cachedGuess;\n\t}\n\n\t/************************************\n\t\tGlobal Methods\n\t************************************/\n\n\tfunction normalizeName (name) {\n\t\treturn (name || '').toLowerCase().replace(/\\//g, '_');\n\t}\n\n\tfunction addZone (packed) {\n\t\tvar i, name, split, normalized;\n\n\t\tif (typeof packed === \"string\") {\n\t\t\tpacked = [packed];\n\t\t}\n\n\t\tfor (i = 0; i < packed.length; i++) {\n\t\t\tsplit = packed[i].split('|');\n\t\t\tname = split[0];\n\t\t\tnormalized = normalizeName(name);\n\t\t\tzones[normalized] = packed[i];\n\t\t\tnames[normalized] = name;\n\t\t\taddToGuesses(normalized, split[2].split(' '));\n\t\t}\n\t}\n\n\tfunction getZone (name, caller) {\n\n\t\tname = normalizeName(name);\n\n\t\tvar zone = zones[name];\n\t\tvar link;\n\n\t\tif (zone instanceof Zone) {\n\t\t\treturn zone;\n\t\t}\n\n\t\tif (typeof zone === 'string') {\n\t\t\tzone = new Zone(zone);\n\t\t\tzones[name] = zone;\n\t\t\treturn zone;\n\t\t}\n\n\t\t// Pass getZone to prevent recursion more than 1 level deep\n\t\tif (links[name] && caller !== getZone && (link = getZone(links[name], getZone))) {\n\t\t\tzone = zones[name] = new Zone();\n\t\t\tzone._set(link);\n\t\t\tzone.name = names[name];\n\t\t\treturn zone;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tfunction getNames () {\n\t\tvar i, out = [];\n\n\t\tfor (i in names) {\n\t\t\tif (names.hasOwnProperty(i) && (zones[i] || zones[links[i]]) && names[i]) {\n\t\t\t\tout.push(names[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn out.sort();\n\t}\n\n\tfunction getCountryNames () {\n\t\treturn Object.keys(countries);\n\t}\n\n\tfunction addLink (aliases) {\n\t\tvar i, alias, normal0, normal1;\n\n\t\tif (typeof aliases === \"string\") {\n\t\t\taliases = [aliases];\n\t\t}\n\n\t\tfor (i = 0; i < aliases.length; i++) {\n\t\t\talias = aliases[i].split('|');\n\n\t\t\tnormal0 = normalizeName(alias[0]);\n\t\t\tnormal1 = normalizeName(alias[1]);\n\n\t\t\tlinks[normal0] = normal1;\n\t\t\tnames[normal0] = alias[0];\n\n\t\t\tlinks[normal1] = normal0;\n\t\t\tnames[normal1] = alias[1];\n\t\t}\n\t}\n\n\tfunction addCountries (data) {\n\t\tvar i, country_code, country_zones, split;\n\t\tif (!data || !data.length) return;\n\t\tfor (i = 0; i < data.length; i++) {\n\t\t\tsplit = data[i].split('|');\n\t\t\tcountry_code = split[0].toUpperCase();\n\t\t\tcountry_zones = split[1].split(' ');\n\t\t\tcountries[country_code] = new Country(\n\t\t\t\tcountry_code,\n\t\t\t\tcountry_zones\n\t\t\t);\n\t\t}\n\t}\n\n\tfunction getCountry (name) {\n\t\tname = name.toUpperCase();\n\t\treturn countries[name] || null;\n\t}\n\n\tfunction zonesForCountry(country, with_offset) {\n\t\tcountry = getCountry(country);\n\n\t\tif (!country) return null;\n\n\t\tvar zones = country.zones.sort();\n\n\t\tif (with_offset) {\n\t\t\treturn zones.map(function (zone_name) {\n\t\t\t\tvar zone = getZone(zone_name);\n\t\t\t\treturn {\n\t\t\t\t\tname: zone_name,\n\t\t\t\t\toffset: zone.utcOffset(new Date())\n\t\t\t\t};\n\t\t\t});\n\t\t}\n\n\t\treturn zones;\n\t}\n\n\tfunction loadData (data) {\n\t\taddZone(data.zones);\n\t\taddLink(data.links);\n\t\taddCountries(data.countries);\n\t\ttz.dataVersion = data.version;\n\t}\n\n\tfunction zoneExists (name) {\n\t\tif (!zoneExists.didShowError) {\n\t\t\tzoneExists.didShowError = true;\n\t\t\t\tlogError(\"moment.tz.zoneExists('\" + name + \"') has been deprecated in favor of !moment.tz.zone('\" + name + \"')\");\n\t\t}\n\t\treturn !!getZone(name);\n\t}\n\n\tfunction needsOffset (m) {\n\t\tvar isUnixTimestamp = (m._f === 'X' || m._f === 'x');\n\t\treturn !!(m._a && (m._tzm === undefined) && !isUnixTimestamp);\n\t}\n\n\tfunction logError (message) {\n\t\tif (typeof console !== 'undefined' && typeof console.error === 'function') {\n\t\t\tconsole.error(message);\n\t\t}\n\t}\n\n\t/************************************\n\t\tmoment.tz namespace\n\t************************************/\n\n\tfunction tz (input) {\n\t\tvar args = Array.prototype.slice.call(arguments, 0, -1),\n\t\t\tname = arguments[arguments.length - 1],\n\t\t\tzone = getZone(name),\n\t\t\tout = moment.utc.apply(null, args);\n\n\t\tif (zone && !moment.isMoment(input) && needsOffset(out)) {\n\t\t\tout.add(zone.parse(out), 'minutes');\n\t\t}\n\n\t\tout.tz(name);\n\n\t\treturn out;\n\t}\n\n\ttz.version = VERSION;\n\ttz.dataVersion = '';\n\ttz._zones = zones;\n\ttz._links = links;\n\ttz._names = names;\n\ttz._countries\t= countries;\n\ttz.add = addZone;\n\ttz.link = addLink;\n\ttz.load = loadData;\n\ttz.zone = getZone;\n\ttz.zoneExists = zoneExists; // deprecated in 0.1.0\n\ttz.guess = guess;\n\ttz.names = getNames;\n\ttz.Zone = Zone;\n\ttz.unpack = unpack;\n\ttz.unpackBase60 = unpackBase60;\n\ttz.needsOffset = needsOffset;\n\ttz.moveInvalidForward = true;\n\ttz.moveAmbiguousForward = false;\n\ttz.countries = getCountryNames;\n\ttz.zonesForCountry = zonesForCountry;\n\n\t/************************************\n\t\tInterface with Moment.js\n\t************************************/\n\n\tvar fn = moment.fn;\n\n\tmoment.tz = tz;\n\n\tmoment.defaultZone = null;\n\n\tmoment.updateOffset = function (mom, keepTime) {\n\t\tvar zone = moment.defaultZone,\n\t\t\toffset;\n\n\t\tif (mom._z === undefined) {\n\t\t\tif (zone && needsOffset(mom) && !mom._isUTC) {\n\t\t\t\tmom._d = moment.utc(mom._a)._d;\n\t\t\t\tmom.utc().add(zone.parse(mom), 'minutes');\n\t\t\t}\n\t\t\tmom._z = zone;\n\t\t}\n\t\tif (mom._z) {\n\t\t\toffset = mom._z.utcOffset(mom);\n\t\t\tif (Math.abs(offset) < 16) {\n\t\t\t\toffset = offset / 60;\n\t\t\t}\n\t\t\tif (mom.utcOffset !== undefined) {\n\t\t\t\tvar z = mom._z;\n\t\t\t\tmom.utcOffset(-offset, keepTime);\n\t\t\t\tmom._z = z;\n\t\t\t} else {\n\t\t\t\tmom.zone(offset, keepTime);\n\t\t\t}\n\t\t}\n\t};\n\n\tfn.tz = function (name, keepTime) {\n\t\tif (name) {\n\t\t\tif (typeof name !== 'string') {\n\t\t\t\tthrow new Error('Time zone name must be a string, got ' + name + ' [' + typeof name + ']');\n\t\t\t}\n\t\t\tthis._z = getZone(name);\n\t\t\tif (this._z) {\n\t\t\t\tmoment.updateOffset(this, keepTime);\n\t\t\t} else {\n\t\t\t\tlogError(\"Moment Timezone has no data for \" + name + \". See http://momentjs.com/timezone/docs/#/data-loading/.\");\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif (this._z) { return this._z.name; }\n\t};\n\n\tfunction abbrWrap (old) {\n\t\treturn function () {\n\t\t\tif (this._z) { return this._z.abbr(this); }\n\t\t\treturn old.call(this);\n\t\t};\n\t}\n\n\tfunction resetZoneWrap (old) {\n\t\treturn function () {\n\t\t\tthis._z = null;\n\t\t\treturn old.apply(this, arguments);\n\t\t};\n\t}\n\n\tfunction resetZoneWrap2 (old) {\n\t\treturn function () {\n\t\t\tif (arguments.length > 0) this._z = null;\n\t\t\treturn old.apply(this, arguments);\n\t\t};\n\t}\n\n\tfn.zoneName = abbrWrap(fn.zoneName);\n\tfn.zoneAbbr = abbrWrap(fn.zoneAbbr);\n\tfn.utc = resetZoneWrap(fn.utc);\n\tfn.local = resetZoneWrap(fn.local);\n\tfn.utcOffset = resetZoneWrap2(fn.utcOffset);\n\n\tmoment.tz.setDefault = function(name) {\n\t\tif (major < 2 || (major === 2 && minor < 9)) {\n\t\t\tlogError('Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js ' + moment.version + '.');\n\t\t}\n\t\tmoment.defaultZone = name ? getZone(name) : null;\n\t\treturn moment;\n\t};\n\n\t// Cloning a moment should include the _z property.\n\tvar momentProperties = moment.momentProperties;\n\tif (Object.prototype.toString.call(momentProperties) === '[object Array]') {\n\t\t// moment 2.8.1+\n\t\tmomentProperties.push('_z');\n\t\tmomentProperties.push('_a');\n\t} else if (momentProperties) {\n\t\t// moment 2.7.0\n\t\tmomentProperties._z = null;\n\t}\n\n\t// INJECT DATA\n\n\treturn moment;\n}));\n\n\n//# sourceURL=webpack://Formio/./node_modules/moment-timezone/moment-timezone.js?"); +eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;//! moment-timezone.js\n//! version : 0.5.40\n//! Copyright (c) JS Foundation and other contributors\n//! license : MIT\n//! github.com/moment/moment-timezone\n\n(function (root, factory) {\n\t\"use strict\";\n\n\t/*global define*/\n\tif ( true && module.exports) {\n\t\tmodule.exports = factory(__webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\")); // Node\n\t} else if (true) {\n\t\t!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); // AMD\n\t} else {}\n}(this, function (moment) {\n\t\"use strict\";\n\n\t// Resolves es6 module loading issue\n\tif (moment.version === undefined && moment.default) {\n\t\tmoment = moment.default;\n\t}\n\n\t// Do not load moment-timezone a second time.\n\t// if (moment.tz !== undefined) {\n\t// \tlogError('Moment Timezone ' + moment.tz.version + ' was already loaded ' + (moment.tz.dataVersion ? 'with data from ' : 'without any data') + moment.tz.dataVersion);\n\t// \treturn moment;\n\t// }\n\n\tvar VERSION = \"0.5.40\",\n\t\tzones = {},\n\t\tlinks = {},\n\t\tcountries = {},\n\t\tnames = {},\n\t\tguesses = {},\n\t\tcachedGuess;\n\n\tif (!moment || typeof moment.version !== 'string') {\n\t\tlogError('Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/');\n\t}\n\n\tvar momentVersion = moment.version.split('.'),\n\t\tmajor = +momentVersion[0],\n\t\tminor = +momentVersion[1];\n\n\t// Moment.js version check\n\tif (major < 2 || (major === 2 && minor < 6)) {\n\t\tlogError('Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js ' + moment.version + '. See momentjs.com');\n\t}\n\n\t/************************************\n\t\tUnpacking\n\t************************************/\n\n\tfunction charCodeToInt(charCode) {\n\t\tif (charCode > 96) {\n\t\t\treturn charCode - 87;\n\t\t} else if (charCode > 64) {\n\t\t\treturn charCode - 29;\n\t\t}\n\t\treturn charCode - 48;\n\t}\n\n\tfunction unpackBase60(string) {\n\t\tvar i = 0,\n\t\t\tparts = string.split('.'),\n\t\t\twhole = parts[0],\n\t\t\tfractional = parts[1] || '',\n\t\t\tmultiplier = 1,\n\t\t\tnum,\n\t\t\tout = 0,\n\t\t\tsign = 1;\n\n\t\t// handle negative numbers\n\t\tif (string.charCodeAt(0) === 45) {\n\t\t\ti = 1;\n\t\t\tsign = -1;\n\t\t}\n\n\t\t// handle digits before the decimal\n\t\tfor (i; i < whole.length; i++) {\n\t\t\tnum = charCodeToInt(whole.charCodeAt(i));\n\t\t\tout = 60 * out + num;\n\t\t}\n\n\t\t// handle digits after the decimal\n\t\tfor (i = 0; i < fractional.length; i++) {\n\t\t\tmultiplier = multiplier / 60;\n\t\t\tnum = charCodeToInt(fractional.charCodeAt(i));\n\t\t\tout += num * multiplier;\n\t\t}\n\n\t\treturn out * sign;\n\t}\n\n\tfunction arrayToInt (array) {\n\t\tfor (var i = 0; i < array.length; i++) {\n\t\t\tarray[i] = unpackBase60(array[i]);\n\t\t}\n\t}\n\n\tfunction intToUntil (array, length) {\n\t\tfor (var i = 0; i < length; i++) {\n\t\t\tarray[i] = Math.round((array[i - 1] || 0) + (array[i] * 60000)); // minutes to milliseconds\n\t\t}\n\n\t\tarray[length - 1] = Infinity;\n\t}\n\n\tfunction mapIndices (source, indices) {\n\t\tvar out = [], i;\n\n\t\tfor (i = 0; i < indices.length; i++) {\n\t\t\tout[i] = source[indices[i]];\n\t\t}\n\n\t\treturn out;\n\t}\n\n\tfunction unpack (string) {\n\t\tvar data = string.split('|'),\n\t\t\toffsets = data[2].split(' '),\n\t\t\tindices = data[3].split(''),\n\t\t\tuntils = data[4].split(' ');\n\n\t\tarrayToInt(offsets);\n\t\tarrayToInt(indices);\n\t\tarrayToInt(untils);\n\n\t\tintToUntil(untils, indices.length);\n\n\t\treturn {\n\t\t\tname : data[0],\n\t\t\tabbrs : mapIndices(data[1].split(' '), indices),\n\t\t\toffsets : mapIndices(offsets, indices),\n\t\t\tuntils : untils,\n\t\t\tpopulation : data[5] | 0\n\t\t};\n\t}\n\n\t/************************************\n\t\tZone object\n\t************************************/\n\n\tfunction Zone (packedString) {\n\t\tif (packedString) {\n\t\t\tthis._set(unpack(packedString));\n\t\t}\n\t}\n\n\tZone.prototype = {\n\t\t_set : function (unpacked) {\n\t\t\tthis.name = unpacked.name;\n\t\t\tthis.abbrs = unpacked.abbrs;\n\t\t\tthis.untils = unpacked.untils;\n\t\t\tthis.offsets = unpacked.offsets;\n\t\t\tthis.population = unpacked.population;\n\t\t},\n\n\t\t_index : function (timestamp) {\n\t\t\tvar target = +timestamp,\n\t\t\t\tuntils = this.untils,\n\t\t\t\ti;\n\n\t\t\tfor (i = 0; i < untils.length; i++) {\n\t\t\t\tif (target < untils[i]) {\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tcountries : function () {\n\t\t\tvar zone_name = this.name;\n\t\t\treturn Object.keys(countries).filter(function (country_code) {\n\t\t\t\treturn countries[country_code].zones.indexOf(zone_name) !== -1;\n\t\t\t});\n\t\t},\n\n\t\tparse : function (timestamp) {\n\t\t\tvar target = +timestamp,\n\t\t\t\toffsets = this.offsets,\n\t\t\t\tuntils = this.untils,\n\t\t\t\tmax = untils.length - 1,\n\t\t\t\toffset, offsetNext, offsetPrev, i;\n\n\t\t\tfor (i = 0; i < max; i++) {\n\t\t\t\toffset = offsets[i];\n\t\t\t\toffsetNext = offsets[i + 1];\n\t\t\t\toffsetPrev = offsets[i ? i - 1 : i];\n\n\t\t\t\tif (offset < offsetNext && tz.moveAmbiguousForward) {\n\t\t\t\t\toffset = offsetNext;\n\t\t\t\t} else if (offset > offsetPrev && tz.moveInvalidForward) {\n\t\t\t\t\toffset = offsetPrev;\n\t\t\t\t}\n\n\t\t\t\tif (target < untils[i] - (offset * 60000)) {\n\t\t\t\t\treturn offsets[i];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn offsets[max];\n\t\t},\n\n\t\tabbr : function (mom) {\n\t\t\treturn this.abbrs[this._index(mom)];\n\t\t},\n\n\t\toffset : function (mom) {\n\t\t\tlogError(\"zone.offset has been deprecated in favor of zone.utcOffset\");\n\t\t\treturn this.offsets[this._index(mom)];\n\t\t},\n\n\t\tutcOffset : function (mom) {\n\t\t\treturn this.offsets[this._index(mom)];\n\t\t}\n\t};\n\n\t/************************************\n\t\tCountry object\n\t************************************/\n\n\tfunction Country (country_name, zone_names) {\n\t\tthis.name = country_name;\n\t\tthis.zones = zone_names;\n\t}\n\n\t/************************************\n\t\tCurrent Timezone\n\t************************************/\n\n\tfunction OffsetAt(at) {\n\t\tvar timeString = at.toTimeString();\n\t\tvar abbr = timeString.match(/\\([a-z ]+\\)/i);\n\t\tif (abbr && abbr[0]) {\n\t\t\t// 17:56:31 GMT-0600 (CST)\n\t\t\t// 17:56:31 GMT-0600 (Central Standard Time)\n\t\t\tabbr = abbr[0].match(/[A-Z]/g);\n\t\t\tabbr = abbr ? abbr.join('') : undefined;\n\t\t} else {\n\t\t\t// 17:56:31 CST\n\t\t\t// 17:56:31 GMT+0800 (台北標準時間)\n\t\t\tabbr = timeString.match(/[A-Z]{3,5}/g);\n\t\t\tabbr = abbr ? abbr[0] : undefined;\n\t\t}\n\n\t\tif (abbr === 'GMT') {\n\t\t\tabbr = undefined;\n\t\t}\n\n\t\tthis.at = +at;\n\t\tthis.abbr = abbr;\n\t\tthis.offset = at.getTimezoneOffset();\n\t}\n\n\tfunction ZoneScore(zone) {\n\t\tthis.zone = zone;\n\t\tthis.offsetScore = 0;\n\t\tthis.abbrScore = 0;\n\t}\n\n\tZoneScore.prototype.scoreOffsetAt = function (offsetAt) {\n\t\tthis.offsetScore += Math.abs(this.zone.utcOffset(offsetAt.at) - offsetAt.offset);\n\t\tif (this.zone.abbr(offsetAt.at).replace(/[^A-Z]/g, '') !== offsetAt.abbr) {\n\t\t\tthis.abbrScore++;\n\t\t}\n\t};\n\n\tfunction findChange(low, high) {\n\t\tvar mid, diff;\n\n\t\twhile ((diff = ((high.at - low.at) / 12e4 | 0) * 6e4)) {\n\t\t\tmid = new OffsetAt(new Date(low.at + diff));\n\t\t\tif (mid.offset === low.offset) {\n\t\t\t\tlow = mid;\n\t\t\t} else {\n\t\t\t\thigh = mid;\n\t\t\t}\n\t\t}\n\n\t\treturn low;\n\t}\n\n\tfunction userOffsets() {\n\t\tvar startYear = new Date().getFullYear() - 2,\n\t\t\tlast = new OffsetAt(new Date(startYear, 0, 1)),\n\t\t\toffsets = [last],\n\t\t\tchange, next, i;\n\n\t\tfor (i = 1; i < 48; i++) {\n\t\t\tnext = new OffsetAt(new Date(startYear, i, 1));\n\t\t\tif (next.offset !== last.offset) {\n\t\t\t\tchange = findChange(last, next);\n\t\t\t\toffsets.push(change);\n\t\t\t\toffsets.push(new OffsetAt(new Date(change.at + 6e4)));\n\t\t\t}\n\t\t\tlast = next;\n\t\t}\n\n\t\tfor (i = 0; i < 4; i++) {\n\t\t\toffsets.push(new OffsetAt(new Date(startYear + i, 0, 1)));\n\t\t\toffsets.push(new OffsetAt(new Date(startYear + i, 6, 1)));\n\t\t}\n\n\t\treturn offsets;\n\t}\n\n\tfunction sortZoneScores (a, b) {\n\t\tif (a.offsetScore !== b.offsetScore) {\n\t\t\treturn a.offsetScore - b.offsetScore;\n\t\t}\n\t\tif (a.abbrScore !== b.abbrScore) {\n\t\t\treturn a.abbrScore - b.abbrScore;\n\t\t}\n\t\tif (a.zone.population !== b.zone.population) {\n\t\t\treturn b.zone.population - a.zone.population;\n\t\t}\n\t\treturn b.zone.name.localeCompare(a.zone.name);\n\t}\n\n\tfunction addToGuesses (name, offsets) {\n\t\tvar i, offset;\n\t\tarrayToInt(offsets);\n\t\tfor (i = 0; i < offsets.length; i++) {\n\t\t\toffset = offsets[i];\n\t\t\tguesses[offset] = guesses[offset] || {};\n\t\t\tguesses[offset][name] = true;\n\t\t}\n\t}\n\n\tfunction guessesForUserOffsets (offsets) {\n\t\tvar offsetsLength = offsets.length,\n\t\t\tfilteredGuesses = {},\n\t\t\tout = [],\n\t\t\ti, j, guessesOffset;\n\n\t\tfor (i = 0; i < offsetsLength; i++) {\n\t\t\tguessesOffset = guesses[offsets[i].offset] || {};\n\t\t\tfor (j in guessesOffset) {\n\t\t\t\tif (guessesOffset.hasOwnProperty(j)) {\n\t\t\t\t\tfilteredGuesses[j] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (i in filteredGuesses) {\n\t\t\tif (filteredGuesses.hasOwnProperty(i)) {\n\t\t\t\tout.push(names[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn out;\n\t}\n\n\tfunction rebuildGuess () {\n\n\t\t// use Intl API when available and returning valid time zone\n\t\ttry {\n\t\t\tvar intlName = Intl.DateTimeFormat().resolvedOptions().timeZone;\n\t\t\tif (intlName && intlName.length > 3) {\n\t\t\t\tvar name = names[normalizeName(intlName)];\n\t\t\t\tif (name) {\n\t\t\t\t\treturn name;\n\t\t\t\t}\n\t\t\t\tlogError(\"Moment Timezone found \" + intlName + \" from the Intl api, but did not have that data loaded.\");\n\t\t\t}\n\t\t} catch (e) {\n\t\t\t// Intl unavailable, fall back to manual guessing.\n\t\t}\n\n\t\tvar offsets = userOffsets(),\n\t\t\toffsetsLength = offsets.length,\n\t\t\tguesses = guessesForUserOffsets(offsets),\n\t\t\tzoneScores = [],\n\t\t\tzoneScore, i, j;\n\n\t\tfor (i = 0; i < guesses.length; i++) {\n\t\t\tzoneScore = new ZoneScore(getZone(guesses[i]), offsetsLength);\n\t\t\tfor (j = 0; j < offsetsLength; j++) {\n\t\t\t\tzoneScore.scoreOffsetAt(offsets[j]);\n\t\t\t}\n\t\t\tzoneScores.push(zoneScore);\n\t\t}\n\n\t\tzoneScores.sort(sortZoneScores);\n\n\t\treturn zoneScores.length > 0 ? zoneScores[0].zone.name : undefined;\n\t}\n\n\tfunction guess (ignoreCache) {\n\t\tif (!cachedGuess || ignoreCache) {\n\t\t\tcachedGuess = rebuildGuess();\n\t\t}\n\t\treturn cachedGuess;\n\t}\n\n\t/************************************\n\t\tGlobal Methods\n\t************************************/\n\n\tfunction normalizeName (name) {\n\t\treturn (name || '').toLowerCase().replace(/\\//g, '_');\n\t}\n\n\tfunction addZone (packed) {\n\t\tvar i, name, split, normalized;\n\n\t\tif (typeof packed === \"string\") {\n\t\t\tpacked = [packed];\n\t\t}\n\n\t\tfor (i = 0; i < packed.length; i++) {\n\t\t\tsplit = packed[i].split('|');\n\t\t\tname = split[0];\n\t\t\tnormalized = normalizeName(name);\n\t\t\tzones[normalized] = packed[i];\n\t\t\tnames[normalized] = name;\n\t\t\taddToGuesses(normalized, split[2].split(' '));\n\t\t}\n\t}\n\n\tfunction getZone (name, caller) {\n\n\t\tname = normalizeName(name);\n\n\t\tvar zone = zones[name];\n\t\tvar link;\n\n\t\tif (zone instanceof Zone) {\n\t\t\treturn zone;\n\t\t}\n\n\t\tif (typeof zone === 'string') {\n\t\t\tzone = new Zone(zone);\n\t\t\tzones[name] = zone;\n\t\t\treturn zone;\n\t\t}\n\n\t\t// Pass getZone to prevent recursion more than 1 level deep\n\t\tif (links[name] && caller !== getZone && (link = getZone(links[name], getZone))) {\n\t\t\tzone = zones[name] = new Zone();\n\t\t\tzone._set(link);\n\t\t\tzone.name = names[name];\n\t\t\treturn zone;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tfunction getNames () {\n\t\tvar i, out = [];\n\n\t\tfor (i in names) {\n\t\t\tif (names.hasOwnProperty(i) && (zones[i] || zones[links[i]]) && names[i]) {\n\t\t\t\tout.push(names[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn out.sort();\n\t}\n\n\tfunction getCountryNames () {\n\t\treturn Object.keys(countries);\n\t}\n\n\tfunction addLink (aliases) {\n\t\tvar i, alias, normal0, normal1;\n\n\t\tif (typeof aliases === \"string\") {\n\t\t\taliases = [aliases];\n\t\t}\n\n\t\tfor (i = 0; i < aliases.length; i++) {\n\t\t\talias = aliases[i].split('|');\n\n\t\t\tnormal0 = normalizeName(alias[0]);\n\t\t\tnormal1 = normalizeName(alias[1]);\n\n\t\t\tlinks[normal0] = normal1;\n\t\t\tnames[normal0] = alias[0];\n\n\t\t\tlinks[normal1] = normal0;\n\t\t\tnames[normal1] = alias[1];\n\t\t}\n\t}\n\n\tfunction addCountries (data) {\n\t\tvar i, country_code, country_zones, split;\n\t\tif (!data || !data.length) return;\n\t\tfor (i = 0; i < data.length; i++) {\n\t\t\tsplit = data[i].split('|');\n\t\t\tcountry_code = split[0].toUpperCase();\n\t\t\tcountry_zones = split[1].split(' ');\n\t\t\tcountries[country_code] = new Country(\n\t\t\t\tcountry_code,\n\t\t\t\tcountry_zones\n\t\t\t);\n\t\t}\n\t}\n\n\tfunction getCountry (name) {\n\t\tname = name.toUpperCase();\n\t\treturn countries[name] || null;\n\t}\n\n\tfunction zonesForCountry(country, with_offset) {\n\t\tcountry = getCountry(country);\n\n\t\tif (!country) return null;\n\n\t\tvar zones = country.zones.sort();\n\n\t\tif (with_offset) {\n\t\t\treturn zones.map(function (zone_name) {\n\t\t\t\tvar zone = getZone(zone_name);\n\t\t\t\treturn {\n\t\t\t\t\tname: zone_name,\n\t\t\t\t\toffset: zone.utcOffset(new Date())\n\t\t\t\t};\n\t\t\t});\n\t\t}\n\n\t\treturn zones;\n\t}\n\n\tfunction loadData (data) {\n\t\taddZone(data.zones);\n\t\taddLink(data.links);\n\t\taddCountries(data.countries);\n\t\ttz.dataVersion = data.version;\n\t}\n\n\tfunction zoneExists (name) {\n\t\tif (!zoneExists.didShowError) {\n\t\t\tzoneExists.didShowError = true;\n\t\t\t\tlogError(\"moment.tz.zoneExists('\" + name + \"') has been deprecated in favor of !moment.tz.zone('\" + name + \"')\");\n\t\t}\n\t\treturn !!getZone(name);\n\t}\n\n\tfunction needsOffset (m) {\n\t\tvar isUnixTimestamp = (m._f === 'X' || m._f === 'x');\n\t\treturn !!(m._a && (m._tzm === undefined) && !isUnixTimestamp);\n\t}\n\n\tfunction logError (message) {\n\t\tif (typeof console !== 'undefined' && typeof console.error === 'function') {\n\t\t\tconsole.error(message);\n\t\t}\n\t}\n\n\t/************************************\n\t\tmoment.tz namespace\n\t************************************/\n\n\tfunction tz (input) {\n\t\tvar args = Array.prototype.slice.call(arguments, 0, -1),\n\t\t\tname = arguments[arguments.length - 1],\n\t\t\tzone = getZone(name),\n\t\t\tout = moment.utc.apply(null, args);\n\n\t\tif (zone && !moment.isMoment(input) && needsOffset(out)) {\n\t\t\tout.add(zone.parse(out), 'minutes');\n\t\t}\n\n\t\tout.tz(name);\n\n\t\treturn out;\n\t}\n\n\ttz.version = VERSION;\n\ttz.dataVersion = '';\n\ttz._zones = zones;\n\ttz._links = links;\n\ttz._names = names;\n\ttz._countries\t= countries;\n\ttz.add = addZone;\n\ttz.link = addLink;\n\ttz.load = loadData;\n\ttz.zone = getZone;\n\ttz.zoneExists = zoneExists; // deprecated in 0.1.0\n\ttz.guess = guess;\n\ttz.names = getNames;\n\ttz.Zone = Zone;\n\ttz.unpack = unpack;\n\ttz.unpackBase60 = unpackBase60;\n\ttz.needsOffset = needsOffset;\n\ttz.moveInvalidForward = true;\n\ttz.moveAmbiguousForward = false;\n\ttz.countries = getCountryNames;\n\ttz.zonesForCountry = zonesForCountry;\n\n\t/************************************\n\t\tInterface with Moment.js\n\t************************************/\n\n\tvar fn = moment.fn;\n\n\tmoment.tz = tz;\n\n\tmoment.defaultZone = null;\n\n\tmoment.updateOffset = function (mom, keepTime) {\n\t\tvar zone = moment.defaultZone,\n\t\t\toffset;\n\n\t\tif (mom._z === undefined) {\n\t\t\tif (zone && needsOffset(mom) && !mom._isUTC) {\n\t\t\t\tmom._d = moment.utc(mom._a)._d;\n\t\t\t\tmom.utc().add(zone.parse(mom), 'minutes');\n\t\t\t}\n\t\t\tmom._z = zone;\n\t\t}\n\t\tif (mom._z) {\n\t\t\toffset = mom._z.utcOffset(mom);\n\t\t\tif (Math.abs(offset) < 16) {\n\t\t\t\toffset = offset / 60;\n\t\t\t}\n\t\t\tif (mom.utcOffset !== undefined) {\n\t\t\t\tvar z = mom._z;\n\t\t\t\tmom.utcOffset(-offset, keepTime);\n\t\t\t\tmom._z = z;\n\t\t\t} else {\n\t\t\t\tmom.zone(offset, keepTime);\n\t\t\t}\n\t\t}\n\t};\n\n\tfn.tz = function (name, keepTime) {\n\t\tif (name) {\n\t\t\tif (typeof name !== 'string') {\n\t\t\t\tthrow new Error('Time zone name must be a string, got ' + name + ' [' + typeof name + ']');\n\t\t\t}\n\t\t\tthis._z = getZone(name);\n\t\t\tif (this._z) {\n\t\t\t\tmoment.updateOffset(this, keepTime);\n\t\t\t} else {\n\t\t\t\tlogError(\"Moment Timezone has no data for \" + name + \". See http://momentjs.com/timezone/docs/#/data-loading/.\");\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif (this._z) { return this._z.name; }\n\t};\n\n\tfunction abbrWrap (old) {\n\t\treturn function () {\n\t\t\tif (this._z) { return this._z.abbr(this); }\n\t\t\treturn old.call(this);\n\t\t};\n\t}\n\n\tfunction resetZoneWrap (old) {\n\t\treturn function () {\n\t\t\tthis._z = null;\n\t\t\treturn old.apply(this, arguments);\n\t\t};\n\t}\n\n\tfunction resetZoneWrap2 (old) {\n\t\treturn function () {\n\t\t\tif (arguments.length > 0) this._z = null;\n\t\t\treturn old.apply(this, arguments);\n\t\t};\n\t}\n\n\tfn.zoneName = abbrWrap(fn.zoneName);\n\tfn.zoneAbbr = abbrWrap(fn.zoneAbbr);\n\tfn.utc = resetZoneWrap(fn.utc);\n\tfn.local = resetZoneWrap(fn.local);\n\tfn.utcOffset = resetZoneWrap2(fn.utcOffset);\n\n\tmoment.tz.setDefault = function(name) {\n\t\tif (major < 2 || (major === 2 && minor < 9)) {\n\t\t\tlogError('Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js ' + moment.version + '.');\n\t\t}\n\t\tmoment.defaultZone = name ? getZone(name) : null;\n\t\treturn moment;\n\t};\n\n\t// Cloning a moment should include the _z property.\n\tvar momentProperties = moment.momentProperties;\n\tif (Object.prototype.toString.call(momentProperties) === '[object Array]') {\n\t\t// moment 2.8.1+\n\t\tmomentProperties.push('_z');\n\t\tmomentProperties.push('_a');\n\t} else if (momentProperties) {\n\t\t// moment 2.7.0\n\t\tmomentProperties._z = null;\n\t}\n\n\t// INJECT DATA\n\n\treturn moment;\n}));\n\n\n//# sourceURL=webpack://Formio/./node_modules/moment-timezone/moment-timezone.js?"); /***/ }), diff --git a/dist/formio.contrib.min.js b/dist/formio.contrib.min.js index e77c179e91..a3e0469159 100644 --- a/dist/formio.contrib.min.js +++ b/dist/formio.contrib.min.js @@ -1,2 +1,2 @@ /*! For license information please see formio.contrib.min.js.LICENSE.txt */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Formio=t():e.Formio=t()}(self,(function(){return function(){var e={44964:function(e,t,n){"use strict";function r(e,t){for(var n=0;n3&&void 0!==arguments[3]&&arguments[3];if(this.events){var o="".concat(this.options.namespace,".").concat(e);return t.id=this.id,t.key=this.key,t.internal=n,this.events[r?"once":"on"](o,t)}}},{key:"once",value:function(e,t,n){return this.on(e,t,n,!0)}},{key:"onAny",value:function(e){if(this.events)return this.events.onAny(e)}},{key:"offAny",value:function(e){if(this.events)return this.events.offAny(e)}},{key:"off",value:function(e,t){var n=this;if(this.events){var r="".concat(this.options.namespace,".").concat(e);this.events.listeners(r).forEach((function(e){e&&e.id===n.id&&(t&&t!==e||n.events.off(r,e))}))}}},{key:"emit",value:function(e){if(this.events){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o2&&void 0!==arguments[2]?arguments[2]:null,o=[];if(e)return this.eventHandlers.forEach((function(i,a){i.id!==n.id||!e.removeEventListener||i.type!==t||r&&i.func!==r||(e.removeEventListener(t,i.func),o.push(a))})),o.length&&l.default.pullAt(this.eventHandlers,o),this}},{key:"removeEventListeners",value:function(){var e=this;this.eventHandlers.forEach((function(t){e.id===t.id&&t.type&&t.obj&&t.obj.removeEventListener&&t.obj.removeEventListener(t.type,t.func)})),this.eventHandlers=[]}},{key:"removeAllEvents",value:function(e){var t=this;l.default.each(this.events._events,(function(n,r){l.default.each(n,(function(n){n&&t.id===n.id&&(e||n.internal)&&t.events.off(r,n)}))}))}},{key:"destroy",value:function(){this.removeEventListeners(),this.removeAllEvents()}},{key:"appendTo",value:function(e,t){return null==t||t.appendChild(e),this}},{key:"prependTo",value:function(e,t){if(t)if(t.firstChild)try{t.insertBefore(e,t.firstChild)}catch(n){console.warn(n),t.appendChild(e)}else t.appendChild(e);return this}},{key:"removeChildFrom",value:function(e,t){if(t&&t.contains(e))try{t.removeChild(e)}catch(e){console.warn(e)}return this}},{key:"ce",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=document.createElement(e);return t&&this.attr(r,t),this.appendChild(r,n),r}},{key:"appendChild",value:function(e,t){var n=this;return Array.isArray(t)?t.forEach((function(t){return n.appendChild(e,t)})):t instanceof HTMLElement||t instanceof Text?e.appendChild(t):t&&e.appendChild(this.text(t.toString())),this}},{key:"maskPlaceholder",value:function(e){var t=this;return e.map((function(e){return e instanceof RegExp?t.placeholderChar:e})).join("")}},{key:"placeholderChar",get:function(){var e;return(null===(e=this.component)||void 0===e?void 0:e.inputMaskPlaceholderChar)||"_"}},{key:"setInputMask",value:function(e,t,n){if(e&&t){var r=a.getInputMask(t,this.placeholderChar);this.defaultMask=r;try{e.mask&&e.mask.destroy(),e.mask=(0,c.default)({inputElement:e,mask:r,placeholderChar:this.placeholderChar,shadowRoot:this.root?this.root.shadowRoot:null})}catch(e){console.warn(e)}r.numeric&&e.setAttribute("pattern","\\d*"),n&&e.setAttribute("placeholder",this.maskPlaceholder(r))}}},{key:"t",value:function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o-1)}},{key:"addClass",value:function(e,t){if(!(e&&e instanceof HTMLElement))return this;var n=e.getAttribute("class");return null!=n&&n.includes(t)||e.setAttribute("class","".concat(n," ").concat(t)),this}},{key:"removeClass",value:function(e,t){if(!(e&&t&&e instanceof HTMLElement))return this;var n=e.getAttribute("class");return n&&(n=n.replace(new RegExp(" ".concat(t),"g"),""),e.setAttribute("class",n)),this}},{key:"empty",value:function(e){if(e)for(;e.firstChild;)e.removeChild(e.firstChild)}},{key:"evalContext",value:function(e){var t;return Object.assign({_:l.default,utils:a,util:a,user:i.GlobalFormio.getUser(),moment:s.default,instance:this,self:this,token:i.GlobalFormio.getToken({decode:!0}),config:this.root&&this.root.form&&this.root.form.config?this.root.form.config:null!==(t=this.options)&&void 0!==t&&t.formConfig?this.options.formConfig:{}},e,l.default.get(this.root,"options.evalContext",{}))}},{key:"interpolate",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return"function"==typeof e||!this.component.content&&!this.component.html||a.Evaluator.templateSettings.interpolate.test(e)||(e=a.translateHTMLTemplate(String(e),(function(e){return n.t(e)}))),a.interpolate(e,this.evalContext(t),r)}},{key:"evaluate",value:function(e,t,n,r){return a.evaluate(e,this.evalContext(t),n,r)}},{key:"hook",value:function(){var e=arguments[0];if(this.options&&this.options.hooks&&this.options.hooks[e])return this.options.hooks[e].apply(this,Array.prototype.slice.call(arguments,1));var t="function"==typeof arguments[arguments.length-1]?arguments[arguments.length-1]:null;return t?t(null,arguments[1]):arguments[1]}}],n&&p(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=h},85542:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n(30489),n(41539),n(74819),n(38880),n(12419),n(66992),n(78783),n(4129),n(33948),n(82526),n(41817),n(32165),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n(92222);var o=n(26729),i=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=a(t);if(n&&n.has(e))return n.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var l=i?Object.getOwnPropertyDescriptor(e,u):null;l&&(l.get||l.set)?Object.defineProperty(o,u,l):o[u]=e[u]}return o.default=e,n&&n.set(e,o),o}(n(82531));function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(a=function(e){return e?n:t})(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}function s(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return c(e)}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=d(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},f.apply(this,arguments)}function d(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=p(e)););return e}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(a,e);var t,n,r,o=(n=a,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=p(n);if(r){var o=p(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return s(this,e)});function a(){var e,t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};u(this,a);var l=r.loadLimit,s=void 0===l?1e3:l,d=r.eventsSafeInterval,v=void 0===d?300:d;h(c(n=o.call(this)),"onAny",(function(e){n.on("any",e)})),h(c(n),"offAny",(function(e){n.off("any",e)}));var y=function(){console.warn("There were more than ".concat(s," events emitted in ").concat(v," ms. It might be caused by events' infinite loop"),n.id)},m=i.observeOverload(y,{limit:s,delay:v});return n.emit=function(){for(var r,o,i=arguments.length,u=new Array(i),l=0;le.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:{};if(g(this,e),!(this instanceof e))return new e(t);if(this.base="",this.projectsUrl="",this.projectUrl="",this.projectId="",this.roleUrl="",this.rolesUrl="",this.roleId="",this.formUrl="",this.formsUrl="",this.formId="",this.submissionsUrl="",this.submissionUrl="",this.submissionId="",this.actionsUrl="",this.actionId="",this.actionUrl="",this.vsUrl="",this.vId="",this.vUrl="",this.query="",this.path=t,this.options=r,r.useSessionToken&&e.useSessionToken(r),r.hasOwnProperty("base")?this.base=r.base:e.baseUrl?this.base=e.baseUrl:"undefined"!=typeof window&&(this.base=window.location.href.match(/http[s]?:\/\/api./)[0]),!t)return this.projectUrl=e.projectUrl||"".concat(this.base,"/project"),this.projectsUrl="".concat(this.base,"/project"),this.projectId=!1,void(this.query="");r.hasOwnProperty("project")&&(this.projectUrl=r.project);var o=this.projectUrl||e.projectUrl,i=/(^|\/)(project)($|\/[^/]+)/,a=-1!==t.search(i);o&&this.base===o&&!a&&(this.noProject=!0,this.projectUrl=this.base),0!==t.indexOf("http")&&0!==t.indexOf("//")&&(t=this.base+t);var u=this.getUrlParts(t),l=[],s=u[1]+u[2],c=(t=u.length>3?u[3]:"").split("?");c.length>1&&(t=c[0],this.query="?".concat(c[1]));var f=function(e,r){n["".concat(e,"sUrl")]="".concat(r,"/").concat(e);var o=new RegExp("/".concat(e,"/([^/]+)"));return-1!==t.search(o)&&(l=t.match(o),n["".concat(e,"Url")]=l?r+l[0]:"",n["".concat(e,"Id")]=l.length>1?l[1]:"",r+=l[0]),r},d=function e(t,n,r){for(var o in t)if(t.hasOwnProperty(o)){var i=t[o];if(Array.isArray(i))e(i,n,!0);else{var a=f(i,n);n=r?n:a}}};if(!this.projectUrl||this.projectUrl===this.base)if(this.projectUrl||a||"Subdirectories"!==e.pathType)this.projectUrl=s;else{var p="^".concat(s.replace(/\//g,"\\/"),".[^/]+"),h=o.match(new RegExp(p));this.projectUrl=h?h[0]:s}var v=!1;if(e.pathType&&(v="Subdomains"!==e.pathType),!this.noProject){if(a)d(["project"],s),t=t.replace(i,"");else if(s===this.base){if(u.length>3&&t.split("/").length>1){var y=t.match(/.json/),m=t.split("/");y?this.projectUrl=s:(m.shift(),this.projectId=m.shift(),t="/".concat(m.join("/")),this.projectUrl="".concat(s,"/").concat(this.projectId))}}else u.length>2&&(u[2].split(".").length>2||s.includes("localhost"))&&!v&&(this.projectUrl=s,this.projectId=u[2].split(".")[0]);this.projectsUrl=this.projectsUrl||"".concat(this.base,"/project")}if(d(["role"],this.projectUrl),/(^|\/)(form)($|\/)/.test(t))d(["form",["submission","action","v"]],this.projectUrl);else{var b=new RegExp("/(submission|action|v)($|/.*)"),w=t.match(b);this.pathType=w&&w.length>1?w[1]:"",t=(t=t.replace(b,"")).replace(/\/$/,""),this.formsUrl="".concat(this.projectUrl,"/form"),this.formUrl=t?this.projectUrl+t:"",this.formId=t.replace(/^\/+|\/+$/g,"");var _=["submission","action","v"];for(var k in _)if(_.hasOwnProperty(k)){var O=_[k];this["".concat(O,"sUrl")]="".concat(this.projectUrl+t,"/").concat(O),this.pathType===O&&w.length>2&&w[2]&&(this["".concat(O,"Id")]=w[2].replace(/^\/+|\/+$/g,""),this["".concat(O,"Url")]=this.projectUrl+t+w[0])}}e.projectUrlSet||(e.projectUrl=this.projectUrl)}var t,o,i;return t=e,o=[{key:"delete",value:function(t,n){var o="".concat(t,"Id"),i="".concat(t,"Url");return this[o]?(e.cache={},this.makeRequest(t,this[i],"delete",null,n)):r.default.reject("Nothing to delete")}},{key:"index",value:function(t,n,r){var o="".concat(t,"Url");return(n=n||"")&&P(n)&&(n="?".concat(e.serialize(n.params))),this.makeRequest(t,this[o]+n,"get",null,r)}},{key:"save",value:function(t,n,r){var o="".concat(t,"Id"),i="".concat(t,"Url"),a=this[o]||n._id?"put":"post",u=this[o]?this[i]:this["".concat(t,"sUrl")];return this[o]||!n._id||"put"!==a||u.includes(n._id)||(u+="/".concat(n._id)),e.cache={},this.makeRequest(t,u+this.query,a,n,r)}},{key:"load",value:function(t,n,o){var i="".concat(t,"Id"),a="".concat(t,"Url");if(n&&P(n)&&(n=e.serialize(n.params)),n=n?this.query?"".concat(this.query,"&").concat(n):"?".concat(n):this.query,!this[i])return r.default.reject("Missing ".concat(i));var u=this[a]+n;return"form"!==t||isNaN(parseInt(this.vId))||0===parseInt(this.vId)||(u+=u.match(/\?/)?"&":"?",u+="formRevision=".concat(this.vId)),this.makeRequest(t,u,"get",null,o)}},{key:"makeRequest",value:function(){for(var t=arguments.length,n=new Array(t),r=0;r-1&&("read"===e.defaultPermission&&(a[i.read]=!0),"create"===e.defaultPermission&&(a[i.create]=!0,a[i.read]=!0),"write"===e.defaultPermission&&(a[i.create]=!0,a[i.read]=!0,a[i.update]=!0),"admin"===e.defaultPermission&&(a[i.create]=!0,a[i.read]=!0,a[i.update]=!0,a[i.delete]=!0))}))}})),a}))}},{key:"canSubmit",value:function(){var t=this;return this.userPermissions().then((function(n){return!n.create&&e.getUser()?t.userPermissions(null).then((function(t){return!!t.create&&(e.setUser(null),!0)})):n.create}))}},{key:"getUrlParts",value:function(t){return e.getUrlParts(t,this)}}],i=[{key:"useSessionToken",value:function(t){var n="".concat(t.namespace||e.namespace||"formio","Token"),r=localStorage.getItem(n);r&&(localStorage.removeItem(n),sessionStorage.setItem(n,r));var o="".concat(t.namespace||e.namespace||"formio","User"),i=localStorage.getItem(o);i&&(localStorage.removeItem(o),sessionStorage.setItem(o,i)),localStorage.setItem("useSessionToken",!0)}},{key:"loadProjects",value:function(t,n){return P(t=t||"")&&(t="?".concat(e.serialize(t.params))),e.makeStaticRequest("".concat(e.baseUrl,"/project").concat(t),"GET",null,n)}},{key:"getUrlParts",value:function(t,n){var r=n&&n.base?n.base:e.baseUrl,o="^(http[s]?:\\/\\/)";return r&&0===t.indexOf(r)?o+="(".concat(r.replace(/^http[s]?:\/\//,""),")"):o+="([^/]+)",o+="($|\\/.*)",t.match(new RegExp(o))}},{key:"serialize",value:function(e,t){var n,r=[];for(var o in e)e.hasOwnProperty(o)&&r.push("".concat(encodeURIComponent(o),"=").concat(encodeURIComponent((n=e[o],t?t(n):n))));return r.join("&")}},{key:"getRequestArgs",value:function(e,t,n,r,o,i){r=(r||"GET").toUpperCase(),i&&P(i)||(i={});var a={url:n,method:r,data:o||null,opts:i};return t&&(a.type=t),e&&(a.formio=e),a}},{key:"makeStaticRequest",value:function(t,n,r,o){var i=e.getRequestArgs(null,"",t,n,r,o),a=e.pluginWait("preRequest",i).then((function(){return e.pluginGet("staticRequest",i).then((function(t){return j(t)?e.request(i.url,i.method,i.data,i.opts.header,i.opts):t}))}));return e.pluginAlter("wrapStaticRequestPromise",a,i)}},{key:"makeRequest",value:function(t,n,r,o,i,a){if(!t)return e.makeStaticRequest(r,o,i,a);var u=e.getRequestArgs(t,n,r,o,i,a);u.opts=u.opts||{},u.opts.formio=t,u.opts.headers||(u.opts.headers={}),u.opts.headers=(0,f.default)(u.opts.headers,{Accept:"application/json","Content-type":"application/json"});var l=e.pluginWait("preRequest",u).then((function(){return e.pluginGet("request",u).then((function(t){return j(t)?e.request(u.url,u.method,u.data,u.opts.header,u.opts):t}))}));return e.pluginAlter("wrapRequestPromise",l,u)}},{key:"request",value:function(t,n,o,i,a){if(!t)return r.default.reject("No url provided");var u=e;n=(n||"GET").toUpperCase(),_(a)===_(!0)&&(a={ignoreCache:a}),a&&P(a)||(a={});var l=btoa(encodeURI(t));if(!a.ignoreCache&&"GET"===n&&u.cache.hasOwnProperty(l))return r.default.resolve(S(u.cache[l]));var s=i||new x(a.headers||{Accept:"application/json","Content-type":"application/json"}),c=u.getToken(a);c&&!a.noToken&&s.append("x-jwt-token",c);var f={};s.forEach((function(e,t){f[t]=e}));var d={method:n,headers:f,mode:"cors"};o&&(d.body=JSON.stringify(o)),((d=u.pluginAlter("requestOptions",d,t)).namespace||u.namespace)&&(a.namespace=d.namespace||u.namespace);var p=d.headers["x-jwt-token"],h=u.pluginAlter("wrapFetchRequestPromise",u.fetch(t,d),{url:t,method:n,data:o,opts:a}).then((function(e){if(!(e=u.pluginAlter("requestResponse",e,u,o)).ok){if(440===e.status)u.setToken(null,a),u.events.emit("formio.sessionExpired",e.body);else if(401===e.status)u.events.emit("formio.unauthorized",e.body);else if(416===e.status)u.events.emit("formio.rangeIsNotSatisfiable",e.body);else if(504===e.status)return r.default.reject(new Error("Network request failed"));return(e.headers.get("content-type").includes("application/json")?e.json():e.text()).then((function(e){return r.default.reject(e)}))}var i=e.headers.get("x-jwt-token"),l=!1;return"GET"!==n||p||!i||a.external||t.includes("token=")||t.includes("x-jwt-token=")||(console.warn("Token was introduced in request."),l=!0),e.status>=200&&e.status<300&&i&&""!==i&&!l&&u.setToken(i,a),204===e.status?{}:(e.headers.get("content-type").includes("application/json")?e.json():e.text()).then((function(t){var n=e.headers.get("content-range");if(n&&P(t)){if("*"!==(n=n.split("/"))[0]){var r=n[0].split("-");t.skip=Number(r[0]),t.limit=r[1]-r[0]+1}t.serverCount="*"===n[1]?n[1]:Number(n[1])}if(!a.getHeaders)return t;var o={};return e.headers.forEach((function(e,t){o[t]=e})),{result:t,headers:o}}))})).then((function(e){return a.getHeaders?e:("GET"===n&&(u.cache[l]=e),S(e))})).catch((function(e){return"Bad Token"===e&&(u.setToken(null,a),u.events.emit("formio.badToken",e)),e.message&&((e=new Error("Could not connect to API server (".concat(e.message,"): ").concat(t))).networkError=!0),"GET"===n&&delete u.cache[l],r.default.reject(e)}));return h}},{key:"token",get:function(){return e.tokens||(e.tokens={}),e.tokens.formioToken||""},set:function(t){e.tokens||(e.tokens={}),e.tokens.formioToken=t||""}},{key:"setToken",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0;t=t||"";var o="".concat((n="string"==typeof n?{namespace:n}:n||{}).namespace||e.namespace||"formio","Token");e.tokens||(e.tokens={});var i=localStorage.getItem("useSessionToken")?sessionStorage:localStorage;if(!t){n.fromUser||(n.fromToken=!0,e.setUser(null,n));try{i.removeItem(o)}catch(e){a.default.erase(o,{path:"/"})}return e.tokens[o]=t,r.default.resolve(null)}if(e.tokens[o]!==t){e.tokens[o]=t;try{i.setItem(o,t)}catch(e){a.default.set(o,t,{path:"/"})}}return this.currentUserResolved?e.currentUser(n.formio,n):r.default.resolve(null)}},{key:"getToken",value:function(t){var n="".concat((t="string"==typeof t?{namespace:t}:t||{}).namespace||e.namespace||"formio","Token"),r=t.decode?"".concat(n,"Decoded"):n;if(e.tokens||(e.tokens={}),e.tokens[r])return e.tokens[r];try{var o=localStorage.getItem("useSessionToken")?sessionStorage.getItem(n):localStorage.getItem(n);return e.tokens[n]=o||"",t.decode?(e.tokens[r]=e.tokens[n]?(0,p.default)(e.tokens[n]):{},e.tokens[r]):e.tokens[n]}catch(t){return e.tokens[n]=a.default.get(n),e.tokens[n]}}},{key:"setUser",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r="".concat(n.namespace||e.namespace||"formio","User"),o=localStorage.getItem("useSessionToken")?sessionStorage:localStorage;if(!t){n.fromToken||(n.fromUser=!0,e.setToken(null,n)),e.events.emit("formio.user",null);try{return o.removeItem(r)}catch(e){return a.default.erase(r,{path:"/"})}}try{o.setItem(r,JSON.stringify(t))}catch(e){a.default.set(r,JSON.stringify(t),{path:"/"})}e.events.emit("formio.user",t)}},{key:"getUser",value:function(t){var n="".concat((t=t||{}).namespace||e.namespace||"formio","User");try{return JSON.parse((localStorage.getItem("useSessionToken")?sessionStorage:localStorage).getItem(n)||null)}catch(e){return JSON.parse(a.default.get(n))}}},{key:"setBaseUrl",value:function(t){e.baseUrl=t,e.projectUrlSet||(e.projectUrl=t)}},{key:"getBaseUrl",value:function(){return e.baseUrl}},{key:"setApiUrl",value:function(t){return e.setBaseUrl(t)}},{key:"getApiUrl",value:function(){return e.getBaseUrl()}},{key:"setAppUrl",value:function(t){console.warn("Formio.setAppUrl() is deprecated. Use Formio.setProjectUrl instead."),e.projectUrl=t,e.projectUrlSet=!0}},{key:"setProjectUrl",value:function(t){e.projectUrl=t,e.projectUrlSet=!0}},{key:"setAuthUrl",value:function(t){e.authUrl=t}},{key:"getAppUrl",value:function(){return console.warn("Formio.getAppUrl() is deprecated. Use Formio.getProjectUrl instead."),e.projectUrl}},{key:"getProjectUrl",value:function(){return e.projectUrl}},{key:"clearCache",value:function(){e.cache={}}},{key:"noop",value:function(){}},{key:"identity",value:function(e){return e}},{key:"deregisterPlugin",value:function(t){var n=e.plugins.length;return e.plugins=e.plugins.filter((function(n){return n!==t&&n.__name!==t||((n.deregister||e.noop).call(t,e),!1)})),n!==e.plugins.length}},{key:"registerPlugin",value:function(t,n){var r=e;r.plugins.push(t),r.plugins.sort((function(e,t){return(t.priority||0)-(e.priority||0)})),t.__name=n,(t.init||r.noop).call(t,r)}},{key:"getPlugin",value:function(t){var n,r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=m(e))){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}(e.plugins);try{for(r.s();!(n=r.n()).done;){var o=n.value;if(o.__name===t)return o}}catch(e){r.e(e)}finally{r.f()}return null}},{key:"pluginWait",value:function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i1?n-1:0),i=1;i2?r-2:0),i=2;i1&&(e[n[0]]=n[1]&&decodeURIComponent(n[1]))})),t.forEach((function(t){(n=t.split("=")).length>1?e[n[0]]=n[1]&&decodeURIComponent(n[1]):0===t.indexOf("/")&&(e.paths=t.substr(1).split("/"))})),e}},{key:"oAuthCurrentUser",value:function(t,n){return e.currentUser(t,{external:!0,headers:{Authorization:"Bearer ".concat(n)}})}},{key:"samlInit",value:function(t){t=t||{};var n=e.pageQuery();if(n.saml){e.setUser(null);var r=e.setToken(n.saml),o=window.location.toString();return o=o.substring(0,o.indexOf("?")),window.location.hash&&(o+=window.location.hash),window.history.replaceState({},document.title,o),r}t.relay||(t.relay=window.location.href);var i=e.authUrl||e.projectUrl;return window.location.href="".concat(i,"/saml/sso?relay=").concat(encodeURI(t.relay)),!1}},{key:"oktaInit",value:function(t){if(t=t||{},void 0!==("undefined"==typeof OktaAuth?"undefined":_(OktaAuth))&&(t.OktaAuth=OktaAuth),void 0===_(t.OktaAuth)){var n="Cannot find OktaAuth. Please include the Okta JavaScript SDK within your application. See https://developer.okta.com/code/javascript/okta_auth_sdk for an example.";return console.warn(n),r.default.reject(n)}return new r.default((function(n,r){var o=t.OktaAuth;delete t.OktaAuth;var i=new o(t);i.tokenManager.get("accessToken").then((function(o){o?n(e.oAuthCurrentUser(t.formio,o.accessToken)):location.hash?i.token.parseFromUrl().then((function(r){i.tokenManager.add("accessToken",r),n(e.oAuthCurrentUser(t.formio,r.accessToken))})).catch((function(e){console.warn(e),r(e)})):(i.token.getWithRedirect({responseType:"token",scopes:t.scopes}),n(!1))})).catch((function(e){r(e)}))}))}},{key:"ssoInit",value:function(t,n){switch(t){case"saml":return e.samlInit(n);case"okta":return e.oktaInit(n);default:return console.warn("Unknown SSO type"),r.default.reject("Unknown SSO type")}}},{key:"requireLibrary",value:function(t,n,o,i,a){if(!e.libraries.hasOwnProperty(t)){e.libraries[t]={},e.libraries[t].ready=new r.default((function(n,r){e.libraries[t].resolve=n,e.libraries[t].reject=r}));var u="".concat(t,"Callback");i||window[u]||(window[u]=function(){return e.libraries[t].resolve()});var l=(0,s.default)(window,n);if(l)e.libraries[t].resolve(l);else if((o=Array.isArray(o)?o:[o]).forEach((function(n){var r={},o="";switch("string"==typeof n&&(n={type:"script",src:n}),n.type){case"script":o="script",r={src:n.src,type:"text/javascript",defer:!0,async:!0,referrerpolicy:"origin"};break;case"styles":o="link",r={href:n.src,rel:"stylesheet"}}var i=document.createElement(o);if(i.setAttribute)for(var u in r)i.setAttribute(u,r[u]);a&&i.addEventListener("load",(function(){e.libraries[t].loaded=!0,a(e.libraries[t].ready)}));var l=document.head;l&&l.appendChild(i)})),i)var c=setInterval((function(){var r=(0,s.default)(window,n);r&&(clearInterval(c),e.libraries[t].resolve(r))}),200)}var f=e.libraries[t];return a&&f.loaded?a(f.ready):f.ready}},{key:"libraryReady",value:function(t){return e.libraries.hasOwnProperty(t)&&e.libraries[t].ready?e.libraries[t].ready:r.default.reject("".concat(t," library was not required."))}},{key:"addToGlobal",value:function(t){"object"!==_(t)||t.Formio||(t.Formio=e)}},{key:"setPathType",value:function(t){"string"==typeof t&&(e.pathType=t)}},{key:"getPathType",value:function(){return e.pathType}},{key:"rulesEntities",get:function(){return{ValueSources:e.ValueSources,Conjunctions:e.Conjunctions,Operators:e.Operators,Transformers:e.Transformers,QuickRules:e.QuickRules,Rules:e.Rules}}},{key:"GlobalFormio",get:function(){return void 0!==n.g&&n.g.Formio?n.g.Formio:"undefined"!=typeof window&&window.Formio?window.Formio:e}}],o&&w(t.prototype,o),i&&w(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();(E="currentUserResolved")in(C=M)?Object.defineProperty(C,E,{value:true,enumerable:!0,configurable:!0,writable:!0}):C[E]=true,M.libraries={},M.Promise=r.default,M.fetch=O,M.Headers=x,M.baseUrl="https://api.form.io",M.projectUrl=M.baseUrl,M.authUrl="",M.projectUrlSet=!1,M.plugins=[],M.cache={},M.Providers=u.default,M.version="4.14.11-rc.13",M.pathType="",M.events=new i.default,M.cdn=new h.default,void 0!==n.g&&M.addToGlobal(n.g),"undefined"!=typeof window&&M.addToGlobal(window);var A=M.GlobalFormio;t.GlobalFormio=A;var R=M;t.default=R},59671:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n(41539),n(12419),n(82526),n(41817),n(32165),n(66992),n(78783),n(33948),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n(30489);var o=u(n(34558)),i=u(n(91459)),a=u(n(96486));function u(e){return e&&e.__esModule?e:{default:e}}function l(e,t){for(var n=0;n\n
  • < 28 bits = Very Weak;
  • \n
  • 28 - 35 bits = Weak; should keep out most people;
  • \n
  • 36 - 59 bits = Reasonable; fairly secure passwords for network and company passwords;
  • \n
  • 60 - 127 bits = Strong; can be good for guarding financial information;
  • \n
  • > 128 bits = Very Strong; often overkill;
  • \n\n",mask:!1,spellcheck:!0,tableView:!1,delimiter:!1,requireDecimal:!1,inputFormat:"plain",validate:{required:!0,min:1,max:128},key:"maxEntropy",type:"number",input:!0},{label:"Style",tooltip:"Specifies the backgounf color style using bootstrap classes",tableView:!0,data:{values:[{label:"Danger",value:"danger"},{label:"Warning",value:"warning"},{label:"Info",value:"info"},{label:"Success",value:"success"}]},selectThreshold:.3,validate:{onlyAvailableItems:!1},key:"style",type:"select",indexeddb:{filter:{}},input:!0},{label:"Color",placeholder:"#0079c0",tooltip:"Specifies a color of the indicator element",tableView:!0,key:"color",type:"textfield",input:!0}]},{label:"Update On",tableView:!0,data:{values:[{label:"Strength Level Change",value:"levelChange"},{label:"Entropy Change",value:"entropyChange"}]},selectThreshold:.3,validate:{onlyAvailableItems:!1},key:"updateOn",type:"select",indexeddb:{filter:{}},input:!0},{label:"Rules",reorder:!1,addAnotherPosition:"bottom",layoutFixed:!1,enableRowGroups:!1,initEmpty:!1,tableView:!1,defaultValue:[{}],key:"rulesSettings",type:"datagrid",input:!0,components:[{label:"Name",tableView:!0,data:{values:[{label:"Length",value:"length"},{label:"Lower Case",value:"lowerCase"},{label:"Upper Case",value:"upperCase"},{label:"Numeric",value:"numeric"},{label:"Symbols",value:"symbols"}]},selectThreshold:.3,validate:{required:!0,onlyAvailableItems:!1},key:"name",type:"select",indexeddb:{filter:{}},input:!0},{label:"Error Message",tableView:!0,key:"errorMessage",type:"textfield",input:!0},{label:"Required",tableView:!1,key:"required",type:"checkbox",input:!0,defaultValue:!1}]},{label:"Custom Rules",tableView:!1,rowDrafts:!1,key:"customRules",type:"editgrid",input:!0,components:[{label:"Name",tableView:!0,validate:{required:!0},key:"name",type:"textfield",input:!0},o.default.javaScriptValue("Check","check","",1100,'

    Example:

    valid = !value.includes(data.email) ? true : "Password should not be variation of the email";

    ',"","",!0),{label:"Increase Characters Pool Size",description:"Set this to amount of characters that may be used in the password if there is a specific group of characters is used.\nE.g., if your validation checks if there is any numeric symbol in the password, then you should set it to 10 (there are 10 possible numbers).\n",mask:!1,spellcheck:!0,tableView:!1,delimiter:!1,requireDecimal:!1,inputFormat:"plain",key:"increaseCharactersPoolSize",type:"number",input:!0},{label:"Required",tooltip:"Check if this check is required to proceed",tableView:!1,key:"required",type:"checkbox",input:!0,defaultValue:!1}]},o.default.javaScriptValue("Is Valid","isValid","",1100,"

    Example:

    valid = entropy > maxEntropy / 2 ;

    ","","entropyCurrent entropy bits of the password.levelCurrent strength level of the password.",!0),{label:"Required",description:"Check this if you don't want to allow submitting password which does not correspond to the minimal strength requirements.",tableView:!1,key:"required",type:"checkbox",input:!0,defaultValue:!1},{label:"Black List",tooltip:"Add words to search in the password. If there are some words from that list were found, the entropy of the password will be recalculated.\n",tableView:!0,multiple:!0,key:"blackList",type:"textfield",input:!0},o.default.javaScriptValue("Custom Blacklisted Words","customBlackListedWords","",1100,"

    Example:

    values = [ data.name, data.dataOfBirth, data.favoriteColor ];

    ","","",!0),{label:"Disable Blacklisted Words",tooltip:"Check if you want to disable submitting passwords containing words form the clack list",tableView:!1,key:"disableBlacklistedWords",type:"checkbox",input:!0,defaultValue:!1},{label:"Location",hideLabel:!1,tableView:!1,key:"location",type:"container",input:!0,components:[{label:"Insert",tooltip:"Specifies where the indicator will be inserted: before or aftre an element",tableView:!0,data:{values:[{label:"Before",value:"before"},{label:"After",value:"after"}]},selectThreshold:.3,validate:{onlyAvailableItems:!1},key:"insert",type:"select",indexeddb:{filter:{}},input:!0},{label:"Selector",placeholder:"[ref='element']",description:"Specifies the selector of the element which will be used as a reference to insert the indicator template",tableView:!0,key:"selector",type:"textfield",input:!0}]},{label:"Template",editor:"ace",tableView:!0,key:"template",type:"textarea",input:!0,as:"html"}];t.default=i},16996:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n(12419),n(74819),n(38880),n(82526),n(41817),n(32165),n(66992),n(78783),n(33948),n(91038),n(47042),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n(2707),n(74916),n(68309),n(44914),n(15306),n(24603),n(39714),n(41539),n(54747),n(92222),n(69600),n(30489);var o=u(n(96486)),i=u(n(59671)),a=u(n(10902));function u(e){return e&&e.__esModule?e:{default:e}}function l(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n/?~]/.test(e)||"Value must contain symbols"},increaseCharactersPoolSize:32}}}},{key:"charactersPoolLength",get:function(){return this._charactersPoolLength},set:function(e){this._charactersPoolLength=e}},{key:"level",get:function(){return this._level||this.getLevel()},set:function(e){this._level=e}},{key:"entropy",get:function(){return this._entropy},set:function(e){var t=this.getLevel(),n="entropyChange"===this.settings.updateOn&&this._entropy!==e;this._entropy=e,this.level=this.getLevel(),("levelChange"===this.settings.updateOn&&t.name!==this.level.name||n)&&this.updateView()}},{key:"dictionarySize",get:function(){return this.settings.dictionarySize||171476}},{key:"template",get:function(){return this.settings.template}},{key:"tooltip",get:function(){var e,t;return(null===(e=this.level)||void 0===e?void 0:e.tooltip)||"".concat(null===(t=this.level)||void 0===t?void 0:t.name," strongness")}},{key:"rulesSettings",get:function(){return this.settings.rulesSettings||[]}},{key:"customRules",get:function(){return this.settings.customRules||[]}},{key:"log2",value:function(e){return"function"==typeof Math.log2?Math.log2(e):Math.log(e)*Math.LOG2E}},{key:"calculatePasswordEntropy",value:function(e,t){return e&&t?this.log2(Math.pow(t,e)):0}},{key:"calculatePasswordEntropyWords",value:function(e){return this.dictionarySize?this.log2(this.dictionarySize)*e:0}},{key:"render",value:function(){var e=this.component.interpolate(this.template,{entropy:this.entropy,maxEntropy:this.maxEntropy,level:this.level,levelName:this.level.name.replace(" ","-").toLowerCase(),levels:this.levels,readOnly:this.component.options.readOnly,pristine:this.component.pristine,t:this.t.bind(this),tooltip:this.tooltip});return this.component.sanitize(e)}},{key:"checkBlackList",value:function(e){var t=l(this.settings.blackList),n=this.settings.customBlacklistedWords;n&&"string"==typeof n&&(n=this.evaluate(n,this.component.evalContext({value:e}),"values"))&&n.length&&t.push.apply(t,l(n));for(var r=e,o=[],i=0;i=Math.round(this.maxEntropy/2)}},{key:"handleRuleCheckResult",value:function(e,t,n,r){if(!0!==e)r.push({validation:t.name,message:n,level:t.required?"error":"warning"});else if(t.increaseCharactersPoolSize)return t.increaseCharactersPoolSize;return 0}},{key:"performChecks",value:function(e){var t=this,n=[],r=0;return this.rulesSettings.forEach((function(i){if(t.rules[i.name]){var a=o.default.merge({},t.rules[i.name],i),u=a.check(e,i.options||{}),l=i.message||u;r+=t.handleRuleCheckResult(u,a,l,n)}})),this.customRules.forEach((function(o){if(o.check&&"string"==typeof o.check){var i=t.evaluate(o.check,t.component.evalContext({value:e}),"valid"),a="string"==typeof i?i:"Password does not meet ".concat(o.name," validation");r+=t.handleRuleCheckResult(i,o,a,n)}})),{charactersPoolSize:r,errors:n}}},{key:"checkValidity",value:function(e){var t,n=e.length,r=this.performChecks(e),o=r.charactersPoolSize,i=r.errors;this.errors=i;var a=this.calculatePasswordEntropy(n,o),u=null!==(t=this.settings.blackList)&&void 0!==t&&t.length||this.settings.customBlacklistedWords?this.checkBlackList(e):null;return u&&!0!==u?(this.handleBlackListCheckResult(u),this.entropy=Math.min(a,u.entropy)):this.entropy=a,this.isValid()||this.errors.push({message:"Password is not strong enough",level:this.settings.required?"error":"warning"}),!this.errors.length}},{key:"handleBlackListCheckResult",value:function(e){var t=e.blacklistedWords,n=this.settings.disableBlacklistedWords,r="Password ".concat(n?"must":"should"," not include common words: ").concat(t.join(", ")),o={name:"blacklist",required:n};this.handleRuleCheckResult(!1,o,r,this.errors)}},{key:"attach",value:function(e){var t=this;f(v(d.prototype),"attach",this).call(this,e);var n=this.component.ce("div",{ref:"passwordStrengthIndicator"});this.insertContainer(e,n)||this.component.append(n),this._element=n,this.component.on("redraw",(function(){return t.updateView()})),this.component.on("componentError",(function(){return t.updateView()})),this.updateView()}},{key:"insertContainer",value:function(e,t){var n,r;if(!e||!t)return!1;var o,i=null===(n=this.settings.location)||void 0===n?void 0:n.insert,a=null===(r=this.settings.location)||void 0===r?void 0:r.selector;if(a&&(o=e.querySelector(a)),!o)return console.warn("No elements found using selector: ".concat(a)),!1;var u=o.parentNode;switch(i){case"after":return!!u&&(u.insertBefore(t,o.nextSibling||null),!0);case"before":return!!u&&(u.insertBefore(t,o),!0);default:return console.warn("Unknown insert option: ".concat(i)),!1}}},{key:"destroy",value:function(){f(v(d.prototype),"destroy",this).call(this)}},{key:"getLevel",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.entropy,t=this.levels[0],n=t.maxEntropy;if(e<=t.maxEntropy)return t;if(e>=this.maxEntropy)return this.levels[this.levels.length-1];for(var r=1;rn&&e<=o.maxEntropy)return o;n=o.maxEntropy}return t}},{key:"updateView",value:function(){if(this.element){var e=this.render();this.element.innerHTML=e}}}],r=[{key:"info",get:function(){return{supportedComponents:["password"],name:"passwordStrength",components:a.default,label:"Password Strength",defaultSettings:{rulesSettings:[{name:"length",required:!1,message:"Value should be longer"},{name:"upperCase",required:!1,message:"Value should have uppercase letters"},{name:"numeric",required:!1,message:"Value should have numeric symbols"},{name:"lowerCase",required:!1,message:"Value should be have lowercase letters"},{name:"symbols",required:!1,message:"Value should have symbols"}],updateOn:"levelChange",required:!0,levels:[{name:"Low",maxEntropy:28,style:"danger"},{name:"Medium",maxEntropy:45,style:"warning"},{name:"High",maxEntropy:59,style:"info"},{name:"Very High",maxEntropy:85,style:"success"}],blackList:[],template:"\n
    \n {% if (!ctx.readOnly && !ctx.pristine) { %}\n
    \n {% } %}\n \n ",location:{insert:"after",selector:'[ref="element"]'}}}}}],n&&c(t.prototype,n),r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),d}(i.default);t.default=y},24951:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.editForms=t.default=void 0,n(21249),n(68309);var r,o=(r=n(16996))&&r.__esModule?r:{default:r},i=[o.default.info].map((function(e){var t=e.components,n=e.name;return{type:"form",key:"settings",display:"form",input:!0,components:t,defaultValue:{data:e.defaultSettings},customConditional:function(e){return e.row.name.value===n}}}));t.editForms=i;var a={passwordStrength:o.default};t.default=a},39086:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(64430)),o=u(n(61550)),i=u(n(3248)),a=u(n(96486));function u(e){return e&&e.__esModule?e:{default:e}}function l(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function x(e){return function(e){if(Array.isArray(e))return P(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||j(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function j(e,t){if(e){if("string"==typeof e)return P(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?P(e,t):void 0}}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:{};return u.default.defaultsDeep(e,this.defaultSchema)}},{key:"ready",get:function(){return i.default.resolve(this)}},{key:"labelInfo",get:function(){var e={};e.hidden=this.labelIsHidden(),e.className="",e.labelPosition=this.component.labelPosition,e.tooltipClass="".concat(this.iconClass("question-sign")," text-muted");var t=this.parent&&this.parent.form&&"pdf"===this.parent.form.display&&this.options.readOnly;return this.hasInput&&this.component.validate&&(0,c.boolValue)(this.component.validate.required)&&!t&&(e.className+=" field-required"),e.hidden&&(e.className+=" control-label--hidden"),this.info.attr.id&&(e.for=this.info.attr.id),e}},{key:"init",value:function(){var e,t=this;this.disabled=this.shouldDisabled,this._visible=this.conditionallyVisible(null,null),null!==(e=this.component.addons)&&void 0!==e&&e.length&&this.component.addons.forEach((function(e){return t.createAddon(e)}))}},{key:"createAddon",value:function(e){var t,n=e.name;if(n){var r=(null===(t=e.settings)||void 0===t?void 0:t.data)||{},o=v.default[n],i=null;if(o){var a=o.info.supportedComponents;null!=a&&a.length&&-1===a.indexOf(this.component.type)?console.warn("Addon ".concat(n," does not support component of type ").concat(this.component.type,".")):(i=new o(r,this),this.addons.push(i))}return i}}},{key:"destroy",value:function(){C(T(w.prototype),"destroy",this).call(this),this.detach(),this.addons.forEach((function(e){return e.destroy()}))}},{key:"shouldDisabled",get:function(){return this.options.readOnly||this.component.disabled||this.options.hasOwnProperty("disabled")&&this.options.disabled[this.key]}},{key:"isInputComponent",get:function(){return!this.component.hasOwnProperty("input")||this.component.input}},{key:"allowData",get:function(){return this.hasInput}},{key:"hasInput",get:function(){return this.isInputComponent||this.refs.input&&this.refs.input.length}},{key:"defaultSchema",get:function(){return w.schema()}},{key:"key",get:function(){return u.default.get(this.component,"key","")}},{key:"parentVisible",get:function(){return this._parentVisible},set:function(e){this._parentVisible=e}},{key:"parentDisabled",get:function(){return this._parentDisabled},set:function(e){this._parentDisabled=e}},{key:"visible",get:function(){return!!(this.builderMode||this.previewMode||this.options.showHiddenFields)||(!this.options.hide||!this.options.hide[this.component.key])&&(!(!this.options.show||!this.options.show[this.component.key])||this._visible&&this._parentVisible)},set:function(e){this._visible!==e&&(this._visible=e,this.clearOnHide(),this.redraw())}},{key:"currentForm",get:function(){return this._currentForm},set:function(e){this._currentForm=e}},{key:"fullMode",get:function(){return"full"===this.options.attachMode}},{key:"builderMode",get:function(){return"builder"===this.options.attachMode}},{key:"calculatedPath",get:function(){return console.error("component.calculatedPath was deprecated, use component.path instead."),this.path}},{key:"labelPosition",get:function(){return this.component.labelPosition}},{key:"labelWidth",get:function(){var e=this.component.labelWidth;return e>=0?e:30}},{key:"labelMargin",get:function(){var e=this.component.labelMargin;return e>=0?e:3}},{key:"isAdvancedLabel",get:function(){return["left-left","left-right","right-left","right-right"].includes(this.labelPosition)}},{key:"labelPositions",get:function(){return this.labelPosition.split("-")}},{key:"skipInEmail",get:function(){return!1}},{key:"rightDirection",value:function(e){return!this.options.condensedMode&&"right"===e}},{key:"getLabelInfo",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.rightDirection(this.labelPositions[0]),n="left"===this.labelPositions[0]||e,r=this.rightDirection(this.labelPositions[1]),o="";if(this.component.hideLabel){var i=this.labelWidth+this.labelMargin;o=t?"margin-right: ".concat(i,"%"):"",o=n?"margin-left: ".concat(i,"%"):""}var a="\n flex: ".concat(this.labelWidth,";\n ").concat(t?"margin-left":"margin-right",": ").concat(this.labelMargin,"%;\n "),u="\n flex: ".concat(100-this.labelWidth-this.labelMargin,";\n ").concat(o,";\n ").concat(this.component.hideLabel?"max-width: ".concat(100-this.labelWidth-this.labelMargin):"",";\n ");return{isRightPosition:t,isRightAlign:r,labelStyles:a,contentStyles:u}}},{key:"getModifiedSchema",value:function(e,t,n){var r=this,o={};return t?(u.default.each(e,(function(e,i){if(!u.default.isArray(e)&&u.default.isObject(e)&&t.hasOwnProperty(i)){var a=r.getModifiedSchema(e,t[i],!0);u.default.isEmpty(a)||(o[i]=a)}else u.default.isArray(e)?0===e.length||u.default.isEqual(e,t[i])||(o[i]=e):(!n&&"type"===i||!n&&"key"===i||!n&&"label"===i||!n&&"input"===i||!n&&"tableView"===i||""!==e&&!t.hasOwnProperty(i)||""!==e&&e!==t[i]||t[i]&&e!==t[i])&&(o[i]=e)})),o):e}},{key:"schema",get:function(){return(0,c.fastCloneDeep)(this.getModifiedSchema(u.default.omit(this.component,"id"),this.defaultSchema))}},{key:"isInDataGrid",get:function(){return this.inDataGrid}},{key:"t",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return"";if(e in m.default&&n._userInput)return e;n.data=this.rootValue,n.row=this.data,n.component=this.component;for(var r=arguments.length,o=new Array(r>2?r-2:0),i=2;i");return t?this.t(t,{_userInput:!0}).replace(/"/g,"""):""}},{key:"isHtmlRenderMode",value:function(){return"html"===this.options.renderMode}},{key:"renderTemplate",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,o=r||this.options.renderMode||"form";n.component=this.component,n.self=this,n.options=this.options,n.readOnly=this.options.readOnly,n.iconClass=this.iconClass.bind(this),n.size=this.size.bind(this),n.t=this.t.bind(this),n.transform=this.transform,n.id=n.id||this.id,n.key=n.key||this.key,n.value=n.value||this.dataValue,n.disabled=this.disabled,n.builder=this.builderMode,n.render=function(){return 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"),t.renderTemplate.apply(t,arguments)},n.label=this.labelInfo,n.tooltip=this.getFormattedTooltip(this.component.tooltip);var i=["".concat(e,"-").concat(this.component.type,"-").concat(this.key),"".concat(e,"-").concat(this.component.type),"".concat(e,"-").concat(this.key),"".concat(e)];return this.hook("render".concat(e.charAt(0).toUpperCase()+e.substring(1,e.length)),this.interpolate(this.getTemplate(i,o),n),n,o)}},{key:"sanitize",value:function(e,t,n){var r;return!this.shouldSanitizeValue&&!t||this.options.pdf&&!t?e:c.sanitize(e,{sanitizeConfig:u.default.merge((null===(r=this.options)||void 0===r?void 0:r.sanitizeConfig)||{},n||{})})}},{key:"renderString",value:function(e,t){return e?this.interpolate(e,t):""}},{key:"performInputMapping",value:function(e){return e}},{key:"widget",get:function(){var e,t=this.component.widget;return t&&null!==(e=this.root)&&void 0!==e&&e.shadowRoot&&(t.shadowRoot=this.root.shadowRoot),t&&h.default[t.type]?new h.default[t.type](t,this.component,this):null}},{key:"getBrowserLanguage",value:function(){var e,t=window.navigator,n=["language","browserLanguage","systemLanguage","userLanguage"];if(Array.isArray(t.languages))for(var r=0;r [ref="'.concat(n,'"]'):'[ref="'.concat(n,'"]');o&&r.startsWith("single")?this.refs[n]=e.querySelector(i):this.refs[n]=e.querySelectorAll(i)}}},{key:"setOpenModalElement",value:function(e){this.componentModal.setOpenModalElement(e||this.getModalPreviewTemplate())}},{key:"getModalPreviewTemplate",value:function(){var e="password"===this.component.type?this.dataValue.replace(/./g,"•"):this.dataValue,t=this.error?{level:"error",message:this.error.message}:"";return this.renderTemplate("modalPreview",{previewText:this.getValueAsString(e,{modalPreview:!0})||this.t("Click to set value"),messages:t&&this.renderTemplate("message",t)})}},{key:"build",value:function(e){return e=e||this.element,this.empty(e),this.setContent(e,this.render()),this.attach(e)}},{key:"hasModalSaveButton",get:function(){return!0}},{key:"render",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Unknown component: ".concat(this.component.type),t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.visible;return this.rendered=!0,this.builderMode||this.previewMode||!this.component.modalEdit?this.renderTemplate("component",{visible:n,id:this.id,classes:this.className,styles:this.customStyle,children:e},t):p.default.render(this,{visible:n,showSaveButton:this.hasModalSaveButton,id:this.id,classes:this.className,styles:this.customStyle,children:e},t)}},{key:"attachTooltips",value:function(e){var t=this;null==e||e.forEach((function(e,n){if(e){var r=e.getAttribute("data-tooltip"),o=e.getAttribute("data-title"),i=t.interpolate(o||r).replace(/(?:\r\n|\r|\n)/g,"
    ");t.tooltips[n]=(0,a.default)(e,{allowHTML:!0,trigger:"mouseenter click focus",placement:"right",zIndex:1e4,interactive:!0,content:t.t(i,{_userInput:!0})})}}))}},{key:"createComponentModal",value:function(e,t,n){return new p.default(this,e,t,n)}},{key:"attach",value:function(e){if(!this.builderMode&&!this.previewMode&&this.component.modalEdit){var t=!!this.componentModal&&this.componentModal.isOpened,n=t?this.componentModal.currentValue:this.dataValue,r=this.componentModal&&t?this.componentModal.openModalTemplate:null;this.componentModal=this.createComponentModal(e,t,n),this.setOpenModalElement(r)}this.attached=!0,this.element=e,e.component=this,this.element.id&&(this.id=this.element.id,this.component.id=this.id),this.loadRefs(e,{messageContainer:"single",tooltip:"multiple"}),this.attachTooltips(this.refs.tooltip),this.attachLogic(),this.autofocus(),this.hook("attachComponent",e,this);var o=this.component.type;return o&&this.hook("attach".concat(o.charAt(0).toUpperCase()+o.substring(1,o.length)),e,this),this.restoreFocus(),this.addons.forEach((function(t){return t.attach(e)})),i.default.resolve()}},{key:"restoreFocus",value:function(){var e,t,n;(null===(e=this.root)||void 0===e||null===(t=e.focusedComponent)||void 0===t?void 0:t.path)===this.path&&(this.loadRefs(this.element,{input:"multiple"}),this.focus(null===(n=this.root.currentSelection)||void 0===n?void 0:n.index),this.restoreCaretPosition())}},{key:"addShortcut",value:function(e,t){e&&this.root&&this.root!==this&&(t||(t=this.component.shortcut),this.root.addShortcut(e,t))}},{key:"removeShortcut",value:function(e,t){e&&this.root!==this&&(t||(t=this.component.shortcut),this.root.removeShortcut(e,t))}},{key:"detach",value:function(){this.refs={},this.removeEventListeners(),this.detachLogic(),this.tooltip&&this.tooltip.destroy()}},{key:"checkRefresh",value:function(e,t,n){var r=u.default.get(t,"instance.path",!1);r&&this.path===r||("data"===e?this.refresh(this.data,t,n):r&&(0,c.getComponentPath)(t.instance)===e&&t&&t.instance&&this.inContext(t.instance)&&this.refresh(t.value,t,n))}},{key:"checkRefreshOn",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e=e||[],!n.noRefresh){!e.length&&n.changed&&(e=[n.changed]);var r=n.fromBlur?this.component.refreshOnBlur:this.component.refreshOn||this.component.redrawOn;r&&(Array.isArray(r)?r.forEach((function(r){return e.forEach((function(e){return t.checkRefresh(r,e,n)}))})):e.forEach((function(e){return t.checkRefresh(r,e,n)})))}}},{key:"refresh",value:function(e){this.hasOwnProperty("refreshOnValue")?this.refreshOnChanged=!u.default.isEqual(e,this.refreshOnValue):this.refreshOnChanged=!0,this.refreshOnValue=(0,c.fastCloneDeep)(e),this.refreshOnChanged&&(this.component.clearOnRefresh&&this.setValue(null),this.triggerRedraw())}},{key:"inContext",value:function(e){if(e.data===this.data)return!0;for(var t=this.parent;t;){if(t.data===e.data)return!0;t=t.parent}return!1}},{key:"viewOnly",get:function(){return this.options.readOnly&&this.options.viewAsHtml}},{key:"createViewOnlyElement",value:function(){return this.element=this.ce("dl",{id:this.id}),this.element&&(this.element.component=this),this.element}},{key:"defaultViewOnlyValue",get:function(){return"-"}},{key:"getWidgetValueAsString",value:function(e,t){var n=this,r=!this.refs.input||!this.refs.input[0]||!this.refs.input[0].widget;if(!e||r)return this.widget&&e?this.widget.getValueAsString(e):e;if(Array.isArray(e)){var o=[];return e.forEach((function(e,r){var i=n.refs.input[r]&&n.refs.input[r].widget;i&&o.push(i.getValueAsString(e,t))})),o}return this.refs.input[0].widget.getValueAsString(e,t)}},{key:"getValueAsString",value:function(e,t){if(!e)return"";if(e=this.getWidgetValueAsString(e,t),Array.isArray(e))return e.join(", ");if(u.default.isPlainObject(e))return JSON.stringify(e);if(null==e)return"";var n=e.toString();return this.sanitize(n)}},{key:"getView",value:function(e,t){return this.component.protected?"--- PROTECTED ---":this.getValueAsString(e,t)}},{key:"updateItems",value:function(){this.restoreValue(),this.onChange.apply(this,arguments)}},{key:"itemValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(u.default.isObject(e)){if(this.valueProperty)return u.default.get(e,this.valueProperty);if(t)return e.value}return e}},{key:"itemValueForHTMLMode",value:function(e){var t=this;return Array.isArray(e)?e.map((function(e){return Array.isArray(e)?t.itemValueForHTMLMode(e):t.itemValue(e)})).join(", "):this.itemValue(e)}},{key:"createModal",value:function(e,t,n){var r=this,o=this.ce("div",t||{});this.setContent(o,this.renderTemplate("dialog")),o.refs={},this.loadRefs.call(o,o,{dialogOverlay:"single",dialogContents:"single",dialogClose:"single"}),o.refs.dialogContents.appendChild(e),document.body.appendChild(o),document.body.classList.add("modal-open"),o.close=function(){document.body.classList.remove("modal-open"),o.dispatchEvent(new CustomEvent("close"))},this.addEventListener(o,"close",(function(){return r.removeChildFrom(o,document.body)}));var i=function(e){e.preventDefault(),o.close()},a=function(e){n?n().then((function(){return i(e)})).catch((function(){})):i(e)};return this.addEventListener(o.refs.dialogOverlay,"click",a),this.addEventListener(o.refs.dialogClose,"click",a),o}},{key:"optimizeRedraw",get:function(){return!(!this.options.optimizeRedraw||!this.element||this.visible||(this.addClass(this.element,"formio-removed"),0))}},{key:"className",get:function(){var e=this.hasInput?"form-group has-feedback ":"";return e+="formio-component formio-component-".concat(this.component.type," "),this.key&&"form"!==this.key&&(e+="formio-component-".concat(this.key," ")),this.component.multiple&&(e+="formio-component-multiple "),this.component.customClass&&(e+=this.component.customClass),this.hasInput&&this.component.validate&&(0,c.boolValue)(this.component.validate.required)&&(e+=" required"),this.labelIsHidden()&&(e+=" formio-component-label-hidden"),this.visible||(e+=" formio-hidden"),e}},{key:"customStyle",get:function(){var e="";return u.default.each(this.component.style,(function(t,n){""!==t&&(e+="".concat(n,":").concat(t,";"))})),e}},{key:"isMobile",get:function(){return(0,l.default)()}},{key:"getElement",value:function(){return this.element}},{key:"evalContext",value:function(e){return C(T(w.prototype),"evalContext",this).call(this,Object.assign({component:this.component,row:this.data,rowIndex:this.rowIndex,data:this.rootValue,iconClass:this.iconClass.bind(this),t:this.t.bind(this),submission:this.root?this.root._submission:{data:this.rootValue},form:this.root?this.root._form:{},options:this.options},e))}},{key:"setPristine",value:function(e){this.pristine=e}},{key:"isPristine",get:function(){return this.pristine}},{key:"setDirty",value:function(e){this.dirty=e}},{key:"isDirty",get:function(){return this.dirty}},{key:"removeValue",value:function(e){this.splice(e),this.redraw(),this.restoreValue(),this.triggerRootChange()}},{key:"iconClass",value:function(e,t){var n=this.options.iconset||I.current.defaultIconset||"fa";return I.current.hasOwnProperty("iconClass")?I.current.iconClass(n,e,t):"fa"===this.options.iconset?I.defaultTemplates.iconClass(n,e,t):e}},{key:"size",value:function(e){return I.current.hasOwnProperty("size")?I.current.size(e):e}},{key:"name",get:function(){return this.t(this.component.label||this.component.placeholder||this.key,{_userInput:!0})}},{key:"errorLabel",get:function(){return this.t(this.component.errorLabel||this.component.label||this.component.placeholder||this.key)}},{key:"errorMessage",value:function(e){return this.component.errors&&this.component.errors[e]?this.component.errors[e]:e}},{key:"setContent",value:function(e,t,n,r){return e instanceof HTMLElement&&(e.innerHTML=this.sanitize(t,n,r),!0)}},{key:"restoreCaretPosition",value:function(){var e,t;if(null!==(e=this.root)&&void 0!==e&&e.currentSelection&&null!==(t=this.refs.input)&&void 0!==t&&t.length){var n=this.root.currentSelection,r=n.selection,o=n.index,i=this.refs.input[o],a=/text|search|password|tel|url/i.test(i.type||"");if(i){var u;a&&(u=i).setSelectionRange.apply(u,x(r))}else{var l,s=(null===(l=(i=this.refs.input[this.refs.input.length]).value)||void 0===l?void 0:l.length)||0;a&&i.setSelectionRange(s,s)}}}},{key:"redraw",value:function(){if(!this.element||!this.element.parentNode||this.optimizeRedraw)return i.default.resolve();this.detach(),this.emit("redraw");var e=this.element.parentNode,t=Array.prototype.indexOf.call(e.children,this.element);return this.element.outerHTML=this.sanitize(this.render()),this.element=e.children[t],this.attach(this.element)}},{key:"rebuild",value:function(){return this.destroy(),this.init(),this.visible=this.conditionallyVisible(null,null),this.redraw()}},{key:"removeEventListeners",value:function(){C(T(w.prototype),"removeEventListeners",this).call(this),this.tooltips.forEach((function(e){return e.destroy()})),this.tooltips=[]}},{key:"hasClass",value:function(e,t){if(e)return C(T(w.prototype),"hasClass",this).call(this,e,this.transform("class",t))}},{key:"addClass",value:function(e,t){if(e)return C(T(w.prototype),"addClass",this).call(this,e,this.transform("class",t))}},{key:"removeClass",value:function(e,t){if(e)return C(T(w.prototype),"removeClass",this).call(this,e,this.transform("class",t))}},{key:"hasCondition",value:function(){return null!==this._hasCondition||(this._hasCondition=c.hasCondition(this.component)),this._hasCondition}},{key:"conditionallyVisible",value:function(e,t){return e=e||this.rootValue,t=t||this.data,this.builderMode||this.previewMode||!this.hasCondition()?!this.component.hidden:(e=e||(this.root?this.root.data:{}),this.checkCondition(t,e))}},{key:"checkCondition",value:function(e,t){return c.checkCondition(this.component,e||this.data,t||this.rootValue,this.root?this.root._form:{},this)}},{key:"checkComponentConditions",value:function(e,t,n){e=e||this.rootValue,t=t||{},n=n||this.data,!this.builderMode&!this.previewMode&&this.fieldLogic(e,n)&&this.redraw();var r=this.conditionallyVisible(e,n);return this.visible!==r&&(this.visible=r),r}},{key:"checkConditions",value:function(e,t,n){return e=e||this.rootValue,t=t||{},n=n||this.data,this.checkComponentConditions(e,t,n)}},{key:"logic",get:function(){return this.component.logic||[]}},{key:"fieldLogic",value:function(e,t){var n=this;e=e||this.rootValue,t=t||this.data;var r=this.logic;if(0!==r.length){var o=(0,c.fastCloneDeep)(this.originalComponent),i=r.reduce((function(r,i){var a=c.checkTrigger(o,i.trigger,t,e,n.root?n.root._form:{},n);return!!a&&n.applyActions(o,i.actions,a,t,e)||r}),!1);if(!u.default.isEqual(this.component,o)){this.component=o,i=!0;var a=this.shouldDisabled;this.disabled!==a&&(this.disabled=a)}return i}}},{key:"isIE",value:function(){if("undefined"==typeof window)return!1;var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);if(e.indexOf("Trident/")>0){var n=e.indexOf("rv:");return parseInt(e.substring(n+3,e.indexOf(".",n)),10)}var r=e.indexOf("Edge/");return r>0&&parseInt(e.substring(r+5,e.indexOf(".",r)),10)}},{key:"defineActionValue",value:function(e,t){return this.evaluate(e.value,t,"value")}},{key:"applyActions",value:function(e,t,n,r,o){var i=this;return o=o||this.rootValue,r=r||this.data,t.reduce((function(t,a){switch(a.type){case"property":c.setActionProperty(e,a,n,r,o,i);var l=a.property.value;u.default.isEqual(u.default.get(i.component,l),u.default.get(e,l))||(t=!0);break;case"value":var s=i.getValue(),f=i.defineActionValue(a,{value:u.default.clone(s),data:o,row:r,component:e,result:n});u.default.isEqual(s,f)||(i.setValue(f),i.viewOnly&&(i.dataValue=f),t=!0);break;case"mergeComponentSchema":var d=i.evaluate(a.schemaDefinition,{value:u.default.clone(i.getValue()),data:o,row:r,component:e,result:n},"schema");u.default.assign(e,d),u.default.isEqual(i.component,e)||(t=!0);break;case"customAction":var p=i.getValue(),h=i.evaluate(a.customAction,{value:u.default.clone(p),data:o,row:r,input:p,component:e,result:n},"value");u.default.isEqual(p,h)||(i.setValue(h),i.viewOnly&&(i.dataValue=h),t=!0)}return t}),!1)}},{key:"addInputError",value:function(e,t,n){this.addMessages(e),this.setErrorClasses(n,t,!!e)}},{key:"removeInputError",value:function(e){this.setErrorClasses(e,!0,!1)}},{key:"addMessages",value:function(e){var t=this;e&&("string"==typeof e&&(e={messages:e,level:"error"}),Array.isArray(e)||(e=[e]),e=u.default.uniqBy(e,(function(e){return e.message})),this.refs.messageContainer&&this.setContent(this.refs.messageContainer,e.map((function(e){return t.renderTemplate("message",e)})).join("")))}},{key:"setErrorClasses",value:function(e,t,n,r){var o=this,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.element;this.clearErrorClasses(),e.forEach((function(e){o.setElementInvalid(o.performInputMapping(e),!1)})),this.setInputWidgetErrorClasses(e,n),n&&(e.forEach((function(e){o.setElementInvalid(o.performInputMapping(e),!0)})),t&&this.options.highlightErrors?this.addClass(i,this.options.componentErrorClass):this.addClass(i,"has-error")),r&&this.addClass(i,"has-message")}},{key:"setElementInvalid",value:function(e,t){e&&(t?this.addClass(e,"is-invalid"):this.removeClass(e,"is-invalid"),e.setAttribute("aria-invalid",t?"true":"false"))}},{key:"clearOnHide",value:function(){this.rootPristine&&!this.options.server&&!(0,c.isInsideScopingComponent)(this)||!1===this.component.clearOnHide||this.options.readOnly||this.options.showHiddenFields||(this.visible?!this.hasValue()&&this.shouldAddDefaultValue&&this.setValue(this.defaultValue,{noUpdateEvent:!0}):this.deleteValue())}},{key:"triggerRootChange",value:function(){var e;if(this.options.onChange)(e=this.options).onChange.apply(e,arguments);else if(this.root){var t;(t=this.root).triggerChange.apply(t,arguments)}}},{key:"onChange",value:function(e,t){(e=e||{}).modified&&(e.noPristineChangeOnModified||(this.pristine=!1),this.addClass(this.getElement(),"formio-modified")),"blur"!==this.component.validateOn||this.errors.length||(e.noValidate=!0),this.component.onChange&&this.evaluate(this.component.onChange,{flags:e});var n={instance:this,component:this.component,value:this.dataValue,flags:e};this.emit("componentChange",n);var r=!1;return e.modified&&(r=!0,delete e.modified),t||this.triggerRootChange(e,n,r),n}},{key:"wysiwygDefault",get:function(){return{quill:{theme:"snow",placeholder:this.t(this.component.placeholder,{_userInput:!0}),modules:{toolbar:[[{size:["small",!1,"large","huge"]}],[{header:[1,2,3,4,5,6,!1]}],[{font:[]}],["bold","italic","underline","strike",{script:"sub"},{script:"super"},"clean"],[{color:[]},{background:[]}],[{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"},{align:[]}],["blockquote","code-block"],["link","image","video","formula","source"]]}},ace:{theme:"ace/theme/xcode",maxLines:12,minLines:12,tabSize:2,mode:"ace/mode/javascript",placeholder:this.t(this.component.placeholder,{_userInput:!0})},ckeditor:{image:{toolbar:["imageTextAlternative","|","imageStyle:full","imageStyle:alignLeft","imageStyle:alignCenter","imageStyle:alignRight"],styles:["full","alignLeft","alignCenter","alignRight"]},extraPlugins:[]},default:{}}}},{key:"addCKE",value:function(e,t,n){return(t=u.default.isEmpty(t)?{}:t).base64Upload=!this.component.isUploadEnabled,t.mediaEmbed={previewsInData:!0},t=u.default.merge(this.wysiwygDefault.ckeditor,u.default.get(this.options,"editors.ckeditor.settings",{}),t),this.component.isUploadEnabled&&t.extraPlugins.push((0,y.getFormioUploadAdapterPlugin)(this.fileService,this)),s.GlobalFormio.requireLibrary("ckeditor",D?"CKEDITOR":"ClassicEditor",u.default.get(this.options,"editors.ckeditor.src","".concat(s.GlobalFormio.cdn.ckeditor,"/ckeditor.js")),!0).then((function(){if(!e.parentNode)return i.default.reject();if(D){var r=CKEDITOR.replace(e);return r.on("change",(function(){return n(r.getData())})),i.default.resolve(r)}return ClassicEditor.create(e,t).then((function(e){return e.model.document.on("change",(function(){return n(e.data.get())})),e}))}))}},{key:"addQuill",value:function(e,t,n){var r=this;return t=u.default.isEmpty(t)?this.wysiwygDefault.quill:t,t=_(_({},t=u.default.merge(this.wysiwygDefault.quill,u.default.get(this.options,"editors.quill.settings",{}),t)),{},{modules:_({table:!0},t.modules)}),s.GlobalFormio.requireLibrary("quill-css-".concat(t.theme),"Quill",[{type:"styles",src:"".concat(s.GlobalFormio.cdn.quill,"/quill.").concat(t.theme,".css")}],!0),s.GlobalFormio.requireLibrary("quill","Quill",u.default.get(this.options,"editors.quill.src","".concat(s.GlobalFormio.cdn.quill,"/quill.min.js")),!0).then((function(){return s.GlobalFormio.requireLibrary("quill-table","Quill","".concat(s.GlobalFormio.cdn.baseUrl,"/quill/quill-table.js"),!0).then((function(){if(!e.parentNode)return i.default.reject();r.quill=new Quill(e,D?_(_({},t),{},{modules:{}}):t);var o=document.createElement("textarea");o.setAttribute("class","quill-source-code"),r.quill.addContainer("ql-custom").appendChild(o);var a=e.parentNode.querySelector(".ql-source");a&&r.addEventListener(a,"click",(function(e){e.preventDefault(),"inherit"===o.style.display&&r.quill.setContents(r.quill.clipboard.convert({html:o.value})),o.style.display="none"===o.style.display?"inherit":"none"})),r.addEventListener(e,"click",(function(){return r.quill.focus()}));for(var u=document.querySelectorAll(".ql-formats > button"),l=0;l1&&void 0!==arguments[1]?arguments[1]:{};if(this.hasValue()){var n=this.dataValue||[];u.default.isArray(n)&&n.hasOwnProperty(e)&&(n.splice(e,1),this.dataValue=n,this.triggerChange(t))}}},{key:"unset",value:function(){u.default.unset(this._data,this.key)}},{key:"deleteValue",value:function(){this.setValue(null,{noUpdateEvent:!0,noDefault:!0}),this.unset()}},{key:"getCustomDefaultValue",value:function(e){return this.component.customDefaultValue&&!this.options.preview&&(e=this.evaluate(this.component.customDefaultValue,{value:""},"value")),e}},{key:"shouldAddDefaultValue",get:function(){return!this.options.noDefaults||this.component.defaultValue&&!this.isEmpty(this.component.defaultValue)||this.component.customDefaultValue}},{key:"defaultValue",get:function(){var e=this,t=this.emptyValue;this.component.defaultValue&&(t=this.component.defaultValue),t=this.getCustomDefaultValue(t);var n=function(t){if("string"==typeof t){var n=e.placeholderChar;t=(0,o.conformToMask)(t,e.defaultMask,{placeholderChar:n}).conformedValue,c.matchInputMask(t,e.defaultMask)||(t="")}else t="";return t};return this.defaultMask&&(t=Array.isArray(t)?t.map(n):n(t)),u.default.cloneDeep(t)}},{key:"getValue",value:function(){if(!this.hasInput||this.viewOnly||!this.refs.input||!this.refs.input.length)return this.dataValue;var e=[];for(var t in this.refs.input)if(this.refs.input.hasOwnProperty(t)){if(!this.component.multiple)return this.getValueAt(t);e.push(this.getValueAt(t))}return 0!==e.length||this.component.multiple?e:""}},{key:"getValueAt",value:function(e){var t=this.performInputMapping(this.refs.input[e]);return t?t.value:void 0}},{key:"setValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.updateValue(e,t);if(e=this.dataValue,!this.hasInput)return n;var r=Array.isArray(e),o=this.refs.fileLink||this.refs.input;if(r&&Array.isArray(this.defaultValue)&&this.refs.hasOwnProperty("input")&&o&&o.length!==e.length&&this.visible&&this.redraw(),this.isHtmlRenderMode()&&t&&t.fromSubmission&&n)return this.redraw(),n;for(var i in this.refs.input)this.refs.input.hasOwnProperty(i)&&this.setValueAt(i,r?e[i]:e,t);return n}},{key:"setValueAt",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n.noDefault||null!=t||this.component.multiple||(t=this.defaultValue);var r=this.performInputMapping(this.refs.input[e]),o=this.refs.valueMaskInput;null!=o&&o.mask&&o.mask.textMaskInputElement.update(t),r.mask?r.mask.textMaskInputElement.update(t):r.widget&&r.widget.setValue?r.widget.setValue(t):r.value=t}},{key:"hasSetValue",get:function(){return this.hasValue()&&!this.isEmpty(this.dataValue)}},{key:"setDefaultValue",value:function(){if(this.defaultValue&&this.shouldAddDefaultValue){var e=this.component.multiple&&!this.dataValue.length?[]:this.defaultValue;this.setValue(e,{noUpdateEvent:!0})}}},{key:"restoreValue",value:function(){this.hasSetValue?this.setValue(this.dataValue,{noUpdateEvent:!0}):this.setDefaultValue()}},{key:"normalizeValue",value:function(e){return this.component.multiple&&!Array.isArray(e)&&(e=e?[e]:[]),e}},{key:"updateComponentValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.resetValue||null!=e?e:this.getValue();n=this.normalizeValue(n,t);var r=this.dataValue,o=void 0!==n&&this.hasChanged(n,r);return o&&(this.dataValue=n,o=this.dataValue!==r,this.updateOnChange(t,o)),this.componentModal&&t&&t.fromSubmission&&this.componentModal.setValue(e),o}},{key:"updateValue",value:function(){return this.updateComponentValue.apply(this,arguments)}},{key:"getIcon",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"icon";return this.renderTemplate("icon",{className:this.iconClass(e),ref:r,styles:n,content:t})}},{key:"resetValue",value:function(){this.unset(),this.setValue(this.emptyValue,{noUpdateEvent:!0,noValidate:!0,resetValue:!0})}},{key:"hasChanged",value:function(e,t){return!(null==e&&(null==t||this.isEmpty(t))||(null==e||!this.allowData||this.hasValue())&&u.default.isEqual(e,t))}},{key:"updateOnChange",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!(e.noUpdateEvent||!t||(this.triggerChange(e),0))}},{key:"convertNumberOrBoolToString",value:function(e){return"number"==typeof e||"boolean"==typeof e?e.toString():e}},{key:"doValueCalculation",value:function(e,t,n){return this.evaluate(this.component.calculateValue,{value:e,data:t,row:n||this.data},"value")}},{key:"calculateComponentValue",value:function(e,t,n){var r=this.component.clearOnHide,o=!this.visible&&r,i=u.default.get(this.component,"allowCalculateOverride",!1);if(this.options.readOnly&&!this.options.pdf||!this.component.calculateValue&&!this.component.calculateValueVariable||o||this.options.server&&!this.component.calculateServer||t.dataSourceInitialLoading&&i)return!1;var a=this.dataValue,l=this.doValueCalculation(a,e,n,t);u.default.isNil(l)&&(l=this.emptyValue);var s=!u.default.isEqual(a,l);if(i){var c=t.fromSubmission&&!0===this.component.persistent;if(this.isEmpty(a))this.calculationLocked=!1;else if(this.calculationLocked||c)return this.calculationLocked=!0,!1;var f=void 0===this.calculatedValue;f&&(this.calculatedValue=null);var d=this.normalizeValue(this.convertNumberOrBoolToString(l)),p=this.normalizeValue(this.convertNumberOrBoolToString(this.calculatedValue)),h=this.normalizeValue(this.convertNumberOrBoolToString(a)),v=!u.default.isEqual(p,d),y=!u.default.isEqual(h,p);if(v&&y&&!f)return!1;if(p&&y&&!v)return!1;if(t.isReordered||!v)return!1;if(c)return this.calculatedValue=l,!1;if(f&&!this.isEmpty(a)&&s&&v)return!0}return this.calculatedValue=l,!!s&&(t.noPristineChangeOnModified||(this.pristine=!1),t.triggeredComponentId=this.id,this.setValue(l,t))}},{key:"calculateValue",value:function(e,t,n){return e=e||this.rootValue,t=t||{},n=n||this.data,this.calculateComponentValue(e,t,n)}},{key:"label",get:function(){return this.component.label},set:function(e){this.component.label=e,this.labelElement&&(this.labelElement.innerText=e)}},{key:"getRoot",value:function(){return this.root}},{key:"invalidMessage",value:function(e,t,n,r){return n||this.checkCondition(r,e)?this.invalid?this.invalid:!this.hasInput||!t&&this.pristine?"":u.default.map(f.default.checkComponent(this,e),"message").join("\n\n"):""}},{key:"isValid",value:function(e,t){return!this.invalidMessage(e,t)}},{key:"setComponentValidity",value:function(e,t,n){var r=!!e.filter((function(e){return"error"===e.level&&!e.fromServer})).length;return!e.length||n&&!this.error||this.isEmpty(this.defaultValue)&&!t&&this.pristine?n||this.setCustomValidity(""):this.setCustomValidity(e,t),!r}},{key:"checkComponentValidity",value:function(e,t,n){var r,o=this,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};e=e||this.rootValue,n=n||this.data;var u=a.async,l=void 0!==u&&u,s=a.silentCheck,c=void 0!==s&&s;if(this.shouldSkipValidation(e,t,n))return this.setCustomValidity(""),!l||i.default.resolve(!0);var d=f.default.checkComponent(this,e,n,!0,l),p=d;return null!==(r=this.serverErrors)&&void 0!==r&&r.length&&(p=d.concat(this.serverErrors)),l?p.then((function(e){return o.setComponentValidity(e,t,c)})):this.setComponentValidity(p,t,c)}},{key:"checkValidity",value:function(e,t,n,r){e=e||this.rootValue,n=n||this.data;var o=this.checkComponentValidity(e,t,n,{silentCheck:r});return this.checkModal(),o}},{key:"checkAsyncValidity",value:function(e,t,n,r){return i.default.resolve(this.checkComponentValidity(e,t,n,{async:!0,silentCheck:r}))}},{key:"checkData",value:function(e,t,n){if(e=e||this.rootValue,t=t||{},n=n||this.data,this.resetCaches(),t.fromBlur||this.checkRefreshOn(t.changes,t),t.noCheck)return!0;if(this.checkComponentConditions(e,t,n),this.id!==t.triggeredComponentId&&this.calculateComponentValue(e,t,n),t.noValidate&&!t.validateOnInit&&!t.fromIframe)return t.fromSubmission&&this.rootPristine&&this.pristine&&this.error&&t.changed&&this.checkComponentValidity(e,!!this.options.alwaysDirty,n,!0),!0;var r=!1;if((this.options.alwaysDirty||t.dirty)&&(r=!0),t.fromSubmission&&this.hasValue(e)&&(r=!0),this.setDirty(r),"blur"===this.component.validateOn&&t.fromSubmission)return!0;var o=this.checkComponentValidity(e,r,n,t);return this.checkModal(),o}},{key:"checkModal",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.component.modalEdit&&this.componentModal&&(t&&!e?this.setErrorClasses([this.refs.openModal],t,!e,!!this.errors.length,this.refs.openModalWrapper):this.clearErrorClasses(this.refs.openModalWrapper))}},{key:"validationValue",get:function(){return this.dataValue}},{key:"isEmpty",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.dataValue,t=!(!u.default.isArray(e)||1!==e.length)&&u.default.isEqual(e[0],this.emptyValue);return null==e||0===e.length||u.default.isEqual(e,this.emptyValue)||t}},{key:"isEqual",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.dataValue;return this.isEmpty(e)&&this.isEmpty(t)||u.default.isEqual(e,t)}},{key:"validateMultiple",value:function(){return!0}},{key:"errors",get:function(){return this.error?[this.error]:[]}},{key:"clearErrorClasses",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.element;this.removeClass(e,this.options.componentErrorClass),this.removeClass(e,"alert alert-danger"),this.removeClass(e,"has-error"),this.removeClass(e,"has-message")}},{key:"setInputWidgetErrorClasses",value:function(e,t){this.isInputComponent&&this.component.widget&&null!=e&&e.length&&e.forEach((function(e){null!=e&&e.widget&&e.widget.setErrorClasses&&e.widget.setErrorClasses(t)}))}},{key:"setCustomValidity",value:function(e,t,n){var r=this,o=this.isInputComponent?this.refs.input||[]:null;"string"==typeof e&&e&&(e={level:"error",message:e}),Array.isArray(e)||(e=e?[e]:[]);var i=!!e.filter((function(e){return"error"===e.level})).length,a=o;if(this.component.multiple){var u=Array.from(o);u.forEach((function(e){r.setElementInvalid(r.performInputMapping(e),!1)})),this.setInputWidgetErrorClasses(u,!1),a=u.filter((function(t){var n,r;return null===(n=(r=e).some)||void 0===n?void 0:n.call(r,(function(e){var n;return(null==e||null===(n=e.context)||void 0===n?void 0:n.input)===t}))}))}e.length?(this.refs.messageContainer&&this.empty(this.refs.messageContainer),this.error={component:this.component,message:e[0].message,messages:e,external:!!n},this.emit("componentError",this.error),this.addMessages(e,t,a),a&&this.setErrorClasses(a,t,i,!!e.length)):(!this.error||this.error&&this.error.external===!!n)&&(this.refs.messageContainer&&this.empty(this.refs.messageContainer),this.refs.modalMessageContainer&&this.empty(this.refs.modalMessageContainer),this.error=null,a&&this.setErrorClasses(a,t,i,!!e.length),this.clearErrorClasses())}},{key:"isValueHidden",value:function(){return(!this.component.protected||!this.root.editing)&&!(!this.root||!this.root.hasOwnProperty("editing"))&&!(!this.root||!this.root.editing)&&(this.component.protected||!this.component.persistent||"client-only"===this.component.persistent)}},{key:"shouldSkipValidation",value:function(e,t,n){var r=this;return[function(){return r.options.readOnly},function(){return!r.hasInput},function(){return r.isValueHidden()},function(){return!r.visible},function(){return!r.checkCondition(n,e)}].some((function(e){return e()}))}},{key:"whenReady",value:function(){return console.warn("The whenReady() method has been deprecated. Please use the dataReady property instead."),this.dataReady}},{key:"dataReady",get:function(){return i.default.resolve()}},{key:"asString",value:function(e){return e=e||this.getValue(),(Array.isArray(e)?e:[e]).map(u.default.toString).join(", ")}},{key:"disabled",get:function(){return this._disabled||this.parentDisabled},set:function(e){this._disabled=e}},{key:"setDisabled",value:function(e,t){e&&(e.disabled=t,t?e.setAttribute("disabled","disabled"):e.removeAttribute("disabled"))}},{key:"setLoading",value:function(e,t){e&&e.loading!==t&&(e.loading=t,!e.loader&&t&&(e.loader=this.ce("i",{class:"".concat(this.iconClass("refresh",!0)," button-icon-right")})),e.loader&&(t?this.appendTo(e.loader,e):this.removeChildFrom(e.loader,e)))}},{key:"selectOptions",value:function(e,t,n,r){var o=this;u.default.each(n,(function(t){var n={value:t.value};void 0!==r&&t.value===r&&(n.selected="selected");var i=o.ce("option",n);i.appendChild(o.text(t.label)),e.appendChild(i)}))}},{key:"setSelectValue",value:function(e,t){var n=e.querySelectorAll("option");u.default.each(n,(function(e){e.value===t?e.setAttribute("selected","selected"):e.removeAttribute("selected")})),e.onchange&&e.onchange(),e.onselect&&e.onselect()}},{key:"getRelativePath",value:function(e){var t=".".concat(this.key),n=this.isInputComponent?this.path:this.path.slice(0).replace(t,"");return e.replace(n,"")}},{key:"clear",value:function(){this.detach(),this.empty(this.getElement())}},{key:"append",value:function(e){this.appendTo(e,this.element)}},{key:"prepend",value:function(e){this.prependTo(e,this.element)}},{key:"removeChild",value:function(e){this.removeChildFrom(e,this.element)}},{key:"detachLogic",value:function(){var e=this;this.logic.forEach((function(t){if("event"===t.trigger.type){var n=e.interpolate(t.trigger.event);e.off(n)}}))}},{key:"attachLogic",value:function(){var e=this;this.builderMode||this.logic.forEach((function(t){if("event"===t.trigger.type){var n=e.interpolate(t.trigger.event);e.on(n,(function(){for(var n=(0,c.fastCloneDeep)(e.originalComponent),r=arguments.length,o=new Array(r),i=0;i0&&void 0!==arguments[0]?arguments[0]:this.element;if(e){var t=e.getBoundingClientRect(),n=t.left,r=t.top;window.scrollTo(n+window.scrollX,r+window.scrollY)}}},{key:"focus",value:function(e){var t;if("beforeFocus"in this.parent&&this.parent.beforeFocus(this),null!==(t=this.refs.input)&&void 0!==t&&t.length){var n,r="number"==typeof e&&this.refs.input[e]?this.refs.input[e]:this.refs.input[this.refs.input.length-1];if("calendar"===(null===(n=this.component.widget)||void 0===n?void 0:n.type)){var o=r.nextSibling;o&&o.focus()}else r.focus()}this.refs.openModal&&this.refs.openModal.focus(),this.parent.refs.openModal&&this.parent.refs.openModal.focus()}},{key:"fileService",get:function(){if(this.options.fileService)return this.options.fileService;if(this.options.formio)return this.options.formio;if(this.root&&this.root.formio)return this.root.formio;var e=new s.GlobalFormio;return this.root&&this.root._form&&this.root._form._id&&(e.formUrl="".concat(e.projectUrl,"/form/").concat(this.root._form._id)),e}},{key:"resetCaches",value:function(){}},{key:"previewMode",get:function(){return!1}}],r=[{key:"schema",value:function(){for(var e=arguments.length,t=new Array(e),n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nYou must assign the show variable a boolean result.

    Note: Advanced Conditional logic will override the results of the Simple Conditional logic.

    Example
    show = !!data.showMe;
    ",'

    Click here for an example

    ')];t.default=a},10024:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(61550))&&r.__esModule?r:{default:r},i=[{weight:0,type:"checkbox",label:"Multiple Values",tooltip:"Allows multiple values to be entered for this field.",key:"multiple",input:!0},{type:"textfield",label:"Default Value",key:"defaultValue",weight:5,placeholder:"Default Value",tooltip:"The Default Value will be the value for this field, before user interaction. Having a default value will override the placeholder text.",input:!0},{weight:30,type:"radio",label:"Persistent",tooltip:"A persistent field will be stored in database when the form is submitted.",key:"persistent",input:!0,inline:!0,defaultValue:!0,values:[{label:"None",value:!1},{label:"Server",value:!0},{label:"Client",value:"client-only"}]},{weight:150,type:"checkbox",label:"Protected",tooltip:"A protected field will not be returned when queried via API.",key:"protected",input:!0},{type:"checkbox",input:!0,weight:200,key:"dbIndex",label:"Database Index",tooltip:"Set this field as an index within the database. Increases performance for submission queries."},{weight:400,type:"checkbox",label:"Encrypted (Enterprise Only)",tooltip:"Encrypt this field on the server. This is two way encryption which is not suitable for passwords.",key:"encrypted",input:!0,logic:[{name:"disabled",trigger:{type:"javascript",javascript:"result = !instance.root.options.sac;"},actions:[{name:"disabled",type:"property",property:{label:"Disabled",value:"disabled",type:"boolean"},state:!0}]},{name:"disabledToolTip",trigger:{type:"javascript",javascript:"result = !instance.root.options.sac;"},actions:[{name:"addDisabledTooltip",type:"property",property:{label:"Tooltip",value:"tooltip",type:"string"},text:"Encryption is not available with your current plan. Please contact sales@form.io."}]}]},{type:"select",input:!0,key:"redrawOn",label:"Redraw On",weight:600,tooltip:"Redraw this component if another component changes. This is useful if interpolating parts of the component like the label.",dataSrc:"custom",valueProperty:"value",data:{custom:function(e){var t=[];return t.push({label:"Any Change",value:"data"}),e.utils.eachComponent(e.instance.options.editForm.components,(function(n,r){n.key!==e.data.key&&t.push({label:n.label||n.key,value:r})})),t}},conditional:{json:{"!":[{var:"data.dataSrc"}]}}},{weight:700,type:"checkbox",label:"Clear Value When Hidden",key:"clearOnHide",defaultValue:!0,tooltip:"When a field is hidden, clear the value.",input:!0,clearOnHide:!1,calculateValue:"value = data.hidden ? false : value",conditional:{json:{"!":[{var:"data.hidden"}]}}},o.default.javaScriptValue("Custom Default Value","customDefaultValue","customDefaultValue",1e3,'

    Example:

    value = data.firstName + " " + data.lastName;

    ','

    Example:

    {"cat": [{"var": "data.firstName"}, " ", {"var": "data.lastName"}]}
    '),o.default.javaScriptValue("Calculated Value","calculateValue","calculateValue",1100,"

    Example:

    value = data.a + data.b + data.c;

    ",'

    Example:

    {"+": [{"var": "data.a"}, {"var": "data.b"}, {"var": "data.c"}]}

    Click here for an example

    ',"tokenThe decoded JWT token for the authenticated user."),{type:"checkbox",input:!0,weight:1100,key:"calculateServer",label:"Calculate Value on server",tooltip:"Checking this will run the calculation on the server. This is useful if you wish to override the values submitted with the calculations performed on the server."},{type:"checkbox",input:!0,weight:1200,key:"allowCalculateOverride",label:"Allow Manual Override of Calculated Value",tooltip:"When checked, this will allow the user to manually override the calculated value."}];t.default=i},10684:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n(92087),t.default=[{weight:0,type:"textfield",input:!0,key:"label",label:"Label",placeholder:"Field Label",tooltip:"The label for this field that will appear next to it.",validate:{required:!0}},{type:"select",input:!0,key:"labelPosition",label:"Label Position",tooltip:"Position for the label for this field.",weight:20,defaultValue:"top",dataSrc:"values",data:{values:[{label:"Top",value:"top"},{label:"Left (Left-aligned)",value:"left-left"},{label:"Left (Right-aligned)",value:"left-right"},{label:"Right (Left-aligned)",value:"right-left"},{label:"Right (Right-aligned)",value:"right-right"},{label:"Bottom",value:"bottom"}]}},{type:"number",input:!0,key:"labelWidth",label:"Label Width",tooltip:"The width of label on line in percentages.",clearOnHide:!1,weight:30,placeholder:"30",suffix:"%",validate:{min:0,max:100},conditional:{json:{and:[{"!==":[{var:"data.labelPosition"},"top"]},{"!==":[{var:"data.labelPosition"},"bottom"]}]}}},{type:"number",input:!0,key:"labelMargin",label:"Label Margin",tooltip:"The width of label margin on line in percentages.",clearOnHide:!1,weight:30,placeholder:"3",suffix:"%",validate:{min:0,max:100},conditional:{json:{and:[{"!==":[{var:"data.labelPosition"},"top"]},{"!==":[{var:"data.labelPosition"},"bottom"]}]}}},{weight:100,type:"textfield",input:!0,key:"placeholder",label:"Placeholder",placeholder:"Placeholder",tooltip:"The placeholder text that will appear when this field is empty."},{weight:200,type:"textarea",input:!0,key:"description",label:"Description",placeholder:"Description for this field.",tooltip:"The description is text that will appear below the input field.",editor:"ace",as:"html",wysiwyg:{minLines:3,isUseWorkerDisabled:!0}},{weight:300,type:"textarea",input:!0,key:"tooltip",label:"Tooltip",placeholder:"To add a tooltip to this field, enter text here.",tooltip:"Adds a tooltip to the side of this field.",editor:"ace",as:"html",wysiwyg:{minLines:3,isUseWorkerDisabled:!0}},{weight:500,type:"textfield",input:!0,key:"customClass",label:"Custom CSS Class",placeholder:"Custom CSS Class",tooltip:"Custom CSS class to add to this component."},{weight:600,type:"textfield",input:!0,key:"tabindex",label:"Tab Index",placeholder:"0",tooltip:"Sets the tabindex attribute of this component to override the tab order of the form. See the MDN documentation on tabindex for more information."},{weight:1100,type:"checkbox",label:"Hidden",tooltip:"A hidden field is still a part of the form, but is hidden from view.",key:"hidden",input:!0},{weight:1200,type:"checkbox",label:"Hide Label",tooltip:"Hide the label (title, if no label) of this component. This allows you to show the label in the form builder, but not when it is rendered.",key:"hideLabel",input:!0},{weight:1350,type:"checkbox",label:"Initial Focus",tooltip:"Make this field the initially focused element on this form.",key:"autofocus",input:!0},{weight:1370,type:"checkbox",label:"Show Label in DataGrid",tooltip:"Show the label when in a Datagrid.",key:"dataGridLabel",input:!0,customConditional:function(e){var t,n;return null===(t=e.instance.options)||void 0===t||null===(n=t.flags)||void 0===n?void 0:n.inDataGrid}},{weight:1400,type:"checkbox",label:"Disabled",tooltip:"Disable the form input.",key:"disabled",input:!0},{weight:1500,type:"checkbox",label:"Table View",tooltip:"Shows this value within the table view of the submissions.",key:"tableView",input:!0},{weight:1600,type:"checkbox",label:"Modal Edit",tooltip:"Opens up a modal to edit the value of this component.",key:"modalEdit",input:!0}]},77869:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=[{label:"HTML Attributes",type:"datamap",input:!0,key:"attributes",keyLabel:"Attribute Name",valueComponent:{type:"textfield",key:"value",label:"Attribute Value",input:!0},tooltip:"Provide a map of HTML attributes for component's input element (attributes provided by other component settings or other attributes generated by form.io take precedence over attributes in this grid)",addAnother:"Add Attribute"},{type:"panel",legend:"PDF Overlay",title:"PDF Overlay",key:"overlay",tooltip:"The settings inside apply only to the PDF forms.",weight:2e3,collapsible:!0,collapsed:!0,components:[{type:"textfield",input:!0,key:"overlay.style",label:"Style",placeholder:"",tooltip:"Custom styles that should be applied to this component when rendered in PDF."},{type:"textfield",input:!0,key:"overlay.page",label:"Page",placeholder:"",tooltip:"The PDF page to place this component."},{type:"textfield",input:!0,key:"overlay.left",label:"Left",placeholder:"",tooltip:"The left margin within a page to place this component."},{type:"textfield",input:!0,key:"overlay.top",label:"Top",placeholder:"",tooltip:"The top margin within a page to place this component."},{type:"textfield",input:!0,key:"overlay.width",label:"Width",placeholder:"",tooltip:"The width of the component (in pixels)."},{type:"textfield",input:!0,key:"overlay.height",label:"Height",placeholder:"",tooltip:"The height of the component (in pixels)."}]}]},48911:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n(19601);var r,o=(r=n(61550))&&r.__esModule?r:{default:r},i=n(82531),a=[{weight:0,input:!0,label:"Advanced Logic",key:"logic",templates:{header:'
    \n
    \n {{ value.length }} {{ ctx.t("Advanced Logic Configured") }}\n
    \n
    ',row:'
    \n
    \n
    {{ row.name }}
    \n
    \n
    \n
    \n \n \n
    \n
    \n
    ',footer:""},type:"editgrid",addAnother:"Add Logic",saveRow:"Save Logic",components:[{weight:0,input:!0,inputType:"text",label:"Logic Name",key:"name",validate:{required:!0},type:"textfield"},{weight:10,key:"triggerPanel",input:!1,title:"Trigger",tableView:!1,components:[{weight:0,input:!0,tableView:!1,components:[{weight:0,input:!0,label:"Type",key:"type",tableView:!1,data:{values:[{value:"simple",label:"Simple"},{value:"javascript",label:"Javascript"},{value:"json",label:"JSON Logic"},{value:"event",label:"Event"}]},dataSrc:"values",template:"{{ item.label }}",type:"select"},{weight:10,label:"",key:"simple",type:"container",tableView:!1,customConditional:function(e){return"simple"===e.row.type},components:[{input:!0,key:"show",label:"Show",type:"hidden",tableView:!1,calculateValue:function(){return!0}},{type:"select",input:!0,label:"When the form component:",key:"when",dataSrc:"custom",valueProperty:"value",tableView:!1,data:{custom:function(e){return(0,i.getContextComponents)(e)}}},{type:"textfield",input:!0,label:"Has the value:",key:"eq",tableView:!1}]},{weight:10,type:"textarea",key:"javascript",rows:5,editor:"ace",as:"javascript",input:!0,tableView:!1,placeholder:"result = (data['mykey'] > 1);",description:'"row", "data", and "component" variables are available. Return "result".',customConditional:function(e){return"javascript"===e.row.type}},{weight:10,type:"textarea",key:"json",rows:5,editor:"ace",label:"JSON Logic",as:"json",input:!0,tableView:!1,placeholder:"{ ... }",description:'"row", "data", "component" and "_" variables are available. Return the result to be passed to the action if truthy.',customConditional:function(e){return"json"===e.row.type}},{weight:10,type:"textfield",key:"event",label:"Event Name",placeholder:"event",description:"The event that will trigger this logic. You can trigger events externally or via a button.",tableView:!1,customConditional:function(e){return"event"===e.row.type}}],key:"trigger",type:"container"}],type:"panel"},{weight:20,input:!0,label:"Actions",key:"actions",tableView:!1,templates:{header:'
    \n
    {{ value.length }} {{ ctx.t("actions") }}
    \n
    ',row:'
    \n
    \n
    {{ row.name }}
    \n
    \n
    \n
    \n \n \n
    \n
    \n
    ',footer:""},type:"editgrid",addAnother:"Add Action",saveRow:"Save Action",components:[{weight:0,title:"Action",input:!1,key:"actionPanel",type:"panel",components:[{weight:0,input:!0,inputType:"text",label:"Action Name",key:"name",validate:{required:!0},type:"textfield"},{weight:10,input:!0,label:"Type",key:"type",data:{values:[{value:"property",label:"Property"},{value:"value",label:"Value"},{label:"Merge Component Schema",value:"mergeComponentSchema"},{label:"Custom Action",value:"customAction"}]},dataSrc:"values",template:"{{ item.label }}",type:"select"},{weight:20,type:"select",template:"{{ item.label }}",dataSrc:"json",tableView:!1,data:{json:[{label:"Hidden",value:"hidden",type:"boolean"},{label:"Required",value:"validate.required",type:"boolean"},{label:"Disabled",value:"disabled",type:"boolean"},{label:"Label",value:"label",type:"string"},{label:"Title",value:"title",type:"string"},{label:"Prefix",value:"prefix",type:"string"},{label:"Suffix",value:"suffix",type:"string"},{label:"Tooltip",value:"tooltip",type:"string"},{label:"Description",value:"description",type:"string"},{label:"Placeholder",value:"placeholder",type:"string"},{label:"Input Mask",value:"inputMask",type:"string"},{label:"CSS Class",value:"className",type:"string"},{label:"Container Custom Class",value:"customClass",type:"string"}]},key:"property",label:"Component Property",input:!0,customConditional:function(e){return"property"===e.row.type}},{weight:30,input:!0,label:"Set State",key:"state",tableView:!1,data:{values:[{label:"True",value:"true"},{label:"False",value:"false"}]},dataSrc:"values",template:"{{ item.label }}",type:"select",customConditional:function(e){var t=e.row;return"property"===t.type&&t.hasOwnProperty("property")&&"boolean"===t.property.type}},{weight:30,type:"textfield",key:"text",label:"Text",inputType:"text",input:!0,tableView:!1,description:'Can use templating with {{ data.myfield }}. "data", "row", "component" and "result" variables are available.',customConditional:function(e){var t=e.row;return"property"===t.type&&t.hasOwnProperty("property")&&"string"===t.property.type&&!t.property.component}},{weight:20,input:!0,label:"Value (Javascript)",key:"value",editor:"ace",as:"javascript",rows:5,placeholder:"value = data.myfield;",type:"textarea",tableView:!1,description:'"row", "data", "component", and "result" variables are available. Return the value.',customConditional:function(e){return"value"===e.row.type}},{weight:20,input:!0,label:"Schema Defenition",key:"schemaDefinition",editor:"ace",as:"javascript",rows:5,placeholder:"schema = { label: 'Updated' };",type:"textarea",tableView:!1,description:'"row", "data", "component", and "result" variables are available. Return the schema.',customConditional:function(e){return"mergeComponentSchema"===e.row.type}},Object.assign(o.default.logicVariablesTable("inputThe value that was input into this component"),{customConditional:function(e){return"customAction"===e.row.type}}),{weight:20,input:!0,label:"Custom Action (Javascript)",key:"customAction",editor:"ace",rows:5,placeholder:"value = data.myfield;",type:"textarea",tableView:!1,customConditional:function(e){return"customAction"===e.row.type}}]}]}]}];t.default=a},51250:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(61550)),o=i(n(193));function i(e){return e&&e.__esModule?e:{default:e}}var a=[{weight:10,type:"checkbox",label:"Required",tooltip:"A required field must be filled in before the form can be submitted.",key:"validate.required",input:!0},{weight:100,type:"checkbox",label:"Unique",tooltip:"Makes sure the data submitted for this field is unique, and has not been submitted before.",key:"unique",input:!0},{weight:0,type:"select",key:"validateOn",defaultValue:"change",input:!0,label:"Validate On",tooltip:"Determines when this component should trigger front-end validation.",dataSrc:"values",data:{values:[{label:"Change",value:"change"},{label:"Blur",value:"blur"}]}},{weight:190,type:"textfield",input:!0,key:"errorLabel",label:"Error Label",placeholder:"Error Label",tooltip:"The label for this field when an error occurs."},{weight:200,key:"validate.customMessage",label:"Custom Error Message",placeholder:"Custom Error Message",type:"textfield",tooltip:"Error message displayed if any error occurred.",input:!0},{type:"panel",title:"Custom Validation",collapsible:!0,collapsed:!0,style:{"margin-bottom":"10px"},key:"custom-validation-js",weight:300,customConditional:function(){return!o.default.noeval||o.default.protectedEval},components:[r.default.logicVariablesTable("inputThe value that was input into this component"),{type:"textarea",key:"validate.custom",rows:5,editor:"ace",hideLabel:!0,as:"javascript",input:!0},{type:"htmlelement",tag:"div",content:"\n \n

    Enter custom validation code.

    \n

    You must assign the valid variable as either true or an error message if validation fails.

    \n
    Example:
    \n
    valid = (input === 'Joe') ? true : 'Your name must be \"Joe\"';
    \n
    "},{type:"well",components:[{weight:100,type:"checkbox",label:"Secret Validation",tooltip:"Check this if you wish to perform the validation ONLY on the server side. This keeps your validation logic private and secret.",description:"Check this if you wish to perform the validation ONLY on the server side. This keeps your validation logic private and secret.",key:"validate.customPrivate",input:!0}]}]},{type:"panel",title:"JSONLogic Validation",collapsible:!0,collapsed:!0,key:"json-validation-json",weight:400,components:[{type:"htmlelement",tag:"div",content:'

    Execute custom logic using JSONLogic.

    Example:
    '+JSON.stringify({if:[{"===":[{var:"input"},"Bob"]},!0,"Your name must be 'Bob'!"]},null,2)+"
    "},{type:"textarea",key:"validate.json",hideLabel:!0,rows:5,editor:"ace",as:"json",input:!0}]},{type:"panel",title:"Custom Errors",collapsible:!0,collapsed:!0,key:"errors",weight:400,components:[{type:"textarea",key:"errors",hideLabel:!0,rows:5,editor:"ace",as:"json",input:!0},{type:"htmlelement",tag:"div",content:'\n

    This allows you to set different custom error messages for different errors\n (in contrast to “Custom Error Message”, which only allows you to set one\n error message for all errors). E.g.

    \n\n
    {\n  "required": "{{ field }} is required. Try again.",\n  "maxLength": "{{ field }} is too long. Try again."\n}
    \n\n

    You can set the following keys (among others):

    \n
      \n
    • required
    • \n
    • min
    • \n
    • max
    • \n
    • minLength
    • \n
    • maxLength
    • \n
    • minWords
    • \n
    • maxWords
    • \n
    • invalid_email
    • \n
    • invalid_date
    • \n
    • invalid_day
    • \n
    • invalid_regex
    • \n
    • mask
    • \n
    • pattern
    • \n
    • custom
    • \n
    \n\n

    Depending on the error message some of the following template variables can be used in the script:

    \n
      \n
    • {{ field }} is replaced with the label of the field.
    • \n
    • {{ min }}
    • \n
    • {{ max }}
    • \n
    • {{ length }}
    • \n
    • {{ pattern }}
    • \n
    • {{ minDate }}
    • \n
    • {{ maxDate }}
    • \n
    • {{ minYear }}
    • \n
    • {{ maxYear }}
    • \n
    • {{ regex }}
    • \n
    \n '}]}];t.default=a},61550:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n(57327),n(41539),n(40561);var r=i(n(96486)),o=i(n(193));function i(e){return e&&e.__esModule?e:{default:e}}var a={sortAndFilterComponents:function(e){return r.default.filter(r.default.sortBy(e,"weight"),(function(e){return!e.ignore}))},unifyComponents:function(e,t){return e.key&&t.key?!e.skipMerge&&!t.skipMerge&&e.key===t.key&&(r.default.each(e,(function(n,r){!e.overrideEditForm&&t.hasOwnProperty(r)||(t[r]=n)})),r.default.each(t,(function(n,r){!t.overrideEditForm&&e.hasOwnProperty(r)||(e[r]=n)})),e.components&&(t.components=a.sortAndFilterComponents(r.default.unionWith(e.components,t.components,a.unifyComponents))),!0):r.default.isEqual(e,t)},logicVariablesTable:function(e){return{type:"htmlelement",tag:"div",content:'

    The following variables are available in all scripts.

    '+(e=e||"")+'
    formThe complete form JSON object
    submissionThe complete submission object.
    dataThe complete submission data object.
    rowContextual "row" data, used within DataGrid, EditGrid, and Container components
    componentThe current component JSON
    instanceThe current component instance.
    valueThe current value of the component.
    momentThe moment.js library for date manipulation.
    _An instance of Lodash.
    utilsAn instance of the FormioUtils object.
    utilAn alias for "utils".

    '}},javaScriptValue:function(e,t,n,r,i,a){var u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",l=arguments.length>7?arguments[7]:void 0,s=[this.logicVariablesTable(u),{type:"panel",title:"JavaScript",collapsible:!0,collapsed:!1,style:{"margin-bottom":"10px"},key:"".concat(t,"-js"),customConditional:function(){return!o.default.noeval||o.default.protectedEval},components:[{type:"textarea",key:t,rows:5,editor:"ace",hideLabel:!0,as:"javascript",input:!0},{type:"htmlelement",tag:"div",content:"

    Enter custom javascript code.

    ".concat(i)}]},{type:"panel",title:"JSONLogic",collapsible:!0,collapsed:!0,key:"".concat(t,"-json"),components:[{type:"htmlelement",tag:"div",content:'

    Execute custom logic using JSONLogic.

    Full Lodash support is provided using an "_" before each operation, such as {"_sum": {var: "data.a"}}

    '+a},{type:"textarea",key:n,rows:5,editor:"ace",hideLabel:!0,as:"json",input:!0}]}];return l&&s.splice(2,1),{type:"panel",title:e,theme:"default",collapsible:!0,collapsed:!0,key:"".concat(t,"Panel"),weight:r,components:s}}},u=a;t.default=u},72801:function(e,t,n){"use strict";n(47941),n(82526),n(57327),n(41539),n(38880),n(54747),n(49337),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n(92222);var r,o=(r=n(96486))&&r.__esModule?r:{default:r},i=n(82531);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t0?e:10,this.refs.modalWrapper.style.paddingTop="".concat(e,"px")}},{key:"openModal",value:function(){this.isOpened=!0,this.refs.modalWrapper.classList.remove("component-rendering-hidden"),"signature"===this.component.component.type&&this.positionOverElement()}},{key:"updateView",value:function(){var e=o.default.isEqual(this.currentValue,this.component.defaultValue)?this.openModalTemplate:this.component.getModalPreviewTemplate();this.component.setContent(this.refs.openModalWrapper,e),this.setOpenEventListener()}},{key:"closeModal",value:function(){this.refs.modalWrapper.classList.remove("formio-dialog-disabled-animation"),this.refs.modalWrapper.classList.add("component-rendering-hidden"),this.isOpened=!1,this.updateView()}},{key:"closeModalHandler",value:function(e){e.preventDefault(),this.component.disabled||this.component.setValue(o.default.cloneDeep(this.currentValue),{resetValue:!0}),this.closeModal()}},{key:"showDialog",value:function(){this.dialogElement=this.component.ce("div");var e='\n

    '.concat(this.component.t("Do you want to clear changes?"),'

    \n
    \n \n \n
    \n ");this.dialogElement.innerHTML=e,this.dialogElement.refs={},this.component.loadRefs.call(this.dialogElement,this.dialogElement,{dialogHeader:"single",dialogCancelButton:"single",dialogYesButton:"single"}),this.dialog=this.component.createModal(this.dialogElement),this.component.addEventListener(this.dialogElement.refs.dialogYesButton,"click",this.saveDialogListener),this.component.addEventListener(this.dialogElement.refs.dialogCancelButton,"click",this.closeDialogListener)}},{key:"closeDialog",value:function(e){e.preventDefault(),this.dialog.close(),this.component.removeEventListener(this.dialogElement.refs.dialogYesButton,"click",this.saveDialogListener),this.component.removeEventListener(this.dialogElement.refs.dialogCancelButton,"click",this.closeDialogListener)}},{key:"saveDialog",value:function(e){this.closeDialog(e),this.closeModalHandler(e)}},{key:"saveModalValueHandler",value:function(e){var t;e.preventDefault(),this.currentValue=(0,i.fastCloneDeep)(null!==(t=this.component.dataValue)&&void 0!==t?t:this.component.getValue()),this.closeModal()}}])&&s(t.prototype,n),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=c},68093:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}var o;function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t0?this.removeClass(t,"text-danger"):this.addClass(t,"text-danger"),this.setContent(t,this.t("{{ remaining }} ".concat(e," remaining."),{remaining:o}))}else this.setContent(t,this.t("{{ count }} ".concat(e),{count:n}))}},{key:"updateValueAt",value:function(e,t,n){if(t=t||{},l.default.get(this.component,"showWordCount",!1)&&this.refs.wordcount&&this.refs.wordcount[n]){var r=l.default.parseInt(l.default.get(this.component,"validate.maxWords",0),10);this.setCounter(this.t("words"),this.refs.wordcount[n],this.getWordCount(e),r)}if(l.default.get(this.component,"showCharCount",!1)&&this.refs.charcount&&this.refs.charcount[n]){var o=l.default.parseInt(l.default.get(this.component,"validate.maxLength",0),10);this.setCounter(this.t("characters"),this.refs.charcount[n],e.length,o)}}},{key:"getValueAt",value:function(e){var t=this.performInputMapping(this.refs.input[e]);return t&&t.widget?t.widget.getValue():t?t.value:void 0}},{key:"updateValue",value:function(e,t,n){t=t||{};var r=f(y(b.prototype),"updateValue",this).call(this,e,t);return this.triggerUpdateValueAt(this.dataValue,t,n),r}},{key:"parseValue",value:function(e){return e}},{key:"formatValue",value:function(e){return e}},{key:"attach",value:function(e){return this.loadRefs(e,{charcount:"multiple",wordcount:"multiple",prefix:"multiple",suffix:"multiple"}),f(y(b.prototype),"attach",this).call(this,e)}},{key:"getWidget",value:function(e){return e=e||0,this.refs.input&&this.refs.input[e]?this.refs.input[e].widget:null}},{key:"attachElement",value:function(e,t){var n=this;f(y(b.prototype),"attachElement",this).call(this,e,t),e.widget&&e.widget.destroy();var r=u.default.resolve();return e.widget=this.createWidget(t),e.widget&&(r=e.widget.attach(e),this.refs.prefix&&this.refs.prefix[t]&&e.widget.addPrefix(this.refs.prefix[t]),this.refs.suffix&&this.refs.suffix[t]&&e.widget.addSuffix(this.refs.suffix[t])),this.addFocusBlurEvents(e),this.options.submitOnEnter&&this.addEventListener(e,"keypress",(function(e){13===(e.keyCode||e.which)&&(e.preventDefault(),e.stopPropagation(),n.emit("submitButton"))})),r}},{key:"createWidget",value:function(e){var t,n=this;if(!this.component.widget)return null;var r,o="string"==typeof this.component.widget?{type:this.component.widget}:this.component.widget;if(null!==(t=this.root)&&void 0!==t&&t.shadowRoot&&(o.shadowRoot=null===(r=this.root)||void 0===r?void 0:r.shadowRoot),!a.default.hasOwnProperty(o.type))return null;var i=new a.default[o.type](o,this.component,this,e);return i.on("update",(function(){return n.updateValue(n.getValue(),{modified:!0},e)}),!0),i.on("redraw",(function(){return n.redraw()}),!0),i}},{key:"detach",value:function(){if(f(y(b.prototype),"detach",this).call(this),this.refs&&this.refs.input)for(var e=0;e<=this.refs.input.length;e++){var t=this.getWidget(e);t&&t.destroy()}this.refs.input=[]}},{key:"addFocusBlurEvents",value:function(e){var t=this;this.addEventListener(e,"focus",(function(){t.root.focusedComponent!==t?(t.root.pendingBlur&&t.root.pendingBlur(),t.root.focusedComponent=t,t.emit("focus",t)):t.root.focusedComponent===t&&t.root.pendingBlur&&(t.root.pendingBlur.cancel(),t.root.pendingBlur=null)})),this.addEventListener(e,"blur",(function(){t.root.pendingBlur=(0,i.delay)((function(){t.emit("blur",t),"blur"===t.component.validateOn&&t.root.triggerChange({fromBlur:!0},{instance:t,component:t.component,value:t.dataValue,flags:{fromBlur:!0}}),t.root.focusedComponent=null,t.root.pendingBlur=null}))}))}}])&&c(t.prototype,n),r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),b}(o.default);t.default=m},99606:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n(12419),n(74819),n(38880),n(83593),n(82526),n(41817),n(32165),n(66992),n(78783),n(33948),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n(69600),n(21249),n(41539),n(54747),n(69826),n(92222),n(30489);var o=u(n(68093)),i=u(n(91459)),a=u(n(96486));function u(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n\n '.concat(this.renderElement("hidden"!==this.component.type?this.dataValue:""),"\n "));var e=this.dataValue;return Array.isArray(e)||(e=e?[e]:[]),f(v(d.prototype),"render",this).call(this,this.renderTemplate("multiValueTable",{rows:e.map(this.renderRow.bind(this)).join(""),disabled:this.disabled,addAnother:this.addAnother}))}},{key:"renderElement",value:function(){return""}},{key:"renderRow",value:function(e,t){return this.renderTemplate("multiValueRow",{index:t,disabled:this.disabled,element:"".concat(this.renderElement(e,t))})}},{key:"attach",value:function(e){var t=this,n=f(v(d.prototype),"attach",this).call(this,e);this.loadRefs(e,{addButton:"multiple",input:"multiple",removeRow:"multiple",mask:"multiple",select:"multiple"});var r=[];return this.refs.input.forEach((function(e,n){r.push(t.attachElement.call(t,e,n))})),this.component.multiple?(this.refs.removeRow.forEach((function(e,n){t.addEventListener(e,"click",(function(e){e.preventDefault(),t.removeValue(n)}))})),this.refs.addButton.forEach((function(e){t.addEventListener(e,"click",(function(e){e.preventDefault(),t.addValue()}))})),n.then((function(){return i.default.all(r)}))):i.default.all(r)}},{key:"detach",value:function(){this.refs.input&&this.refs.input.length&&this.refs.input.forEach((function(e){e.mask&&e.mask.destroy(),e.widget&&e.widget.destroy()})),this.refs.mask&&this.refs.mask.length&&this.refs.mask.forEach((function(e){e.mask&&e.mask.destroy()})),f(v(d.prototype),"detach",this).call(this)}},{key:"attachElement",value:function(e,t){var n=this;if(this.addEventListener(e,this.inputInfo.changeEvent,(function(){var r=a.default.get(n.component,"case","mixed");if("mixed"!==r){var o=e.selectionStart,i=e.selectionEnd;"uppercase"===r&&e.value&&(e.value=e.value.toUpperCase()),"lowercase"===r&&e.value&&(e.value=e.value.toLowerCase()),e.selectionStart&&e.selectionEnd&&(e.selectionStart=o,e.selectionEnd=i)}try{n.saveCaretPosition(e,t)}catch(e){console.warn("An error occurred while trying to save caret position",e)}if(!e.mask)return n.updateValue(null,{modified:"hidden"!==n.component.type},t);setTimeout((function(){return n.updateValue(null,{modified:"hidden"!==n.component.type},t)}),1)})),!this.attachMultiMask(t)){this.setInputMask(e);var r=this.component.inputMask,o=this.component.displayMask;r&&o&&o!==r&&this.refs.valueMaskInput&&this.setInputMask(this.refs.valueMaskInput,r)}}},{key:"saveCaretPosition",value:function(e,t){var n,r;(null===(n=this.root)||void 0===n||null===(r=n.focusedComponent)||void 0===r?void 0:r.path)===this.path&&(this.root.currentSelection={selection:[e.selectionStart,e.selectionEnd],index:t})}},{key:"onSelectMaskHandler",value:function(e){this.updateMask(e.target.maskInput,this.getMaskPattern(e.target.value))}},{key:"getMaskPattern",value:function(e){if(this.multiMasks||(this.multiMasks={}),this.multiMasks[e])return this.multiMasks[e];var t=this.component.inputMasks.find((function(t){return t.label===e}));return this.multiMasks[e]=t?t.mask:this.component.inputMasks[0].mask,this.multiMasks[e]}},{key:"attachMultiMask",value:function(e){if(!(this.isMultipleMasksField&&this.component.inputMasks.length&&this.refs.input.length))return!1;var t=this.refs.select[e];return t.onchange=this.onSelectMaskHandler.bind(this),t.maskInput=this.refs.mask[e],this.setInputMask(t.maskInput,this.component.inputMasks[0].mask),!0}},{key:"updateMask",value:function(e,t){t&&(this.setInputMask(e,t,!this.component.placeholder),this.updateValue())}},{key:"addNewValue",value:function(e){void 0===e&&(e=this.component.defaultValue?this.component.defaultValue:this.emptyValue,Array.isArray(e)&&0===e.length&&(e=this.emptyValue));var t=this.dataValue||[];Array.isArray(t)||(t=[t]),Array.isArray(e)?t=t.concat(e):t.push(e),this.dataValue=t}},{key:"addValue",value:function(){this.addNewValue(),this.redraw(),this.checkConditions(),this.isEmpty(this.dataValue)||this.restoreValue(),this.root&&this.root.onChange()}}])&&s(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),d}(o.default);t.default=y},24561:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n(12419),n(74819),n(38880),n(83593),n(82526),n(41817),n(32165),n(66992),n(78783),n(33948),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n(21249),n(41539),n(54747),n(26699),n(32023),n(9494),n(9653),n(92222),n(34553),n(40561),n(47042),n(57327),n(30489);var o=s(n(96486)),i=s(n(68093)),a=s(n(39086)),u=s(n(91459)),l=n(82531);function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){for(var n=0;n0&&"getComponent"in e?s=e.getComponent(u,t,n):t&&t(e,o),!1})),s||(s=c),s):s}},{key:"getComponentById",value:function(e,t){var n=null;return this.everyComponent((function(r,o){if(r.id===e)return n=r,t&&t(r,o),!1})),n}},{key:"calculateComponentPath",value:function(e){var t="";if(e.component.key){for(var n=this;n&&!n.allowData&&n.parent;)n=n.parent;var r=e.row?"[".concat(Number.parseInt(e.row),"]"):"";return t=n.path?"".concat(n.path).concat(r,"."):"",(t+=e._parentPath&&e.component.shouldIncludeSubFormPath?e._parentPath:"")+e.component.key}}},{key:"createComponent",value:function(e,t,n,r){var i;if(e){t=t||this.options,n=n||this.data,t.parent=this,t.parentVisible=this.visible,t.root=(null===(i=t)||void 0===i?void 0:i.root)||this.root||this,t.localRoot=this.localRoot,t.skipInit=!0,!this.isInputComponent&&this.component.shouldIncludeSubFormPath&&(e.shouldIncludeSubFormPath=!0);var u=a.default.create(e,t,n,!0),l=this.calculateComponentPath(u);if(l&&(u.path=l),u.init(),e.internal)return u;if(r){var s=o.default.findIndex(this.components,{id:r.id});-1!==s?this.components.splice(s,0,u):this.components.push(u)}else this.components.push(u);return u}}},{key:"getContainer",value:function(){return this.element}},{key:"componentComponents",get:function(){return this.component.components||[]}},{key:"nestedKey",get:function(){return"nested-".concat(this.key)}},{key:"templateName",get:function(){return"container"}},{key:"init",value:function(){return this.components=this.components||[],this.addComponents(),h(b(g.prototype),"init",this).call(this)}},{key:"addComponents",value:function(e,t){var n=this;e=e||this.data,(t=t||this.options).components?this.components=t.components:(this.hook("addComponents",this.componentComponents,this)||[]).forEach((function(t){return n.addComponent(t,e)}))}},{key:"addComponent",value:function(e,t,n,r){return t=t||this.data,this.options.parentPath&&(e.shouldIncludeSubFormPath=!0),e=this.hook("addComponent",e,t,n,r),this.createComponent(e,this.options,t,n||null)}},{key:"beforeFocus",value:function(){this.parent&&"beforeFocus"in this.parent&&this.parent.beforeFocus(this)}},{key:"render",value:function(e){return h(b(g.prototype),"render",this).call(this,e||this.renderTemplate(this.templateName,{children:this.visible?this.renderComponents():"",nestedKey:this.nestedKey,collapsed:!this.options.pdf&&this.collapsed}))}},{key:"renderComponents",value:function(e){var t=(e=e||this.getComponents()).map((function(e){return e.render()}));return this.renderTemplate("components",{children:t,components:e})}},{key:"attach",value:function(e){var t=this,n=h(b(g.prototype),"attach",this).call(this,e);this.loadRefs(e,p({header:"single",collapsed:this.collapsed},this.nestedKey,"single"));var r=u.default.resolve();return this.refs[this.nestedKey]&&(r=this.attachComponents(this.refs[this.nestedKey])),this.component.collapsible&&this.refs.header&&(this.addEventListener(this.refs.header,"click",(function(){t.collapsed=!t.collapsed})),this.addEventListener(this.refs.header,"keydown",(function(e){13!==e.keyCode&&32!==e.keyCode||(e.preventDefault(),t.collapsed=!t.collapsed)}))),u.default.all([n,r])}},{key:"attachComponents",value:function(e,t,n){if(t=t||this.components,n=n||this.component.components,!(e=this.hook("attachComponents",e,t,n,this)))return new u.default((function(){}));var r=0,o=[];return Array.prototype.slice.call(e.children).forEach((function(e){!e.getAttribute("data-noattach")&&t[r]&&(o.push(t[r].attach(e)),r++)})),u.default.all(o)}},{key:"removeComponent",value:function(e,t){t=t||this.components,e.destroy(),o.default.remove(t,{id:e.id})}},{key:"removeComponentByKey",value:function(e,t){var n=this;if(!this.getComponent(e,(function(e,r){n.removeComponent(e,r),t&&t(e,r)})))return t&&t(null),null}},{key:"removeComponentById",value:function(e,t){var n=this;if(!this.getComponentById(e,(function(e,r){n.removeComponent(e,r),t&&t(e,r)})))return t&&t(null),null}},{key:"updateValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.components.reduce((function(e,n){return n.updateValue(null,t)||e}),h(b(g.prototype),"updateValue",this).call(this,e,t))}},{key:"shouldSkipValidation",value:function(e,t,n){return!this.component.input||h(b(g.prototype),"shouldSkipValidation",this).call(this,e,t,n)}},{key:"checkData",value:function(e,t,n,r){if(this.builderMode)return!0;e=e||this.rootValue,t=t||{},n=n||this.data;var i=(r=r&&o.default.isArray(r)?r:this.getComponents()).reduce((function(r,o){return o.checkData(e,t,n)&&r}),h(b(g.prototype),"checkData",this).call(this,e,t,n));return this.checkModal(i,this.isDirty),i}},{key:"checkConditions",value:function(e,t,n){var r=h(b(g.prototype),"checkConditions",this).call(this,e,t,n);return this.getComponents().forEach((function(n){return n.checkConditions(e,t,n.data)})),r}},{key:"clearOnHide",value:function(e){h(b(g.prototype),"clearOnHide",this).call(this,e),this.component.clearOnHide&&(this.allowData&&!this.hasValue()&&(this.dataValue=this.defaultValue),this.hasValue()&&this.restoreComponentsContext()),this.getComponents().forEach((function(t){return t.clearOnHide(e)}))}},{key:"restoreComponentsContext",value:function(){var e=this;this.getComponents().forEach((function(t){return t.data=e.dataValue}))}},{key:"beforePage",value:function(e){return u.default.all(this.getComponents().map((function(t){return t.beforePage(e)})))}},{key:"beforeSubmit",value:function(){return u.default.all(this.getComponents().map((function(e){return e.beforeSubmit()})))}},{key:"calculateValue",value:function(e,t,n){return!!this.conditionallyVisible()&&this.getComponents().reduce((function(r,o){return o.calculateValue(e,t,n)||r}),h(b(g.prototype),"calculateValue",this).call(this,e,t,n))}},{key:"isLastPage",value:function(){return this.pages.length-1===this.page}},{key:"isValid",value:function(e,t){return this.getComponents().reduce((function(n,r){return r.isValid(e,t)&&n}),h(b(g.prototype),"isValid",this).call(this,e,t))}},{key:"checkValidity",value:function(e,t,n,r){if(!this.checkCondition(n,e))return this.setCustomValidity(""),!0;var o=this.getComponents().reduce((function(o,i){return i.checkValidity(e,t,n,r)&&o}),h(b(g.prototype),"checkValidity",this).call(this,e,t,n,r));return this.checkModal(o,t),o}},{key:"checkAsyncValidity",value:function(e,t,n,r){var o=this;return this.ready.then((function(){var i=[h(b(g.prototype),"checkAsyncValidity",o).call(o,e,t,n,r)];return o.eachComponent((function(o){return i.push(o.checkAsyncValidity(e,t,n,r))})),u.default.all(i).then((function(e){return e.reduce((function(e,t){return e&&t}),!0)}))}))}},{key:"setPristine",value:function(e){h(b(g.prototype),"setPristine",this).call(this,e),this.getComponents().forEach((function(t){return t.setPristine(e)}))}},{key:"isPristine",get:function(){return this.pristine&&this.getComponents().every((function(e){return e.isPristine}))}},{key:"isDirty",get:function(){return this.dirty&&this.getComponents().every((function(e){return e.isDirty}))}},{key:"detach",value:function(){this.components.forEach((function(e){e.detach()})),h(b(g.prototype),"detach",this).call(this)}},{key:"clear",value:function(){this.components.forEach((function(e){e.clear()})),h(b(g.prototype),"clear",this).call(this)}},{key:"destroy",value:function(){this.destroyComponents(),h(b(g.prototype),"destroy",this).call(this)}},{key:"destroyComponents",value:function(){var e=this;this.getComponents().slice().forEach((function(t){return e.removeComponent(t,e.components)})),this.components=[]}},{key:"errors",get:function(){var e=this.error?[this.error]:[];return this.getComponents().reduce((function(e,t){return e.concat(t.errors||[])}),e).filter((function(e){return"hidden"!==e.level}))}},{key:"getValue",value:function(){return this.data}},{key:"resetValue",value:function(){h(b(g.prototype),"resetValue",this).call(this),this.getComponents().forEach((function(e){return e.resetValue()})),this.setPristine(!0)}},{key:"dataReady",get:function(){return u.default.all(this.getComponents().map((function(e){return e.dataReady})))}},{key:"setNestedValue",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e._data=this.componentContext(e),"button"!==e.type&&("components"===e.type?e.tree&&e.hasValue(t)?e.setValue(o.default.get(t,e.key),n):e.setValue(t,n):t&&e.hasValue(t)?e.setValue(o.default.get(t,e.key),n):this.rootPristine&&!e.visible||!e.shouldAddDefaultValue?void 0:(n.noValidate=!n.dirty,n.resetValue=!0,e.setValue(e.defaultValue,n)))}},{key:"setValue",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!!e&&(e.submitAsDraft&&!e.submit&&(n.noValidate=!0),this.getComponents().reduce((function(r,o){return t.setNestedValue(o,e,n,r)||r}),!1))}},{key:"lazyLoad",get:function(){var e;return null!==(e=this.component.lazyLoad)&&void 0!==e&&e}}],r=[{key:"schema",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&"getComponent"in e?l=e.getComponent(i,t,n):t&&t(e,o),a=null!==s?l:a.concat(l||u))}),s),a&&0!==a.length||!u||(a=null!==s?u:[u]),a):a}},{key:"everyComponent",value:function(e,t,n){var r;if(o.default.isObject(t)&&(n=t,t=null),null===(r=n)||void 0===r||!r.email){var i=this.getComponents(t);o.default.each(i,(function(t,r){return!1!==e(t,i,r)&&("function"!=typeof t.everyComponent||!1!==t.everyComponent(e,n))&&void 0}))}}},{key:"getValueAsString",value:function(e,t){if(null!=t&&t.email){var n,r='\n \n \n \n ';return null===(n=this.component.components)||void 0===n||n.forEach((function(e){var t=e.label||e.key;r+='")})),r+="\n \n \n \n ",this.iteratableRows.forEach((function(e){var n=e.components;r+="",o.default.each(n,(function(e){r+='"})),r+=""})),r+="\n \n
    '.concat(t,"
    ',e.isInputComponent&&e.visible&&!e.skipInEmail&&(r+=e.getView(e.dataValue,t)),r+="
    \n "}return e&&e.length?c(h(y.prototype),"getValueAsString",this).call(this,e,t):""}},{key:"getComponents",value:function(e){return void 0!==e?this.iteratableRows[e]?this.iteratableRows[e].components:[]:c(h(y.prototype),"getComponents",this).call(this)}}])&&s(t.prototype,n),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),y}(a.default);t.default=v},67329:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n(12419),n(74819),n(38880),n(47941),n(82526),n(57327),n(49337),n(41817),n(32165),n(66992),n(78783),n(33948),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n(92222),n(24603),n(74916),n(39714),n(41539),n(54747),n(15306),n(30489);var o=u(n(64430)),i=u(n(24561)),a=u(n(96486));function u(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t\n ').concat(e.getView(e.dataValue,t),"\n \n "))}),s(s({},t),{},{fromRoot:!0})),n+="\n \n \n "}return a.default.isEmpty(e)?"":null!=t&&t.modalPreview?(delete t.modalPreview,this.getDataValueAsTable(e,t)):"[Complex Data]"}},{key:"getDataValueAsTable",value:function(e,t){var n='\n \n \n ',r=new RegExp("<(.*?)>");return this.components.forEach((function(e){if(e.isInputComponent&&e.visible&&!e.skipInEmail){var o=e.getView(e.dataValue,t);n+='\n \n \n \n \n ")}}),s(s({},t),{},{fromRoot:!0})),n+="\n \n
    '.concat(e.label,'').concat(e.component&&"html"===e.component.inputFormat&&r.test(o)?o:''),"
    \n "}},{key:"everyComponent",value:function(e,t){if(null!=t&&t.email){if(!t.fromRoot)return;delete t.fromRoot}return p(m(l.prototype),"everyComponent",this).call(this,e,t)}},{key:"getValue",value:function(){return this.dataValue}},{key:"updateValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o.default.prototype.updateValue.call(this,e,t)}},{key:"setValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=!1,r=this.hasValue();return r&&a.default.isEmpty(this.dataValue)&&(t.noValidate=!0),e&&a.default.isObject(e)&&r||(n=!0,this.dataValue=this.defaultValue),n=p(m(l.prototype),"setValue",this).call(this,e,t)||n,this.updateOnChange(t,n),n}}],n&&d(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(i.default);t.default=b},83696:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n(12419),n(74819),n(38880),n(82526),n(41817),n(32165),n(66992),n(78783),n(33948),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n(26699),n(40561),n(74916),n(15306),n(24603),n(39714),n(64765),n(92222),n(69600),n(21249),n(47941),n(41539),n(23123),n(68309),n(30489);var o=s(n(96486)),i=s(n(91459)),a=s(n(68093)),u=s(n(63820)),l=n(82531);function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);no.default.get(this.component,"validate.minLength",0)}},{key:"hasTopSubmit",value:function(){return this.hasAddButton()&&["top","both"].includes(this.addAnotherPosition)}},{key:"hasBottomSubmit",value:function(){return this.hasAddButton()&&["bottom","both"].includes(this.addAnotherPosition)}},{key:"canAddColumn",get:function(){return this.builderMode}},{key:"render",value:function(){var e=this.getColumns(),t=0,n=this.hasRemoveButtons();this.component.reorder&&t++,n&&t++,this.canAddColumn&&t++;var r=Math.floor(12/(e.length+t));return O(S(x.prototype),"render",this).call(this,this.renderTemplate("datagrid",{rows:this.getRows(),columns:e,groups:this.hasRowGroups()?this.getGroups():[],visibleColumns:this.visibleColumns,hasToggle:o.default.get(this,"component.groupToggle",!1),hasHeader:this.hasHeader(),hasExtraColumn:this.hasExtraColumn(),hasAddButton:this.hasAddButton(),hasRemoveButtons:n,hasTopSubmit:this.hasTopSubmit(),hasBottomSubmit:this.hasBottomSubmit(),hasGroups:this.hasRowGroups(),numColumns:e.length+(this.hasExtraColumn()?1:0),datagridKey:this.datagridKey,allowReorder:this.allowReorder,builder:this.builderMode,canAddColumn:this.canAddColumn,tabIndex:this.tabIndex,placeholder:this.renderTemplate("builderPlaceholder",{position:this.componentComponents.length}),colWidth:r.toString()}))}},{key:"getRows",value:function(){return this.rows.map((function(e){var t={};return o.default.each(e,(function(e,n){t[n]=e.render()})),t}))}},{key:"getColumns",value:function(){var e=this;return this.columns.filter((function(t){return!e.visibleColumns.hasOwnProperty(t.key)||e.visibleColumns[t.key]}))}},{key:"hasHeader",value:function(){return this.component.components.reduce((function(e,t){return e||(t.label||t.title)&&!t.hideLabel}),!1)}},{key:"loadRefs",value:function(e,t){if(O(S(x.prototype),"loadRefs",this).call(this,e,t),"single"===t.messageContainer){var n=o.default.last(e.querySelectorAll("[ref=messageContainer]"));this.refs.messageContainer=n||this.refs.messageContainer}}},{key:"attach",value:function(e){var t,n=this;this.loadRefs(e,(k(t={},"".concat(this.datagridKey,"-row"),"multiple"),k(t,"".concat(this.datagridKey,"-tbody"),"single"),k(t,"".concat(this.datagridKey,"-addRow"),"multiple"),k(t,"".concat(this.datagridKey,"-removeRow"),"multiple"),k(t,"".concat(this.datagridKey,"-group-header"),"multiple"),k(t,this.datagridKey,"multiple"),k(t,"messageContainer","single"),t)),this.allowReorder&&(this.refs["".concat(this.datagridKey,"-row")].forEach((function(e,t){e.dragInfo={index:t}})),r&&(this.dragula=r([this.refs["".concat(this.datagridKey,"-tbody")]],{moves:function(e,t,n){var r=n.getAttribute("data-key");if(t.getAttribute("data-key")===r)return n.classList.contains("formio-drag-button")}}).on("drop",this.onReorder.bind(this)),this.dragula.on("cloned",(function(e,t){e&&e.children&&t&&t.children&&t.children.forEach((function(t,n){var r=getComputedStyle(t,null);if(""!==r.cssText)e.children[n].style.cssText=r.cssText;else{var o=Object.values(r).reduce((function(e,t){return"".concat(e).concat(t,":").concat(r.getPropertyValue(t),";")}),"");e.children[n].style.cssText=o}}))})))),this.refs["".concat(this.datagridKey,"-addRow")].forEach((function(e){n.addEventListener(e,"click",n.addRow.bind(n))})),this.refs["".concat(this.datagridKey,"-removeRow")].forEach((function(e,t){n.addEventListener(e,"click",n.removeRow.bind(n,t))})),this.hasRowGroups()&&(this.refs.chunks=this.getRowChunks(this.getGroupSizes(),this.refs["".concat(this.datagridKey,"-row")]),this.refs["".concat(this.datagridKey,"-group-header")].forEach((function(e,t){n.addEventListener(e,"click",(function(){return n.toggleGroup(e,t)}))})));var o=this.getColumns(),i=o.length;return this.rows.forEach((function(e,t){var r=0;o.forEach((function(e){n.attachComponents(n.refs[n.datagridKey][t*i+r],[n.rows[t][e.key]],n.getComponentsContainer()),r++}))})),O(S(x.prototype),"attach",this).call(this,e)}},{key:"getComponentsContainer",value:function(){return this.component.components}},{key:"onReorder",value:function(e,t,n,r){if(!e.dragInfo||r&&!r.dragInfo)console.warn("There is no Drag Info available for either dragged or sibling element");else{var o=e.dragInfo.index,i=r?r.dragInfo.index:this.dataValue.length,u=i>o,l=(0,a.fastCloneDeep)(this.dataValue),s=l[o];l.splice(i,0,s),l.splice(u?o:o+1,1),this.setValue(l,{isReordered:!0}),this.rebuild()}}},{key:"focusOnNewRowElement",value:function(e){Object.keys(e).find((function(t){var n=(0,a.getFocusableElements)(e[t].element);return!(!n||!n[0]||(n[0].focus(),0))}))}},{key:"addRow",value:function(){var e,t=this,n=this.rows.length;this.dataValue.length===n&&this.dataValue.push({});var r=this.dataValue,o=this.defaultValue;this.initEmpty&&o[n]?(e=o[n],r[n]=e):e=r[n],this.rows[n]=this.createRowComponents(e,n),this.emit("dataGridAddRow",{component:this.component,row:e}),this.checkConditions(),this.triggerChange(),this.redraw().then((function(){t.focusOnNewRowElement(t.rows[n])}))}},{key:"updateComponentsRowIndex",value:function(e,t){var n=this;e.forEach((function(e,r){var o;if(null!==(o=e.options)&&void 0!==o&&o.name){var i="[".concat(n.key,"][").concat(t,"]");e.options.name=e.options.name.replace("[".concat(n.key,"][").concat(e.rowIndex,"]"),i)}e.rowIndex=t,e.row="".concat(t,"-").concat(r),e.path=n.calculateComponentPath(e)}))}},{key:"updateRowsComponents",value:function(e){var t=this;this.rows.slice(e).forEach((function(n,r){t.updateComponentsRowIndex(Object.values(n),e+r)}))}},{key:"removeRow",value:function(e){this.splice(e,{isReordered:!0}),this.emit("dataGridDeleteRow",{index:e});var t=c(this.rows.splice(e,1),1)[0];this.removeRowComponents(t),this.updateRowsComponents(e),this.setValue(this.dataValue,{isReordered:!0}),this.redraw()}},{key:"removeRowComponents",value:function(e){var t=this;o.default.each(e,(function(e){return t.removeComponent(e)}))}},{key:"getRowValues",value:function(){return this.dataValue}},{key:"setRowComponentsData",value:function(e,t){o.default.each(this.rows[e],(function(e){e.data=t}))}},{key:"createRows",value:function(e,t){var n=this,r=!1,o=this.getRowValues();o.forEach((function(e,o){!t&&n.rows[o]?n.setRowComponentsData(o,e):(n.rows[o]&&n.removeRowComponents(n.rows[o]),n.rows[o]=n.createRowComponents(e,o),r=!0)}));var i=this.rows.splice(o.length),a=!!i.length;return a&&i.forEach((function(e){return n.removeRowComponents(e)})),e||!r&&!a||this.redraw(),r}},{key:"createRowComponents",value:function(e,t){var n=this,r={};return this.tabIndex=0,this.component.components.map((function(i,a){var u,l=o.default.clone(n.options);l.name+="[".concat(t,"]"),l.row="".concat(t,"-").concat(a),n.builderMode?(i.id=i.id+t,u=i):u=s(s({},i),{},{id:i.id+t});var c=n.createComponent(u,l,e);c.parentDisabled=!!n.disabled,c.rowIndex=t,c.inDataGrid=!0,u.tabindex&&parseInt(u.tabindex)>n.tabIndex&&(n.tabIndex=parseInt(u.tabindex)),r[i.key]=c})),r}},{key:"checkValidity",value:function(e,t,n,r){if(e=e||this.rootValue,n=n||this.data,!this.checkCondition(n,e))return this.setCustomValidity(""),!0;if(!this.checkComponentValidity(e,t,n,{silentCheck:r}))return!1;var o=this.checkRows("checkValidity",e,t,!0,r);return this.checkModal(o,t),o}},{key:"checkColumns",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=e||this.rootValue;var r=!1;if(!this.rows||!this.rows.length)return{rebuild:!1,show:!1};if(this.builderMode)return{rebuild:!1,show:!0};var i={},a=!1,u=this.dataValue;this.rows.forEach((function(r,l){o.default.each(r,(function(r,s){if(r&&"function"==typeof r.checkConditions){var c=void 0===i[s];if(i[s]=!!i[s]||r.checkConditions(e,n,u[l])&&"hidden"!==r.type,r.component.logic&&c){var f=o.default.findIndex(t.columns,["key",s]);o.default.isEqual(t.columns[f],r.component)||(a=!0,t.columns[f]=r.component)}}}))}));var l=!o.default.isEqual(i,this.visibleColumns)||a;return o.default.each(i,(function(e){r|=e})),this.visibleColumns=i,{rebuild:l,show:r}}},{key:"checkComponentConditions",value:function(e,t,n){var r=this.visible;if(!O(S(x.prototype),"checkComponentConditions",this).call(this,e,t,n))return!1;var o=this.checkColumns(e,t),i=o.rebuild,a=o.show;return!i&&r||this.createRows(!1,i),a}},{key:"setValue",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return this.dataValue=this.defaultValue,this.createRows(),!1;Array.isArray(e)||("object"===p(e)?e=[e]:(this.createRows(),e=[{}])),!e||e.length||this.initEmpty||e.push({});var r=n.fromSubmission&&!o.default.isEqual(e,this.emptyValue),i=this.hasChanged(e,this.dataValue);return this.dataValue=e,(this.initRows||r)&&!this.createRows()&&i&&this.redraw(),this.componentModal&&r&&this.componentModal.setValue(e),this.rows.forEach((function(r,i){e.length<=i||o.default.each(r,(function(r){r.rowIndex=i,t.setNestedValue(r,e[i],n)}))})),this.updateOnChange(n,i),i}},{key:"restoreComponentsContext",value:function(){var e=this;this.rows.forEach((function(t,n){return o.default.forIn(t,(function(t){return t.data=e.dataValue[n]}))}))}},{key:"getComponent",value:function(e,t){var n,r=d(n=e=Array.isArray(e)?e:[e])||y(n)||v(n)||f(),i=r[0],a=r.slice(1),u=[];if(o.default.isNumber(i)&&a.length){var l=a.pop();return(u=this.rows[i][l])||Object.entries(this.rows[i]).forEach((function(e){var n=c(e,2)[1];if("getComponent"in n){var r=n.getComponent([l],t);r&&(u=r)}})),u&&o.default.isFunction(t)&&t(u,this.getComponents()),a.length&&"getComponent"in u?u.getComponent(a,t):u}return o.default.isString(i)?(this.everyComponent((function(e,n){if(e.component.key===i){var r=e;a.length>0&&"getComponent"in e?r=e.getComponent(a,t):t&&t(e,n),u=u.concat(r)}})),u.length>0?u:null):u}},{key:"toggleGroup",value:function(e,t){e.classList.toggle("collapsed"),o.default.each(this.refs.chunks[t],(function(e){e.classList.toggle("hidden")}))}}],u=[{key:"schema",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n");return this.renderTemplate("well",{children:o,nestedKey:this.key,value:e})}return this.renderTemplate("input",{prefix:this.prefix,suffix:this.suffix,input:n,value:e,index:t})}},{key:"autoExpand",get:function(){return this.component.autoExpand}},{key:"updateEditorValue",value:function(e,t){t=this.getConvertedValue(this.trimBlanks(t));var n=this.dataValue;if(this.component.multiple&&Array.isArray(n)){var r=i.default.clone(n);r[e]=t,t=r}i.default.isEqual(t,n)||i.default.isEmpty(t)&&i.default.isEmpty(n)||this.updateValue(t,{modified:!this.autoModified},e),this.autoModified=!1}},{key:"attachElement",value:function(e,t){var n=this;if(this.autoExpand&&(this.isPlain||this.options.readOnly||this.options.htmlView)&&"TEXTAREA"===e.nodeName&&this.addAutoExpanding(e,t),this.options.readOnly)return e;this.component.wysiwyg&&!this.component.editor&&(this.component.editor="ckeditor");var r=i.default.isEmpty(this.component.wysiwyg)?this.wysiwygDefault[this.component.editor]||this.wysiwygDefault.default:this.component.wysiwyg;return this.editorsReady[t]=new a.default((function(o){switch(n.component.editor){case"ace":r||(r={}),r.mode=n.component.as?"ace/mode/".concat(n.component.as):"ace/mode/javascript",n.addAce(e,r,(function(e){return n.updateEditorValue(t,e)})).then((function(e){n.editors[t]=e;var r=n.dataValue;return r=n.component.multiple&&Array.isArray(r)?r[t]:r,e.setValue(n.setConvertedValue(r,t)),o(e),e})).catch((function(e){return console.warn(e)}));break;case"quill":(r.hasOwnProperty("toolbarGroups")||r.hasOwnProperty("toolbar"))&&(console.warn("The WYSIWYG settings are configured for CKEditor. For this renderer, you will need to use configurations for the Quill Editor. See https://quilljs.com/docs/configuration for more information."),r=n.wysiwygDefault.quill),n.addQuill(e,r,(function(){return n.updateEditorValue(t,n.editors[t].root.innerHTML)})).then((function(e){if(n.editors[t]=e,n.component.isUploadEnabled){var r=n;e.getModule("uploader").options.handler=function(){for(var e,t=arguments.length,n=new Array(t),o=0;o2&&void 0!==arguments[2]?arguments[2]:{};if(f(v(m.prototype),"setValueAt",this).call(this,e,t,r),this.editorsReady[e]){var o=function(r){return function(o){if(!r.skipWysiwyg)switch(n.autoModified=!0,n.component.editor){case"ace":o.setValue(n.setConvertedValue(t,e));break;case"quill":if(n.component.isUploadEnabled)n.setAsyncConvertedValue(t).then((function(e){var t=o.clipboard.convert({html:e});o.setContents(t)}));else{var i=n.setConvertedValue(t,e),a=o.clipboard.convert({html:i});o.setContents(a)}break;case"ckeditor":o.data.set(n.setConvertedValue(t,e))}}};this.editorsReady[e].then(o(i.default.clone(r)))}}},{key:"setValue",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.isPlain||this.options.readOnly||this.disabled?(e=this.component.multiple&&Array.isArray(e)?e.map((function(e,n){return t.setConvertedValue(e,n)})):this.setConvertedValue(e),f(v(m.prototype),"setValue",this).call(this,e,n)):(n.skipWysiwyg=i.default.isEqual(e,this.getValue()),f(v(m.prototype),"setValue",this).call(this,e,n))}},{key:"setContent",value:function(e,t,n){f(v(m.prototype),"setContent",this).call(this,e,t,n,{addAttr:["allow","allowfullscreen","frameborder","scrolling"],addTags:["iframe"]})}},{key:"setReadOnlyValue",value:function(e,t){t=t||0,(this.options.readOnly||this.disabled)&&this.refs.input&&this.refs.input[t]&&("plain"===this.component.inputFormat?this.refs.input[t].innerText=this.interpolate(e,{},{noeval:!0}):this.setContent(this.refs.input[t],this.interpolate(e,{},{noeval:!0}),this.shouldSanitizeValue))}},{key:"isJsonValue",get:function(){return this.component.as&&"json"===this.component.as}},{key:"setConvertedValue",value:function(e,t){if(this.isJsonValue&&!i.default.isNil(e))try{e=JSON.stringify(e,null,2)}catch(e){console.warn(e)}return i.default.isString(e)||(e=""),this.setReadOnlyValue(e,t),e}},{key:"setAsyncConvertedValue",value:function(e){if(this.isJsonValue&&e)try{e=JSON.stringify(e,null,2)}catch(e){console.warn(e)}i.default.isString(e)||(e="");var t=(new DOMParser).parseFromString(e,"text/html"),n=t.getElementsByTagName("img");return n.length?this.setImagesUrl(n).then((function(){return e=t.getElementsByTagName("body")[0].innerHTML})):a.default.resolve(e)}},{key:"setImagesUrl",value:function(e){var t=this;return a.default.all(i.default.map(e,(function(e){var n;try{n=JSON.parse(e.getAttribute("alt"))}catch(e){console.warn(e)}return t.fileService.downloadFile(n).then((function(t){e.setAttribute("src",t.url)}))})))}},{key:"addAutoExpanding",value:function(e,t){var n=null,r=null,o=function(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t},a=function(){0!==e.scrollHeight&&function(t,r){for(var o=[];t&&t.parentNode&&t.parentNode instanceof Element;)t.parentNode.scrollTop&&o.push({node:t.parentNode,scrollTop:t.parentNode.scrollTop}),t=t.parentNode;e.style.height="",e.style.height="".concat(e.scrollHeight+n,"px"),o.forEach((function(e){e.node.scrollTop=e.scrollTop}))}(e)},u=i.default.debounce((function(){a();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),i=e.offsetHeight;i0&&void 0!==arguments[0]?arguments[0]:this.dataValue;return f(v(m.prototype),"isEmpty",this).call(this,this.trimBlanks(e))}},{key:"defaultValue",get:function(){var e=f(v(m.prototype),"defaultValue",this);return"quill"!==this.component.editor||e||(e="


    "),e}},{key:"getConvertedValue",value:function(e){if(this.isJsonValue&&e)try{e=JSON.parse(e)}catch(e){}return e}},{key:"detach",value:function(){var e=this;this.editors.forEach((function(e){e.destroy&&e.destroy()})),this.editors=[],this.editorsReady=[],this.updateSizes.forEach((function(t){return e.removeEventListener(window,"resize",t)})),this.updateSizes=[],f(v(m.prototype),"detach",this).call(this)}},{key:"getValue",value:function(){return this.isPlain?this.getConvertedValue(f(v(m.prototype),"getValue",this).call(this)):this.dataValue}},{key:"focus",value:function(){switch(f(v(m.prototype),"focus",this).call(this),this.component.editor){case"ckeditor":var e,t;null!==(e=this.editors[0].editing)&&void 0!==e&&null!==(t=e.view)&&void 0!==t&&t.focus&&this.editors[0].editing.view.focus(),this.element.scrollIntoView();break;case"ace":this.editors[0].focus(),this.element.scrollIntoView();break;case"quill":this.editors[0].focus()}}}],r=[{key:"schema",value:function(){for(var e=arguments.length,t=new Array(e),n=0;nhttps://github.com/danialfarid/ng-file-upload#server-side for how to set up the server.",conditional:{json:{"===":[{var:"data.uploadStorage"},"url"]}}},{type:"textarea",key:"uploadOptions",label:"Image Upload Custom request options",tooltip:"Pass your custom xhr options(optional)",rows:5,editor:"ace",input:!0,weight:415.4,placeholder:'{\n "withCredentials": true\n }',conditional:{json:{"===":[{var:"data.uploadStorage"},"url"]}}},{type:"textfield",input:!0,key:"uploadDir",label:"Image Upload Directory",placeholder:"(optional) Enter a directory for the files",tooltip:"This will place all the files uploaded in this field in the directory",weight:415.5,conditional:{json:{"===":[{var:"data.isUploadEnabled"},!0]}}},{type:"textfield",key:"fileKey",input:!0,label:"File form-data Key",tooltip:"Key name that you would like to modify for the file while calling API request.",rows:5,weight:415.6,placeholder:"Enter the key name of a file for form data.",conditional:{json:{and:[{"===":[{var:"data.editor"},"quill"]},{"===":[{var:"data.isUploadEnabled"},!0]},{"===":[{var:"data.uploadStorage"},"url"]}]}}},{type:"select",input:!0,key:"as",label:"Save As",dataSrc:"values",tooltip:"This setting determines how the value should be entered and stored in the database.",clearOnHide:!0,data:{values:[{label:"String",value:"string"},{label:"JSON",value:"json"},{label:"HTML",value:"html"}]},conditional:{json:{or:[{"===":[{var:"data.editor"},"quill"]},{"===":[{var:"data.editor"},"ace"]}]}},weight:416},{type:"textarea",input:!0,editor:"ace",rows:10,as:"json",label:"Editor Settings",tooltip:"Enter the WYSIWYG editor JSON configuration.",key:"wysiwyg",customDefaultValue:function(e,t,n,r,o){return o?o.wysiwygDefault:""},conditional:{json:{or:[{"===":[{var:"data.editor"},"ace"]},{"===":[{var:"data.editor"},"ckeditor"]},{"===":[{var:"data.editor"},"quill"]}]}},weight:417}];t.default=a},94799:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=[{weight:125,key:"validate.minWords",label:"Minimum Word Length",placeholder:"Minimum Word Length",type:"number",tooltip:"The minimum amount of words that can be added to this field.",input:!0},{weight:126,key:"validate.maxWords",label:"Maximum Word Length",placeholder:"Maximum Word Length",type:"number",tooltip:"The maximum amount of words that can be added to this field.",input:!0}]},53983:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if(e&&"object"===s(e)||(e={value:e,maskName:this.component.inputMasks[0].label}),!e.value){var n=t.noDefault?this.emptyValue:this.defaultValue;e.value=Array.isArray(n)?n[0]:n}return e}},{key:"normalizeValue",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.isMultipleMasksField?Array.isArray(e)?y(b(m.prototype),"normalizeValue",this).call(this,e.map((function(e){return t.maskValue(e,n)}))):y(b(m.prototype),"normalizeValue",this).call(this,this.maskValue(e,n)):y(b(m.prototype),"normalizeValue",this).call(this,e)}},{key:"setValueAt",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!this.isMultipleMasksField)return y(b(m.prototype),"setValueAt",this).call(this,e,t,n);var r=(t=this.maskValue(t,n)).value||"",a=this.refs.mask?this.refs.mask[e]:null,u=this.refs.select?this.refs.select[e]:null,l=this.getMaskPattern(t.maskName);if(!(a&&u&&l))return y(b(m.prototype),"setValueAt",this).call(this,e,r,n);var s=this.placeholderChar;a.value=(0,o.conformToMask)(r,i.getInputMask(l),{placeholderChar:s}).conformedValue,u.value=t.maskName}},{key:"unmaskValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.component.displayMask,n=i.getInputMask(t,this.placeholderChar);return i.unmaskValue(e,n,this.placeholderChar)}},{key:"getValueAt",value:function(e){if(!this.isMultipleMasksField){var t,n,r=y(b(m.prototype),"getValueAt",this).call(this,e),o=this.component.inputMask,i=this.component.displayMask;return o&&!i||i===o?r:i&&!o?this.unmaskValue(r,i):null!==(t=this.refs.valueMaskInput)&&void 0!==t&&t.mask?(this.refs.valueMaskInput.mask.textMaskInputElement.update(r),null===(n=this.refs.valueMaskInput)||void 0===n?void 0:n.value):r}var a=this.refs.mask?this.refs.mask[e]:null,u=this.refs.select?this.refs.select[e]:null;return{value:a?a.value:void 0,maskName:u?u.value:void 0}}},{key:"isHtmlRenderMode",value:function(){return y(b(m.prototype),"isHtmlRenderMode",this).call(this)||(this.options.readOnly||this.disabled)&&"html"===this.component.inputFormat&&"textfield"===this.type}},{key:"isEmpty",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.dataValue;return this.isMultipleMasksField?y(b(m.prototype),"isEmpty",this).call(this,e)||(this.component.multiple?0===e.length:!e.maskName||!e.value):y(b(m.prototype),"isEmpty",this).call(this,(e||"").toString().trim())}},{key:"truncateMultipleSpaces",value:function(e){return e?e.trim().replace(/\s{2,}/g," "):e}},{key:"validationValue",get:function(){var e=y(b(m.prototype),"validationValue",this);return e&&this.component.truncateMultipleSpaces?this.truncateMultipleSpaces(e):e}},{key:"beforeSubmit",value:function(){var e=this,t=this.dataValue;return this.component.truncateMultipleSpaces&&t?(t=this.truncateMultipleSpaces(t),this.dataValue=t,a.default.resolve(t).then((function(){return y(b(m.prototype),"beforeSubmit",e).call(e)}))):a.default.resolve(t)}}],u=[{key:"schema",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n{{ item.label }}",data:{values:[{value:"plain",label:"Plain"},{value:"html",label:"HTML"},{value:"raw",label:"Raw (Insecure)"}]},defaultValue:"plain",input:!0},{weight:200,type:"radio",label:"Text Case",key:"case",tooltip:"When data is entered, you can change the case of the value.",input:!0,values:[{value:"mixed",label:"Mixed (Allow upper and lower case)"},{value:"uppercase",label:"Uppercase"},{value:"lowercase",label:"Lowercase"}]},{weight:205,type:"checkbox",input:!0,key:"truncateMultipleSpaces",label:"Truncate Multiple Spaces"}]},58054:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(22457)),o=i(n(96486));function i(e){return e&&e.__esModule?e:{default:e}}var a=[{weight:400,type:"select",input:!0,key:"widget.type",label:"Widget",placeholder:"Select a widget",tooltip:"The widget is the display UI used to input the value of the field.",defaultValue:"input",onChange:function(e){e.data.widget=o.default.pick(e.data.widget,"type")},dataSrc:"values",data:{values:[{label:"Input Field",value:"input"},{label:"Calendar Picker",value:"calendar"}]},conditional:{json:{"===":[{var:"data.type"},"textfield"]}}},{weight:405,type:"textarea",key:"widget",label:"Widget Settings",refreshOn:"wiget.type",clearOnHide:!1,calculateValue:function(e){var t=e.instance.calculatedValue,n=e.data.widget.type;if(o.default.isEmpty(o.default.omit(e.data.widget,"type"))||o.default.isEmpty(o.default.omit(t,"type"))){if(t&&!t.type)return e.data.widget;var i=e.instance._currentForm.options.editComponent.widget;if(i&&!o.default.isEmpty(o.default.omit(i,"type"))&&n===i.type)return o.default.omit(i,"language");if(n)return o.default.omit(r.default[n].defaultSettings,"language")}return e.data.widget},input:!0,rows:5,editor:"ace",as:"json",conditional:{json:{"!==":[{var:"data.widget.type"},"input"]}}},{weight:410,type:"textfield",input:!0,key:"inputMask",label:"Input Mask",tooltip:"An input mask helps the user with input by ensuring a predefined format.

    9: numeric
    a: alphabetical
    *: alphanumeric

    Example telephone mask: (999) 999-9999

    See the jquery.inputmask documentation for more information.",customConditional:function(e){return!e.data.allowMultipleMasks}},{weight:410,type:"textfield",input:!0,key:"displayMask",label:"Display Mask",tooltip:"A display mask helps to display the input in a readable way, this won't affect the value which will be saved (to affect both view and saved value, delete Display Mask and use Input Mask).

    9: numeric
    a: alphabetical
    *: alphanumeric

    Example telephone mask: (999) 999-9999

    See the jquery.inputmask documentation for more information.",customConditional:function(e){return!e.data.allowMultipleMasks}},{weight:411,type:"textfield",input:!0,key:"inputMaskPlaceholderChar",label:"Input Mask Placeholder Char",tooltip:"You can specify a char which will be used as a placeholder in the field.
    E.g., ˍ
    Make note that placeholder char will be replaced by a space if it is used inside the mask",validation:{maxLength:1},customConditional:function(e){return e.data.inputMask||e.data.displayMask}},{weight:413,type:"checkbox",input:!0,key:"allowMultipleMasks",label:"Allow Multiple Masks"},{weight:1350,type:"checkbox",input:!0,key:"spellcheck",defaultValue:!0,label:"Allow Spellcheck"},{weight:417,type:"datagrid",input:!0,key:"inputMasks",label:"Input Masks",customConditional:function(e){return!0===e.data.allowMultipleMasks},reorder:!0,components:[{type:"textfield",key:"label",label:"Label",input:!0},{type:"textfield",key:"mask",label:"Mask",input:!0}]},{weight:320,type:"textfield",input:!0,key:"prefix",label:"Prefix"},{weight:330,type:"textfield",input:!0,key:"suffix",label:"Suffix"},{weight:700,type:"textfield",input:!0,key:"autocomplete",label:"Autocomplete",placeholder:"on",tooltip:"Indicates whether input elements can by default have their values automatically completed by the browser. See the MDN documentation on autocomplete for more information."},{weight:1300,type:"checkbox",label:"Hide Input",tooltip:"Hide the input in the browser. This does not encrypt on the server. Do not use for passwords.",key:"mask",input:!0},{weight:1200,type:"checkbox",label:"Show Word Counter",tooltip:"Show a live count of the number of words.",key:"showWordCount",input:!0},{weight:1201,type:"checkbox",label:"Show Character Counter",tooltip:"Show a live count of the number of characters.",key:"showCharCount",input:!0}];t.default=a},64082:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=[{weight:110,key:"validate.minLength",label:"Minimum Length",placeholder:"Minimum Length",type:"number",tooltip:"The minimum length requirement this field must meet.",input:!0},{weight:120,key:"validate.maxLength",label:"Maximum Length",placeholder:"Maximum Length",type:"number",tooltip:"The maximum length requirement this field must meet.",input:!0},{weight:125,key:"validate.minWords",label:"Minimum Word Length",placeholder:"Minimum Word Length",type:"number",tooltip:"The minimum amount of words that can be added to this field.",input:!0},{weight:126,key:"validate.maxWords",label:"Maximum Word Length",placeholder:"Maximum Word Length",type:"number",tooltip:"The maximum amount of words that can be added to this field.",input:!0},{weight:130,key:"validate.pattern",label:"Regular Expression Pattern",placeholder:"Regular Expression Pattern",type:"textfield",tooltip:"The regular expression pattern test that the field value must pass before the form can be submitted.",input:!0}]},12630:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){for(var e=arguments.length,t=new Array(e),n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0}},{key:"hasExtraColumn",value:function(){return!1}},{key:"hasAddButton",value:function(){return v(g(d.prototype),"hasAddButton",this).call(this)&&this.hasColumns()}},{key:"componentSchema",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:{};v(g(d.prototype),"build",this).call(this,e),this.tableElement.className=this.tableClass,this.builderMode&&!this.hasColumns()&&this.element.appendChild(this.builderView()),this.setMeta()}},{key:"buildRows",value:function(){v(g(d.prototype),"buildRows",this).call(this),this.groupsMode&&this.buildGroups()}},{key:"buildGroups",value:function(){var e=this,t=o.default.get(this.component,"rowGroups",[]),n=o.default.map(t,"numberOfRows"),r=this.tableElement.querySelectorAll("tbody>tr"),i=this.tableElement.querySelector("tbody"),a=this.getRowChunks(n,r).map(o.default.head);t.map((function(t){return e.buildGroup(t)})).forEach((function(e,t){var n=a[t];n&&i.insertBefore(e,n)}))}},{key:"getRowChunks",value:function(e,t){var n=e.reduce((function(e,t){var n=c(e,2),r=n[0],o=n[1],i=r+t;return[i,[].concat(s(o),[[r,i]])]}),[0,[]]);return c(n,2)[1].map((function(e){return o.default.slice.apply(o.default,[t].concat(s(e)))}))}},{key:"buildGroup",value:function(e){var t=e.label,n=this.getColumns().length,r=this.ce("td",{colspan:n,class:"edittable-group-label"},t);return this.ce("tr",null,r)}},{key:"buildRow",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.builderMode)return null;this.rows[t]={};var o=this.componentComponents,i=o.length-1,a=o.map((function(o,a){var u=n.buildComponent(o,a,e,t,n.getComponentState(o,r));return n.hasRemoveButtons()&&a===i&&u.append(n.removeButton(t)),u}));return this.ce("tr",null,a)}},{key:"removeButton",value:function(e){var t=this,n=o.default.get(this.component,"type","edittable"),r=this.ce("button",{type:"button",class:"btn btn-xxs btn-danger formio-".concat(n,"-remove")},this.ce("i",{class:this.iconClass("remove")}));return this.addEventListener(r,"click",(function(n){n.preventDefault(),t.removeValue(e)})),r}},{key:"builderView",value:function(){return this.ce("div",{class:"well edittable-placeholder"},[this.ce("i",{class:this.iconClass("warning-sign")})," ",this.t("No columns provided")])}},{key:"getMeta",value:function(){var e=this.getGroups();return this.hasColumns&&e.length?e.reduce((function(e,t){return e[t.label]=t.numberOfRows,e}),{}):null}},{key:"setMeta",value:function(){var e=o.default.get(this.component,"key"),t=this.getMeta();e&&t&&o.default.set(this.root,["_submission","metadata",e],t)}}],r=[{key:"schema",value:function(){for(var e=arguments.length,t=new Array(e),n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:"";return this.renderTemplate("modaledit",{content:e})}},{key:"attach",value:function(e){return this.loadRefs(e,{container:"single",edit:"single"}),h(b(f.prototype),"attach",this).call(this,e)}},{key:"attachElement",value:function(e){Object.defineProperty(e,"value",{get:function(){return this.innerHTML},set:function(e){this.innerHTML=e}});var t=this.showModal.bind(this);this.addEventListener(this.refs.container,"dblclick",t),this.addEventListener(this.refs.edit,"click",t)}},{key:"createModal",value:function(e){var t=this,n=this,r=this.ce("div");this.setContent(r,this.renderTemplate("modaldialog")),r.refs={},this.loadRefs.call(r,r,{overlay:"single",content:"single",inner:"single",close:"single"});var o=this.getElementRect(this.refs.container),i=this.getModalLayout(o),a=this.getModalStyle(i);return Object.assign(r.refs.content.style,a),r.refs.inner.appendChild(e),this.addEventListener(r.refs.overlay,"click",(function(e){e.preventDefault(),r.close()})),this.addEventListener(r.refs.close,"click",(function(e){e.preventDefault(),r.close()})),this.addEventListener(r,"close",(function(){t.removeChildFrom(r,document.body)})),r.close=function(){r.dispatchEvent(new CustomEvent("close")),n.removeChildFrom(r,document.body)},document.body.appendChild(r),r}},{key:"updateOnChange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];h(b(f.prototype),"updateOnChange",this).call(this,e,t)&&this.updateContentView(this.dataValue)}},{key:"showModal",value:function(){var e=this.ce("div");this.setContent(e,h(b(f.prototype),"renderElement",this).call(this,this.dataValue));var t=e.children[0];this.isPlain&&(t.style.resize="vertical"),h(b(f.prototype),"attachElement",this).call(this,t),this.createModal(t)}},{key:"updateContentView",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=o.default.get(this,"refs.input[0]",null);return this.setContent(t,e)}},{key:"getElementRect",value:function(e){return e.getBoundingClientRect()}},{key:"getModalStyle",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={position:"absolute",height:"auto"},r=o.default.mapValues(o.default.pick(e,["top","left","width"]),(function(e){return"".concat(e,"px")}));return c(c(c({},n),t),r)}},{key:"getModalLayout",value:function(e){var t=this.getModalSize(e.width,e.height),n=t.width,r=t.height;return{left:e.left,minHeight:r,top:e.top,width:n}}},{key:"getModalSize",value:function(e,t){var n,r,i=(n=this.defaultModalSize,r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(n,r)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=i[0],u=i[1],s=o.default.get(this.component,"modalLayout","fixed"),c=this.layoutProps[s],f=c.widthProp,d=c.heightProp,p=o.default.get(this.component,f,a),h=o.default.get(this.component,d,u);return"fluid"===s?{width:Math.max(e,p),height:Math.max(t,h)}:{width:p,height:h}}},{key:"defaultModalSize",get:function(){return[475,300]}},{key:"layoutProps",get:function(){return{fixed:{widthProp:"width",heightProp:"height"},fluid:{widthProp:"minWidth",heightProp:"minHeight"}}}}],r=[{key:"schema",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:{};return this.updateValue(e,t)}},{key:"onToken",value:function(e){this.setValue(e.id),"submit"===this.componentAction?this.emit("submitButton"):(this.addClass(this.element,"btn-success"),this.disabled=!0)}},{key:"onClickButton",value:function(e){var t=this;if(this.component.key===e.component.key){var n=r.default.cloneDeep(this.component.stripe.popupConfiguration)||{};r.default.each(n,(function(e,r){n[r]=t.t(e)})),"submit"===this.componentAction?this.root.isValid(e.data,!0)?this.handler.open(n):this.emit("submitButton"):this.handler.open(n)}}},{key:"build",value:function(){var e=this;s(p(v.prototype),"build",this).call(this),"submit"===this.componentAction&&(this.on("submitButton",(function(){e.loading=!0,e.disabled=!0}),!0),this.on("submitDone",(function(){e.loading=!1,e.disabled=!1}),!0),this.on("change",(function(t){e.loading=!1,e.disabled=e.component.disableOnInvalid&&!e.root.isValid(t.data,!0)}),!0),this.on("error",(function(){e.loading=!1}),!0)),this.stripeCheckoutReady.then((function(){var t=r.default.cloneDeep(e.component.stripe.handlerConfiguration)||{};t.key=e.component.stripe.apiKey,t.token=e.onToken.bind(e),void 0===t.locale&&(t.locale=e.options.language),e.handler=StripeCheckout.configure(t),e.on("customEvent",e.onClickButton.bind(e)),e.addEventListener(window,"popstate",(function(){e.handler.close()}))}))}}],a=[{key:"builderInfo",get:function(){return{group:!1,schema:o.default.schema()}}}],n&&l(t.prototype,n),a&&l(t,a),Object.defineProperty(t,"prototype",{writable:!1}),v}(o.default);t.default=h,"object"===(void 0===n.g?"undefined":u(n.g))&&n.g.Formio&&n.g.Formio.registerComponent&&n.g.Formio.registerComponent("stripeCheckout",h)},34038:function(e,t,n){"use strict";n(41539),n(12419),n(74819),n(38880),n(82526),n(41817),n(32165),n(66992),n(78783),n(33948),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n(30489);var r=l(n(96486)),o=l(n(6771)),i=l(n(64430)),a=n(19161),u=l(n(91459));function l(e){return e&&e.__esModule?e:{default:e}}function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function c(e,t){for(var n=0;n=s)for(;s>>0,"object"===r(e[o])?e[o].baseVal=a.join(" "):e[o]=a.join(" "),f())},i.remove=function(){d.apply(i,t=arguments);for(var t,n={},s=0,c=[];s>>0,"object"===r(e[o])?e[o].baseVal=a.join(" "):e[o]=a.join(" "),f()},i.toggle=function(e,n){return d.apply(i,[e]),t!==n?n?(i.add(e),!0):(i.remove(e),!1):u[e]?(i.remove(e),!1):(i.add(e),!0)},i}}();"DOMTokenList"in e&&(!("classList"in(l=document.createElement("x")))||!l.classList.toggle("x",!1)&&!l.className)||("DOMTokenList"in(u=e)&&u.DOMTokenList&&(!document.createElementNS||!document.createElementNS("http://www.w3.org/2000/svg","svg")||document.createElementNS("http://www.w3.org/2000/svg","svg").classList instanceof DOMTokenList)||(u.DOMTokenList=s),function(){var e=document.createElement("span");"classList"in e&&(e.classList.toggle("x",!1),e.classList.contains("x")&&(e.classList.constructor.prototype.toggle=function(e){var n=arguments[1];if(n===t){var r=!this.contains(e);return this[r?"add":"remove"](e),r}return this[(n=!!n)?"add":"remove"](e),n}))}(),function(){var e=document.createElement("span");if("classList"in e&&(e.classList.add("a","b"),!e.classList.contains("b"))){var t=e.classList.constructor.prototype.add;e.classList.constructor.prototype.add=function(){for(var e=arguments,n=arguments.length,r=0;re.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:{};u(this,e),this.beforeMergeOptions(t),this.options=o.default.merge({},this.defaultOptions,t)}var t,n,r;return t=e,n=[{key:"beforeMergeOptions",value:function(){}},{key:"defaultOptions",get:function(){return{}}},{key:"queryProperty",get:function(){return"query"}},{key:"responseProperty",get:function(){return null}},{key:"displayValueProperty",get:function(){return null}},{key:"serialize",value:function(e){return o.default.toPairs(e).map((function(e){var t,n,r=(n=2,function(e){if(Array.isArray(e))return e}(t=e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t,n)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=r[0],i=r[1];return"".concat(encodeURIComponent(o),"=").concat(encodeURIComponent(i))})).join("&")}},{key:"getRequestOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o.default.merge({},this.options,e)}},{key:"getRequestUrl",value:function(){throw new Error("Method AddressProvider#getRequestUrl(options) is abstract.")}},{key:"makeRequest",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i.GlobalFormio.makeStaticRequest(this.getRequestUrl(e),"GET",null,{noToken:!0})}},{key:"search",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRequestOptions(n),i=r.params=r.params||{};return i[this.queryProperty]=e,this.makeRequest(r).then((function(e){return t.responseProperty?o.default.get(e,t.responseProperty,[]):e}))}},{key:"getDisplayValue",value:function(e){return this.displayValueProperty?o.default.get(e,this.displayValueProperty,""):String(e)}}],r=[{key:"name",get:function(){return"address"}},{key:"displayName",get:function(){return"Address"}}],n&&l(t.prototype,n),r&&l(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.AddressProvider=s},25823:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=e.params;return"https://atlas.microsoft.com/search/address/json?".concat(this.serialize(t))}}],r=[{key:"name",get:function(){return"azure"}},{key:"displayName",get:function(){return"Azure Maps"}}],n&&i(t.prototype,n),r&&i(t,r),Object.defineProperty(t,"prototype",{writable:!1}),d}(n(6542).AddressProvider);t.AzureAddressProvider=s},45555:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=e.params,n=e.url;return"".concat(n,"?").concat(this.serialize(t))}}],r=[{key:"name",get:function(){return"custom"}},{key:"displayName",get:function(){return"Custom"}}],n&&i(t.prototype,n),r&&i(t,r),Object.defineProperty(t,"prototype",{writable:!1}),p}(n(6542).AddressProvider);t.CustomAddressProvider=f},7763:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n(12419),n(82526),n(41817),n(32165),n(66992),n(78783),n(33948),Object.defineProperty(t,"__esModule",{value:!0}),t.GoogleAddressProvider=void 0,n(73210),n(41539),n(54747),n(30489);var o=n(19161),i=l(n(96486)),a=n(6542),u=l(n(91459));function l(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};s(this,v),(t=h.call(this,n)).setAutocompleteOptions();var r="https://maps.googleapis.com/maps/api/js?v=quarterly&libraries=places&callback=googleMapsCallback";return null!==(e=n.params)&&void 0!==e&&e.key&&(r+="&key=".concat(n.params.key)),o.GlobalFormio.requireLibrary(t.getLibraryName(),"google.maps.places",r),t}return t=v,r=[{key:"name",get:function(){return"google"}},{key:"displayName",get:function(){return"Google Maps"}}],(n=[{key:"displayValueProperty",get:function(){return"formattedPlace"}},{key:"alternativeDisplayValueProperty",get:function(){return"formatted_address"}},{key:"autocompleteOptions",get:function(){return this._autocompleteOptions},set:function(e){this._autocompleteOptions=e}},{key:"setAutocompleteOptions",value:function(){var e=i.default.get(this.options,"params.autocompleteOptions",{});i.default.isObject(e)||(e={}),this.addRequiredProviderOptions(e),this.autocompleteOptions=e}},{key:"beforeMergeOptions",value:function(e){this.convertRegionToAutocompleteOption(e)}},{key:"getLibraryName",value:function(){return"googleMaps"}},{key:"convertRegionToAutocompleteOption",value:function(e){var t=e,n=i.default.get(t,"params.region","");if(n&&!i.default.has(e,"params.autocompleteOptions")){var r={UK:"GB"};r[n=n.toUpperCase().trim()]&&(n=r[n]),i.default.set(t,"params.autocompleteOptions.componentRestrictions.country",[n])}}},{key:"getRequiredAddressProperties",value:function(){return["address_components","formatted_address","geometry","place_id","plus_code","types"]}},{key:"addRequiredProviderOptions",value:function(e){var t=this.getRequiredAddressProperties();i.default.isArray(e.fields)&&e.fields.length>0&&e.fields.forEach((function(e){t.some((function(t){return e===t}))||t.push(e)})),e.fields=t}},{key:"filterPlace",value:function(e){e=e||{};var t={};return this.autocompleteOptions&&this.autocompleteOptions.fields.forEach((function(n){e[n]&&(t[n]=e[n])})),t}},{key:"attachAutocomplete",value:function(e,t,n){var r=this;o.GlobalFormio.libraryReady(this.getLibraryName()).then((function(){var o=new google.maps.places.Autocomplete(e,r.autocompleteOptions);o.addListener("place_changed",(function(){var a=r.filterPlace(o.getPlace());a.formattedPlace=i.default.get(o,"gm_accessors_.place.se.formattedPrediction",a[r.alternativeDisplayValueProperty]),n(a,e,t)}))}))}},{key:"search",value:function(){return u.default.resolve()}},{key:"makeRequest",value:function(){return u.default.resolve()}},{key:"getDisplayValue",value:function(e){var t=i.default.has(e,this.displayValueProperty)?this.displayValueProperty:this.alternativeDisplayValueProperty;return i.default.get(e,t,"")}}])&&c(t.prototype,n),r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),v}(a.AddressProvider);t.GoogleAddressProvider=h},21680:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=e.params;return"https://nominatim.openstreetmap.org/search?".concat(this.serialize(t))}}],r=[{key:"name",get:function(){return"nominatim"}},{key:"displayName",get:function(){return"OpenStreetMap Nominatim"}}],n&&i(t.prototype,n),r&&i(t,r),Object.defineProperty(t,"prototype",{writable:!1}),d}(n(6542).AddressProvider);t.NominatimAddressProvider=s},56499:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n(68309);var r,o=n(25823),i=n(45555),a=n(7763),u=n(21680);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=(l(r={},o.AzureAddressProvider.name,o.AzureAddressProvider),l(r,i.CustomAddressProvider.name,i.CustomAddressProvider),l(r,a.GoogleAddressProvider.name,a.GoogleAddressProvider),l(r,u.NominatimAddressProvider.name,u.NominatimAddressProvider),r);t.default=s},49452:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={}},10695:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=((r=n(89738))&&r.__esModule?r:{default:r}).default;t.default=o},64666:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n(92222),n(73210),n(68309);var r,o=(r=n(3975))&&r.__esModule?r:{default:r},i=function(e){return{uploadFile:function(t,n,r,i,a,u,l,s,c,f){return o.default.upload(e,"azure",(function(e,n){return e.openAndSetHeaders("PUT",n.url),e.setRequestHeader("Content-Type",t.type),e.setRequestHeader("x-ms-blob-type","BlockBlob"),t}),t,n,r,i,s,c,f).then((function(){return{storage:"azure",name:o.default.path([r,n]),size:t.size,type:t.type,groupPermissions:s,groupId:c}}))},downloadFile:function(t){return e.makeRequest("file","".concat(e.formUrl,"/storage/azure?name=").concat(o.default.trim(t.name)),"GET")}}};i.title="Azure File Services";var a=i;t.default=a},52174:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(91459))&&r.__esModule?r:{default:r},i=function(){return{title:"Base64",name:"base64",uploadFile:function(e,t){var n=this,r=new FileReader;return new o.default((function(o,i){r.onload=function(n){var r=n.target.result;o({storage:"base64",name:t,url:r,size:e.size,type:e.type})},r.onerror=function(){return i(n)},r.readAsDataURL(e)}))},downloadFile:function(e){return o.default.resolve(e)}}};i.title="Base64";var a=i;t.default=a},37771:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n(92222);var r,o=(r=n(91459))&&r.__esModule?r:{default:r},i=n(3975),a=function(e){return{uploadFile:function(t,n,r,a,u,l,s,c,f,d){return new o.default((function(o,u){var l=new XMLHttpRequest;"function"==typeof a&&(l.upload.onprogress=a),"function"==typeof d&&d((function(){return l.abort()}));var s=new FormData;s.append("name",n),s.append("dir",r),s.append("file",t),l.onerror=function(e){e.networkError=!0,u(e)},l.onload=function(){if(l.status>=200&&l.status<300){var e=JSON.parse(l.response);e.storage="googledrive",e.size=t.size,e.type=t.type,e.groupId=f,e.groupPermissions=c,o(e)}else u(l.response||"Unable to upload file")},l.onabort=u,l.open("POST","".concat(e.formUrl,"/storage/gdrive")),(0,i.setXhrHeaders)(e,l);var p=e.getToken();p&&l.setRequestHeader("x-jwt-token",p),l.send(s)}))},downloadFile:function(t){var n=e.getToken();return t.url="".concat(e.formUrl,"/storage/gdrive?fileId=").concat(t.id,"&fileName=").concat(t.originalName).concat(n?"&x-jwt-token=".concat(n):""),o.default.resolve(t)}}};a.title="Google Drive";var u=a;t.default=u},34198:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=s(n(52174)),o=s(n(87527)),i=s(n(64666)),a=s(n(7433)),u=s(n(3769)),l=s(n(37771));function s(e){return e&&e.__esModule?e:{default:e}}var c={base64:r.default,s3:o.default,url:a.default,azure:i.default,indexeddb:u.default,googledrive:l.default};t.default=c},3769:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n(68309);var r,o=n(21614),i=(r=n(91459))&&r.__esModule?r:{default:r},a=function(){return{title:"indexedDB",name:"indexeddb",uploadFile:function(e,t,n,r,a,u){var l=this;if("indexedDB"in window)return new i.default((function(e){var t=indexedDB.open(u.indexeddb,3);t.onsuccess=function(t){var n=t.target.result;e(n)},t.onupgradeneeded=function(e){e.target.result.createObjectStore(u.indexeddbTable)}})).then((function(t){var n=new FileReader;return new i.default((function(r,i){n.onload=function(){var n=new Blob([e],{type:e.type}),i=(0,o.v4)(n),l={id:i,data:n,name:e.name,size:e.size,type:e.type,url:a},s=t.transaction([u.indexeddbTable],"readwrite");s.objectStore(u.indexeddbTable).put(l,i).onerror=function(e){console.log("error storing data"),console.error(e)},s.oncomplete=function(){r({storage:"indexeddb",name:e.name,size:e.size,type:e.type,url:a,id:i})}},n.onerror=function(){return i(l)},n.readAsDataURL(e)}))}));console.log("This browser doesn't support IndexedDB")},downloadFile:function(e,t){var n=this;return new i.default((function(e){indexedDB.open(t.indexeddb,3).onsuccess=function(t){var n=t.target.result;e(n)}})).then((function(r){return new i.default((function(o,i){var a=r.transaction([t.indexeddbTable],"readonly"),u=a.objectStore(t.indexeddbTable).get(e.id);u.onsuccess=function(){a.oncomplete=function(){var t=u.result,r=new File([u.result.data],e.name,{type:u.result.type}),a=new FileReader;a.onload=function(n){t.url=n.target.result,t.storage=e.storage,o(t)},a.onerror=function(){return i(n)},a.readAsDataURL(r)}},u.onerror=function(){return i(n)}}))}))},deleteFile:function(e,t){var n=this;return new i.default((function(e){indexedDB.open(t.indexeddb,3).onsuccess=function(t){var n=t.target.result;e(n)}})).then((function(r){return new i.default((function(o,i){var a=r.transaction([t.indexeddbTable],"readwrite"),u=a.objectStore(t.indexeddbTable).delete(e.id);u.onsuccess=function(){a.oncomplete=function(){var e=u.result;o(e)}},u.onerror=function(){return i(n)}}))}))}}};a.title="IndexedDB";var u=a;t.default=u},87527:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n(92222),n(73210);var r=i(n(91459)),o=i(n(3975));function i(e){return e&&e.__esModule?e:{default:e}}var a=function(e){return{uploadFile:function(t,n,r,i,a,u,l,s,c,f){return o.default.upload(e,"s3",(function(e,i){if(i.data.fileName=n,i.data.key=o.default.path([i.data.key,r,n]),i.signed)return e.openAndSetHeaders("PUT",i.signed),e.setRequestHeader("Content-Type",t.type),t;var a=new FormData;for(var u in i.data)a.append(u,i.data[u]);return a.append("file",t),e.openAndSetHeaders("POST",i.url),a}),t,n,r,i,s,c,f).then((function(e){return{storage:"s3",name:n,bucket:e.bucket,key:e.data.key,url:o.default.path([e.url,e.data.key]),acl:e.data.acl,size:t.size,type:t.type}}))},downloadFile:function(t){return"public-read"!==t.acl?e.makeRequest("file","".concat(e.formUrl,"/storage/s3?bucket=").concat(o.default.trim(t.bucket),"&key=").concat(o.default.trim(t.key)),"GET"):r.default.resolve(t)}}};a.title="S3";var u=a;t.default=u},17607:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFormioUploadAdapterPlugin=void 0,n(68309),n(41539),n(88674),n(17727),n(92222);var r,o=n(82531),i=(r=n(91459))&&r.__esModule?r:{default:r};function a(e,t){for(var n=0;n=200&&c.status<300){var e={};try{e=(e="string"==typeof c.response?JSON.parse(c.response):{})&&e.data?e.data:e}catch(t){e={}}var r=e.hasOwnProperty("url")?e.url:"".concat(c.responseURL,"/").concat(n);r&&"/"===r[0]&&(r="".concat(t).concat(r)),o({url:r,data:e})}else s(c.response||"Unable to upload file")},c.onerror=function(){return s(c)},c.onabort=function(){return s(c)};var h=t+(t.indexOf("?")>-1?"&":"?");for(var v in r)h+="".concat(v,"=").concat(r[v],"&");"&"===h[h.length-1]&&(h=h.substr(0,h.length-1)),c.open("POST",h),f&&c.setRequestHeader("Content-Type","application/json");var y=e.getToken();if(y&&c.setRequestHeader("x-jwt-token",y),a){var m="string"==typeof a?JSON.parse(a):a;for(var b in m)c[b]=m[b]}c.send(f?i:d)}))};return{title:"Url",name:"url",uploadFile:function(n,r,o,a,u,l,s,c,f,d){var p=function(c){var f;return t(u,r,{baseUrl:encodeURIComponent(e.projectUrl),project:c?c.project:"",form:c?c._id:""},(f={},i(f,s,n),i(f,"name",r),i(f,"dir",o),f),l,a,d).then((function(t){return t.data=t.data||{},t.data.baseUrl=e.projectUrl,t.data.project=c?c.project:"",t.data.form=c?c._id:"",{storage:"url",name:r,url:t.url,size:n.size,type:n.type,data:t.data}}))};return n.private&&e.formId?e.loadForm().then((function(e){return p(e)})):p()},deleteFile:function(e){return new o.default((function(t,n){var r=new XMLHttpRequest;r.open("DELETE",e.url,!0),r.onload=function(){r.status>=200&&r.status<300?t("File deleted"):n(r.response||"Unable to delete file")},r.send(null)}))},downloadFile:function(n){return n.private?(e.submissionId&&n.data&&(n.data.submission=e.submissionId),t(n.url,n.name,{},JSON.stringify(n)).then((function(e){return e.data}))):o.default.resolve(n)}}};a.title="Url";var u=a;t.default=u},3975:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setXhrHeaders=t.default=void 0,n(69600),n(21249),n(57327),n(41539),n(73210),n(92222);var r=i(n(91459)),o=i(n(92742));function i(e){return e&&e.__esModule?e:{default:e}}var a=function(e,t){var n=e.options.headers;if(n){var r={"Content-Disposition":!0,Authorization:!0};for(var o in n)r[o]&&t.setRequestHeader(o,n[o])}};t.setXhrHeaders=a;var u={trim:function(e){return(0,o.default)(e,"/")},path:function(e){return e.filter((function(e){return!!e})).map(u.trim).join("/")},upload:function(e,t,n,o,i,l,s,c,f,d){return new r.default((function(r,p){var h=new XMLHttpRequest;h.onerror=function(e){e.networkError=!0,p(e)},h.onabort=p,h.onload=function(){if(h.status>=200&&h.status<300){var t=JSON.parse(h.response),o=new XMLHttpRequest;"function"==typeof s&&(o.upload.onprogress=s),"function"==typeof d&&d((function(){return o.abort()})),o.openAndSetHeaders=function(){o.open.apply(o,arguments),a(e,o)},o.onerror=function(e){e.networkError=!0,p(e)},o.onabort=function(e){e.networkError=!0,p(e)},o.onload=function(){o.status>=200&&o.status<300?r(t):p(o.response||"Unable to upload file")},o.onabort=p,o.send(n(o,t))}else p(h.response||"Unable to sign file")},h.open("POST","".concat(e.formUrl,"/storage/").concat(t)),h.setRequestHeader("Accept","application/json"),h.setRequestHeader("Content-Type","application/json; charset=UTF-8");var v=e.getToken();v&&h.setRequestHeader("x-jwt-token",v),h.send(JSON.stringify({name:u.path([l,i]),size:o.size,type:o.type,groupPermissions:c,groupId:f}))}))}},l=u;t.default=l},51508:function(e,t,n){"use strict";t.Z=void 0;var r=i(n(75146)),o=i(n(96486));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){for(var n=0;n\n ',e.component.disableClearIcon||(n+='\n \n '),n+="\n \n"}return n+="\n",e.self.manualModeEnabled&&(n+='\n
    \n \n
    \n"),n+="\n",e.self.manualMode&&(n+='\n
    \n '+(null==(t=e.children)?"":t)+"\n
    \n"),n+"\n"}},87302:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    ',e.displayValue?n+=null==(t=e.displayValue)?"":t:n+="-",n+"
    \n"}},45284:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(4295)),o=i(n(87302));function i(e){return e&&e.__esModule?e:{default:e}}var a={form:r.default,html:o.default};t.default=a},34801:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";for(var r in Array.prototype.join,n+="'+(null==(t=e.t("errorListHotkey"))?"":t)+"\n "),n+"\n\n"}},75284:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(34801))&&r.__esModule?r:{default:r}).default};t.default=o},3824:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return""+'
    \n
    \n '+(null==(t=e.sidebar)?"":t)+'\n
    \n
    \n '+(null==(t=e.form)?"":t)+"\n
    \n
    \n"}},15590:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(3824))&&r.__esModule?r:{default:r}).default};t.default=o},6e4:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n ',e.disableBuilderActions||(n+='\n
    \n \n \n
    \n \n \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n '),n+"\n "+(null==(t=e.html)?"":t)+"\n\n"}},14943:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(6e4))&&r.__esModule?r:{default:r}).default};t.default=o},15858:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return""+'
    \n '+(null==(t=e.html)?"":t)+"\n
    \n"}},89298:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(15858))&&r.__esModule?r:{default:r}).default};t.default=o},47995:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n
    \n

    '+(null==(t=e.t(e.componentInfo.title,{_userInput:!0}))?"":t)+" "+(null==(t=e.t("Component"))?"":t)+"

    \n
    \n ",e.helplinks&&(n+='\n \n "),n+='\n
    \n
    \n
    \n ",e.preview||(n+='\n
    \n \n \n \n
    \n "),n+="\n
    \n ",e.preview&&(n+='\n
    \n
    \n
    \n

    '+(null==(t=e.t("Preview"))?"":t)+'

    \n
    \n
    \n
    \n '+(null==(t=e.preview)?"":t)+"\n
    \n
    \n
    \n ",e.componentInfo.help&&(n+='\n
    \n '+(null==(t=e.t(e.componentInfo.help))?"":t)+"\n
    \n "),n+='\n
    \n \n \n \n
    \n
    \n "),n+"\n
    \n"}},74798:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(47995))&&r.__esModule?r:{default:r}).default};t.default=o},72807:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return""+'\n '+(null==(t=e.t("Drag and Drop a form component"))?"":t)+"\n\n"}},65181:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(72807))&&r.__esModule?r:{default:r}).default};t.default=o},42904:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n \n
    \n ',e.groups.forEach((function(e){n+="\n "+(null==(t=e)?"":t)+"\n "})),n+="\n
    \n
    \n"}},98953:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(42904))&&r.__esModule?r:{default:r}).default};t.default=o},96746:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n
    \n
    \n \n '+(null==(t=e.t(e.group.title,{_userInput:!0}))?"":t)+'\n \n
    \n
    \n \n
    \n ',e.group.componentOrder.length||e.subgroups.length?(n+="\n ",!e.group.componentOrder||e.group.componentOrder.forEach((function(r){n+='\n \n ',e.group.components[r].icon&&(n+='\n \n '),n+="\n "+(null==(t=e.t(e.group.components[r].title,{_userInput:!0}))?"":t)+"\n \n "})),n+="\n "+(null==(t=e.subgroups.join(""))?"":t)+"\n "):n+="\n
    "+(null==(t=e.t("No Matches Found"))?"":t)+"
    \n ",n+="\n
    \n
    \n\n"}},31440:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(96746))&&r.__esModule?r:{default:r}).default};t.default=o},41737:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n
    \n '+(null==(t=e.sidebar)?"":t)+'\n
    \n
    \n \n
    \n '+(null==(t=e.form)?"":t)+"\n
    \n
    \n
    \n"}},19838:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(41737))&&r.__esModule?r:{default:r}).default};t.default=o},26982:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";for(var r in Array.prototype.join,n+="<"+(null==(t=e.input.type)?"":t)+'\n ref="button"\n ',e.input.attr)n+="\n "+(null==(t=r)?"":t)+'="'+(null==(t=e.input.attr[r])?"":t)+'"\n ';return n+="\n ",e.component.description&&(n+='\n aria-describedby="d-'+(null==(t=e.instance.id)?"":t)+"-"+(null==(t=e.component.key)?"":t)+'"\n '),n+="\n>\n",e.component.leftIcon&&(n+=' '),n+="\n"+(null==(t=e.input.content)?"":t)+"\n",e.component.tooltip&&(n+='\n \n'),n+="\n",e.component.rightIcon&&(n+=' '),n+"\n\n
    \n \n
    \n'}},35858:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"\n"}},40707:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(26982)),o=i(n(35858));function i(e){return e&&e.__esModule?e:{default:e}}var a={form:r.default,html:o.default};t.default=a},18952:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";for(var r in Array.prototype.join,n+='
    \n \n
    \n"}},24609:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n
    ',e.checked?n+="True":n+="False",n+"
    \n"}},28569:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(18952)),o=i(n(24609));function i(e){return e&&e.__esModule?e:{default:e}}var a={form:r.default,html:o.default};t.default=a},89199:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,e.component.columns.forEach((function(r,o){n+='\n
    \n '+(null==(t=e.columnComponents[o])?"":t)+"\n
    \n"})),n+="\n"}},36567:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(89199))&&r.__esModule?r:{default:r}).default};t.default=o},8404:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n ',e.visible&&(n+="\n "+(null==(t=e.children)?"":t)+'\n
    \n '),n+"\n
    \n"}},28857:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(8404))&&r.__esModule?r:{default:r}).default};t.default=o},64229:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n
    \n
    \n
    \n
    '+(null==(t=e.t(e.component.label))?"":t)+(null==(t=e.self.isIE()?", dialog":"")?"":t)+"\n ",e.options.vpat?n+='\n \n ':n+='\n \n ',n+='\n
    \n ',e.visible&&(n+="\n "+(null==(t=e.children)?"":t)+"\n "),n+='\n
    \n ',e.options.vpat&&(n+='\n \n "),n+'\n \n
    \n
    \n
    \n \n
    \n
    \n'}},6311:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(64229))&&r.__esModule?r:{default:r}).default};t.default=o},16499:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return""+((null==(t=e.children.join(""))?"":t)+"\n")}},16056:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(16499))&&r.__esModule?r:{default:r}).default};t.default=o},46441:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return""+'
    \n '+(null==(t=e.children)?"":t)+"\n
    \n"}},64401:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(46441))&&r.__esModule?r:{default:r}).default};t.default=o},25486:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={"border-default":"","formio-tab-panel-active":"active","formio-tab-link-active":"active","formio-tab-link-container-active":"active","formio-form-error":"formio-error-wrapper has-message","formio-form-alert":"alert alert-danger","formio-label-error":"","formio-input-error":"","formio-alert-danger":"alert alert-danger","formio-alert-success":"alert alert-success","formio-alert-warning":"alert alert-warning","formio-modal-cancel-button":"btn btn-danger formio-dialog-button","formio-modal-confirm-button":"btn btn-primary formio-dialog-button"}},79025:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n '+(null==(t=r.hideLabel?"":e.t(r.label||r.title,{_userInput:!0}))?"":t)+"\n ",r.tooltip&&(n+=' '),n+="\n \n "})),n+="\n ",e.hasExtraColumn&&(n+='\n \n "),n+="\n \n \n "),n+='\n \n ',e.rows.forEach((function(r,o){n+="\n ",e.hasGroups&&e.groups[o]&&(n+='\n \n '+(null==(t=e.groups[o].label)?"":t)+"\n \n "),n+='\n \n ',e.component.reorder&&(n+='\n \n '),n+="\n ",e.columns.forEach((function(o){n+='\n \n "})),n+="\n ",e.hasExtraColumn&&(n+="\n ",e.hasRemoveButtons&&(n+='\n \n '),n+="\n ",e.canAddColumn&&(n+='\n \n "),n+="\n "),n+="\n \n "})),n+="\n \n ",!e.builder&&e.hasAddButton&&e.hasBottomSubmit&&(n+='\n \n \n \n \n \n "),n+="\n
    \n '+(null==(t=e.t("Add/Remove"))?"":t)+"\n ",!e.builder&&e.hasAddButton&&e.hasTopSubmit&&(n+='\n \n "),n+="\n
    \n \n \n "+(null==(t=r[o.key])?"":t)+"\n \n \n \n '+(null==(t=e.placeholder)?"":t)+"\n
    \n \n
    \n"}},79822:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n ',e.hasHeader&&(n+="\n \n \n ",e.columns.forEach((function(r){n+='\n \n "})),n+="\n \n \n "),n+="\n \n ",e.rows.forEach((function(r){n+="\n \n ",e.columns.forEach((function(o){n+='\n \n "})),n+="\n \n "})),n+="\n \n
    \n '+(null==(t=r.hideLabel?"":e.t(r.label||r.title,{_userInput:!0}))?"":t)+"\n ",r.tooltip&&(n+=' '),n+="\n
    \n '+(null==(t=r[o.key])?"":t)+"\n
    \n"}},27915:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(79025)),o=i(n(79822));function i(e){return e&&e.__esModule?e:{default:e}}var a={form:r.default,html:o.default};t.default=a},62796:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n "),n+="\n
    "+(null==(t=e.day)?"":t)+"
    \n
    \n "),n+="\n ",e.showMonth&&(n+='\n
    \n ',e.component.hideInputLabels||(n+='\n
    \n "),n+="\n ",!e.dayFirst&&e.showDay&&(n+='\n
    \n ',e.component.hideInputLabels||(n+='\n
    \n "),n+="\n ",e.showYear&&(n+='\n
    \n ',e.component.hideInputLabels||(n+='\n
    \n "),n+'\n\n\n'}},11594:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(62796))&&r.__esModule?r:{default:r}).default};t.default=o},63645:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return'
    \n
    \n \n
    \n'}},10158:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(63645))&&r.__esModule?r:{default:r}).default};t.default=o},9665:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
      \n ',e.header&&(n+='\n
    • \n '+(null==(t=e.header)?"":t)+"\n
    • \n "),n+="\n ",e.rows.forEach((function(r,o){n+='\n
    • \n '+(null==(t=r)?"":t)+"\n ",e.openRows[o]&&!e.readOnly&&(n+='\n
      \n \n ",e.component.removeRow&&(n+='\n \n "),n+="\n
      \n "),n+='\n
      \n
      \n '+(null==(t=e.errors[o])?"":t)+"\n
      \n
      \n
    • \n "})),n+="\n ",e.footer&&(n+='\n \n "),n+="\n
    \n",!e.readOnly&&e.hasAddButton&&(n+='\n\n"),n+="\n"}},46248:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
      \n ',e.header&&(n+='\n
    • \n '+(null==(t=e.header)?"":t)+"\n
    • \n "),n+="\n ",e.rows.forEach((function(r,o){n+='\n
    • \n '+(null==(t=r)?"":t)+"\n ",e.openRows[o]&&!e.readOnly&&(n+='\n
      \n \n ",e.component.removeRow&&(n+='\n \n "),n+="\n
      \n "),n+='\n
      \n
      \n '+(null==(t=e.errors[o])?"":t)+"\n
      \n
      \n
    • \n "})),n+="\n ",e.footer&&(n+='\n \n "),n+="\n
    \n"}},21838:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(9665)),o=i(n(46248));function i(e){return e&&e.__esModule?e:{default:e}}var a={form:r.default,html:o.default};t.default=a},82064:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n
    \n \n ',e.header&&(n+='\n \n '+(null==(t=e.header)?"":t)+"\n \n "),n+='\n \n ',e.rows.forEach((function(r,o){n+='\n \n '+(null==(t=r)?"":t)+"\n ",e.openRows[o]&&!e.readOnly&&(n+='\n \n "),n+="\n ",e.errors[o]&&(n+='\n \n "),n+="\n \n "})),n+="\n \n ",e.footer&&(n+="\n \n \n "+(null==(t=e.footer)?"":t)+"\n \n \n "),n+="\n
    \n
    \n \n ",e.component.removeRow&&(n+='\n \n "),n+="\n
    \n
    \n
    \n
    \n '+(null==(t=e.errors[o])?"":t)+"\n
    \n
    \n
    \n
    \n
    \n",!e.readOnly&&e.hasAddButton&&(n+='\n\n"),n+="\n"}},84940:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n
    \n \n ',e.header&&(n+='\n \n '+(null==(t=e.header)?"":t)+"\n \n "),n+='\n \n ',e.rows.forEach((function(r,o){n+='\n \n '+(null==(t=r)?"":t)+"\n ",e.openRows[o]&&!e.readOnly&&(n+='\n \n "),n+="\n ",e.errors[o]&&(n+='\n \n "),n+="\n \n "})),n+="\n \n ",e.footer&&(n+="\n \n \n "+(null==(t=e.footer)?"":t)+"\n \n \n "),n+="\n
    \n
    \n \n ",e.component.removeRow&&(n+='\n \n "),n+="\n
    \n
    \n
    \n
    \n '+(null==(t=e.errors[o])?"":t)+"\n
    \n
    \n
    \n
    \n
    \n"}},5342:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(82064)),o=i(n(84940));function i(e){return e&&e.__esModule?e:{default:e}}var a={form:r.default,html:o.default};t.default=a},92161:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+="

    "+(null==(t=e.t("error"))?"":t)+"\n ",e.options.vpat&&(n+='\n \n '),n+="\n

    \n
      \n ",e.errors.forEach((function(e){n+='\n
    • \n \n '+(null==(t=e.message)?"":t)+"\n \n
    • \n "})),n+="\n
    \n"}},21337:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(92161))&&r.__esModule?r:{default:r}).default};t.default=o},21193:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n ',e.label.hidden||(n+='\n
    \n '+(null==(t=e.labelMarkup)?"":t)+"\n
    \n "),n+="\n\n ",e.label.hidden&&e.label.className&&e.component.validate.required&&(n+='\n
    \n \n
    \n '),n+='\n\n
    \n '+(null==(t=e.element)?"":t)+"\n
    \n
    \n\n",e.component.description&&(n+='\n
    '+(null==(t=e.t(e.component.description,{_userInput:!0}))?"":t)+"
    \n"),n+"\n"}},81336:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,e.label.hidden||"bottom"===e.label.labelPosition||(n+="\n "+(null==(t=e.labelMarkup)?"":t)+"\n"),n+="\n\n",e.label.hidden&&e.label.className&&e.component.validate.required&&(n+='\n \n'),n+="\n\n"+(null==(t=e.element)?"":t)+"\n\n",e.label.hidden||"bottom"!==e.label.labelPosition||(n+="\n "+(null==(t=e.labelMarkup)?"":t)+"\n"),n+="\n",e.component.description&&(n+='\n
    '+(null==(t=e.t(e.component.description,{_userInput:!0}))?"":t)+"
    \n"),n+"\n"}},77703:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(81336)),o=i(n(21193));function i(e){return e&&e.__esModule?e:{default:e}}var a={form:r.default,align:o.default};t.default=a},3677:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+="
    \n ",e.component.legend&&(n+='\n \n '+(null==(t=e.t(e.component.legend,{_userInput:!0}))?"":t)+"\n ",e.component.tooltip&&(n+='\n \n '),n+="\n \n "),n+="\n ",e.collapsed||(n+='\n
    \n '+(null==(t=e.children)?"":t)+"\n
    \n "),n+"\n
    \n"}},2619:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(3677))&&r.__esModule?r:{default:r}).default};t.default=o},99748:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,e.options.vpat&&(n+='\n \n'),n+="\n",e.self.imageUpload?(n+="\n
    \n ",e.files.forEach((function(r){n+='\n
    \n \n '+(null==(t=r.originalName||r.name)?\n ',e.disabled||(n+='\n \n '),n+="\n \n
    \n "})),n+="\n
    \n"):(n+="\n ",e.options.vpat&&(n+="\n
    "+(null==(t=e.component.filePattern&&"*"!==e.component.filePattern?e.t("Allowed file types: ")+e.component.filePattern:"Any file types are allowed")?"":t)+"
    \n "),n+='\n
      \n \n ",e.files.forEach((function(r){n+='\n
    • \n
      \n ',e.disabled||(n+='\n
      \n '),n+='\n
      \n '+(null==(t=e.t("Press to open "))?"":t)+""+(null==(t=r.originalName||r.name)?"":t)+"\n \n ",n+='\n
      \n
      '+(null==(t=e.fileSize(r.size))?"":t)+"
      \n ",e.self.hasTypes&&!e.disabled&&(n+='\n
      \n \n
      \n "),n+="\n ",e.self.hasTypes&&e.disabled&&(n+='\n
      '+(null==(t=r.fileType)?"":t)+"
      \n "),n+="\n
      \n
    • \n "})),n+="\n
    \n"),n+="\n",e.disabled||!e.component.multiple&&e.files.length||(n+="\n ",e.self.useWebViewCamera?n+='\n
    \n \n \n
    \n ":e.self.cameraMode?n+='\n
    \n \n
    \n \n \n ":(n+='\n \n '),n+="\n"),n+="\n",e.statuses.forEach((function(r){n+='\n
    \n
    \n
    '+(null==(t=r.originalName)?"":t)+'\n \n '+(null==(t=e.t("Remove button. Press to remove "+r.originalName||0))?"":t)+'\n '+(null==(t=r.message?r.message.replace(";","."):"")?"":t)+'\n \n
    \n
    '+(null==(t=e.fileSize(r.size))?"":t)+'
    \n
    \n
    \n
    \n ',"progress"===r.status?n+='\n
    \n
    \n '+(null==(t=r.progress)?"":t)+"% "+(null==(t=e.t("Complete"))?"":t)+"\n
    \n
    \n ":"error"===r.status?n+='\n
    '+(null==(t=e.t(r.message))?"":t)+"
    \n ":n+='\n
    '+(null==(t=e.t(r.message))?"":t)+"
    \n ",n+="\n
    \n
    \n
    \n"})),n+="\n",e.component.storage&&!e.support.hasWarning||(n+='\n
    \n ',e.component.storage||(n+="\n

    "+(null==(t=e.t("No storage has been set for this field. File uploads are disabled until storage is set up."))?"":t)+"

    \n "),n+="\n ",e.support.filereader||(n+="\n

    "+(null==(t=e.t("File API & FileReader API not supported."))?"":t)+"

    \n "),n+="\n ",e.support.formdata||(n+="\n

    "+(null==(t=e.t("XHR2's FormData is not supported."))?"":t)+"

    \n "),n+="\n ",e.support.progress||(n+="\n

    "+(null==(t=e.t("XHR2's upload progress isn't supported."))?"":t)+"

    \n "),n+="\n
    \n"),n+="\n"}},10910:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(99748))&&r.__esModule?r:{default:r}).default};t.default=o},80692:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+="<"+(null==(t=e.tag)?"":t)+' class="formio-component-htmlelement '+(null==(t=e.component.className)?"":t)+'" ref="html"\n ',e.attrs.forEach((function(e){n+="\n "+(null==(t=e.attr)?"":t)+'="'+(null==(t=e.value)?"":t)+'"\n '})),n+="\n>"+(null==(t=e.t(e.content))?"":t),e.singleTags&&-1!==e.singleTags.indexOf(e.tag)||(n+=""),n+="\n"}},28209:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(80692))&&r.__esModule?r:{default:r}).default};t.default=o},72663:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return""+''+(null==(t=e.content)?"":t)+"\n"}},34885:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(72663))&&r.__esModule?r:{default:r}).default};t.default=o},64968:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n(92222),t.default=function(e,t,n){if("fa"===e)switch(t){case"save":t="download";break;case"zoom-in":t="search-plus";break;case"zoom-out":t="search-minus";break;case"question-sign":t="question-circle";break;case"remove-circle":t="times-circle-o";break;case"new-window":t="window-restore";break;case"move":t="arrows";break;case"time":t="clock-o"}return n?"".concat(e," ").concat(e,"-").concat(t," ").concat(e,"-spin"):"".concat(e," ").concat(e,"-").concat(t)}},5508:function(e,t,n){"use strict";n(47941),n(82526),n(57327),n(38880),n(54747),n(49337),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n(41539),n(39714);var r=pe(n(45284)),o=pe(n(15590)),i=pe(n(14943)),a=pe(n(89298)),u=pe(n(74798)),l=pe(n(65181)),s=pe(n(98953)),c=pe(n(31440)),f=pe(n(19838)),d=pe(n(40707)),p=pe(n(28569)),h=pe(n(36567)),v=pe(n(28857)),y=pe(n(6311)),m=pe(n(16056)),b=pe(n(42142)),g=pe(n(64401)),w=pe(n(27915)),_=pe(n(11594)),k=pe(n(10158)),O=pe(n(21838)),x=pe(n(5342)),j=pe(n(77703)),P=pe(n(2619)),S=pe(n(10910)),C=pe(n(28209)),E=pe(n(34885)),M=pe(n(64968)),A=pe(n(98781)),R=pe(n(59811)),T=pe(n(38304)),D=pe(n(97028)),I=pe(n(56105)),L=pe(n(40822)),V=pe(n(75441)),N=pe(n(20073)),F=pe(n(44857)),z=pe(n(87505)),U=pe(n(5392)),B=pe(n(32878)),q=pe(n(2265)),H=pe(n(40486)),W=pe(n(24628)),Y=pe(n(80247)),G=pe(n(80411)),K=pe(n(36236)),$=pe(n(58830)),J=pe(n(3246)),Z=pe(n(4287)),X=pe(n(40708)),Q=pe(n(67741)),ee=pe(n(75401)),te=pe(n(1)),ne=pe(n(29304)),re=pe(n(56429)),oe=pe(n(13380)),ie=pe(n(41345)),ae=pe(n(187)),ue=pe(n(88057)),le=pe(n(75273)),se=pe(n(24376)),ce=pe(n(25486)),fe=pe(n(21337)),de=pe(n(75284));function pe(e){return e&&e.__esModule?e:{default:e}}function he(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ve(e){for(var t=1;t'+(null==(t=e.input.content)?"":t)+"\n ",e.hasValueMaskInput&&(n+='\n \n '),n+="\n"}return n+="\n",(e.component.editor||e.component.wysiwyg)&&(n+='\n
    \n'),n+="\n","datetime"===e.component.type&&(n+='\n\n'),n+="\n",e.suffix&&(n+='\n
    \n \n ',e.suffix instanceof HTMLElement?n+="\n "+(null==(t=e.t(e.suffix.outerHTML,{_userInput:!0}))?"":t)+"\n ":n+="\n "+(null==(t=e.t(e.suffix,{_userInput:!0}))?"":t)+"\n ",n+="\n \n
    \n"),n+="\n",(e.prefix||e.suffix)&&(n+="\n \n"),n+="\n",(e.component.showCharCount||e.component.showWordCount)&&(n+='\n
    \n ',e.component.showCharCount&&(n+='\n \n '),n+="\n ",e.component.showWordCount&&(n+='\n \n '),n+="\n
    \n"),n+"\n"}},19423:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    ',e.value?n+=null==(t=e.value)?"":t:n+="-",n+"
    \n"}},98781:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(62247)),o=i(n(19423));function i(e){return e&&e.__esModule?e:{default:e}}var a={form:r.default,html:o.default};t.default=a},2025:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n '+(null==(t=e.t(e.component.label,{_userInput:!0}))?"":t)+"\n ","number"!==e.component.type&&"phoneNumber"!==e.component.type&&"currency"!==e.component.type||(n+="\n , "+(null==(t=e.t("numeric only"))?"":t)+",\n "),n+="\n ",e.component.tooltip&&(n+='\n \n '),n+"\n\n"}},59811:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(2025))&&r.__esModule?r:{default:r}).default};t.default=o},76904:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return'
    \n
    \n
    \n
    \n
    \n'}},38304:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(76904))&&r.__esModule?r:{default:r}).default};t.default=o},71956:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"Loading...\n"}},97028:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(71956))&&r.__esModule?r:{default:r}).default};t.default=o},31597:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return""+'
    \n'}},56105:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(31597))&&r.__esModule?r:{default:r}).default};t.default=o},46742:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return""+'
    '+(null==(t=e.message)?"":t)+"
    \n"}},40822:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(46742))&&r.__esModule?r:{default:r}).default};t.default=o},47190:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return""+'
    \n\n\n '+(null==(t=e.previewText)?"":t)+'\n\n
    \n '+(null==(t=e.messages)?"":t)+"\n
    \n"}},44857:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(47190))&&r.__esModule?r:{default:r}).default};t.default=o},34585:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return""+'
    \n
    \n
    \n \n '+(null==(t=e.t("Close"))?"":t)+'\n \n
    \n
    \n
    \n'}},75441:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(34585))&&r.__esModule?r:{default:r}).default};t.default=o},16160:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return""+'
    \n \n \n \n
    '+(null==(t=e.content)?"":t)+"
    \n
    \n"}},20073:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(16160))&&r.__esModule?r:{default:r}).default};t.default=o},31737:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n \n '+(null==(t=e.element)?"":t)+"\n \n ",e.disabled||(n+='\n \n \n \n '),n+"\n\n"}},5392:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(31737))&&r.__esModule?r:{default:r}).default};t.default=o},47935:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n \n '+(null==(t=e.rows)?"":t)+"\n ",e.disabled||(n+='\n \n \n \n "),n+"\n \n
    \n \n
    \n"}},32878:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(47935))&&r.__esModule?r:{default:r}).default};t.default=o},33793:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";for(var r in Array.prototype.join,n+='\n '+(null==(t=e.label)?"":t)+"\n "})),n+='\n \n \n \n ',e.component.collapsible&&(n+='\n \n '),n+="\n ",e.component.hideLabel&&!e.builder||(n+="\n "+(null==(t=e.t(e.component.title,{_userInput:!0}))?"":t)+"\n "),n+="\n ",e.component.tooltip&&(n+='\n \n '),n+="\n \n \n "),n+="\n ",e.collapsed&&!e.builder||(n+='\n
    \n '+(null==(t=e.children)?"":t)+"\n
    \n "),n+"\n\n"}},2265:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(47760))&&r.__esModule?r:{default:r}).default};t.default=o},52342:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return""+'
    \n\t\n\t\t\n\t\n\t\n\t\t\n\t\n
    \n '+(null==(t=e.submitButton)?"":t)+"\n
    \n"}},40486:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(52342))&&r.__esModule?r:{default:r}).default};t.default=o},67384:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return""+'
    \n
    \n '+(null==(t=e.sidebar)?"":t)+'\n
    \n
    \n\t
    \n '+(null==(t=e.form)?"":t)+"\n
    \n
    \n"}},24628:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(67384))&&r.__esModule?r:{default:r}).default};t.default=o},47733:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return""+'
    \n

    '+(null==(t=e.t("Upload a PDF File"))?"":t)+'

    \n \n
    \n \n '+(null==(t=e.t("Drop pdf to start, or"))?"":t)+' '+(null==(t=e.t("browse"))?"":t)+'\n \n \n
    \n
    \n\n
    \n
    \n\n'}},80247:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(47733))&&r.__esModule?r:{default:r}).default};t.default=o},36564:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n \n \n "})),n+="\n\n"}},92635:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,(n+='
    \n ')+"\n "+(null==(t=e.values.filter((function(t){return e.value===t.value||"object"==typeof e.value&&e.value.hasOwnProperty(t.value)&&e.value[t.value]})).map((function(t){return e.t(t.label,{_userInput:!0})})).join(", "))?"":t)+"\n
    \n"}},80411:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(36564)),o=i(n(92635));function i(e){return e&&e.__esModule?e:{default:e}}var a={form:r.default,html:o.default};t.default=a},59464:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return""+'\n \n \n \n \n \n \n \n \n
    \n '+(null==(t=e.element)?"":t)+'\n
    \n \n
    \n"}},36236:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(59464))&&r.__esModule?r:{default:r}).default};t.default=o},99291:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";for(var r in Array.prototype.join,n+=''+(null==(t=e.selectOptions)?"":t)+'\n\n'}},29645:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    ',e.value?n+=null==(t=e.self.itemValueForHTMLMode(e.value))?"":t:n+="-",n+"
    \n"}},58830:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(99291)),o=i(n(29645));function i(e){return e&&e.__esModule?e:{default:e}}var a={form:r.default,html:o.default};t.default=a},37040:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";for(var r in Array.prototype.join,n+="\n"}},89741:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,e.selected&&(n+=null==(t=e.t(e.option.label,{_userInput:!0}))?"":t),n+"\n"}},3246:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(37040)),o=i(n(89741));function i(e){return e&&e.__esModule?e:{default:e}}var a={form:r.default,html:o.default};t.default=a},66272:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+=(null==(t=e.element)?"":t)+'\n\n \n \n \n \n ',e.required&&(n+='\n \n '),n+='\n \n\n',e.component.footer&&(n+='\n \n"),n+"\n"}},47044:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return'\n'}},4287:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(66272)),o=i(n(47044));function i(e){return e&&e.__esModule?e:{default:e}}var a={form:r.default,html:o.default};t.default=a},79419:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n \n \n \n ',e.component.values.forEach((function(r){n+='\n \n "})),n+="\n \n \n \n ",e.component.questions.forEach((function(r){n+="\n \n \n ",e.component.values.forEach((function(o){n+='\n \n '})),n+="\n \n "})),n+="\n \n
    \n '+(null==(t=e.t(r.label,{_userInput:!0}))?"":t)+"\n ",r.tooltip&&(n+='\n \n '),n+="\n
    \n "+(null==(t=e.t(r.label))?"":t)+"\n ",r.tooltip&&(n+='\n \n '),n+="\n \n \n
    \n"}},80188:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n \n ',e.component.questions.forEach((function(r){n+="\n \n \n \n \n "})),n+="\n \n
    "+(null==(t=e.t(r.label))?"":t)+"\n ",e.component.values.forEach((function(o){n+="\n ",e.value&&e.value.hasOwnProperty(r.value)&&e.value[r.value]===o.value&&(n+="\n "+(null==(t=e.t(o.label))?"":t)+"\n "),n+="\n "})),n+="\n
    \n"}},40708:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(79419)),o=i(n(80188));function i(e){return e&&e.__esModule?e:{default:e}}var a={form:r.default,html:o.default};t.default=a},61915:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,e.component.components.forEach((function(r,o){n+='\n
    \n
    \n

    '+(null==(t=e.t(r.label,{_userInput:!0}))?"":t)+'

    \n
    \n \n '+(null==(t=e.tabComponents[o])?"":t)+"\n
    \n \n"})),n+="\n"}},78395:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n
    \n \n
    \n ",e.component.components.forEach((function(r,o){n+='\n \n '+(null==(t=e.tabComponents[o])?"":t)+"\n
    \n "})),n+="\n\n"}},67741:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(61915)),o=i(n(78395));function i(e){return e&&e.__esModule?e:{default:e}}var a={flat:r.default,form:o.default};t.default=a},13381:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n \n ",e.component.header&&e.component.header.length>0&&(n+="\n \n \n ",e.component.header.forEach((function(r){n+="\n \n "})),n+="\n \n \n "),n+="\n \n ",e.tableComponents.forEach((function(r,o){n+='\n \n ',r.forEach((function(r,i){n+='\n \n "})),n+="\n \n
    '+(null==(t=e.t(e.component.label))?"":t)+"
    "+(null==(t=e.t(r))?"":t)+"
    \n "})),n+="\n
    \n"}},75401:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(13381))&&r.__esModule?r:{default:r}).default};t.default=o},81863:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,e.children.forEach((function(e){n+='\n \n '+(null==(t=e)?"":t)+"\n \n"})),n+="\n"}},42142:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(81863))&&r.__esModule?r:{default:r}).default};t.default=o},45568:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,e.node.isRoot?n+='\n
    \n':n+='\n
  • \n',n+="\n ",e.content&&(n+='\n
    \n '+(null==(t=e.content)?"":t)+"\n
    \n "),n+="\n ",e.childNodes&&e.childNodes.length&&(n+='\n
      \n '+(null==(t=e.childNodes.join(""))?"":t)+"\n
    \n "),n+="\n",e.node.isRoot?n+="\n
  • \n":n+="\n \n",n+"\n"}},1:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(45568))&&r.__esModule?r:{default:r}).default};t.default=o},62720:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n
    '+(null==(t=e.children)?"":t)+"
    \n ",e.readOnly||(n+='\n
    \n \n \n
    \n "),n+"\n
    \n"}},29304:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(62720));function o(e){return e&&e.__esModule?e:{default:e}}var i={treeView:{form:o(n(26062)).default},treeEdit:{form:r.default}};t.default=i},26062:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n ',e.values.forEach((function(e){n+='\n
    \n '+(null==(t=e)?"":t)+"\n
    \n "})),n+='\n
    \n
    \n ',e.node.hasChildren&&(n+='\n \n "),n+="\n ",e.readOnly||(n+='\n \n \n \n ",e.node.revertAvailable&&(n+='\n \n "),n+="\n "),n+="\n
    \n
    \n
    \n"}},50332:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return""+'
    '+(null==(t=e.t(e.component.title,{_userInput:!0}))?"":t)+"
    \n"}},83946:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return""+'
    '+(null==(t=e.children)?"":t)+"
    \n"}},56429:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(83946)),o=i(n(50332));function i(e){return e&&e.__esModule?e:{default:e}}var a={form:r.default,builder:o.default};t.default=a},80643:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return""+'
    \n
    \n '+(null==(t=e.children)?"":t)+"\n
    \n
    \n"}},13380:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(80643))&&r.__esModule?r:{default:r}).default};t.default=o},7349:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return""+'
    '+(null==(t=e.t(e.component.title,{_userInput:!0}))?"":t)+"
    \n"}},77090:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n
    \n ',"wizardHeaderVertical"===e.wizardHeaderType?(n+='\n
    \n ',"right"!==e.wizardHeaderLocation&&(n+='\n
    \n '+(null==(t=e.wizardHeader)?"":t)+"\n
    \n "),n+='\n
    \n '+(null==(t=e.components)?"":t)+"\n
    \n ","right"===e.wizardHeaderLocation&&(n+='\n
    \n '+(null==(t=e.wizardHeader)?"":t)+"\n
    \n "),n+='\n
    \n
    \n '+(null==(t=e.wizardNav)?"":t)+"\n
    \n "):n+="\n "+(null==(t=e.wizardHeader)?"":t)+'\n
    \n '+(null==(t=e.components)?"":t)+"\n
    \n "+(null==(t=e.wizardNav)?"":t)+"\n ",n+"\n
    \n
    \n"}},41345:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(77090)),o=i(n(7349));function i(e){return e&&e.__esModule?e:{default:e}}var a={form:r.default,builder:o.default};t.default=a},29864:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n"}},187:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(29864))&&r.__esModule?r:{default:r}).default};t.default=o},47626:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n"}},88057:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(47626))&&r.__esModule?r:{default:r}).default};t.default=o},9289:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n"}},75273:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(9289))&&r.__esModule?r:{default:r}).default};t.default=o},38054:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
      \n ',e.buttonOrder.forEach((function(r){n+="\n ","cancel"===r&&e.buttons.cancel&&(n+='\n
    • \n \n
    • \n "),n+="\n ","previous"===r&&e.buttons.previous&&(n+='\n
    • \n \n
    • \n "),n+="\n ","next"===r&&e.buttons.next&&(n+='\n
    • \n \n
    • \n "),n+="\n ","submit"===r&&e.buttons.submit&&(n+="\n
    • \n ",e.disableWizardSubmit?n+='\n \n ":n+='\n \n ",n+="\n
    • \n "),n+="\n "})),n+="\n
    \n"}},24376:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={form:((r=n(38054))&&r.__esModule?r:{default:r}).default};t.default=o},75146:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(5508)),o=a(n(81575)),i=a(n(95295));function a(e){return e&&e.__esModule?e:{default:e}}var u={bootstrap:r.default,bootstrap3:o.default.templates.bootstrap3,semantic:i.default.templates.semantic};t.default=u},6701:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={unsavedRowsError:"Please save all rows before proceeding.",invalidRowsError:"Please correct invalid rows before proceeding.",invalidRowError:"Invalid row. Please correct it or delete.",alertMessageWithLabel:"{{label}}: {{message}}",alertMessage:"{{message}}",complete:"Submission Complete",error:"Please fix the following errors before submitting.",errorListHotkey:"Press Ctrl + Alt + X to go back to the error list.",errorsListNavigationMessage:"Click to navigate to the field with following error.",submitError:"Please check the form and correct all errors before submitting.",required:"{{field}} is required",unique:"{{field}} must be unique",array:"{{field}} must be an array",array_nonempty:"{{field}} must be a non-empty array",nonarray:"{{field}} must not be an array",select:"{{field}} contains an invalid selection",pattern:"{{field}} does not match the pattern {{pattern}}",minLength:"{{field}} must have at least {{length}} characters.",maxLength:"{{field}} must have no more than {{length}} characters.",minWords:"{{field}} must have at least {{length}} words.",maxWords:"{{field}} must have no more than {{length}} words.",min:"{{field}} cannot be less than {{min}}.",max:"{{field}} cannot be greater than {{max}}.",maxDate:"{{field}} should not contain date after {{- maxDate}}",minDate:"{{field}} should not contain date before {{- minDate}}",maxYear:"{{field}} should not contain year greater than {{maxYear}}",minYear:"{{field}} should not contain year less than {{minYear}}",invalid_email:"{{field}} must be a valid email.",invalid_url:"{{field}} must be a valid url.",invalid_regex:"{{field}} does not match the pattern {{regex}}.",invalid_date:"{{field}} is not a valid date.",invalid_day:"{{field}} is not a valid day.",mask:"{{field}} does not match the mask.",valueIsNotAvailable:"{{ field }} is an invalid value.",stripe:"{{stripe}}",month:"Month",day:"Day",year:"Year",january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December",next:"Next",previous:"Previous",cancel:"Cancel",submit:"Submit Form",confirmCancel:"Are you sure you want to cancel?",saveDraftInstanceError:"Cannot save draft because there is no formio instance.",saveDraftAuthError:"Cannot save draft unless a user is authenticated.",restoreDraftInstanceError:"Cannot restore draft because there is no formio instance.",time:"Invalid time"}},193:function(e,t,n){"use strict";n(91038),n(47042),n(68309),n(12419),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n(66992),n(41539),n(33948),n(92222),n(74916),n(15306),n(21249),n(23123),n(73210),n(54747),n(47941),n(82526),n(41817),n(32165),n(78783);var r=i(n(96486)),o=i(n(69887));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t,n){return a=u()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&l(o,n.prototype),o},a.apply(null,arguments)}function u(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}function s(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?t-1:0),o=1;ol&&(i=a.greater(l,t),u=!1)}if(o&&e.isValid()){var s=(0,r.default)(o,t);e-1;(n||i.tree||!d)&&(c=t(i,f,e));var p=function(){return i.key&&!["panel","table","well","columns","fieldset","tabs","form"].includes(i.type)&&(["datagrid","container","editgrid","address","dynamicWizard","datatable"].includes(i.type)||i.tree)?f:i.key&&"form"===i.type?"".concat(f,".data"):r};c||(u?i.columns.forEach((function(e){return b(e.components,t,n,p(),o?i:null)}),!0):l?i.rows.forEach((function(e){Array.isArray(e)&&e.forEach((function(e){return b(e.components,t,n,p(),o?i:null)}),!0)})):s&&b(i.components,t,n,p(),o?i:null,!0))}})),e.noRecurse&&delete e.noRecurse}}function g(e,t){if((0,l.default)(t))return e.key===t||e.path===t;var n=!1;return(0,u.default)(t,(function(t,o){if(!(n=(0,r.default)(e,o)===t))return!1})),n}function w(e,t){var n=[];return b(e,(function(e){g(e,t)&&n.push(e)}),!0),n}function _(e,t,n,r){if(e){if(n=n||[],!t)return r(e);e.forEach((function(o,i){var a=n.slice();a.push(i),o&&(o.hasOwnProperty("columns")&&Array.isArray(o.columns)&&(a.push("columns"),o.columns.forEach((function(e,n){var o=a.slice();o.push(n),o.push("components"),_(e.components,t,o,r)}))),o.hasOwnProperty("rows")&&Array.isArray(o.rows)&&(a.push("rows"),o.rows.forEach((function(e,n){var o=a.slice();o.push(n),e.forEach((function(e,n){var i=o.slice();i.push(n),i.push("components"),_(e.components,t,i,r)}))}))),o.hasOwnProperty("components")&&Array.isArray(o.components)&&(a.push("components"),_(o.components,t,a,r)),o.key===t&&r(o,a,e))}))}}function k(e,t){var n=t.pop();0!==t.length&&(e=(0,r.default)(e,t)),e.splice(n,1)}function O(e){return parseFloat((0,l.default)(e)?e.replace(/[^\de.+-]/gi,""):e)}},52013:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lodashOperators=void 0,t.lodashOperators=["chunk","compact","concat","difference","differenceBy","differenceWith","drop","dropRight","dropRightWhile","dropWhile","findIndex","findLastIndex","first","flatten","flattenDeep","flattenDepth","fromPairs","head","indexOf","initial","intersection","intersectionBy","intersectionWith","join","last","lastIndexOf","nth","slice","sortedIndex","sortedIndexBy","sortedIndexOf","sortedLastIndex","sortedLastIndexBy","sortedLastIndexOf","sortedUniq","sortedUniqBy","tail","take","takeRight","takeRightWhile","takeWhile","union","unionBy","unionWith","uniq","uniqBy","uniqWith","unzip","unzipWith","without","xor","xorBy","xorWith","zip","zipObject","zipObjectDeep","zipWith","countBy","every","filter","find","findLast","flatMap","flatMapDeep","flatMapDepth","groupBy","includes","invokeMap","keyBy","map","orderBy","partition","reduce","reduceRight","reject","sample","sampleSize","shuffle","size","some","sortBy","now","flip","negate","overArgs","partial","partialRight","rearg","rest","spread","castArray","clone","cloneDeep","cloneDeepWith","cloneDeep","conformsTo","eq","gt","gte","isArguments","isArray","isArrayBuffer","isArrayLike","isArrayLikeObject","isBoolean","isBuffer","isDate","isElement","isEmpty","isEqual","isEqualWith","isError","isFinite","isFunction","isInteger","isLength","isMap","isMatch","isMatchWith","isNaN","isNative","isNil","isNull","isNumber","isObject","isObjectLike","isPlainObject","isRegExp","isSafeInteger","isSet","isString","isSymbol","isTypedArray","isUndefined","isWeakMap","isWeakSet","lt","lte","toArray","toFinite","toInteger","toLength","toNumber","toPlainObject","toSafeInteger","toString","add","ceil","divide","floor","max","maxBy","mean","meanBy","min","minBy","multiply","round","subtract","sum","sumBy","clamp","inRange","random","at","entries","entriesIn","findKey","findLastKey","functions","functionsIn","get","has","hasIn","invert","invertBy","invoke","keys","keysIn","mapKeys","mapValues","omit","omitBy","pick","pickBy","result","toPairs","toPairsIn","transform","values","valuesIn","camelCase","capitalize","deburr","endsWith","escape","escapeRegExp","kebabCase","lowerCase","lowerFirst","pad","padEnd","padStart","parseInt","repeat","replace","snakeCase","split","startCase","startsWith","toLower","toUpper","trim","trimEnd","trimStart","truncate","unescape","upperCase","upperFirst","words","cond","conforms","constant","defaultTo","flow","flowRight","identity","iteratee","matches","matchesProperty","method","methodOf","nthArg","over","overEvery","overSome","property","propertyOf","range","rangeRight","stubArray","stubFalse","stubObject","stubString","stubTrue","times","toPath","uniqueId"]},82531:function(e,t,n){"use strict";n(82526),n(41817),n(32165),n(78783),n(91038),n(47941),Object.defineProperty(t,"__esModule",{value:!0});var r={evaluate:!0,getRandomComponentId:!0,getPropertyValue:!0,getElementRect:!0,boolValue:!0,isMongoId:!0,checkCalculated:!0,checkSimpleConditional:!0,checkCustomConditional:!0,checkJsonConditional:!0,checkCondition:!0,checkTrigger:!0,setActionProperty:!0,unescapeHTML:!0,convertStringToHTMLElement:!0,uniqueName:!0,guid:!0,getDateSetting:!0,isValidDate:!0,currentTimezone:!0,offsetDate:!0,zonesLoaded:!0,shouldLoadZones:!0,loadZones:!0,momentDate:!0,formatDate:!0,formatOffset:!0,getLocaleDateFormatInfo:!0,convertFormatToFlatpickr:!0,convertFormatToMoment:!0,convertFormatToMask:!0,getInputMask:!0,unmaskValue:!0,matchInputMask:!0,getNumberSeparators:!0,getNumberDecimalLimit:!0,getCurrencyAffixes:!0,fieldData:!0,delay:!0,iterateKey:!0,uniqueKey:!0,bootstrapVersion:!0,unfold:!0,firstNonNil:!0,withSwitch:!0,observeOverload:!0,getContextComponents:!0,getContextButtons:!0,translateHTMLTemplate:!0,sanitize:!0,fastCloneDeep:!0,interpolate:!0,isInputComponent:!0,getArrayFromComponentPath:!0,hasInvalidComponent:!0,getStringFromComponentPath:!0,round:!0,getIEBrowserVersion:!0,getBrowserInfo:!0,getComponentPathWithoutIndicies:!0,getComponentPath:!0,getDataParentComponent:!0,isPromise:!0,isInsideScopingComponent:!0,getFocusableElements:!0,_:!0,jsonLogic:!0,moment:!0,Evaluator:!0};Object.defineProperty(t,"Evaluator",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"_",{enumerable:!0,get:function(){return o.default}}),t.boolValue=function(e){return o.default.isBoolean(e)?e:o.default.isString(e)?"true"===e.toLowerCase():!!e},t.bootstrapVersion=function(e){return e.bootstrap?e.bootstrap:"function"==typeof $&&"function"==typeof $().collapse?parseInt($.fn.collapse.Constructor.VERSION.split(".")[0],10):0},t.checkCalculated=function(e,t,n){e.calculateValue&&o.default.set(n,e.key,g(e.calculateValue,{value:void 0,data:t?t.data:n,row:n,util:this,component:e},"value"))},t.checkCondition=function(e,t,n,r,o){var i=e.customConditional,a=e.conditional;return i?k(0,i,t,n,r,"show",!0,o):a&&a.when?_(0,a,t=x(e,t,o),n):!a||!a.json||O(e,a.json,t,n,r,!0)},t.checkCustomConditional=k,t.checkJsonConditional=O,t.checkSimpleConditional=_,t.checkTrigger=function(e,t,n,r,o,i){if(!t[t.type])return!1;switch(t.type){case"simple":return n=x(e,n,i,t.simple),_(0,t.simple,n,r);case"javascript":return k(0,t.javascript,n,r,o,"result",!1,i);case"json":return O(e,t.json,n,r,o,!1)}return!1},t.convertFormatToFlatpickr=function(e){return e.replace(/Z/g,"").replace(/y/g,"Y").replace("YYYY","Y").replace("YY","y").replace("MMMM","F").replace(/M/g,"n").replace("nnn","M").replace("nn","m").replace(/d/g,"j").replace(/jj/g,"d").replace("EEEE","l").replace("EEE","D").replace("HH","H").replace("hh","G").replace("mm","i").replace("ss","S").replace(/a/g,"K")},t.convertFormatToMask=function(e){return e.replace(/M{4}/g,"MM").replace(/M{3}/g,"***").replace(/e/g,"Q").replace(/[ydhmsHMG]/g,"9").replace(/a/g,"AA")},t.convertFormatToMoment=M,t.convertStringToHTMLElement=function(e,t){return(new window.DOMParser).parseFromString(e,"text/html").body.querySelector(t)},t.currentTimezone=P,t.delay=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length,r=new Array(n>2?n-2:0),o=2;o0&&void 0!==arguments[0]?arguments[0]:"";return e.replace(/\[\d+\]/,"")},t.getContextButtons=function(e){var t=[];return e.utils.eachComponent(e.instance.options.editForm.components,(function(e){"button"===e.type&&t.push({label:"".concat(e.key," (").concat(e.label,")"),value:e.key})})),t},t.getContextComponents=function(e){var t=[];return e.utils.eachComponent(e.instance.options.editForm.components,(function(n,r){n.key!==e.data.key&&t.push({label:"".concat(n.label||n.key," (").concat(r,")"),value:r})})),t},t.getCurrencyAffixes=function(e){var t=e.currency,n=void 0===t?"USD":t,r=e.decimalLimit,o=e.decimalSeparator,i=e.lang,a="(.*)?".concat(100..toLocaleString(i));r&&(a+="".concat("."===o?"\\.":o).concat((0).toLocaleString(i),"{").concat(r,"}")),a+="(.*)?";var u=100..toLocaleString(i,{style:"currency",currency:n,useGrouping:!0,maximumFractionDigits:r||0,minimumFractionDigits:r||0}).replace(".",o).match(new RegExp(a));return{prefix:(null==u?void 0:u[1])||"",suffix:(null==u?void 0:u[2])||""}},t.getDataParentComponent=F,t.getDateSetting=function(e){if(o.default.isNil(e)||o.default.isNaN(e)||""===e)return null;if(e instanceof Date)return e;if("function"==typeof e.toDate)return e.isValid()?e.toDate():null;var t="string"!=typeof e||-1===e.indexOf("moment(")?(0,u.default)(e):null;if(t&&t.isValid())return t.toDate();t=null;try{var n=p.default.evaluator("return ".concat(e,";"),"moment")(u.default);"string"==typeof n?t=(0,u.default)(n):"function"==typeof n.toDate?t=(0,u.default)(n.toDate().toUTCString()):n instanceof Date&&(t=(0,u.default)(n))}catch(e){return null}return t&&t.isValid()?t.toDate():null},t.getElementRect=function(e){var t=window.getComputedStyle(e,null);return{x:w(t,"left"),y:w(t,"top"),width:w(t,"width"),height:w(t,"height")}},t.getFocusableElements=function(e){return e.querySelectorAll("button:not([disabled]), input:not([disabled]), select:not([disabled]),\n textarea:not([disabled]), button:not([disabled]), [href]")},t.getIEBrowserVersion=function(){var e=V(),t=e.ie,n=e.version;return t?n:null},t.getInputMask=function(e,t){if(e instanceof Array)return e;var n=[];n.numeric=!0;for(var r=0;r1&&(n=i[1].length)}return n},t.getNumberSeparators=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en",t=12345.6789.toLocaleString(e),n=t.match(/..(.)...(.)../);return n?{delimiter:n.length>1?n[1]:",",decimalSeparator:n.length>2?n[2]:"."}:{delimiter:",",decimalSeparator:"."}},t.getPropertyValue=w,t.getRandomComponentId=function(){return"e".concat(Math.random().toString(36).substring(7))},t.getStringFromComponentPath=function(e){if(!o.default.isArray(e))return e;var t="";return e.forEach((function(e,n){o.default.isNumber(e)?t+="[".concat(e,"]"):t+=0===n?e:".".concat(e)})),t},t.guid=j,t.hasInvalidComponent=function e(t){return t.getComponents().some((function(t){return o.default.isArray(t.components)?e(t):t.error}))},t.interpolate=void 0,t.isInputComponent=function(e){if(!1===e.input||!0===e.input)return e.input;switch(e.type){case"htmlelement":case"content":case"columns":case"fieldset":case"panel":case"table":case"tabs":case"well":case"button":return!1;default:return!0}},t.isInsideScopingComponent=function e(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!n&&null!=t&&t.hasScopedChildren)return!0;var r=F(t);return!(null==r||!r.hasScopedChildren)||!(null==r||!r.parent)&&e(r.parent,!1)},t.isMongoId=function(e){return e.toString().match(/^[0-9a-fA-F]{24}$/)},t.isPromise=function(e){return e&&e.then&&"function"==typeof e.then&&"[object Promise]"===Object.prototype.toString.call(e)},t.isValidDate=function(e){return o.default.isDate(e)&&!o.default.isNaN(e.getDate())},t.iterateKey=A,Object.defineProperty(t,"jsonLogic",{enumerable:!0,get:function(){return a.default}}),t.loadZones=E,t.matchInputMask=function(e,t){if(!t)return!0;if(e.length>t.length)return!1;for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=t.limit,r=void 0===n?50:n,o=t.delay,i=void 0===o?500:o,a=0,u=0,l=function(){return a=0};return function(){if(0!==u&&(clearTimeout(u),u=0),u=setTimeout(l,i),(a+=1)>=r)return clearTimeout(u),l(),e()}},t.offsetDate=S,t.round=function(e,t){return o.default.isNumber(e)?e.toFixed(t):e},t.sanitize=function(e,t){if("function"!=typeof f.default.sanitize)return e;var n={ADD_ATTR:["ref","target"],USE_PROFILES:{html:!0}};return t.sanitizeConfig&&Array.isArray(t.sanitizeConfig.addAttr)&&t.sanitizeConfig.addAttr.length>0&&t.sanitizeConfig.addAttr.forEach((function(e){n.ADD_ATTR.push(e)})),t.sanitizeConfig&&Array.isArray(t.sanitizeConfig.addTags)&&t.sanitizeConfig.addTags.length>0&&(n.ADD_TAGS=t.sanitizeConfig.addTags),t.sanitizeConfig&&Array.isArray(t.sanitizeConfig.allowedTags)&&t.sanitizeConfig.allowedTags.length>0&&(n.ALLOWED_TAGS=t.sanitizeConfig.allowedTags),t.sanitizeConfig&&Array.isArray(t.sanitizeConfig.allowedAttrs)&&t.sanitizeConfig.allowedAttrs.length>0&&(n.ALLOWED_ATTR=t.sanitizeConfig.allowedAttrs),t.sanitizeConfig&&t.sanitizeConfig.allowedUriRegex&&(n.ALLOWED_URI_REGEXP=t.sanitizeConfig.allowedUriRegex),t.sanitizeConfig&&Array.isArray(t.sanitizeConfig.addUriSafeAttr)&&t.sanitizeConfig.addUriSafeAttr.length>0&&(n.ADD_URI_SAFE_ATTR=t.sanitizeConfig.addUriSafeAttr),f.default.sanitize(e,n)},t.setActionProperty=function(e,t,n,r,i,a){var u=t.property.value;switch(t.property.type){case"boolean":var l=o.default.get(e,u,!1).toString(),s=t.state.toString();l!==s&&o.default.set(e,u,"true"===s);break;case"string":var c={data:i,row:r,component:e,result:n},f=t.property.component?t[t.property.component]:t.text,d=o.default.get(e,u,""),h=a&&a.interpolate?a.interpolate(f,c):p.default.interpolate(f,c);h!==d&&o.default.set(e,u,h)}return e},t.shouldLoadZones=C,t.translateHTMLTemplate=function(e,t){if(!/<[^>]*>/.test(e))return t(e);var n=document.createElement("div");return n.innerHTML=e,n.innerText&&n.children.length?(L(n,t),n.innerHTML):e},t.unescapeHTML=function(e){return"undefined"!=typeof window&&"DOMParser"in window?(new window.DOMParser).parseFromString(e,"text/html").documentElement.textContent:e},t.unfold=R,t.uniqueKey=function(e,t){for(var n=t;e.hasOwnProperty(n);)n=A(n);return n},t.uniqueName=function(e,t,n){(t=t||"{{fileName}}-{{guid}}").includes("{{guid}}")||(t="".concat(t,"-{{guid}}"));var r=e.split("."),i=r.slice(0,r.length-1).join("."),a=r.length>1?".".concat(o.default.last(r)):"";return i=i.substr(0,100),n=Object.assign(n||{},{fileName:i,guid:j()}),"".concat(p.default.interpolate(t,n)).concat(a).replace(/[^0-9a-zA-Z.\-_ ]/g,"-")},t.unmaskValue=function(e,t,n){if(!t||!e||e.length>t.length)return e;for(var r=e.split(""),i=0;ie.length)&&(t=e.length);for(var n=0,r=new Array(t);n]*>(.*?)<\/a>/g);if(o&&o.length){if(1===o.length&&o[0].length===e.innerHTML.length)return e.innerHTML.replace(n,r);var i=o.map((function(e){var n=document.createElement("a");return n.innerHTML=e,I(n,t)}));return"".concat(r," (").concat(i.join(", "),")")}return e.innerText.replace(n,r)}return e.innerHTML}function L(e,t){var n,r=e.children.length&&(function(e){if(Array.isArray(e))return v(e)}(n=e.children)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(e,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=r&&r.every((function(e){return 0===e.children.length&&D.some((function(t){return e.nodeName===t}))}));!r||o?e.innerHTML=I(e,t):r.forEach((function(e){return L(e,t)}))}function V(){var e={};if("undefined"==typeof window)return e;var t=window.navigator.userAgent.toLowerCase(),n=/(edge|edg)\/([\w.]+)/.exec(t)||/(opr)[/]([\w.]+)/.exec(t)||/(yabrowser)[ /]([\w.]+)/.exec(t)||/(chrome)[ /]([\w.]+)/.exec(t)||/(iemobile)[/]([\w.]+)/.exec(t)||/(version)(applewebkit)[ /]([\w.]+).*(safari)[ /]([\w.]+)/.exec(t)||/(webkit)[ /]([\w.]+).*(version)[ /]([\w.]+).*(safari)[ /]([\w.]+)/.exec(t)||/(webkit)[ /]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ /]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t)||[],r={browser:n[5]||n[3]||n[1]||"",version:n[4]||n[2]||"0"};return r.browser&&(e[r.browser]=!0,e.version=parseInt(r.version,10)),(e.chrome||e.opr||e.safari||e.edg||e.yabrowser)&&(e.isWebkit=!0),(e.rv||e.iemobile)&&(e.ie=!0),e.edg&&(e.edge=!0),e.opr&&(e.opera=!0),e}function N(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e&&e.key&&"wizard"!==(null==e||null===(t=e._form)||void 0===t?void 0:t.display)?(n=e.isInputComponent||!0===e.input?"".concat(e.key).concat(n?".":"").concat(n):n,N(e.parent,n)):n}function F(e){if(e){var t=e.parent;return t&&(t.isInputComponent||t.input)?t:F(t)}}},24897:function(e,t,n){"use strict";n(47941),n(82526),n(57327),n(41539),n(38880),n(54747),n(49337),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(64753))&&r.__esModule?r:{default:r};function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:{};v(this,e),this.config=r.default.defaults(t,e.config),this.validators={required:{key:"validate.required",method:"validateRequired",hasLabel:!0,message:function(e){return e.t(e.errorMessage("required"),{field:e.errorLabel,data:e.data})},check:function(e,t,n){if(!(0,o.boolValue)(t)||e.isValueHidden())return!0;var r=e.validators.some((function(e){return"calendar"===e}));return!n&&r&&e.widget.enteredDate?!this.validators.calendar.check.call(this,e,t,n):!e.isEmpty(n)}},onlyAvailableItems:{key:"validate.onlyAvailableItems",method:"validateValueAvailability",hasLabel:!0,message:function(e){return e.t(e.errorMessage("valueIsNotAvailable"),{field:e.errorLabel,data:e.data})},check:function(e,t){return!(0,o.boolValue)(t)}},unique:{key:"validate.unique",hasLabel:!0,message:function(e){return e.t(e.errorMessage("unique"),{field:e.errorLabel,data:e.data})},check:function(e,t,n){var i=this;return!(0,o.boolValue)(t)||!!(!n||r.default.isObjectLike(n)&&r.default.isEmpty(n))||!this.config.db||new a.default((function(t){var a=i.config.form,u=i.config.submission,l="data.".concat(e.path),s=function(e,t,n){var o=n.split(/\[\d+\]?./),i=n;if(o.length>1){i=o.shift();var a={};r.default.reduce(o,(function(t,n,i){var u=i===o.length-1,l=r.default.get(a,t,a),s="$elemMatch['".concat(n,"']");return r.default.set(l,s,u?e:{}),t?"".concat(t,".").concat(s):s}),""),t[i]=a}else t[i]=e},c={form:a._id};r.default.isString(n)?e.component.dbIndex?s(n,c,l):s({$regex:new RegExp("^".concat((0,o.escapeRegExCharacters)(n),"$")),$options:"i"},c,l):r.default.isPlainObject(n)&&n.address&&n.address.address_components&&n.address.place_id?s({$regex:new RegExp("^".concat((0,o.escapeRegExCharacters)(n.address.place_id),"$")),$options:"i"},c,"".concat(l,".address.place_id")):r.default.isArray(n)?s({$all:n},c,l):(r.default.isObject(n)||r.default.isNumber(n))&&s({$eq:n},c,l),c.deleted={$eq:null},i.config.db.findOne(c,(function(n,r){return n?t(!1):r?u._id&&r._id.toString()===u._id?void t(!0):(e.conflictId=r._id.toString(),t(!1)):t(!0)}))})).catch((function(){return!1}))}},multiple:{key:"validate.multiple",hasLabel:!0,message:function(e){var t=(0,o.boolValue)(e.component.multiple)||Array.isArray(e.emptyValue),n=e.component.validate.required,r=t?n?"array_nonempty":"array":"nonarray";return e.t(e.errorMessage(r),{field:e.errorLabel,data:e.data})},check:function(e,t,n){if(!e.validateMultiple())return!0;var i=(0,o.boolValue)(t),a=Array.isArray(e.emptyValue),u=Array.isArray(n),l=e.component.validate.required;return i?u?!l||!!n.length:!!r.default.isNil(n)&&!l:a||!u}},select:{key:"validate.select",hasLabel:!0,message:function(e){return e.t(e.errorMessage("select"),{field:e.errorLabel,data:e.data})},check:function(e,t,n,i,a,u,l){if(!(0,o.boolValue)(t))return!0;if(!n||r.default.isEmpty(n))return!0;if(!l)return!0;var s=e.component,c={url:t,method:"GET",qs:{},json:!0,headers:{}};if(r.default.isBoolean(c.url)){if(c.url=!!c.url,!c.url||"url"!==s.dataSrc||!s.data.url||!s.searchField)return!0;c.url=s.data.url,c.qs[s.searchField]=n,s.filter&&(c.url+=(c.url.includes("?")?"&":"?")+s.filter),s.selectFields&&(c.qs.select=s.selectFields)}return!c.url||(c.url=(0,o.interpolate)(c.url,{data:e.data}),c.url+=(c.url.includes("?")?"&":"?")+r.default.chain(c.qs).map((function(e,t){return"".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(e))})).join("&").value(),s.data&&s.data.headers&&r.default.each(s.data.headers,(function(e){e.key&&(c.headers[e.key]=e.value)})),s.authenticate&&this.config.token&&(c.headers["x-jwt-token"]=this.config.token),b(new w(c.url,{headers:new g(c.headers)})).then((function(e){return!!e.ok&&e.json()})).then((function(e){return e&&e.length})).catch((function(){return!1})))}},min:{key:"validate.min",hasLabel:!0,message:function(e,t){return e.t(e.errorMessage("min"),{field:e.errorLabel,min:parseFloat(t),data:e.data})},check:function(e,t,n){var r=parseFloat(t),o=parseFloat(n);return!(!Number.isNaN(r)&&!Number.isNaN(o))||o>=r}},max:{key:"validate.max",hasLabel:!0,message:function(e,t){return e.t(e.errorMessage("max"),{field:e.errorLabel,max:parseFloat(t),data:e.data})},check:function(e,t,n){var r=parseFloat(t),o=parseFloat(n);return!(!Number.isNaN(r)&&!Number.isNaN(o))||o<=r}},minSelectedCount:{key:"validate.minSelectedCount",message:function(e,t){return e.component.minSelectedCountMessage?e.component.minSelectedCountMessage:e.t(e.errorMessage("minSelectedCount"),{minCount:parseFloat(t),data:e.data})},check:function(e,t,n){var r=parseFloat(t);if(!r)return!0;var o=Object.keys(n).reduce((function(e,t){return n[t]&&e++,e}),0);return!o||o>=r}},maxSelectedCount:{key:"validate.maxSelectedCount",message:function(e,t){return e.component.maxSelectedCountMessage?e.component.maxSelectedCountMessage:e.t(e.errorMessage("maxSelectedCount"),{minCount:parseFloat(t),data:e.data})},check:function(e,t,n){var r=parseFloat(t);return!r||Object.keys(n).reduce((function(e,t){return n[t]&&e++,e}),0)<=r}},minLength:{key:"validate.minLength",hasLabel:!0,message:function(e,t){return e.t(e.errorMessage("minLength"),{field:e.errorLabel,length:t,data:e.data})},check:function(e,t,n){var r=parseInt(t,10);return!(n&&r&&"string"==typeof n&&!e.isEmpty(n))||n.length>=r}},maxLength:{key:"validate.maxLength",hasLabel:!0,message:function(e,t){return e.t(e.errorMessage("maxLength"),{field:e.errorLabel,length:t,data:e.data})},check:function(e,t,n){var r=parseInt(t,10);return!r||"string"!=typeof n||n.length<=r}},maxWords:{key:"validate.maxWords",hasLabel:!0,message:function(e,t){return e.t(e.errorMessage("maxWords"),{field:e.errorLabel,length:t,data:e.data})},check:function(e,t,n){var r=parseInt(t,10);return!r||"string"!=typeof n||n.trim().split(/\s+/).length<=r}},minWords:{key:"validate.minWords",hasLabel:!0,message:function(e,t){return e.t(e.errorMessage("minWords"),{field:e.errorLabel,length:t,data:e.data})},check:function(e,t,n){var r=parseInt(t,10);return!r||!n||"string"!=typeof n||n.trim().split(/\s+/).length>=r}},email:{hasLabel:!0,message:function(e){return e.t(e.errorMessage("invalid_email"),{field:e.errorLabel,data:e.data})},check:function(e,t,n){return!n||/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(n)}},url:{hasLabel:!0,message:function(e){return e.t(e.errorMessage("invalid_url"),{field:e.errorLabel,data:e.data})},check:function(e,t,n){return!n||/^(?:(?:(?:https?|ftp):)?\/\/)?(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(n)&&!/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(n)}},date:{hasLabel:!0,message:function(e){return e.t(e.errorMessage("invalid_date"),{field:e.errorLabel,data:e.data})},check:function(e,t,n){return"Invalid date"!==n}},day:{hasLabel:!0,message:function(e){return e.t(e.errorMessage("invalid_day"),{field:e.errorLabel,data:e.data})},check:function(e,t,n){if(!n)return!0;var r=d(e.dayFirst?[0,1,2]:[1,0,2],3),o=r[0],i=r[1],a=r[2],u=n.split("/").map((function(e){return parseInt(e,10)})),l=u[o],s=u[i],c=u[a],f=function(e,t){switch(e){case 1:case 3:case 5:case 7:case 8:case 10:case 12:default:return 31;case 4:case 6:case 9:case 11:return 30;case 2:return function(e){return!(e%400&&(!(e%100)||e%4))}(t)?29:28}}(s,c);return!(l<0||l>f||s<0||s>12||c<0||c>9999)}},pattern:{key:"validate.pattern",hasLabel:!0,message:function(e,t){return e.t(r.default.get(e,"component.validate.patternMessage",e.errorMessage("pattern")),{field:e.errorLabel,pattern:t,data:e.data})},check:function(e,t,n){return!!e.isEmpty(n)||(!t||new RegExp("^".concat(t,"$")).test(n))}},json:{key:"validate.json",check:function(e,t,n,r,o,i){if(!t)return!0;var a=e.evaluate(t,{data:r,row:i,rowIndex:o,input:n});return null===a||a}},mask:{key:"inputMask",hasLabel:!0,message:function(e){return e.t(e.errorMessage("mask"),{field:e.errorLabel,data:e.data})},check:function(e,t,n){var r;if(e.isMultipleMasksField){var i=n?n.maskName:void 0,a=e.getMaskByName(i);a&&(r=a),n=n?n.value:n}else r=t;return r=r?(0,o.getInputMask)(r):null,!(n&&r&&!e.skipMaskValidation)||(r=r.map((function(t){return t===e.placeholderChar?" ":t})),(0,o.matchInputMask)(n,r))}},custom:{key:"validate.custom",message:function(e){return e.t(e.errorMessage("custom"),{field:e.errorLabel,data:e.data})},check:function(e,t,n,r,o,i){if(!t)return!0;var a=e.evaluate(t,{valid:!0,data:r,rowIndex:o,row:i,input:n},"valid",!0);return null===a||a}},maxDate:{key:"maxDate",hasLabel:!0,message:function(e,t){var n=(0,o.getDateSetting)(t);return e.t(e.errorMessage("maxDate"),{field:e.errorLabel,maxDate:(0,i.default)(n).format(e.format)})},check:function(e,t,n){if(e.isPartialDay&&e.isPartialDay(n))return!0;var a=e.getValidationFormat?(0,i.default)(n,e.getValidationFormat()):(0,i.default)(n),u=(0,o.getDateSetting)(t);return!!r.default.isNull(u)||(u.setHours(0,0,0,0),a.isBefore(u)||a.isSame(u))}},minDate:{key:"minDate",hasLabel:!0,message:function(e,t){var n=(0,o.getDateSetting)(t);return e.t(e.errorMessage("minDate"),{field:e.errorLabel,minDate:(0,i.default)(n).format(e.format)})},check:function(e,t,n){if(e.isPartialDay&&e.isPartialDay(n))return!0;var a=e.getValidationFormat?(0,i.default)(n,e.getValidationFormat()):(0,i.default)(n),u=(0,o.getDateSetting)(t);return!!r.default.isNull(u)||(u.setHours(0,0,0,0),a.isAfter(u)||a.isSame(u))}},minYear:{key:"minYear",hasLabel:!0,message:function(e,t){return e.t(e.errorMessage("minYear"),{field:e.errorLabel,minYear:t})},check:function(e,t,n){var r=t,o=/\d{4}$/.exec(n);return o=o?o[0]:null,!+r||!+o||+o>=+r}},maxYear:{key:"maxYear",hasLabel:!0,message:function(e,t){return e.t(e.errorMessage("maxYear"),{field:e.errorLabel,maxYear:t})},check:function(e,t,n){var r=t,o=/\d{4}$/.exec(n);return o=o?o[0]:null,!+r||!+o||+o<=+r}},calendar:{key:"validate.calendar",messageText:"",hasLabel:!0,message:function(e){return e.t(e.errorMessage(this.validators.calendar.messageText),{field:e.errorLabel,maxDate:(0,i.default)(e.dataValue).format(e.format)})},check:function(e,t,n,r,a){this.validators.calendar.messageText="";var u=e.getWidget(a);if(!u)return!0;var s=u.settings,c=u.enteredDate,f=s.minDate,d=s.maxDate,p=s.format,h=[(0,o.convertFormatToMoment)(p)];if(h[0].match(/M{3,}/g)&&h.push(h[0].replace(/M{3,}/g,"MM")),!n&&c){var v=(0,l.checkInvalidDate)(c,h,f,d),y=v.message,m=v.result;if(!m)return this.validators.calendar.messageText=y,m}return n&&c?(0,i.default)(n).format()!==(0,i.default)(c,h,!0).format()&&c.match(/_/gi)?(this.validators.calendar.messageText=l.CALENDAR_ERROR_MESSAGES.INCOMPLETE,!1):(u.enteredDate="",!0):void 0}},time:{key:"validate.time",messageText:"Invalid time",hasLabel:!0,message:function(e){return e.t(e.errorMessage(this.validators.time.messageText),{field:e.errorLabel})},check:function(e,t,n){return!!e.isEmpty(n)||(0,i.default)(n,e.component.format).isValid()}}}}var t,n;return t=e,n=[{key:"checkValidator",value:function(e,t,n,r,o,i,u,l){var s,c=this;s=t.method&&"function"==typeof e[t.method]?e[t.method](n,r,o,i,u,l):t.check.call(this,e,n,r,o,i,u,l);var f=function(r){return"string"==typeof r?r:!r&&t.message?t.message.call(c,e,n,i,u):""};return l?a.default.resolve(s).then(f):f(s)}},{key:"validate",value:function(e,t,n,i,u,l,s,c,f){if(!c)return!1;var d=this.validators[t],p=r.default.get(f||e.component,d.key,null),h=this.checkValidator(e,d,p,n,i,u,l,s),v=function(i){if(i){var a,l={message:(0,o.unescapeHTML)(r.default.get(i,"message",i)),level:"warning"===r.default.get(i,"level")?"warning":"error",path:(0,o.getArrayFromComponentPath)(e.path||""),context:{validator:t,hasLabel:d.hasLabel,setting:p,key:e.key,label:e.label,value:n,index:u,input:null===(a=e.refs.input)||void 0===a?void 0:a[u]}};return"unique"===t&&e.conflictId&&(l.conflictId=e.conflictId),l}return!1};return s?a.default.resolve(h).then(v):v(h)}},{key:"checkComponent",value:function(e,t,n){var o,i=this,u=arguments.length>3&&void 0!==arguments[3]&&arguments[3],l=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s="undefined"!=typeof process&&"node"===r.default.get(process,"release.name")&&!r.default.defaultTo(e.component.persistent,!0);if(s||!1===e.component.validate)return l?a.default.resolve([]):[];t=t||e.rootValue,n=n||e.data;var c=e.component.multiple&&Array.isArray(e.validationValue)?e.validationValue:[e.validationValue],d=e.conditionallyVisible(),p=[];null!=e&&null!==(o=e.addons)&&void 0!==o&&o.length&&c.forEach((function(t){e.addons.forEach((function(e){e.checkValidity(t)||p.push.apply(p,f(e.errors||[]))}))}));var h=r.default.get(e,"component.validations"),v=[];if(h&&Array.isArray(h)&&h.length){var y=r.default.chain(h).groupBy((function(e){return e.mode})).value();if(e.calculateCondition){u=!0;var m=r.default.chain(y.ui).filter("active").groupBy((function(e){return e.group||null})).value(),b=m.null||[];delete m.null,b.forEach((function(t){var n=t.condition,r=t.message,o=t.severity;e.calculateCondition(n)||v.push({level:o||"error",message:e.t(r),componentInstance:e})})),r.default.forEach(m,(function(t){r.default.forEach(t,(function(t){var n=t.condition,r=t.message,o=t.severity;if(!e.calculateCondition(n))return v.push({level:o||"error",message:e.t(r),componentInstance:e}),!1}))}))}else v=this.checkValidations(e,h,t,n,c,l);e.validators.includes("custom")&&y.js&&r.default.each(y.js,(function(o){v.push(r.default.map(c,(function(r,a){return i.validate(e,"custom",r,t,a,n,l,d,o)})))})),e.validators.includes("json")&&y.json&&r.default.each(y.json,(function(o){v.push(r.default.map(c,(function(r,a){return i.validate(e,"json",r,t,a,n,l,d,o)})))}))}var g=r.default.get(e,"component.validate.custom"),w=r.default.get(e,"component.validate.customMessage"),_=(0,r.default)(e.validators).chain().map((function(o){return i.validators.hasOwnProperty(o)?"required"!==o||c.length?r.default.map(c,(function(r,a){return i.validate(e,o,r,t,a,n,l,d)})):[i.validate(e,o,null,t,0,n,l,d)]:{message:'Validator for "'.concat(o,'" is not defined'),level:"warning",context:{validator:o,key:e.key,label:e.label}}})).flatten().value();e.component.validate=e.component.validate||{},e.component.validate.unique=e.component.unique,_.push(this.validate(e,"unique",e.validationValue,t,0,t,l,d)),e.component.validate.multiple=e.component.multiple,_.push(this.validate(e,"multiple",e.validationValue,t,0,t,l,d)),_.push.apply(_,p),_.push.apply(_,f(v));var k=function(o){return o=(0,r.default)(o).chain().flatten().compact().value(),(w||g)&&r.default.each(o,(function(r){r.message=e.t(w||r.message,{field:e.errorLabel,data:t,row:n,error:r}),r.context.hasLabel=!1})),u?o:r.default.reject(o,(function(e){return"warning"===e.level}))};return l?a.default.all(_).then(k):k(_)}},{key:"checkValidations",value:function(e,t,n,r,o,i){var a=this,u=t.map((function(t){return a.checkRule(e,t,n,r,o,i)})).reduce((function(e,t){return t?[].concat(f(e),f(t)):e}),[]).filter((function(e){return e})).reduce((function(e,t){return e[t.context.validator]=t,e}),{});return Object.values(u)}},{key:"checkRule",value:function(e,t,n,r,o,i){var a=s.default.getRule(t.rule),u=[];if(a){var l=new a(e,t.settings,this.config);o.map((function(o,a){var s=l.check(o,n,r,i);!0!==s&&u.push({level:t.level||"error",message:e.t(t.message||l.defaultMessage,{settings:t.settings,field:e.errorLabel,data:n,row:r,error:s}),context:{key:e.key,index:a,label:e.label,validator:t.rule}})}))}return 0!==u.length&&u}},{key:"check",get:function(){return this.checkComponent}},{key:"get",value:function(){r.default.get.call(this,arguments)}},{key:"each",value:function(){r.default.each.call(this,arguments)}},{key:"has",value:function(){r.default.has.call(this,arguments)}}],n&&y(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.ValidationChecker=_,_.config={db:null,token:null,form:null,submission:null};var k=new _;t.default=k},480:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nd||isNaN(c)||c<0||c>12||isNaN(f)||f<0||f>9999)}}])&&a(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),h}(d)},81365:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}}])&&i(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),p}(f)},58788:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n=t}}])&&i(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),p}(f)},36056:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n(30489),n(41539),n(12419),n(82526),n(41817),n(32165),n(66992),n(78783),n(33948),n(92222);var o=n(82531),i=u(n(30381)),a=u(n(96486));function u(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n=t}}])&&i(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),p}(f)},17579:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n=t}}])&&i(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),p}(f)},40535:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n=+t}}])&&i(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),p}(f)},49561:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}}])&&i(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),p}(f)},64753:function(e,t,n){"use strict";var r=n(480),o=n(31266),i=n(22762),a=n(81365),u=n(58788),l=n(35239),s=n(54266),c=n(89017),f=n(93942),d=n(40177),p=n(43117),h=n(36056),v=n(24391),y=n(17579),m=n(49561),b=n(86947),g=n(71912),w=n(18754),_=n(68135),k=n(40535),O=n(18722),x=n(30173);e.exports={custom:r,date:o,day:i,email:a,json:u,mask:l,max:s,maxDate:c,maxLength:f,maxWords:d,min:p,minDate:h,minLength:v,minWords:y,pattern:m,required:b,select:g,unique:w,url:_,minYear:k,maxYear:O,time:x}},27660:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n(12419),n(74819),n(38880),n(83593),n(47941),n(82526),n(54747),n(49337),n(41817),n(32165),n(66992),n(78783),n(33948),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n(74916),n(15306),n(57327),n(41539),n(92222),n(23123),n(21249),n(4723),n(26699),n(32023),n(69826),n(39714),n(30489);var o=n(19161),i=s(n(581)),a=n(82531),u=s(n(30381)),l=s(n(96486));function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t=2&&"en"!==i)return o.GlobalFormio.requireLibrary("flatpickr-".concat(i),"flatpickr-".concat(i),"".concat(o.GlobalFormio.cdn.flatpickr,"/l10n/").concat(i,".min.js"),!1,(function(){return n.initFlatpickr(t)}));n.initFlatpickr(t)}}))})).catch((function(e){console.warn(e)}))}},{key:"disableWeekends",get:function(){return function(e){return 0===e.getDay()||6===e.getDay()}}},{key:"disableWeekdays",get:function(){var e=this;return function(t){return!e.disableWeekends(t)}}},{key:"disableFunction",get:function(){var e=this;return function(t){return e.evaluate("return ".concat(e.settings.disableFunction),{date:t})}}},{key:"defineTimezone",value:function(){return!this.componentInstance.attached&&this.componentInstance.submissionTimezone?this.componentInstance.submissionTimezone:this.settings.timezone?this.settings.timezone:"submission"===this.settings.displayInTimezone&&this.settings.submissionTimezone?this.settings.submissionTimezone:"utc"===this.settings.displayInTimezone?"UTC":(0,a.currentTimezone)()}},{key:"timezone",get:function(){return this.defineTimezone()}},{key:"defaultSettings",get:function(){return h.defaultSettings}},{key:"addSuffix",value:function(e){var t=this;return this.addEventListener(e,"click",(function(){setTimeout((function(){t.calendar&&(!t.calendar.isOpen&&Date.now()-t.closedOn>200?t.calendar.open():t.calendar.isOpen&&t.calendar.close())}),0)})),e}},{key:"disabled",set:function(e){(function(e,t,n,r,o){if(!p(e,t,n,r||e)&&o)throw new Error("failed to set property")})(g(h.prototype),"disabled",e,this,!0),this.calendar&&(e?this.calendar._input.setAttribute("disabled","disabled"):this.calendar._input.removeAttribute("disabled"),this.calendar.close(),this.calendar.redraw())}},{key:"input",get:function(){return this.calendar?this.calendar.altInput:null}},{key:"disabledDates",get:function(){return this.settings.disabledDates?this.settings.disabledDates.split(",").map((function(e){var t=/\d{4}-\d{2}-\d{2}/g,n=e.match(t);if(n&&n.length)return 1===n.length?e.match(t)[0]:{from:e.match(t)[0],to:e.match(t)[1]}})):[]}},{key:"localeFormat",get:function(){var e="";return this.settings.enableDate&&(e+=this.defaultFormat.date),this.settings.enableTime&&(e+=this.defaultFormat.time),e}},{key:"dateTimeFormat",get:function(){return this.settings.useLocaleSettings?this.localeFormat:(0,a.convertFormatToFlatpickr)(this.dateFormat)}},{key:"dateFormat",get:function(){return l.default.get(this.settings,"format",w)}},{key:"getDateValue",value:function(e,t,n){return n?(0,a.momentDate)(e,this.valueFormat,this.timezone).format((0,a.convertFormatToMoment)(t)):(0,u.default)(e).format((0,a.convertFormatToMoment)(t))}},{key:"getValue",value:function(){if(!this.calendar)return v(g(h.prototype),"getValue",this).call(this);var e=this.calendar.selectedDates;return e&&e.length?e[0]instanceof Date?this.getDateValue(e[0],this.valueFormat,"date"===this.settings.saveAs):"Invalid Date":v(g(h.prototype),"getValue",this).call(this)}},{key:"isValueISO8601",value:function(e){return e&&"string"==typeof e&&e.match(/-[0-9]{2}T[0-9]{2}:/)}},{key:"setValue",value:function(e){var t="text"===this.settings.saveAs;if(!this.calendar)return e=e?(0,a.formatDate)(this.timezonesUrl,e,(0,a.convertFormatToMoment)(this.settings.format),this.timezone,(0,a.convertFormatToMoment)(this.valueMomentFormat)):e,v(g(h.prototype),"setValue",this).call(this,e);var n=this.loadZones();this.isValueISO8601(e)?this.calendar.setDate(e,!1):e?t||!this.settings.readOnly||n?this.calendar.setDate((0,u.default)(e,this.valueMomentFormat).toDate(),!1):this.calendar.setDate((0,a.momentDate)(e,this.valueFormat,this.timezone).toDate(),!1):this.calendar.clear(!1)}},{key:"getValueAsString",value:function(e,t){var n=t||this.dateFormat,r=this.calendar?this.valueFormat:this.settings.dateFormat;return"text"===this.settings.saveAs&&this.componentInstance.parent&&!this.settings.readOnly?(0,u.default)(e,(0,a.convertFormatToMoment)(r)).format((0,a.convertFormatToMoment)(r)):(0,a.formatDate)(this.timezonesUrl,e,n,this.timezone,(0,a.convertFormatToMoment)(r))}},{key:"setErrorClasses",value:function(e){this.input&&(e?(this.addClass(this.input,"is-invalid"),this.input.setAttribute("aria-invalid","true")):(this.removeClass(this.input,"is-invalid"),this.input.setAttribute("aria-invalid","false")))}},{key:"validationValue",value:function(e){return"string"==typeof e?new Date(e):e.map((function(e){return new Date(e)}))}},{key:"isCalendarElement",value:function(e){var t,n,r,o,i;return!e||!(null===(t=this.calendar)||void 0===t||null===(n=t.config)||void 0===n||null===(r=n.appendTo)||void 0===r||!r.contains(e))||(null===(o=this.calendar)||void 0===o||null===(i=o.calendarContainer)||void 0===i?void 0:i.contains(e))}},{key:"initFlatpickr",value:function(e){var t=this,n=this._input.value;if(this.calendar=new e(this._input,f(f({},this.settings),{},{disableMobile:!0})),n&&(this.isValueISO8601(n)?this.calendar.setDate((0,u.default)(n).toDate(),!1,this.settings.altFormat):this.calendar.setDate((0,u.default)(n,(0,a.convertFormatToMoment)(this.dateFormat)).toDate(),!1,this.settings.altFormat)),this.calendar.altInput.addEventListener("input",(function(e){t.settings.allowInput&&t.settings.currentValue!==e.target.value&&(t.settings.manualInputValue=e.target.value,t.settings.isManuallyOverriddenValue=!0,t.settings.currentValue=e.target.value),""===e.target.value&&t.calendar.selectedDates.length>0?(t.settings.wasDefaultValueChanged=!0,t.settings.defaultValue=e.target.value,t.calendar.clear()):t.settings.wasDefaultValueChanged=!1})),this.settings.readOnly||l.default.some(["MMMM"],(function(e){return l.default.includes(t.settings.format,e)}))||this.setInputMask(this.calendar._input,(0,a.convertFormatToMask)(this.settings.format)),k){var r=this.calendar._handlers.find((function(e){var n=e.event,r=e.element;return"blur"===n&&r===t.calendar._input}));this.calendar._input.removeEventListener("blur",r.handler),this.addEventListener(this.calendar._input,"blur",(function(e){var n=t.settings.shadowRoot?t.settings.shadowRoot.activeElement:document.activeElement,r=e.relatedTarget?e.relatedTarget:n;e.target===t.calendar._input&&!t.isCalendarElement(r)&&t.calendar.setDate(t.calendar._input.value,!0,e.target===t.calendar.altInput?t.calendar.config.altFormat:t.calendar.config.dateFormat)}))}this.addEventListener(this.calendar._input,"blur",(function(e){var n=t.settings.shadowRoot?t.settings.shadowRoot.activeElement:document.activeElement,r=e.relatedTarget?e.relatedTarget:n;if(k&&!r||t.isCalendarElement(r)){if(!t.calendar.input.value&&t.calendar.config.noCalendar){var o,i,l,s,c=(0,u.default)({hour:null===(o=t.calendar)||void 0===o||null===(i=o.config)||void 0===i?void 0:i.defaultHour,minute:null===(l=t.calendar)||void 0===l||null===(s=l.config)||void 0===s?void 0:s.defaultMinute}).toDate();t.calendar.setDate(c,!0,t.settings.format)}}else{var f=t.calendar.input.value,d=f?(0,u.default)(t.calendar.input.value,(0,a.convertFormatToMoment)(t.valueFormat)).toDate():f;t.calendar.setDate(d,!0,t.settings.altFormat)}})),this.addEventListener(this.calendar.altInput,"keydown",(function(e){13===e.keyCode&&t.calendar.isOpen&&(t.calendar.close(),e.stopPropagation())}))}},{key:"initShortcutButtonsPlugin",value:function(e){var t=this;this.settings.plugins=[e({button:this.component.shortcutButtons.map((function(e){return{label:e.label,attributes:e.attribute}})),onClick:function(e){var n=t.component.shortcutButtons[e].onClick,r=t.evaluate(n,{date:new Date},"date");t.calendar.setDate(r,!0)}})]}},{key:"getFlatpickrFormatDate",value:function(e){var t=this;return function(n,r){if(t.settings.readOnly&&r===t.settings.altFormat&&t.settings.submissionTimezone===t.timezone){if(t.loadZones())return e.formatDate(n,r);if(new Date(t.getValue()).toString()===n.toString()){var o=t.componentInstance.dataValue;return Array.isArray(o)&&(o=o[t.valueIndex]),(0,a.formatOffset)(t.timezonesUrl,e.formatDate.bind(e),new Date(o),r,t.timezone)}return(0,a.formatOffset)(t.timezonesUrl,e.formatDate.bind(e),n,r,t.timezone)}return e.formatDate(n,r)}}},{key:"destroy",value:function(){v(g(h.prototype),"destroy",this).call(this),this.calendar&&this.calendar.destroy()}}])&&d(t.prototype,n),r&&d(t,r),Object.defineProperty(t,"prototype",{writable:!1}),h}(i.default);t.default=O},581:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n(41539),n(12419),n(74819),n(38880),n(82526),n(41817),n(32165),n(66992),n(78783),n(33948),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n(19601),n(30489);var o=u(n(96486)),i=u(n(34558)),a=u(n(91459));function u(e){return e&&e.__esModule?e:{default:e}}function l(e,t){for(var n=0;n"+(null==(t=e.message)?"":t)+"\n"}},2101:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(68286);t.default={form:r.default}},83787:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return""+'
    \n
    \n '+(null==(t=e.sidebar)?"":t)+'\n
    \n
    \n '+(null==(t=e.form)?"":t)+"\n
    \n
    \n"}},48433:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(83787);t.default={form:r.default}},85539:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n ',e.disableBuilderActions||(n+='\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n '),n+"\n "+(null==(t=e.html)?"":t)+"\n
    \n"}},7581:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(85539);t.default={form:r.default}},82097:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return""+'
    \n '+(null==(t=e.html)?"":t)+"\n
    \n"}},2434:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(82097);t.default={form:r.default}},17894:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n
    \n

    '+(null==(t=e.t(e.componentInfo.title,{_userInput:!0}))?"":t)+" "+(null==(t=e.t("Component"))?"":t)+"

    \n
    \n ",e.helplinks&&(n+='\n \n"),n+='\n
    \n
    \n
    \n ",e.preview||(n+='\n
    \n \n \n \n
    \n "),n+="\n
    \n ",e.preview&&(n+='\n
    \n
    \n
    \n

    '+(null==(t=e.t("Preview"))?"":t)+'

    \n
    \n
    \n
    \n '+(null==(t=e.preview)?"":t)+"\n
    \n
    \n
    \n ",e.componentInfo.help&&(n+='\n
    \n '+(null==(t=e.componentInfo.help)?"":t)+"\n
    \n "),n+='\n
    \n \n \n \n
    \n
    \n "),n+"\n
    \n"}},58809:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(17894);t.default={form:r.default}},41852:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return""+'\n '+(null==(t=e.t("Drag and Drop a form component"))?"":t)+"\n\n"}},59624:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(41852);t.default={form:r.default}},70307:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n \n
    \n ',e.groups.forEach((function(e){n+="\n "+(null==(t=e)?"":t)+"\n "})),n+="\n
    \n
    \n"}},92470:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(70307);t.default={form:r.default}},74913:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n
    \n
    \n \n '+(null==(t=e.t(e.group.title,{_userInput:!0}))?"":t)+'\n \n
    \n
    \n \n
    \n ',e.group.componentOrder.length||e.subgroups.length?(n+="\n ",e.group.componentOrder.forEach((function(r){n+='\n \n ',e.group.components[r].icon&&(n+='\n \n '),n+="\n "+(null==(t=e.t(e.group.components[r].title,{_userInput:!0}))?"":t)+"\n \n "})),n+="\n "+(null==(t=e.subgroups.join(""))?"":t)+"\n "):n+="\n
    "+(null==(t=e.t("No Matches Found"))?"":t)+"
    \n ",n+="\n
    \n
    \n\n\n"}},64959:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(74913);t.default={form:r.default}},86227:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,e.component.columns.forEach((function(r,o){n+='\n
    \n '+(null==(t=e.columnComponents[o])?"":t)+"\n
    \n"})),n+="\n"}},7569:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(86227);t.default={form:r.default}},51382:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={"formio-tab-panel-active":"active","formio-tab-link-active":"active","formio-tab-link-container-active":"active"}},70897:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n '+(null==(t=r.hideLabel?"":e.t(r.label||r.title,{_userInput:!0}))?"":t)+"\n ",r.tooltip&&(n+=' '),n+="\n \n "})),n+="\n ",e.hasExtraColumn&&(n+="\n \n "),n+="\n \n \n "),n+='\n \n ',e.rows.forEach((function(r,o){n+="\n ",e.hasGroups&&e.groups[o]&&(n+='\n \n '+(null==(t=e.groups[o].label)?"":t)+"\n \n "),n+='\n \n ',e.component.reorder&&(n+='\n \n '),n+="\n ",e.columns.forEach((function(o){n+='\n \n "})),n+="\n ",e.hasExtraColumn&&(n+="\n ",e.hasRemoveButtons&&(n+='\n \n '),n+="\n ",e.canAddColumn&&(n+='\n \n "),n+="\n "),n+="\n \n "})),n+="\n \n ",e.hasAddButton&&e.hasBottomSubmit&&(n+='\n \n \n \n \n \n "),n+="\n
    \n ",!e.builder&&e.hasAddButton&&e.hasTopSubmit&&(n+='\n \n "),n+="\n
    \n \n \n '+(null==(t=r[o.key])?"":t)+"\n \n \n \n '+(null==(t=e.placeholder)?"":t)+"\n
    \n \n
    \n"}},5118:function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){var n,r="";return Array.prototype.join,r+='\n ',hasHeader&&(r+="\n \n \n ",columns.forEach((function(e){r+='\n \n "})),r+="\n \n \n "),r+="\n \n ",rows.forEach((function(e){r+="\n \n ",columns.forEach((function(t){r+='\n \n "})),r+="\n \n "})),r+="\n \n
    \n '+(null==(n=e.hideLabel?"":t(e.label||e.title))?"":n)+"\n ",e.tooltip&&(r+=' '),r+="\n
    \n '+(null==(n=e[t.key])?"":n)+"\n
    \n"}},14714:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(70897),o=n(5118);t.default={form:r.default,html:o.default}},97842:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n ',e.dayFirst&&e.showDay&&(n+='\n
    \n ',e.component.hideInputLabels||(n+='\n
    \n "),n+="\n ",e.showMonth&&(n+='\n
    \n ',e.component.hideInputLabels||(n+='\n
    \n "),n+="\n ",!e.dayFirst&&e.showDay&&(n+='\n
    \n ',e.component.hideInputLabels||(n+='\n
    \n "),n+="\n ",e.showYear&&(n+='\n
    \n ',e.component.hideInputLabels||(n+='\n
    \n "),n+'\n
    \n\n'}},11024:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(97842);t.default={form:r.default}},44033:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return'
    \n
    \n
    \n
    \n \n
    \n
    \n'}},95371:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(44033);t.default={form:r.default}},61424:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
      \n ',e.header&&(n+='\n
    • \n '+(null==(t=e.header)?"":t)+"\n
    • \n "),n+="\n ",e.rows.forEach((function(r,o){n+='\n
    • \n '+(null==(t=r)?"":t)+"\n ",e.openRows[o]&&!e.readOnly&&(n+='\n
      \n \n ",e.component.removeRow&&(n+='\n \n "),n+="\n
      \n "),n+='\n
      \n
      \n '+(null==(t=e.errors[o])?"":t)+"\n
      \n
      \n
    • \n "})),n+="\n ",e.footer&&(n+='\n \n "),n+="\n
    \n",!e.readOnly&&e.hasAddButton&&(n+='\n\n"),n+="\n"}},47456:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
      \n ',e.header&&(n+='\n
    • \n '+(null==(t=e.header)?"":t)+"\n
    • \n "),n+="\n ",e.rows.forEach((function(r,o){n+='\n
    • \n '+(null==(t=r)?"":t)+"\n ",e.openRows[o]&&!e.readOnly&&(n+='\n
      \n \n ",e.component.removeRow&&(n+='\n \n "),n+="\n
      \n "),n+='\n
      \n
      \n '+(null==(t=e.errors[o])?"":t)+"\n
      \n
      \n
    • \n "})),n+="\n ",e.footer&&(n+='\n \n "),n+="\n
    \n"}},43614:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(61424),o=n(47456);t.default={form:r.default,html:o.default}},44787:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+="

    "+(null==(t=e.t("error"))?"":t)+"

    \n
      \n ",e.errors.forEach((function(r){n+='\n '+(null==(t=r.message)?"":t)+"\n "})),n+="\n
    \n"}},40079:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(44787);t.default={form:r.default}},96735:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n ',e.label.hidden||(n+='\n
    \n '+(null==(t=e.labelMarkup)?"":t)+"\n
    \n "),n+="\n\n ",e.label.hidden&&e.label.className&&e.component.validate.required&&(n+='\n
    \n \n
    \n '),n+='\n\n
    \n '+(null==(t=e.element)?"":t)+"\n
    \n
    \n\n",e.component.description&&(n+='\n
    '+(null==(t=e.t(e.component.description,{_userInput:!0}))?"":t)+"
    \n"),n+"\n"}},63646:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,e.label.hidden||"bottom"===e.label.labelPosition||(n+="\n "+(null==(t=e.labelMarkup)?"":t)+"\n"),n+="\n\n",e.label.hidden&&e.label.className&&e.component.validate.required&&(n+='\n \n'),n+="\n\n"+(null==(t=e.element)?"":t)+"\n",e.label.hidden||"bottom"!==e.label.labelPosition||(n+="\n "+(null==(t=e.labelMarkup)?"":t)+"\n"),n+="\n",e.component.description&&(n+='\n
    '+(null==(t=e.t(e.component.description,{_userInput:!0}))?"":t)+"
    \n"),n+"\n"}},20798:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(96735),o=n(63646);t.default={align:r.default,form:o.default}},65526:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,e.self.imageUpload?(n+="\n
    \n ",e.files.forEach((function(r){n+='\n
    \n \n '+(null==(t=r.originalName||r.name)?\n ',e.disabled||(n+='\n \n '),n+="\n \n
    \n "})),n+="\n
    \n"):(n+='\n
      \n \n ",e.files.forEach((function(r){n+='\n
    • \n
      \n ',e.disabled||(n+='\n
      \n '),n+='\n
      '+(null==(t=r.originalName||r.name)?"":t)+"\n ",n+='\n
      \n
      '+(null==(t=e.fileSize(r.size))?"":t)+"
      \n ",e.self.hasTypes&&!e.disabled&&(n+='\n
      \n \n
      \n "),n+="\n ",e.self.hasTypes&&e.disabled&&(n+='\n
      '+(null==(t=r.fileType)?"":t)+"
      \n "),n+="\n
      \n
    • \n "})),n+="\n
    \n"),n+="\n",e.disabled||!e.component.multiple&&e.files.length||(n+="\n ",e.self.useWebViewCamera?n+='\n
    \n \n \n
    \n ":e.self.cameraMode?n+='\n
    \n \n
    \n \n \n ":(n+='\n
    \n '+(null==(t=e.t("Drop files to attach,"))?"":t)+"\n ",e.self.imageUpload&&e.component.webcam&&(n+='\n '+(null==(t=e.t("Use Camera,"))?"":t)+"\n "),n+="\n "+(null==(t=e.t("or"))?"":t)+' '+(null==(t=e.t("browse"))?"":t)+"\n
    \n "),n+="\n"),n+="\n",e.statuses.forEach((function(r){n+='\n
    \n
    \n
    '+(null==(t=r.originalName)?"":t)+'
    \n
    '+(null==(t=e.fileSize(r.size))?"":t)+'
    \n
    \n
    \n
    \n ',"progress"===r.status?n+='\n
    \n
    \n '+(null==(t=r.progress)?"":t)+"% "+(null==(t=e.t("Complete"))?"":t)+"\n
    \n
    \n ":"error"===r.status?n+='\n
    '+(null==(t=e.t(r.message))?"":t)+"
    \n ":n+='\n
    '+(null==(t=e.t(r.message))?"":t)+"
    \n ",n+="\n
    \n
    \n
    \n"})),n+="\n",e.component.storage&&!e.support.hasWarning||(n+='\n
    \n ',e.component.storage||(n+="\n

    "+(null==(t=e.t("No storage has been set for this field. File uploads are disabled until storage is set up."))?"":t)+"

    \n "),n+="\n ",e.support.filereader||(n+="\n

    "+(null==(t=e.t("File API & FileReader API not supported."))?"":t)+"

    \n "),n+="\n ",e.support.formdata||(n+="\n

    "+(null==(t=e.t("XHR2's FormData is not supported."))?"":t)+"

    \n "),n+="\n ",e.support.progress||(n+="\n

    "+(null==(t=e.t("XHR2's upload progress isn't supported."))?"":t)+"

    \n "),n+="\n
    \n"),n}},66565:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(65526);t.default={form:r.default}},18320:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return""+''+(null==(t=e.content)?"":t)+"\n"}},3429:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(18320);t.default={form:r.default}},42260:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if("fa"===e)switch(t){case"save":t="download";break;case"zoom-in":t="search-plus";break;case"zoom-out":t="search-minus";break;case"question-sign":t="question-circle";break;case"remove-circle":t="times-circle-o";break;case"new-window":t="window-restore";break;case"move":t="arrows"}return n?e+" "+e+"-"+t+" "+e+"-spin":e+" "+e+"-"+t}},65441:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(91033),o=n(48433),i=n(7581),a=n(2434),u=n(58809),l=n(59624),s=n(92470),c=n(64959),f=n(7569),d=n(51382),p=n(14714),h=n(11024),v=n(95371),y=n(43614),m=n(20798),b=n(66565),g=n(3429),w=n(42260),_=n(55691),k=n(17875),O=n(35284),x=n(49074),j=n(36786),P=n(85573),S=n(3499),C=n(12477),E=n(96950),M=n(61659),A=n(92882),R=n(80710),T=n(634),D=n(83980),I=n(95722),L=n(45546),V=n(68497),N=n(72065),F=n(48866),z=n(16299),U=n(2101),B=n(40079);t.default={transform:function(e,t){return t&&"class"===e&&this.cssClasses.hasOwnProperty(t.toString())?this.cssClasses[t.toString()]:t},handleBuilderSidebarScroll:function(e){e.scrollResizeObserver&&e.scrollResizeObserver.disconnect(),e.scrollResizeObserver=new r.default((function(){setTimeout((function(){var t=e.refs,n=t.form,r=t.sidebar,o=n&&n.parentNode&&n.parentNode.clientHeight,i=r&&r.clientHeight,a=r&&r.parentNode&&r.parentNode.style;a&&o&&i&&(a.height=Math.max(i+20,o)+"px")}))})),e.scrollResizeObserver.observe(e.refs.form),e.scrollResizeObserver.observe(e.refs.sidebar)},clearBuilderSidebarScroll:function(e){e.scrollResizeObserver&&(e.scrollResizeObserver.disconnect(),e.scrollResizeObserver=null)},defaultIconset:"glyphicon",iconClass:w.default,cssClasses:d.default,builder:o.default,builderComponent:i.default,builderComponents:a.default,builderEditForm:u.default,builderPlaceholder:l.default,builderSidebar:s.default,builderSidebarGroup:c.default,columns:f.default,datagrid:p.default,day:h.default,dialog:v.default,editgrid:y.default,field:m.default,file:b.default,icon:g.default,input:_.default,label:k.default,message:O.default,modaldialog:x.default,modaledit:j.default,multiValueRow:P.default,multiValueTable:S.default,panel:C.default,radio:E.default,resourceAdd:M.default,signature:A.default,survey:R.default,tab:T.default,table:D.default,well:I.default,wizard:L.default,wizardHeader:V.default,wizardHeaderClassic:N.default,wizardHeaderVertical:F.default,wizardNav:z.default,errorsList:B.default,alert:U.default}},25169:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";if(Array.prototype.join,(e.prefix||e.suffix)&&(n+='\n
    \n '),n+="\n ",e.prefix&&(n+='\n
    \n ',e.prefix instanceof HTMLElement?n+="\n "+(null==(t=e.t(e.prefix.outerHTML,{_userInput:!0}))?"":t)+"\n ":n+="\n "+(null==(t=e.t(e.prefix,{_userInput:!0}))?"":t)+"\n ",n+="\n
    \n "),n+="\n ",!e.component.editor&&!e.component.wysiwyg){for(var r in n+="\n <"+(null==(t=e.input.type)?"":t)+'\n ref="'+(null==(t=e.input.ref?e.input.ref:"input")?"":t)+'"\n ',e.input.attr)n+="\n "+(null==(t=r)?"":t)+'="'+(null==(t=e.input.attr[r])?"":t)+'"\n ';n+='\n id="'+(null==(t=e.instance.id)?"":t)+"-"+(null==(t=e.component.key)?"":t)+'"\n >'+(null==(t=e.input.content)?"":t)+"\n ",e.hasValueMaskInput&&(n+='\n \n '),n+="\n"}return n+="\n",(e.component.editor||e.component.wysiwyg)&&(n+='\n
    \n'),n+="\n",e.suffix&&(n+='\n
    \n ',e.suffix instanceof HTMLElement?n+="\n "+(null==(t=e.t(e.suffix.outerHTML,{_userInput:!0}))?"":t)+"\n ":n+="\n "+(null==(t=e.t(e.suffix,{_userInput:!0}))?"":t)+"\n ",n+="\n
    \n"),n+="\n",(e.prefix||e.suffix)&&(n+="\n
    \n"),n+="\n",e.component.showCharCount&&(n+='\n\n'),n+="\n",e.component.showWordCount&&(n+='\n\n'),n+"\n"}},81944:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    ',e.value?n+=null==(t=e.value)?"":t:n+="-",n+"
    \n"}},55691:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(25169),o=n(81944);t.default={form:r.default,html:o.default}},83340:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n ',e.label.hidden||(n+="\n "+(null==(t=e.t(e.component.label,{_userInput:!0}))?"":t)+"\n ",e.component.tooltip&&(n+='\n \n '),n+="\n "),n+"\n\n"}},17875:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(83340);t.default={form:r.default}},68059:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return""+'

    '+(null==(t=e.message)?"":t)+"

    \n"}},35284:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(68059);t.default={form:r.default}},64375:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return""+'
    \n
    \n
    \n \n '+(null==(t=e.t("Close"))?"":t)+'\n \n
    \n
    \n
    \n'}},49074:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(64375);t.default={form:r.default}},90685:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return""+'
    \n \n \n \n
    '+(null==(t=e.content)?"":t)+"
    \n
    \n"}},36786:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(90685);t.default={form:r.default}},1948:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n \n '+(null==(t=e.element)?"":t)+"\n \n ",e.disabled||(n+='\n \n \n \n '),n+"\n\n"}},85573:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1948);t.default={form:r.default}},48021:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n \n '+(null==(t=e.rows)?"":t)+"\n ",e.disabled||(n+='\n \n \n \n "),n+"\n \n
    \n \n
    \n"}},3499:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(48021);t.default={form:r.default}},16094:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n ',(!e.component.hideLabel||e.builder||e.component.collapsible||e.component.tooltip)&&(n+='\n
    \n

    \n ',e.component.collapsible&&(n+='\n \n '),n+="\n ",e.component.hideLabel&&!e.builder||(n+="\n "+(null==(t=e.t(e.component.title,{_userInput:!0}))?"":t)+"\n "),n+="\n ",e.component.tooltip&&(n+='\n \n '),n+="\n

    \n
    \n "),n+="\n ",e.collapsed&&!e.builder||(n+='\n
    \n '+(null==(t=e.children)?"":t)+"\n
    \n "),n+"\n
    \n"}},12477:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(16094);t.default={form:r.default}},22159:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n ',e.values.forEach((function(r){for(var o in n+='\n
    \n \n
    \n "})),n+="\n
    \n"}},31152:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,(n+='
    \n ')+"\n "+(null==(t=e.values.filter((function(t){return e.value===t.value||"object"==typeof e.value&&e.value.hasOwnProperty(t.value)&&e.value[t.value]})).map((function(t){return e.t(t.label,{_userInput:!0})})).join(", "))?"":t)+"\n
    \n"}},96950:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(22159),o=n(31152);t.default={form:r.default,html:o.default}},72264:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return""+'\n \n \n \n \n \n \n \n \n
    \n '+(null==(t=e.element)?"":t)+'\n
    \n \n
    \n"}},61659:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(72264);t.default={form:r.default}},16866:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+=(null==(t=e.element)?"":t)+'\n\n\n \n \n \n \n ',e.required&&(n+='\n \n '),n+='\n \n\n',e.component.footer&&(n+='\n \n"),n+"\n"}},96141:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return'\n'}},92882:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(16866),o=n(96141);t.default={form:r.default,html:o.default}},40207:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n \n \n \n ',e.component.values.forEach((function(r){n+='\n \n "})),n+="\n \n \n \n ",e.component.questions.forEach((function(r){n+="\n \n \n ",e.component.values.forEach((function(o){n+='\n \n '})),n+="\n \n "})),n+="\n \n
    \n '+(null==(t=e.t(r.label))?"":t)+"\n ",r.tooltip&&(n+='\n \n '),n+="\n
    \n "+(null==(t=e.t(r.label))?"":t)+"\n ",r.tooltip&&(n+='\n \n '),n+="\n \n \n
    \n"}},55754:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n \n ',e.component.questions.forEach((function(r){n+="\n \n \n \n \n "})),n+="\n \n
    "+(null==(t=e.t(r.label))?"":t)+"\n ",e.component.values.forEach((function(o){n+="\n ",e.value&&e.value.hasOwnProperty(r.value)&&e.value[r.value]===o.value&&(n+="\n "+(null==(t=e.t(o.label))?"":t)+"\n "),n+="\n "})),n+="\n
    \n"}},80710:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(40207),o=n(55754);t.default={form:r.default,html:o.default}},87603:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,e.component.components.forEach((function(r,o){n+='\n
    \n
    \n

    '+(null==(t=e.t(r.label,{_userInput:!0}))?"":t)+'

    \n
    \n
    \n '+(null==(t=e.tabComponents[o])?"":t)+"\n
    \n
    \n"})),n+="\n"}},17469:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n \n
    \n ',e.component.components.forEach((function(r,o){n+='\n
    '+(null==(t=e.tabComponents[o])?"":t)+"
    \n "})),n+="\n
    \n
    \n"}},634:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(87603),o=n(17469);t.default={flat:r.default,form:o.default}},94957:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n ',e.component.header&&e.component.header.length>0&&(n+="\n \n \n ",e.component.header.forEach((function(r){n+="\n \n "})),n+="\n \n \n "),n+="\n \n ",e.tableComponents.forEach((function(r,o){n+='\n \n ',r.forEach((function(r,i){n+='\n \n "})),n+="\n \n
    "+(null==(t=e.t(r,{_userInput:!0}))?"":t)+"
    \n "})),n+="\n
    \n"}},83980:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(94957);t.default={form:r.default}},25378:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return""+'
    \n
    \n '+(null==(t=e.children)?"":t)+"\n
    \n
    \n"}},95722:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(25378);t.default={form:r.default}},55040:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return""+'
    '+(null==(t=e.t(e.component.title,{_userInput:!0}))?"":t)+"
    \n"}},24088:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n
    \n ',"wizardHeaderVertical"===e.wizardHeaderType?n+='\n
    \n
    \n '+(null==(t=e.wizardHeader)?"":t)+'\n
    \n
    \n '+(null==(t=e.components)?"":t)+'\n
    \n
    \n
    \n '+(null==(t=e.wizardNav)?"":t)+"\n
    \n ":n+=" \n "+(null==(t=e.wizardHeader)?"":t)+'\n
    \n '+(null==(t=e.components)?"":t)+"\n
    \n "+(null==(t=e.wizardNav)?"":t)+"\n ",n+" \n
    \n
    "}},45546:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(55040),o=n(24088);t.default={form:o.default,builder:r.default}},38917:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n"}},68497:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(38917);t.default={form:r.default}},18760:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n"}},72065:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(18760);t.default={form:r.default}},34611:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n"}},48866:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(34611);t.default={form:r.default}},81201:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
      \n ',e.buttons.cancel&&(n+='\n
    • \n \n
    • \n "),n+="\n ",e.buttons.previous&&(n+='\n
    • \n \n
    • \n "),n+="\n ",e.buttons.next&&(n+='\n
    • \n \n
    • \n "),n+="\n ",e.buttons.submit&&(n+='\n
    • \n \n
    • \n "),n+"\n
    \n"}},16299:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(81201);t.default={form:r.default}},68531:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(65441);t.default={bootstrap3:r.default}},95295:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(38571);t.default={framework:"semantic",templates:r.default}},38571:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5487);t.default={semantic:r.default}},89345:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";for(var r in Array.prototype.join,n+=""+(null==(t=e.message)?"":t)+"\n"}},35692:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(89345);t.default={form:r.default}},23138:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return""+'
    \n
    \n '+(null==(t=e.sidebar)?"":t)+'\n
    \n
    \n '+(null==(t=e.form)?"":t)+"\n
    \n
    \n"}},84594:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(23138);t.default={form:r.default}},16751:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return""+'
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n '+(null==(t=e.html)?"":t)+"\n
    \n"}},61967:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(16751);t.default={form:r.default}},84558:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return""+'
    \n '+(null==(t=e.html)?"":t)+"\n
    \n"}},13332:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(84558);t.default={form:r.default}},26680:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n
    \n

    '+(null==(t=e.t(e.componentInfo.title))?"":t)+" "+(null==(t=e.t("Component"))?"":t)+'

    \n
    \n \n
    \n
    \n
    \n ",e.preview||(n+='\n
    \n \n \n \n
    \n "),n+="\n
    \n ",e.preview&&(n+='\n
    \n
    \n '+(null==(t=e.t("Preview"))?"":t)+'\n
    \n
    \n '+(null==(t=e.preview)?"":t)+"\n
    \n ",e.componentInfo.help&&(n+='\n
    \n '+(null==(t=e.componentInfo.help)?"":t)+"\n
    \n "),n+='\n
    \n \n \n \n
    \n
    \n "),n+"\n
    \n"}},85097:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(26680);t.default={form:r.default}},36634:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return""+'\n Drag and Drop a form component\n\n'}},59144:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(36634);t.default={form:r.default}},21102:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n ',e.groups.forEach((function(e){n+="\n "+(null==(t=e)?"":t)+"\n "})),n+="\n
    \n"}},67767:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(21102);t.default={form:r.default}},3414:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n
    \n
    \n \n '+(null==(t=e.t(e.group.title))?"":t)+'\n \n
    \n
    \n
    \n
    \n \n
    \n ',e.group.componentOrder.forEach((function(r){n+='\n \n ',e.group.components[r].icon&&(n+='\n \n '),n+="\n "+(null==(t=e.t(e.group.components[r].title))?"":t)+"\n \n "})),n+="\n "+(null==(t=e.subgroups.join(""))?"":t)+"\n
    \n
    \n\n"}},18840:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3414);t.default={form:r.default}},17517:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n
    \n '+(null==(t=e.sidebar)?"":t)+'\n
    \n
    \n \n
    \n"}},29733:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(17517);t.default={form:r.default}},50052:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";for(var r in Array.prototype.join,n+="<"+(null==(t=e.input.type)?"":t)+'\n ref="button"\n class="ui button '+(null==(t=e.transform("theme",e.component.theme))?"":t)+" "+(null==(t=e.component.customClass)?"":t)+'"\n ',e.input.attr)n+="\n "+(null==(t=r)?"":t)+'="'+(null==(t=e.input.attr[r])?"":t)+'"\n ';return n+="\n>\n",e.component.leftIcon&&(n+=' '),n+="\n"+(null==(t=e.input.content)?"":t)+"\n",e.component.tooltip&&(n+='\n \n'),n+="\n",e.component.rightIcon&&(n+=' '),n+"\n\n
    \n \n
    \n'}},12749:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"\n"}},96871:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(50052),o=n(12749);t.default={form:r.default,html:o.default}},1237:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";for(var r in Array.prototype.join,n+='
    \n <'+(null==(t=e.input.type)?"":t)+'\n ref="input"\n id="'+(null==(t=e.id)?"":t)+'"\n ',e.input.attr)n+="\n "+(null==(t=r)?"":t)+'="'+(null==(t=e.input.attr[r])?"":t)+'"\n ';return n+="\n ",e.checked&&(n+="checked=true"),n+="\n >\n \n \n
    \n"}},51266:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n
    ',e.checked?n+="True":n+="False",n+"
    \n"}},48424:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1237),o=n(51266);t.default={form:r.default,html:o.default}},46530:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n ',e.component.columns.forEach((function(r,o){n+='\n
    \n '+(null==(t=e.columnComponents[o])?"":t)+"\n
    \n "})),n+="\n
    \n"}},43960:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(46530);t.default={form:r.default}},23475:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n ',e.visible&&(n+="\n "+(null==(t=e.children)?"":t)+'\n
    \n '),n+"\n
    \n"}},71427:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(23475);t.default={form:r.default}},51284:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={"has-error":"error","is-invalid":"error","formio-tab-panel-active":"active","formio-tab-link-active":"active","formio-tab-link-container-active":"active"}},15894:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n '+(null==(t=r.hideLabel?"":e.t(r.label||r.title))?"":t)+"\n ",r.tooltip&&(n+=' '),n+="\n \n "})),n+="\n ",e.hasExtraColumn&&(n+="\n \n "),n+="\n \n \n "),n+='\n \n ',e.rows.forEach((function(r,o){n+="\n ",e.hasGroups&&e.groups[o]&&(n+='\n \n '+(null==(t=e.groups[o].label)?"":t)+"\n \n "),n+='\n \n ',e.component.reorder&&(n+='\n \n '),n+="\n ",e.columns.forEach((function(o){n+='\n \n "})),n+="\n ",e.hasExtraColumn&&(n+="\n ",e.hasRemoveButtons&&(n+='\n \n '),n+="\n ",e.canAddColumn&&(n+='\n \n "),n+="\n "),n+="\n \n "})),n+="\n \n ",e.hasAddButton&&e.hasBottomSubmit&&(n+='\n \n \n \n \n \n "),n+="\n
    \n ",e.hasAddButton&&e.hasTopSubmit&&(n+='\n \n "),n+="\n
    \n \n \n '+(null==(t=r[o.key])?"":t)+"\n \n \n \n '+(null==(t=e.placeholder)?"":t)+"\n
    \n \n
    \n"}},46719:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n ',e.hasHeader&&(n+="\n \n \n ",e.columns.forEach((function(r){n+='\n \n "})),n+="\n \n \n "),n+="\n \n ",e.rows.forEach((function(r){n+="\n \n ",e.columns.forEach((function(o){n+='\n \n "})),n+="\n \n "})),n+="\n \n
    \n '+(null==(t=r.hideLabel?"":e.t(r.label||r.title))?"":t)+"\n ",r.tooltip&&(n+=' '),n+="\n
    \n '+(null==(t=r[o.key])?"":t)+"\n
    \n"}},99126:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(15894),o=n(46719);t.default={form:r.default,html:o.default}},20173:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n ',e.dayFirst&&e.showDay&&(n+='\n
    \n \n "+(null==(t=e.day)?"":t)+"\n
    \n "),n+="\n ",e.showMonth&&(n+='\n
    \n \n "+(null==(t=e.month)?"":t)+"\n
    \n "),n+="\n ",!e.dayFirst&&e.showDay&&(n+='\n
    \n \n "+(null==(t=e.day)?"":t)+"\n
    \n "),n+="\n ",e.showYear&&(n+='\n
    \n \n "+(null==(t=e.year)?"":t)+"\n
    \n "),n+'\n
    \n\n'}},20446:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(20173);t.default={form:r.default}},97483:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n ',e.header&&(n+='\n
    \n '+(null==(t=e.header)?"":t)+"\n
    \n "),n+="\n ",e.rows.forEach((function(r,o){n+='\n
    \n '+(null==(t=r)?"":t)+"\n ",e.openRows[o]&&!e.readOnly&&(n+='\n
    \n \n ",e.component.removeRow&&(n+='\n \n "),n+="\n
    \n "),n+='\n
    \n
    \n '+(null==(t=e.errors[o])?"":t)+"\n
    \n
    \n
    \n "})),n+="\n ",e.footer&&(n+='\n \n "),n+="\n
    \n",!e.readOnly&&e.hasAddButton&&(n+='\n\n"),n+="\n"}},5264:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n ',e.header&&(n+='\n
    \n '+(null==(t=e.header)?"":t)+"\n
    \n "),n+="\n ",e.rows.forEach((function(r,o){n+='\n
    \n '+(null==(t=r)?"":t)+"\n ",e.openRows[o]&&!e.readOnly&&(n+='\n
    \n \n ",e.component.removeRow&&(n+='\n \n "),n+="\n
    \n "),n+='\n
    \n
    \n '+(null==(t=e.errors[o])?"":t)+"\n
    \n
    \n
    \n "})),n+="\n ",e.footer&&(n+='\n \n "),n+="\n
    \n"}},96943:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(97483),o=n(5264);t.default={form:r.default,html:o.default}},95463:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+="

    "+(null==(t=e.t("error"))?"":t)+"

    \n
      \n ",e.errors.forEach((function(r){n+='\n '+(null==(t=r.message)?"":t)+"\n "})),n+="\n
    \n\n"}},69240:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(95463);t.default={form:r.default}},64129:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n ',e.label.hidden||(n+='\n
    \n '+(null==(t=e.labelMarkup)?"":t)+"\n
    \n "),n+="\n\n ",e.label.hidden&&e.label.className&&e.component.validate.required&&(n+='\n
    \n \n
    \n '),n+='\n\n
    \n '+(null==(t=e.element)?"":t)+"\n
    \n
    \n\n",e.component.description&&(n+='\n
    '+(null==(t=e.t(e.component.description))?"":t)+"
    \n"),n+"\n"}},99809:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,e.label.hidden||"bottom"===e.label.labelPosition||(n+="\n "+(null==(t=e.labelMarkup)?"":t)+"\n"),n+="\n\n",e.label.hidden&&e.label.className&&e.component.validate.required&&(n+='\n \n'),n+="\n\n"+(null==(t=e.element)?"":t)+"\n",e.label.hidden||"bottom"!==e.label.labelPosition||(n+="\n "+(null==(t=e.labelMarkup)?"":t)+"\n"),n+="\n",e.component.description&&(n+='\n
    '+(null==(t=e.t(e.component.description))?"":t)+"
    \n"),n+"\n"}},4061:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(99809),o=n(64129);t.default={form:r.default,align:o.default}},54427:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n \n '+(null==(t=e.t(e.component.legend))?"":t)+"\n ",e.component.tooltip&&(n+='\n \n '),n+="\n ",e.collapsed||(n+='\n
    \n '+(null==(t=e.children)?"":t)+"\n
    \n "),n+"\n
    \n"}},72297:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(54427);t.default={form:r.default}},75762:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,e.self.imageUpload?(n+="\n
    \n ",e.files.forEach((function(r){n+='\n
    \n \n '+(null==(t=r.originalName||r.name)?\n ',e.disabled||(n+='\n \n '),n+="\n \n
    \n "})),n+="\n
    \n"):(n+='\n
    \n
    \n
    \n ',e.disabled||(n+='\n
    \n '),n+='\n
    \n
    '+(null==(t=e.t("Size"))?"":t)+"
    \n ",e.self.hasTypes&&(n+='\n
    '+(null==(t=e.t("Type"))?"":t)+"
    \n "),n+="\n
    \n
    \n ",e.files.forEach((function(r){n+='\n
  • \n
    \n ',e.disabled||(n+='\n
    \n '),n+='\n
    '+(null==(t=r.originalName||r.name)?"":t)+"\n ",n+='\n
    \n
    '+(null==(t=e.fileSize(r.size))?"":t)+"
    \n ",e.self.hasTypes&&!e.disabled&&(n+='\n
    \n \n
    \n "),n+="\n ",e.self.hasTypes&&e.disabled&&(n+='\n
    '+(null==(t=r.fileType)?"":t)+"
    \n "),n+="\n
    \n
  • \n "})),n+="\n
    \n"),n+="\n",e.disabled||!e.component.multiple&&e.files.length||(n+="\n ",e.self.useWebViewCamera?n+='\n
    \n \n \n
    \n ":e.self.cameraMode?n+='\n
    \n \n
    \n \n \n ":(n+='\n
    \n '+(null==(t=e.t("Drop files to attach,"))?"":t)+"\n ",e.self.imageUpload&&e.component.webcam&&(n+='\n '+(null==(t=e.t("Use Camera,"))?"":t)+"\n "),n+="\n "+(null==(t=e.t("or"))?"":t)+' '+(null==(t=e.t("browse"))?"":t)+"\n
    \n "),n+="\n"),n+="\n",e.statuses.forEach((function(r){n+='\n
    \n
    \n
    '+(null==(t=r.originalName)?"":t)+'
    \n
    '+(null==(t=e.fileSize(r.size))?"":t)+'
    \n
    \n
    \n
    \n ',"progress"===r.status?n+='\n
    \n
    \n '+(null==(t=r.progress)?"":t)+"% "+(null==(t=e.t("Complete"))?"":t)+"\n
    \n
    \n ":n+='\n
    '+(null==(t=e.t(r.message))?"":t)+"
    \n ",n+="\n
    \n
    \n
    \n"})),n+="\n",e.component.storage&&!e.support.hasWarning||(n+='\n
    \n ',e.component.storage||(n+="\n

    "+(null==(t=e.t("No storage has been set for this field. File uploads are disabled until storage is set up."))?"":t)+"

    \n "),n+="\n ",e.support.filereader||(n+="\n

    "+(null==(t=e.t("File API & FileReader API not supported."))?"":t)+"

    \n "),n+="\n ",e.support.formdata||(n+="\n

    "+(null==(t=e.t("XHR2's FormData is not supported."))?"":t)+"

    \n "),n+="\n ",e.support.progress||(n+="\n

    "+(null==(t=e.t("XHR2's upload progress isn't supported."))?"":t)+"

    \n "),n+="\n
    \n"),n+="\n"}},7007:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(75762);t.default={form:r.default}},84481:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return""+''+(null==(t=e.content)?"":t)+"\n"}},63751:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(84481);t.default={form:r.default}},83836:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r={"plus-squre-o":"plus square outline","minus-squre-o":"minus square outline","question-sign":"question circle","remove-circle":"trash alternate outline","new-window":"external alternate","files-o":"file outline",move:"arrows alternate",link:"linkify"};return r.hasOwnProperty(t)&&(t=r[t]),t=(t=(t=t||"").replace(/-/g," ")).replace(/ o$/," outline"),n?"icon "+t+" loading":"icon "+t}},5487:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n\n',e.prefix&&(n+='\n\n"),n+="\n",!e.component.editor&&!e.component.wysiwyg){for(var r in n+="\n<"+(null==(t=e.input.type)?"":t)+'\n ref="'+(null==(t=e.input.ref?e.input.ref:"input")?"":t)+'"\n ',e.input.attr)n+="\n "+(null==(t=r)?"":t)+'="'+(null==(t=e.input.attr[r])?"":t)+'"\n ';n+='\n id="'+(null==(t=e.instance.id)?"":t)+"-"+(null==(t=e.component.key)?"":t)+'"\n>'+(null==(t=e.input.content)?"":t)+"\n"}return n+="\n",(e.component.editor||e.component.wysiwyg)&&(n+='\n
    \n'),n+="\n",e.component.showCharCount&&(n+='\n\n'),n+="\n",e.component.showWordCount&&(n+='\n\n'),n+="\n",e.suffix&&(n+='\n
    \n',e.suffix instanceof HTMLElement?n+="\n "+(null==(t=e.t(e.suffix.outerHTML))?"":t)+"\n":n+="\n "+(null==(t=e.t(e.suffix))?"":t)+"\n",n+="\n
    \n"),n+"\n
    \n"}},2305:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    ',e.value?n+=null==(t=e.value)?"":t:n+="-",n+"
    \n"}},89504:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(10090),o=n(2305);t.default={form:r.default,html:o.default}},31520:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n ',e.label.hidden||(n+="\n "+(null==(t=e.t(e.component.label))?"":t)+"\n ",e.component.tooltip&&(n+='\n \n '),n+="\n "),n+"\n\n"}},61206:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(31520);t.default={form:r.default}},83345:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return'
    \n
    \n
    \n
    \n
    \n'}},11042:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(83345);t.default={form:r.default}},23432:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"Loading...\n"}},72763:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(23432);t.default={form:r.default}},18182:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return""+'
    \n '+(null==(t=e.message)?"":t)+"\n
    \n"}},30490:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(18182);t.default={form:r.default}},9637:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n \n '+(null==(t=e.element)?"":t)+"\n \n ",e.disabled||(n+='\n \n \n \n '),n+"\n\n"}},71580:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9637);t.default={form:r.default}},42412:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n \n '+(null==(t=e.rows)?"":t)+"\n ",e.disabled||(n+='\n \n \n \n "),n+"\n \n
    \n \n
    \n"}},29367:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(42412);t.default={form:r.default}},4860:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,(!e.component.hideLabel||e.builder||e.component.collapsible||e.component.tooltip)&&(n+='\n

    \n ',e.component.collapsible&&(n+='\n \n '),n+="\n ",e.component.hideLabel&&!e.builder||(n+="\n "+(null==(t=e.t(e.component.title))?"":t)+"\n "),n+="\n ",e.component.tooltip&&(n+='\n \n '),n+="\n

    \n"),n+="\n",e.collapsed&&!e.builder||(n+='\n
    \n '+(null==(t=e.children)?"":t)+"\n
    \n"),n+"\n"}},88576:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4860);t.default={form:r.default}},84275:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n ',e.values.forEach((function(r){for(var o in n+='\n
    \n
    \n <'+(null==(t=e.input.type)?"":t)+'\n ref="input"\n ',e.input.attr)n+="\n "+(null==(t=o)?"":t)+'="'+(null==(t=e.input.attr[o])?"":t)+'"\n ';n+='\n value="'+(null==(t=r.value)?"":t)+'"\n ',(e.value===r.value||"object"==typeof e.value&&e.value.hasOwnProperty(r.value)&&e.value[r.value])&&(n+="\n checked=true\n "),n+="\n ",r.disabled&&(n+="\n disabled=true\n "),n+='\n id="'+(null==(t=e.instance.root&&e.instance.root.id)?"":t)+"-"+(null==(t=e.id)?"":t)+"-"+(null==(t=e.row)?"":t)+"-"+(null==(t=r.value)?"":t)+'"\n >\n \n
    \n
    \n "})),n+="\n
    \n"}},2227:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,(n+='
    \n ')+"\n "+(null==(t=e.values.filter((function(t){return e.value===t.value||"object"==typeof e.value&&e.value.hasOwnProperty(t.value)&&e.value[t.value]})).map((function(t){return e.t(t.label)})).join(", "))?"":t)+"\n
    \n"}},1746:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(84275),o=n(2227);t.default={form:r.default,html:o.default}},25396:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return""+'\n \n \n \n \n \n \n \n \n
    \n '+(null==(t=e.element)?"":t)+'\n
    \n \n
    \n"}},56533:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(25396);t.default={form:r.default}},5721:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";for(var r in Array.prototype.join,n+='\n\n'}},80260:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    ',e.value?n+=null==(t=e.self.itemValueForHTMLMode(e.value))?"":t:n+="-",n+"
    \n"}},60587:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5721),o=n(80260);t.default={form:r.default,html:o.default}},93593:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";for(var r in Array.prototype.join,n+="\n"}},60345:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,e.selected&&(n+=null==(t=e.t(e.option.label))?"":t),n+"\n"}},14668:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(93593),o=n(60345);t.default={form:r.default,html:o.default}},90538:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+=(null==(t=e.element)?"":t)+'\n\n\n \n \n \n \n ',e.required&&(n+='\n \n '),n+='\n \n\n',e.component.footer&&(n+='\n \n"),n+"\n"}},96515:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return'\n'}},95339:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(90538),o=n(96515);t.default={form:r.default,html:o.default}},87090:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n \n \n \n ',e.component.values.forEach((function(r){n+='\n \n "})),n+="\n \n \n \n ",e.component.questions.forEach((function(r){n+="\n \n \n ",e.component.values.forEach((function(o){n+='\n \n '})),n+="\n \n "})),n+="\n \n
    '+(null==(t=e.t(r.label))?"":t)+"
    "+(null==(t=e.t(r.label))?"":t)+"\n \n
    \n"}},13556:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n \n ',e.component.questions.forEach((function(r){n+="\n \n \n \n \n "})),n+="\n \n
    "+(null==(t=e.t(r.label))?"":t)+"\n ",e.component.values.forEach((function(o){n+="\n ",e.value&&e.value.hasOwnProperty(r.value)&&e.value[r.value]===o.value&&(n+="\n "+(null==(t=e.t(o.label))?"":t)+"\n "),n+="\n "})),n+="\n
    \n"}},88020:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(87090),o=n(13556);t.default={form:r.default,html:o.default}},74216:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,e.component.components.forEach((function(r,o){n+='\n

    '+(null==(t=e.t(r.label))?"":t)+'

    \n
    \n '+(null==(t=e.tabComponents[o])?"":t)+"\n
    \n"})),n+="\n"}},25238:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n \n ",e.component.components.forEach((function(r,o){n+='\n
    '+(null==(t=e.tabComponents[o])?"":t)+"
    \n "})),n+="\n
    \n"}},31533:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(74216),o=n(25238);t.default={flat:r.default,form:o.default}},949:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n ',e.component.header&&e.component.header.length>0&&(n+="\n \n \n ",e.component.header.forEach((function(r){n+="\n \n "})),n+="\n \n \n "),n+="\n \n ",e.tableComponents.forEach((function(r,o){n+='\n \n ',r.forEach((function(r,o){n+='\n \n "})),n+="\n \n
    "+(null==(t=e.t(r))?"":t)+"
    \n "})),n+="\n
    \n"}},83725:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(949);t.default={form:r.default}},37552:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,e.node.isRoot?n+='\n
    \n
    \n ':n+='\n
    \n ',n+="\n ",e.content&&(n+='\n
    \n '+(null==(t=e.content)?"":t)+"\n
    \n "),n+="\n ",e.childNodes&&e.childNodes.length&&(n+='\n
    \n '+(null==(t=e.childNodes.join(""))?"":t)+"\n
    \n "),n+="\n ",e.node.isRoot?n+="\n
    \n
    \n ":n+="\n
    \n",n+"\n"}},62441:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(37552);t.default={form:r.default}},16016:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n
    '+(null==(t=e.children)?"":t)+"
    \n ",e.readOnly||(n+='\n
    \n \n
    \n "),n+"\n
    \n"}},12923:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(16016),o=n(47379);t.default={treeView:{form:o.default},treeEdit:{form:r.default}}},47379:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n
    \n ',e.values.forEach((function(e){n+='\n
    \n '+(null==(t=e)?"":t)+"\n
    \n "})),n+='\n
    \n
    \n ',e.node.hasChildren&&(n+='\n \n
    \n '),n+="\n ",e.readOnly||(n+='\n \n
    \n \n
    \n \n ",e.node.revertAvailable&&(n+='\n
    \n \n "),n+="\n "),n+="\n
    \n
    \n
    \n
    \n"}},21710:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return""+'

    '+(null==(t=e.t(e.component.title))?"":t)+"

    \n"}},32178:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return""+'
    '+(null==(t=e.children)?"":t)+"
    \n"}},4599:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(21710),o=n(32178);t.default={form:o.default,builder:r.default}},2230:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return""+'
    \n
    \n '+(null==(t=e.children)?"":t)+"\n
    \n
    \n"}},76709:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2230);t.default={form:r.default}},70084:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return""+'
    '+(null==(t=e.t(e.component.title))?"":t)+"
    \n"}},16466:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n
    \n ',"wizardHeaderVertical"===e.wizardHeaderType?n+='\n
    \n
    \n '+(null==(t=e.wizardHeader)?"":t)+'\n
    \n
    \n
    \n '+(null==(t=e.components)?"":t)+'\n
    \n
    \n
    \n
    \n
    \n '+(null==(t=e.wizardNav)?"":t)+"\n
    \n
    \n ":n+=" \n "+(null==(t=e.wizardHeader)?"":t)+'\n
    \n '+(null==(t=e.components)?"":t)+"\n
    \n "+(null==(t=e.wizardNav)?"":t)+"\n ",n+" \n
    \n
    "}},42317:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(70084),o=n(16466);t.default={form:o.default,builder:r.default}},93363:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n"}},86739:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(93363);t.default={form:r.default}},28267:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n"}},7130:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(28267);t.default={form:r.default}},81256:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n"}},54815:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(81256);t.default={form:r.default}},41993:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
    \n ',e.buttons.cancel&&(n+='\n
    \n \n
    \n "),n+="\n ",e.buttons.previous&&(n+='\n
    \n \n
    \n "),n+="\n ",e.buttons.next&&(n+='\n
    \n \n
    \n "),n+="\n ",e.buttons.submit&&(n+='\n
    \n \n
    \n "),n+"\n
    \n"}},86858:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(41993);t.default={form:r.default}},47853:function(e){e.exports=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=e.inputElement,n=e.afterUpdate,r=(0,a.default)(e),o=function(e){var t=e.target.value;r.update(t),"function"==typeof n&&n(t)};return t.addEventListener("input",o),r.update(t.value),{textMaskInputElement:r,destroy:function(){t.removeEventListener("input",o)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.conformToMask=void 0,t.maskInput=o;var i=n(2);Object.defineProperty(t,"conformToMask",{enumerable:!0,get:function(){return r(i).default}});var a=r(n(5));t.default=o},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.placeholderChar="_",t.strFunction="function"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!(0,o.isArray)(t)){if((void 0===t?"undefined":r(t))!==i.strFunction)throw new Error("Text-mask:conformToMask; The mask property must be an array.");t=t(e,n),t=(0,o.processCaretTraps)(t).maskWithoutCaretTraps}var l=n.guide,s=void 0===l||l,c=n.previousConformedValue,f=void 0===c?u:c,d=n.placeholderChar,p=void 0===d?i.placeholderChar:d,h=n.placeholder,v=void 0===h?(0,o.convertMaskToPlaceholder)(t,p):h,y=n.currentCaretPosition,m=n.keepCharPositions,b=!1===s&&void 0!==f,g=e.length,w=f.length,_=v.length,k=t.length,O=g-w,x=O>0,j=y+(x?-O:0),P=j+Math.abs(O);if(!0===m&&!x){for(var S=u,C=j;C=j&&t=0;M--){var A=E[M].char;A!==p&&A===v[M>=j&&w===k?M-O:M]&&E.splice(M,1)}var R=u,T=!1;e:for(var D=0;D<_;D++){var I=v[D];if(I===p){if(E.length>0)for(;E.length>0;){var L=E.shift(),V=L.char,N=L.isNew;if(V===p&&!0!==b){R+=p;continue e}if(t[D].test(V)){if(!0===m&&!1!==N&&f!==u&&!1!==s&&x){for(var F=E.length,z=null,U=0;U0&&void 0!==arguments[0]?arguments[0]:i,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.placeholderChar;if(!r(e))throw new Error("Text-mask:convertMaskToPlaceholder; The mask property must be an array.");if(-1!==e.indexOf(t))throw new Error("Placeholder character must not be used as part of the mask. Please specify a character that is not present in your mask as your placeholder character.\n\nThe placeholder character that was received is: "+JSON.stringify(t)+"\n\nThe mask that was received is: "+JSON.stringify(e));return e.map((function(e){return e instanceof RegExp?t:e})).join("")},t.isArray=r,t.isString=function(e){return"string"==typeof e||e instanceof String},t.isNumber=function(e){return"number"==typeof e&&void 0===e.length&&!isNaN(e)},t.isNil=function(e){return null==e},t.processCaretTraps=function(e){for(var t=[],n=void 0;-1!==(n=e.indexOf(a));)t.push(n),e.splice(n,1);return{maskWithoutCaretTraps:e,indexes:t}};var o=n(1),i=[],a="[]"},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.previousConformedValue,o=void 0===t?r:t,i=e.previousPlaceholder,a=void 0===i?r:i,u=e.currentCaretPosition,l=void 0===u?0:u,s=e.conformedValue,c=e.rawValue,f=e.placeholderChar,d=e.placeholder,p=e.indexesOfPipedChars,h=void 0===p?n:p,v=e.caretTrapIndexes,y=void 0===v?n:v;if(0===l||!c.length)return 0;var m=c.length,b=o.length,g=d.length,w=s.length,_=m-b,k=_>0;if(_>1&&!k&&0!==b)return l;var O=0,x=void 0,j=void 0;if(!k||o!==s&&s!==d){var P=s.toLowerCase(),S=c.toLowerCase().substr(0,l).split(r).filter((function(e){return-1!==P.indexOf(e)}));j=S[S.length-1];var C=a.substr(0,S.length).split(r).filter((function(e){return e!==f})).length,E=d.substr(0,S.length).split(r).filter((function(e){return e!==f})).length,M=E!==C,A=void 0!==a[S.length-1]&&void 0!==d[S.length-2]&&a[S.length-1]!==f&&a[S.length-1]!==d[S.length-1]&&a[S.length-1]===d[S.length-2];!k&&(M||A)&&C>0&&d.indexOf(j)>-1&&void 0!==c[l]&&(x=!0,j=c[l]);for(var R=h.map((function(e){return P[e]})),T=R.filter((function(e){return e===j})).length,D=S.filter((function(e){return e===j})).length,I=d.substr(0,d.indexOf(f)).split(r).filter((function(e,t){return e===j&&c[t]!==e})).length,L=I+D+T+(x?1:0),V=0,N=0;N=L));N++);}else O=l-_;if(k){for(var F=O,z=O;z<=g;z++)if(d[z]===f&&(F=z),d[z]===f||-1!==y.indexOf(z)||z===g)return F}else if(x){for(var U=O-1;U>=0;U--)if(s[U]===j||-1!==y.indexOf(U)||0===U)return U}else for(var B=O;B>=0;B--)if(d[B-1]===f||-1!==y.indexOf(B)||0===B)return B};var n=[],r=""},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){(n?n.activeElement:document.activeElement)===e&&(v?y((function(){return e.setSelectionRange(t,t,p)}),0):e.setSelectionRange(t,t,p))}function i(e){if((0,c.isString)(e))return e;if((0,c.isNumber)(e))return String(e);if(null==e)return d;throw new Error("The 'value' provided to Text Mask needs to be a string or a number. The value received was:\n\n "+JSON.stringify(e))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:e,p=r.inputElement,v=r.mask,y=r.guide,m=r.pipe,b=r.placeholderChar,g=void 0===b?f.placeholderChar:b,w=r.keepCharPositions,_=void 0!==w&&w,k=r.showMask,O=void 0!==k&&k;if(void 0===n&&(n=p.value),n!==t.previousConformedValue){(void 0===v?"undefined":u(v))===h&&void 0!==v.pipe&&void 0!==v.mask&&(m=v.pipe,v=v.mask);var x=void 0,j=void 0;if(v instanceof Array&&(x=(0,c.convertMaskToPlaceholder)(v,g)),!1!==v){var P=i(n),S=p.selectionEnd,C=t.previousConformedValue,E=t.previousPlaceholder,M=void 0;if((void 0===v?"undefined":u(v))===f.strFunction){if(!1===(j=v(P,{currentCaretPosition:S,previousConformedValue:C,placeholderChar:g})))return;var A=(0,c.processCaretTraps)(j);j=A.maskWithoutCaretTraps,M=A.indexes,x=(0,c.convertMaskToPlaceholder)(j,g)}else j=v;var R={previousConformedValue:C,guide:y,placeholderChar:g,pipe:m,placeholder:x,currentCaretPosition:S,keepCharPositions:_},T=(0,s.default)(P,j,R).conformedValue,D=(void 0===m?"undefined":u(m))===f.strFunction,I={};D&&(!1===(I=m(T,a({rawValue:P},R)))?I={value:C,rejected:!0}:(0,c.isString)(I)&&(I={value:I}));var L=D?I.value:T,V=(0,l.default)({previousConformedValue:C,previousPlaceholder:E,conformedValue:L,placeholder:x,rawValue:P,currentCaretPosition:S,placeholderChar:g,indexesOfPipedChars:I.indexesOfPipedChars,caretTrapIndexes:M}),N=L===x&&0===V?O?x:d:L;t.previousConformedValue=N,t.previousPlaceholder=x,p.value!==N&&(P.includes("e-")?p.value=P:p.value=N,o(p,V,e.shadowRoot))}}}}};var l=r(n(4)),s=r(n(2)),c=n(3),f=n(1),d="",p="none",h="object",v="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),y="undefined"!=typeof requestAnimationFrame?requestAnimationFrame:setTimeout}])},4389:function(e,t){t.defaults={},t.set=function(e,n,r){var o=r||{},i=t.defaults,a=o.expires||i.expires,u=o.domain||i.domain,l=void 0!==o.path?o.path:void 0!==i.path?i.path:"/",s=void 0!==o.secure?o.secure:i.secure,c=void 0!==o.httponly?o.httponly:i.httponly,f=void 0!==o.samesite?o.samesite:i.samesite,d=a?new Date("number"==typeof a?(new Date).getTime()+864e5*a:a):0;document.cookie=e.replace(/[^+#$&^`|]/g,encodeURIComponent).replace("(","%28").replace(")","%29")+"="+n.replace(/[^+#$&/:<-\[\]-}]/g,encodeURIComponent)+(d&&d.getTime()>=0?";expires="+d.toUTCString():"")+(u?";domain="+u:"")+(l?";path="+l:"")+(s?";secure":"")+(c?";httponly":"")+(f?";samesite="+f:"")},t.get=function(e){for(var t=document.cookie.split(";");t.length;){var n=t.pop(),r=n.indexOf("=");if(r=r<0?n.length:r,decodeURIComponent(n.slice(0,r).replace(/^\s+/,""))===e)return decodeURIComponent(n.slice(r+1))}return null},t.erase=function(e,n){t.set(e,"",{expires:-1,domain:n&&n.domain,path:n&&n.path,secure:0,httponly:0})},t.all=function(){for(var e={},t=document.cookie.split(";");t.length;){var n=t.pop(),r=n.indexOf("=");r=r<0?n.length:r,e[decodeURIComponent(n.slice(0,r).replace(/^\s+/,""))]=decodeURIComponent(n.slice(r+1))}return e}},19662:function(e,t,n){var r=n(60614),o=n(66330),i=TypeError;e.exports=function(e){if(r(e))return e;throw i(o(e)+" is not a function")}},39483:function(e,t,n){var r=n(4411),o=n(66330),i=TypeError;e.exports=function(e){if(r(e))return e;throw i(o(e)+" is not a constructor")}},96077:function(e,t,n){var r=n(60614),o=String,i=TypeError;e.exports=function(e){if("object"==typeof e||r(e))return e;throw i("Can't set "+o(e)+" as a prototype")}},51223:function(e,t,n){var r=n(5112),o=n(70030),i=n(3070).f,a=r("unscopables"),u=Array.prototype;null==u[a]&&i(u,a,{configurable:!0,value:o(null)}),e.exports=function(e){u[a][e]=!0}},31530:function(e,t,n){"use strict";var r=n(28710).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},25787:function(e,t,n){var r=n(47976),o=TypeError;e.exports=function(e,t){if(r(t,e))return e;throw o("Incorrect invocation")}},19670:function(e,t,n){var r=n(70111),o=String,i=TypeError;e.exports=function(e){if(r(e))return e;throw i(o(e)+" is not an object")}},7556:function(e,t,n){var r=n(47293);e.exports=r((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}))},18533:function(e,t,n){"use strict";var r=n(42092).forEach,o=n(9341)("forEach");e.exports=o?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}},48457:function(e,t,n){"use strict";var r=n(49974),o=n(46916),i=n(47908),a=n(53411),u=n(97659),l=n(4411),s=n(26244),c=n(86135),f=n(18554),d=n(71246),p=Array;e.exports=function(e){var t=i(e),n=l(this),h=arguments.length,v=h>1?arguments[1]:void 0,y=void 0!==v;y&&(v=r(v,h>2?arguments[2]:void 0));var m,b,g,w,_,k,O=d(t),x=0;if(!O||this===p&&u(O))for(m=s(t),b=n?new this(m):p(m);m>x;x++)k=y?v(t[x],x):t[x],c(b,x,k);else for(_=(w=f(t,O)).next,b=n?new this:[];!(g=o(_,w)).done;x++)k=y?a(w,v,[g.value,x],!0):g.value,c(b,x,k);return b.length=x,b}},41318:function(e,t,n){var r=n(45656),o=n(51400),i=n(26244),a=function(e){return function(t,n,a){var u,l=r(t),s=i(l),c=o(a,s);if(e&&n!=n){for(;s>c;)if((u=l[c++])!=u)return!0}else for(;s>c;c++)if((e||c in l)&&l[c]===n)return e||c||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},42092:function(e,t,n){var r=n(49974),o=n(1702),i=n(68361),a=n(47908),u=n(26244),l=n(65417),s=o([].push),c=function(e){var t=1==e,n=2==e,o=3==e,c=4==e,f=6==e,d=7==e,p=5==e||f;return function(h,v,y,m){for(var b,g,w=a(h),_=i(w),k=r(v,y),O=u(_),x=0,j=m||l,P=t?j(h,O):n||d?j(h,0):void 0;O>x;x++)if((p||x in _)&&(g=k(b=_[x],x,w),e))if(t)P[x]=g;else if(g)switch(e){case 3:return!0;case 5:return b;case 6:return x;case 2:s(P,b)}else switch(e){case 4:return!1;case 7:s(P,b)}return f?-1:o||c?c:P}};e.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6),filterReject:c(7)}},81194:function(e,t,n){var r=n(47293),o=n(5112),i=n(7392),a=o("species");e.exports=function(e){return i>=51||!r((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},9341:function(e,t,n){"use strict";var r=n(47293);e.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){return 1},1)}))}},83658:function(e,t,n){"use strict";var r=n(19781),o=n(43157),i=TypeError,a=Object.getOwnPropertyDescriptor,u=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=u?function(e,t){if(o(e)&&!a(e,"length").writable)throw i("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},41589:function(e,t,n){var r=n(51400),o=n(26244),i=n(86135),a=Array,u=Math.max;e.exports=function(e,t,n){for(var l=o(e),s=r(t,l),c=r(void 0===n?l:n,l),f=a(u(c-s,0)),d=0;s0;)e[r]=e[--r];r!==i++&&(e[r]=n)}return e},u=function(e,t,n,r){for(var o=t.length,i=n.length,a=0,u=0;a9007199254740991)throw t("Maximum allowed index exceeded");return e}},48324:function(e){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},98509:function(e,t,n){var r=n(80317)("span").classList,o=r&&r.constructor&&r.constructor.prototype;e.exports=o===Object.prototype?void 0:o},68886:function(e,t,n){var r=n(88113).match(/firefox\/(\d+)/i);e.exports=!!r&&+r[1]},7871:function(e,t,n){var r=n(83823),o=n(35268);e.exports=!r&&!o&&"object"==typeof window&&"object"==typeof document},83823:function(e){e.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},30256:function(e,t,n){var r=n(88113);e.exports=/MSIE|Trident/.test(r)},71528:function(e,t,n){var r=n(88113),o=n(17854);e.exports=/ipad|iphone|ipod/i.test(r)&&void 0!==o.Pebble},6833:function(e,t,n){var r=n(88113);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},35268:function(e,t,n){var r=n(84326),o=n(17854);e.exports="process"==r(o.process)},71036:function(e,t,n){var r=n(88113);e.exports=/web0s(?!.*chrome)/i.test(r)},88113:function(e,t,n){var r=n(35005);e.exports=r("navigator","userAgent")||""},7392:function(e,t,n){var r,o,i=n(17854),a=n(88113),u=i.process,l=i.Deno,s=u&&u.versions||l&&l.version,c=s&&s.v8;c&&(o=(r=c.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=+r[1]),e.exports=o},98008:function(e,t,n){var r=n(88113).match(/AppleWebKit\/(\d+)\./);e.exports=!!r&&+r[1]},80748:function(e){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},82109:function(e,t,n){var r=n(17854),o=n(31236).f,i=n(68880),a=n(98052),u=n(13072),l=n(99920),s=n(54705);e.exports=function(e,t){var n,c,f,d,p,h=e.target,v=e.global,y=e.stat;if(n=v?r:y?r[h]||u(h,{}):(r[h]||{}).prototype)for(c in t){if(d=t[c],f=e.dontCallGetSet?(p=o(n,c))&&p.value:n[c],!s(v?c:h+(y?".":"#")+c,e.forced)&&void 0!==f){if(typeof d==typeof f)continue;l(d,f)}(e.sham||f&&f.sham)&&i(d,"sham",!0),a(n,c,d,e)}}},47293:function(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},27007:function(e,t,n){"use strict";n(74916);var r=n(1702),o=n(98052),i=n(22261),a=n(47293),u=n(5112),l=n(68880),s=u("species"),c=RegExp.prototype;e.exports=function(e,t,n,f){var d=u(e),p=!a((function(){var t={};return t[d]=function(){return 7},7!=""[e](t)})),h=p&&!a((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[s]=function(){return n},n.flags="",n[d]=/./[d]),n.exec=function(){return t=!0,null},n[d](""),!t}));if(!p||!h||n){var v=r(/./[d]),y=t(d,""[e],(function(e,t,n,o,a){var u=r(e),l=t.exec;return l===i||l===c.exec?p&&!a?{done:!0,value:v(t,n,o)}:{done:!0,value:u(n,t,o)}:{done:!1}}));o(String.prototype,e,y[0]),o(c,d,y[1])}f&&l(c[d],"sham",!0)}},76677:function(e,t,n){var r=n(47293);e.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},22104:function(e,t,n){var r=n(34374),o=Function.prototype,i=o.apply,a=o.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?a.bind(i):function(){return a.apply(i,arguments)})},49974:function(e,t,n){var r=n(1702),o=n(19662),i=n(34374),a=r(r.bind);e.exports=function(e,t){return o(e),void 0===t?e:i?a(e,t):function(){return e.apply(t,arguments)}}},34374:function(e,t,n){var r=n(47293);e.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},27065:function(e,t,n){"use strict";var r=n(1702),o=n(19662),i=n(70111),a=n(92597),u=n(50206),l=n(34374),s=Function,c=r([].concat),f=r([].join),d={},p=function(e,t,n){if(!a(d,t)){for(var r=[],o=0;o]*>)/g,c=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,n,r,f,d){var p=n+e.length,h=r.length,v=c;return void 0!==f&&(f=o(f),v=s),u(d,v,(function(o,u){var s;switch(a(u,0)){case"$":return"$";case"&":return e;case"`":return l(t,0,n);case"'":return l(t,p);case"<":s=f[l(u,1,-1)];break;default:var c=+u;if(0===c)return o;if(c>h){var d=i(c/10);return 0===d?o:d<=h?void 0===r[d-1]?a(u,1):r[d-1]+a(u,1):o}s=r[c-1]}return void 0===s?"":s}))}},17854:function(e,t,n){var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},92597:function(e,t,n){var r=n(1702),o=n(47908),i=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return i(o(e),t)}},3501:function(e){e.exports={}},842:function(e,t,n){var r=n(17854);e.exports=function(e,t){var n=r.console;n&&n.error&&(1==arguments.length?n.error(e):n.error(e,t))}},60490:function(e,t,n){var r=n(35005);e.exports=r("document","documentElement")},64664:function(e,t,n){var r=n(19781),o=n(47293),i=n(80317);e.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},68361:function(e,t,n){var r=n(1702),o=n(47293),i=n(84326),a=Object,u=r("".split);e.exports=o((function(){return!a("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?u(e,""):a(e)}:a},79587:function(e,t,n){var r=n(60614),o=n(70111),i=n(27674);e.exports=function(e,t,n){var a,u;return i&&r(a=t.constructor)&&a!==n&&o(u=a.prototype)&&u!==n.prototype&&i(e,u),e}},42788:function(e,t,n){var r=n(1702),o=n(60614),i=n(5465),a=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(e){return a(e)}),e.exports=i.inspectSource},62423:function(e,t,n){var r=n(82109),o=n(1702),i=n(3501),a=n(70111),u=n(92597),l=n(3070).f,s=n(8006),c=n(1156),f=n(52050),d=n(69711),p=n(76677),h=!1,v=d("meta"),y=0,m=function(e){l(e,v,{value:{objectID:"O"+y++,weakData:{}}})},b=e.exports={enable:function(){b.enable=function(){},h=!0;var e=s.f,t=o([].splice),n={};n[v]=1,e(n).length&&(s.f=function(n){for(var r=e(n),o=0,i=r.length;ob;b++)if((w=M(e[b]))&&s(v,w))return w;return new h(!1)}y=c(e,m)}for(_=j?e.next:y.next;!(k=o(_,y)).done;){try{w=M(k.value)}catch(e){d(y,"throw",e)}if("object"==typeof w&&w&&s(v,w))return w}return new h(!1)}},99212:function(e,t,n){var r=n(46916),o=n(19670),i=n(58173);e.exports=function(e,t,n){var a,u;o(e);try{if(!(a=i(e,"return"))){if("throw"===t)throw n;return n}a=r(a,e)}catch(e){u=!0,a=e}if("throw"===t)throw n;if(u)throw a;return o(a),n}},63061:function(e,t,n){"use strict";var r=n(13383).IteratorPrototype,o=n(70030),i=n(79114),a=n(58003),u=n(97497),l=function(){return this};e.exports=function(e,t,n,s){var c=t+" Iterator";return e.prototype=o(r,{next:i(+!s,n)}),a(e,c,!1,!0),u[c]=l,e}},51656:function(e,t,n){"use strict";var r=n(82109),o=n(46916),i=n(31913),a=n(76530),u=n(60614),l=n(63061),s=n(79518),c=n(27674),f=n(58003),d=n(68880),p=n(98052),h=n(5112),v=n(97497),y=n(13383),m=a.PROPER,b=a.CONFIGURABLE,g=y.IteratorPrototype,w=y.BUGGY_SAFARI_ITERATORS,_=h("iterator"),k="keys",O="values",x="entries",j=function(){return this};e.exports=function(e,t,n,a,h,y,P){l(n,t,a);var S,C,E,M=function(e){if(e===h&&I)return I;if(!w&&e in T)return T[e];switch(e){case k:case O:case x:return function(){return new n(this,e)}}return function(){return new n(this)}},A=t+" Iterator",R=!1,T=e.prototype,D=T[_]||T["@@iterator"]||h&&T[h],I=!w&&D||M(h),L="Array"==t&&T.entries||D;if(L&&(S=s(L.call(new e)))!==Object.prototype&&S.next&&(i||s(S)===g||(c?c(S,g):u(S[_])||p(S,_,j)),f(S,A,!0,!0),i&&(v[A]=j)),m&&h==O&&D&&D.name!==O&&(!i&&b?d(T,"name",O):(R=!0,I=function(){return o(D,this)})),h)if(C={values:M(O),keys:y?I:M(k),entries:M(x)},P)for(E in C)(w||R||!(E in T))&&p(T,E,C[E]);else r({target:t,proto:!0,forced:w||R},C);return i&&!P||T[_]===I||p(T,_,I,{name:h}),v[t]=I,C}},13383:function(e,t,n){"use strict";var r,o,i,a=n(47293),u=n(60614),l=n(70111),s=n(70030),c=n(79518),f=n(98052),d=n(5112),p=n(31913),h=d("iterator"),v=!1;[].keys&&("next"in(i=[].keys())?(o=c(c(i)))!==Object.prototype&&(r=o):v=!0),!l(r)||a((function(){var e={};return r[h].call(e)!==e}))?r={}:p&&(r=s(r)),u(r[h])||f(r,h,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:v}},97497:function(e){e.exports={}},26244:function(e,t,n){var r=n(17466);e.exports=function(e){return r(e.length)}},56339:function(e,t,n){var r=n(47293),o=n(60614),i=n(92597),a=n(19781),u=n(76530).CONFIGURABLE,l=n(42788),s=n(29909),c=s.enforce,f=s.get,d=Object.defineProperty,p=a&&!r((function(){return 8!==d((function(){}),"length",{value:8}).length})),h=String(String).split("String"),v=e.exports=function(e,t,n){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!i(e,"name")||u&&e.name!==t)&&(a?d(e,"name",{value:t,configurable:!0}):e.name=t),p&&n&&i(n,"arity")&&e.length!==n.arity&&d(e,"length",{value:n.arity});try{n&&i(n,"constructor")&&n.constructor?a&&d(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=c(e);return i(r,"source")||(r.source=h.join("string"==typeof t?t:"")),e};Function.prototype.toString=v((function(){return o(this)&&f(this).source||l(this)}),"toString")},74758:function(e){var t=Math.ceil,n=Math.floor;e.exports=Math.trunc||function(e){var r=+e;return(r>0?n:t)(r)}},95948:function(e,t,n){var r,o,i,a,u,l,s,c,f=n(17854),d=n(49974),p=n(31236).f,h=n(20261).set,v=n(6833),y=n(71528),m=n(71036),b=n(35268),g=f.MutationObserver||f.WebKitMutationObserver,w=f.document,_=f.process,k=f.Promise,O=p(f,"queueMicrotask"),x=O&&O.value;x||(r=function(){var e,t;for(b&&(e=_.domain)&&e.exit();o;){t=o.fn,o=o.next;try{t()}catch(e){throw o?a():i=void 0,e}}i=void 0,e&&e.enter()},v||b||m||!g||!w?!y&&k&&k.resolve?((s=k.resolve(void 0)).constructor=k,c=d(s.then,s),a=function(){c(r)}):b?a=function(){_.nextTick(r)}:(h=d(h,f),a=function(){h(r)}):(u=!0,l=w.createTextNode(""),new g(r).observe(l,{characterData:!0}),a=function(){l.data=u=!u})),e.exports=x||function(e){var t={fn:e,next:void 0};i&&(i.next=t),o||(o=t,a()),i=t}},78523:function(e,t,n){"use strict";var r=n(19662),o=TypeError,i=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw o("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)};e.exports.f=function(e){return new i(e)}},3929:function(e,t,n){var r=n(47850),o=TypeError;e.exports=function(e){if(r(e))throw o("The method doesn't accept regular expressions");return e}},83009:function(e,t,n){var r=n(17854),o=n(47293),i=n(1702),a=n(41340),u=n(53111).trim,l=n(81361),s=r.parseInt,c=r.Symbol,f=c&&c.iterator,d=/^[+-]?0x/i,p=i(d.exec),h=8!==s(l+"08")||22!==s(l+"0x16")||f&&!o((function(){s(Object(f))}));e.exports=h?function(e,t){var n=u(a(e));return s(n,t>>>0||(p(d,n)?16:10))}:s},21574:function(e,t,n){"use strict";var r=n(19781),o=n(1702),i=n(46916),a=n(47293),u=n(81956),l=n(25181),s=n(55296),c=n(47908),f=n(68361),d=Object.assign,p=Object.defineProperty,h=o([].concat);e.exports=!d||a((function(){if(r&&1!==d({b:1},d(p({},"a",{enumerable:!0,get:function(){p(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),o="abcdefghijklmnopqrst";return e[n]=7,o.split("").forEach((function(e){t[e]=e})),7!=d({},e)[n]||u(d({},t)).join("")!=o}))?function(e,t){for(var n=c(e),o=arguments.length,a=1,d=l.f,p=s.f;o>a;)for(var v,y=f(arguments[a++]),m=d?h(u(y),d(y)):u(y),b=m.length,g=0;b>g;)v=m[g++],r&&!i(p,y,v)||(n[v]=y[v]);return n}:d},70030:function(e,t,n){var r,o=n(19670),i=n(36048),a=n(80748),u=n(3501),l=n(60490),s=n(80317),c=n(6200)("IE_PROTO"),f=function(){},d=function(e){return"